mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 13:31:28 +07:00
[devkit] support 'loading' attribute for 'module' tag in plugin.xml (IJPL-161359)
GitOrigin-RevId: 0ac07cca0eea815508edcc1363ac88fdd5b49032
This commit is contained in:
committed by
intellij-monorepo-bot
parent
860837cd20
commit
e0f8efbb23
@@ -3,7 +3,6 @@ package org.jetbrains.idea.devkit.dom;
|
||||
|
||||
import com.intellij.ide.presentation.Presentation;
|
||||
import com.intellij.util.xml.*;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.idea.devkit.dom.impl.ModuleDescriptorNameConverter;
|
||||
|
||||
@@ -26,5 +25,24 @@ public interface ContentDescriptor extends DomElement {
|
||||
@NameValue(referencable = false)
|
||||
@Convert(ModuleDescriptorNameConverter.class)
|
||||
GenericAttributeValue<IdeaPlugin> getName();
|
||||
|
||||
@NotNull
|
||||
@Stubbed
|
||||
GenericAttributeValue<ModuleLoadingRule> getLoading();
|
||||
|
||||
enum ModuleLoadingRule implements NamedEnum {
|
||||
REQUIRED("required"), OPTIONAL("optional"), ON_DEMAND("on-demand");
|
||||
|
||||
private final String myValue;
|
||||
|
||||
ModuleLoadingRule(@NotNull String value) {
|
||||
myValue = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return myValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<idea-plugin>
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<content>
|
||||
<module name="requiredModule" loading="required"/>
|
||||
<module name="onDemandModule" loading="on-demand"/>
|
||||
<module name="mainModule" loading="<error descr="Unknown enum value 'unknown'">unknown</error>"/>
|
||||
</content>
|
||||
</idea-plugin>
|
||||
@@ -0,0 +1,3 @@
|
||||
<idea-plugin>
|
||||
|
||||
</idea-plugin>
|
||||
@@ -0,0 +1,3 @@
|
||||
<idea-plugin>
|
||||
|
||||
</idea-plugin>
|
||||
@@ -0,0 +1,3 @@
|
||||
<idea-plugin>
|
||||
|
||||
</idea-plugin>
|
||||
@@ -72,6 +72,10 @@ public class PluginXmlContentDependencyDescriptorTest extends JavaCodeInsightFix
|
||||
public void testContentDescriptorDuplicatedHighlighting() {
|
||||
doHighlightingTest();
|
||||
}
|
||||
|
||||
public void testContentDescriptorLoadingAttribute() {
|
||||
doHighlightingTest("requiredModule", "onDemandModule");
|
||||
}
|
||||
|
||||
public void testContentDescriptorNoModuleDescriptorFileHighlighting() {
|
||||
doHighlightingTest();
|
||||
|
||||
Reference in New Issue
Block a user