void () { final String root = "idea_core"; addPluginXml(root, """ <id>com.intellij</id> <extensionPoints> <extensionPoint name="completion.contributor"/> <extensionPoint name="myService" beanClass="foo.MyServiceDescriptor"/> </extensionPoints> """); addPluginXml("indirect", """ <id>com.intellij.indirect</id> <extensionPoints> <extensionPoint name="indirect"/> </extensionPoints> """); addPluginXml("custom", """ <id>com.intellij.custom</id> <depends>com.intellij.indirect</depends> <extensionPoints> <extensionPoint name="custom"/> </extensionPoints> """); addPluginXml("notInDependencies", """ <id>com.intellij.notincluded</id> <extensionPoints> <extensionPoint name="notInDependencies"/> </extensionPoints> """); myFixture.addClass("package foo; public class MyRunnable implements java.lang.Runnable {}"); myFixture.addClass("package foo; @Deprecated public abstract class MyDeprecatedEP {}"); myFixture.addClass("package foo; public class MyDeprecatedEPImpl extends foo.MyDeprecatedEP {}"); myFixture.addClass("package foo; @Deprecated(forRemoval=true) public interface MyDeprecatedForRemovalEP {}"); myFixture.addClass("package foo; public class MyDeprecatedForRemovalEPImpl implements MyDeprecatedForRemovalEP {}"); myFixture.addClass("package foo; import org.jetbrains.annotations.ApiStatus.Experimental; " + "@Experimental public class MyExperimentalEP { " + " @com.intellij.util.xmlb.annotations.Attribute " + " @Experimental public String experimentalAttribute; " + "}"); myFixture.addClass("package foo; import org.jetbrains.annotations.ApiStatus.ScheduledForRemoval; " + "@ScheduledForRemoval(inVersion = \"removeVersion\") " + "@Deprecated " + "public class MyScheduledForRemovalEP {" + " @com.intellij.util.xmlb.annotations.Attribute " + " @Deprecated" + " @ScheduledForRemoval " + " public String scheduledForRemovalAttribute; " + "}"); myFixture.addClass("package foo; import org.jetbrains.annotations.ApiStatus.Internal; " + "@Internal public class MyInternalEP {" + " @com.intellij.util.xmlb.annotations.Attribute " + " @Internal public String internalAttribute; " + "}"); myFixture.addClass("package foo; import org.jetbrains.annotations.ApiStatus.Obsolete; " + "@Obsolete public class MyObsoleteEP {" + " @com.intellij.util.xmlb.annotations.Attribute " + " @Obsolete public String obsoleteAttribute; " + "}"); myFixture.addClass("package foo; " + "import com.intellij.util.xmlb.annotations.Attribute; " + "import com.intellij.util.xmlb.annotations.Property; " + "@Property(style = Property.Style.ATTRIBUTE) " + "public class ClassLevelProperty {" + " public String classLevel;"+ " @Attribute(\"customAttributeName\") public int intProperty; " + "}"); myFixture.addClass("package foo; " + "import com.intellij.util.xmlb.annotations.Attribute; " + "import com.intellij.openapi.extensions.RequiredElement; " + "public class MyServiceDescriptor { " + " @Attribute public String serviceImplementation; " + " @Attribute public java.util.concurrent.TimeUnit timeUnit; " + " @Attribute public java.lang.Integer integerNullable; " + " @Attribute public int intPropertyForClass; " + " @Attribute @RequiredElement(allowEmpty=true) public String canBeEmptyString; " + " @Attribute public boolean forClass; " + " @Attribute(\"class\") public boolean _class; " + " @Attribute(\"myClassName\") public boolean className; " + "}"); configureByFile(); myFixture.copyFileToProject("ExtensionsHighlighting-included.xml"); myFixture.copyFileToProject("ExtensionsHighlighting-via-depends.xml"); myFixture.checkHighlighting(true, false, false); myFixture.testHighlighting("ExtensionsHighlighting-included.xml"); myFixture.testHighlighting("ExtensionsHighlighting-via-depends.xml"); }