mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
IJ-MR-135481 [lombok] IDEA-352727 Support incomplete mode
- highlighting test for logs GitOrigin-RevId: 517909418304c83e1fa67c4bfde0c3aed274d22d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9531a30d8e
commit
f3b00ccc67
@@ -0,0 +1,35 @@
|
||||
package de.plushnikov.intellij.plugin.highlights;
|
||||
|
||||
import com.intellij.openapi.application.WriteAction;
|
||||
import com.intellij.openapi.project.IncompleteDependenciesService;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static com.intellij.openapi.project.IncompleteDependenciesServiceKt.asAutoCloseable;
|
||||
|
||||
public class IncompleteModeHighlightTest extends AbstractLombokHighlightsTest {
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return super.getBasePath() + "/incomplete";
|
||||
}
|
||||
|
||||
public void testLogs() {
|
||||
doIncompleteTest();
|
||||
}
|
||||
|
||||
private void doIncompleteTest() {
|
||||
IncompleteDependenciesService service = getProject().getService(IncompleteDependenciesService.class);
|
||||
try (var ignored = asAutoCloseable(WriteAction.compute(() -> service.enterIncompleteState()))) {
|
||||
String name = getTestName(false);
|
||||
myFixture.configureByFile(name + ".java");
|
||||
myFixture.testHighlighting(true, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected LightProjectDescriptor getProjectDescriptor() {
|
||||
return JAVA_LATEST;
|
||||
}
|
||||
}
|
||||
9
plugins/lombok/testData/highlights/incomplete/Logs.java
Normal file
9
plugins/lombok/testData/highlights/incomplete/Logs.java
Normal file
@@ -0,0 +1,9 @@
|
||||
import <info descr="Not resolved until the project is fully loaded">lombok</info>.<info descr="Not resolved until the project is fully loaded">extern</info>.<info descr="Not resolved until the project is fully loaded">slf4j</info>.<info descr="Not resolved until the project is fully loaded">Slf4j</info>;
|
||||
|
||||
@<info descr="Not resolved until the project is fully loaded">Slf4j</info>
|
||||
public class Logs {
|
||||
|
||||
public static void main(String[] args) {
|
||||
log.<info descr="Not resolved until the project is fully loaded">info</info>("Hello World!");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user