mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-197972 DevKit: add checks from PluginVerifier (plugins.jetbrains.com) to plugin.xml inspection
This commit is contained in:
@@ -156,6 +156,7 @@ inspections.plugin.xml.use.defaultExtensionNs=Use defaultExtensionNs instead
|
||||
inspections.plugin.xml.specify.defaultExtensionNs.explicitly=Specify defaultExtensionNs="{0}" explicitly
|
||||
inspections.plugin.xml.until.build.use.asterisk.instead.of.big.number=Don''t use ''{0}'' in ''until-build'', use ''*'' instead
|
||||
inspections.plugin.xml.until.build.misleading.plain.number=Plain numbers in ''until-build'' attribute may be misleading. ''{0}'' means the same as ''{0}.0'', so the plugin won''t be compatible with {0}.* builds. It''s better to specify ''{1}'' instead.
|
||||
inspections.plugin.xml.until.build.must.be.greater.than.since.build="until-build" must be greater than "since-build"
|
||||
inspections.plugin.xml.deprecated.ep=Deprecated EP ''{0}''
|
||||
inspections.plugin.xml.no.need.to.specify.itnReporter=Exceptions from plugins developed by JetBrains are reported via ITNReporter automatically, there is no need to specify it explicitly
|
||||
inspections.plugin.xml.third.party.plugins.must.not.use.itnReporter='com.intellij.diagnostic.ITNReporter' reports errors for internal processing at JetBrains, it should not be used for third-party plugins
|
||||
@@ -168,6 +169,12 @@ inspections.plugin.xml.invalid.ep.name.description=Invalid EP {0} ''{1}'', must
|
||||
inspections.plugin.xml.invalid.ep.name=name
|
||||
inspections.plugin.xml.invalid.ep.qualifiedName=qualified name
|
||||
inspections.plugin.xml.ignore.classes.title=Registration check ignore class list
|
||||
inspections.plugin.xml.version.must.be.specified=<version> must be specified
|
||||
inspections.plugin.xml.vendor.must.be.specified=<vendor> must be specified
|
||||
inspections.plugin.xml.do.not.use.template.text=Do not use template text ''{0}''
|
||||
inspections.plugin.xml.must.not.contain.template.text=Must not contain template text ''{0}''
|
||||
inspections.plugin.xml.value.exceeds.max.length=Value exceeds maximum length {0}
|
||||
inspections.plugin.xml.value.must.have.minimum.length=Value must have minimum length of {0}
|
||||
|
||||
inspections.registration.problems.name=Component type mismatch
|
||||
inspections.registration.problems.option.check.plugin.xml=Check Plugin Descriptor (plugin.xml)
|
||||
|
||||
@@ -68,6 +68,7 @@ public interface IdeaPlugin extends DomElement {
|
||||
|
||||
@NotNull
|
||||
@Stubbed
|
||||
@Required(false)
|
||||
GenericDomValue<String> getName();
|
||||
|
||||
|
||||
|
||||
@@ -15,10 +15,7 @@
|
||||
*/
|
||||
package org.jetbrains.idea.devkit.dom;
|
||||
|
||||
import com.intellij.util.xml.DomElement;
|
||||
import com.intellij.util.xml.GenericAttributeValue;
|
||||
import com.intellij.util.xml.NameValue;
|
||||
import com.intellij.util.xml.Stubbed;
|
||||
import com.intellij.util.xml.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface PluginModule extends DomElement {
|
||||
@@ -26,5 +23,6 @@ public interface PluginModule extends DomElement {
|
||||
@NotNull
|
||||
@Stubbed
|
||||
@NameValue
|
||||
@Required
|
||||
GenericAttributeValue<String> getValue();
|
||||
}
|
||||
|
||||
@@ -16,19 +16,18 @@
|
||||
package org.jetbrains.idea.devkit.dom;
|
||||
|
||||
import com.intellij.spellchecker.xml.NoSpellchecking;
|
||||
import com.intellij.util.xml.DomElement;
|
||||
import com.intellij.util.xml.GenericAttributeValue;
|
||||
import com.intellij.util.xml.GenericDomValue;
|
||||
import com.intellij.util.xml.Required;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface Vendor extends DomElement {
|
||||
public interface Vendor extends GenericDomValue<String> {
|
||||
|
||||
@NotNull
|
||||
@NoSpellchecking
|
||||
@Required
|
||||
String getValue();
|
||||
|
||||
void setValue(String value);
|
||||
|
||||
|
||||
@NotNull
|
||||
@NoSpellchecking
|
||||
GenericAttributeValue<String> getEmail();
|
||||
|
||||
@@ -43,6 +43,6 @@ public class PluginDescriptorDomFileDescription extends DomFileDescription<IdeaP
|
||||
|
||||
@Override
|
||||
public int getStubVersion() {
|
||||
return 9;
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ import com.intellij.openapi.extensions.LoadingOrder;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.ModuleRootManager;
|
||||
import com.intellij.openapi.util.BuildNumber;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.*;
|
||||
@@ -34,6 +36,7 @@ import com.intellij.util.ui.FormBuilder;
|
||||
import com.intellij.util.xml.*;
|
||||
import com.intellij.util.xml.highlighting.*;
|
||||
import com.intellij.util.xml.reflect.DomAttributeChildDescription;
|
||||
import com.intellij.xml.CommonXmlStrings;
|
||||
import com.siyeh.ig.ui.ExternalizableStringSet;
|
||||
import com.siyeh.ig.ui.UiUtils;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
@@ -85,8 +88,11 @@ public class PluginXmlDomInspection extends BasicDomElementsInspection<IdeaPlugi
|
||||
super.checkDomElement(element, holder, helper);
|
||||
|
||||
if (element instanceof IdeaPlugin) {
|
||||
annotateIdeaPlugin((IdeaPlugin)element, holder);
|
||||
checkJetBrainsPlugin((IdeaPlugin)element, holder);
|
||||
Module module = element.getModule();
|
||||
if (module != null) {
|
||||
annotateIdeaPlugin((IdeaPlugin)element, holder, module);
|
||||
checkJetBrainsPlugin((IdeaPlugin)element, holder, module);
|
||||
}
|
||||
}
|
||||
else if (element instanceof Extension) {
|
||||
annotateExtension((Extension)element, holder);
|
||||
@@ -139,7 +145,7 @@ public class PluginXmlDomInspection extends BasicDomElementsInspection<IdeaPlugi
|
||||
}
|
||||
}
|
||||
|
||||
private static void annotateIdeaPlugin(IdeaPlugin ideaPlugin, DomElementAnnotationHolder holder) {
|
||||
private static void annotateIdeaPlugin(IdeaPlugin ideaPlugin, DomElementAnnotationHolder holder, @NotNull Module module) {
|
||||
//noinspection deprecation
|
||||
highlightAttributeNotUsedAnymore(ideaPlugin.getIdeaPluginVersion(), holder);
|
||||
//noinspection deprecation
|
||||
@@ -147,15 +153,46 @@ public class PluginXmlDomInspection extends BasicDomElementsInspection<IdeaPlugi
|
||||
//noinspection deprecation
|
||||
highlightDeprecated(ideaPlugin.getUseIdeaClassloader(), "Deprecated", holder, true, true);
|
||||
}
|
||||
|
||||
checkMaxLength(ideaPlugin.getUrl(), 255, holder);
|
||||
|
||||
checkMaxLength(ideaPlugin.getId(), 255, holder);
|
||||
|
||||
checkTemplateText(ideaPlugin.getName(), "Plugin display name here", holder);
|
||||
checkTemplateTextContains(ideaPlugin.getName(), "plugin", holder);
|
||||
checkMaxLength(ideaPlugin.getName(), 255, holder);
|
||||
|
||||
|
||||
checkMaxLength(ideaPlugin.getDescription(), 65535, holder);
|
||||
checkHasRealText(ideaPlugin.getDescription(), 40, holder);
|
||||
checkTemplateTextContains(ideaPlugin.getDescription(), "Enter short description for your plugin here.", holder);
|
||||
checkTemplateTextContains(ideaPlugin.getDescription(), "most HTML tags may be used", holder);
|
||||
|
||||
checkMaxLength(ideaPlugin.getChangeNotes(), 65535, holder);
|
||||
checkHasRealText(ideaPlugin.getChangeNotes(), 40, holder);
|
||||
checkTemplateTextContains(ideaPlugin.getChangeNotes(), "Add change notes here", holder);
|
||||
checkTemplateTextContains(ideaPlugin.getChangeNotes(), "most HTML tags may be used", holder);
|
||||
|
||||
if (!hasRealPluginId(ideaPlugin)) return;
|
||||
|
||||
if (!DomUtil.hasXml(ideaPlugin.getVersion())) {
|
||||
holder.createProblem(ideaPlugin, DevKitBundle.message("inspections.plugin.xml.version.must.be.specified"),
|
||||
new AddDomElementQuickFix<>(ideaPlugin.getVersion()));
|
||||
}
|
||||
checkMaxLength(ideaPlugin.getVersion(), 64, holder);
|
||||
|
||||
|
||||
if (PsiUtil.isIdeaProject(module.getProject())) return;
|
||||
if (!DomUtil.hasXml(ideaPlugin.getVendor())) {
|
||||
holder.createProblem(ideaPlugin, DevKitBundle.message("inspections.plugin.xml.vendor.must.be.specified"),
|
||||
new AddDomElementQuickFix<>(ideaPlugin.getVendor()));
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkJetBrainsPlugin(IdeaPlugin ideaPlugin, DomElementAnnotationHolder holder) {
|
||||
final Module module = ideaPlugin.getModule();
|
||||
if (module == null) return;
|
||||
private static void checkJetBrainsPlugin(IdeaPlugin ideaPlugin, DomElementAnnotationHolder holder, @NotNull Module module) {
|
||||
if (!PsiUtil.isIdeaProject(module.getProject())) return;
|
||||
|
||||
String pluginId = ideaPlugin.getPluginId();
|
||||
if (pluginId == null || pluginId.equals(PluginManagerCore.CORE_PLUGIN_ID)) return;
|
||||
if (!hasRealPluginId(ideaPlugin)) return;
|
||||
|
||||
XmlTag xmlTag = ideaPlugin.getXmlTag();
|
||||
if (xmlTag == null) return;
|
||||
@@ -177,6 +214,11 @@ public class PluginXmlDomInspection extends BasicDomElementsInspection<IdeaPlugi
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean hasRealPluginId(IdeaPlugin ideaPlugin) {
|
||||
String pluginId = ideaPlugin.getPluginId();
|
||||
return pluginId != null && !pluginId.equals(PluginManagerCore.CORE_PLUGIN_ID);
|
||||
}
|
||||
|
||||
private void annotateExtensionPoint(ExtensionPoint extensionPoint, DomElementAnnotationHolder holder) {
|
||||
if (extensionPoint.getWithElements().isEmpty() &&
|
||||
!extensionPoint.collectMissingWithTags().isEmpty()) {
|
||||
@@ -293,6 +335,20 @@ public class PluginXmlDomInspection extends BasicDomElementsInspection<IdeaPlugi
|
||||
//noinspection deprecation
|
||||
highlightAttributeNotUsedAnymore(ideaVersion.getMax(), holder);
|
||||
highlightUntilBuild(ideaVersion, holder);
|
||||
|
||||
GenericAttributeValue<String> sinceBuild = ideaVersion.getSinceBuild();
|
||||
GenericAttributeValue<String> untilBuild = ideaVersion.getUntilBuild();
|
||||
if (!DomUtil.hasXml(sinceBuild) ||
|
||||
!DomUtil.hasXml(untilBuild)) {
|
||||
return;
|
||||
}
|
||||
|
||||
BuildNumber sinceBuildNumber = BuildNumber.fromString(sinceBuild.getStringValue());
|
||||
BuildNumber untilBuildNumber = BuildNumber.fromString(untilBuild.getStringValue());
|
||||
int compare = Comparing.compare(sinceBuildNumber, untilBuildNumber);
|
||||
if (compare > 0) {
|
||||
holder.createProblem(untilBuild, DevKitBundle.message("inspections.plugin.xml.until.build.must.be.greater.than.since.build"));
|
||||
}
|
||||
}
|
||||
|
||||
private static void highlightUntilBuild(IdeaVersion ideaVersion, DomElementAnnotationHolder holder) {
|
||||
@@ -406,18 +462,18 @@ public class PluginXmlDomInspection extends BasicDomElementsInspection<IdeaPlugi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void annotateVendor(Vendor vendor, DomElementAnnotationHolder holder) {
|
||||
//noinspection deprecation
|
||||
highlightAttributeNotUsedAnymore(vendor.getLogo(), holder);
|
||||
}
|
||||
|
||||
private static void highlightAttributeNotUsedAnymore(GenericAttributeValue attributeValue,
|
||||
DomElementAnnotationHolder holder) {
|
||||
if (!DomUtil.hasXml(attributeValue)) return;
|
||||
highlightDeprecated(
|
||||
attributeValue, DevKitBundle.message("inspections.plugin.xml.attribute.not.used.anymore", attributeValue.getXmlElementName()),
|
||||
holder, true, true);
|
||||
checkTemplateText(vendor, "YourCompany", holder);
|
||||
checkMaxLength(vendor, 255, holder);
|
||||
|
||||
checkTemplateText(vendor.getUrl(), "http://www.yourcompany.com", holder);
|
||||
checkMaxLength(vendor.getUrl(), 255, holder);
|
||||
|
||||
checkTemplateText(vendor.getEmail(), "support@yourcompany.com", holder);
|
||||
checkMaxLength(vendor.getEmail(), 255, holder);
|
||||
}
|
||||
|
||||
private static void annotateAddToGroup(AddToGroup addToGroup, DomElementAnnotationHolder holder) {
|
||||
@@ -519,6 +575,14 @@ public class PluginXmlDomInspection extends BasicDomElementsInspection<IdeaPlugi
|
||||
}
|
||||
}
|
||||
|
||||
private static void highlightAttributeNotUsedAnymore(GenericAttributeValue attributeValue,
|
||||
DomElementAnnotationHolder holder) {
|
||||
if (!DomUtil.hasXml(attributeValue)) return;
|
||||
highlightDeprecated(
|
||||
attributeValue, DevKitBundle.message("inspections.plugin.xml.attribute.not.used.anymore", attributeValue.getXmlElementName()),
|
||||
holder, true, true);
|
||||
}
|
||||
|
||||
private static void highlightDeprecated(DomElement element, String message, DomElementAnnotationHolder holder,
|
||||
boolean useRemoveQuickfix, boolean highlightWholeElement) {
|
||||
DomElementProblemDescriptor problem;
|
||||
@@ -533,6 +597,46 @@ public class PluginXmlDomInspection extends BasicDomElementsInspection<IdeaPlugi
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkTemplateText(GenericDomValue<String> domValue,
|
||||
String templateText,
|
||||
DomElementAnnotationHolder holder) {
|
||||
if (templateText.equals(domValue.getValue())) {
|
||||
holder.createProblem(domValue, DevKitBundle.message("inspections.plugin.xml.do.not.use.template.text", templateText));
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkTemplateTextContains(GenericDomValue<String> domValue,
|
||||
String containsText,
|
||||
DomElementAnnotationHolder holder) {
|
||||
String text = domValue.getStringValue();
|
||||
if (text != null && StringUtil.containsIgnoreCase(text, containsText)) {
|
||||
holder.createProblem(domValue, DevKitBundle.message("inspections.plugin.xml.must.not.contain.template.text", containsText));
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkMaxLength(GenericDomValue<String> domValue,
|
||||
int maxLength,
|
||||
DomElementAnnotationHolder holder) {
|
||||
String value = domValue.getStringValue();
|
||||
if (value != null && value.length() > maxLength) {
|
||||
holder.createProblem(domValue, DevKitBundle.message("inspections.plugin.xml.value.exceeds.max.length", maxLength));
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkHasRealText(GenericDomValue<String> domValue,
|
||||
int minimumLength,
|
||||
DomElementAnnotationHolder holder) {
|
||||
if (!DomUtil.hasXml(domValue)) return;
|
||||
|
||||
String value = StringUtil.notNullize(StringUtil.removeHtmlTags(domValue.getStringValue()));
|
||||
value = StringUtil.replace(value, CommonXmlStrings.CDATA_START, "");
|
||||
value = StringUtil.replace(value, CommonXmlStrings.CDATA_END, "");
|
||||
|
||||
if (StringUtil.isEmptyOrSpaces(value) || value.length() < minimumLength) {
|
||||
holder.createProblem(domValue, DevKitBundle.message("inspections.plugin.xml.value.must.have.minimum.length", minimumLength));
|
||||
}
|
||||
}
|
||||
|
||||
private static class CorrectUntilBuildAttributeFix implements LocalQuickFix {
|
||||
private final String myCorrectValue;
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<depends>com.intellij</depends>
|
||||
<depends>com.intellij.modules.vcs</depends>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<extensionPoints>
|
||||
<extensionPoint qualifiedName="com.intellij.myPlugin.ext" interface="java.lang.Runnable"/>
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
<idea-plugin>
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
<extensionPoints>
|
||||
<extensionPoint name="foo.bar" interface="java.util.List"/>
|
||||
<extensionPoint name="ext" interface="java.lang.Runnable"/>
|
||||
<extensionPoint name="deprecatedEP" interface="foo.MyDeprecatedEP"/>
|
||||
</extensionPoints>
|
||||
|
||||
<depends>com.intellij.custom</depends>
|
||||
<depends>com.intellij.custom</depends>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<<error descr="'implementation' attribute should be defined">myPlugin.ext</error>/>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<idea-plugin
|
||||
url="<error descr="Value exceeds maximum length 255">0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345</error>">
|
||||
|
||||
<id><error descr="Value exceeds maximum length 255">0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345</error></id>
|
||||
|
||||
<name><error descr="Value exceeds maximum length 255">0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345</error></name>
|
||||
|
||||
<vendor
|
||||
url="<error descr="Value exceeds maximum length 255">0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345</error>"
|
||||
email="<error descr="Value exceeds maximum length 255">0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345</error>"
|
||||
><error descr="Value exceeds maximum length 255">0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345</error></vendor>
|
||||
|
||||
<version><error descr="Value exceeds maximum length 64">01234567890123456789012345678901234567890123456789012345678901234</error></version>
|
||||
|
||||
|
||||
</idea-plugin>
|
||||
@@ -0,0 +1,21 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<<error descr="Value must not be empty">name</error>></name>
|
||||
|
||||
<module value=<error descr="Value must not be empty">""</error>/>
|
||||
|
||||
<description><error descr="Value must have minimum length of 40">
|
||||
<![CDATA[
|
||||
Not enough text <a href="http://jetbrains.com">short</a>
|
||||
]]>
|
||||
</error></description>
|
||||
|
||||
<change-notes><error descr="Value must have minimum length of 40">
|
||||
<![CDATA[
|
||||
Not enough text <a href="http://jetbrains.com">short</a>
|
||||
]]>
|
||||
</error></change-notes>
|
||||
</idea-plugin>
|
||||
@@ -0,0 +1,16 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<vendor
|
||||
url="<error descr="Do not use template text 'http://www.yourcompany.com'">http://www.yourcompany.com</error>"
|
||||
email="<error descr="Do not use template text 'support@yourcompany.com'">support@yourcompany.com</error>"
|
||||
><error descr="Do not use template text 'YourCompany'">YourCompany</error></vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<name><error descr="Must not contain template text 'plugin'">Something with PlUgIn</error></name>
|
||||
|
||||
<description><error descr="Must not contain template text 'Enter short description for your plugin here.'"><error descr="Must not contain template text 'most HTML tags may be used'">
|
||||
Enter short description for your plugin here. Some more text.
|
||||
most HTML tags may be used
|
||||
</error></error></description>
|
||||
|
||||
</idea-plugin>
|
||||
@@ -1,7 +1,7 @@
|
||||
<idea-plugin <error descr="Attribute 'version' not used anymore">version="666"</error>
|
||||
<error descr="Deprecated">use-idea-classloader="true"</error>
|
||||
>
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<id>com.intellij</id>
|
||||
|
||||
<vendor <error descr="Attribute 'logo' not used anymore">logo="deprecated"</error>/>
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<extensionPoints>
|
||||
<extensionPoint name="myExt" beanClass="MyExtBean"/>
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<extensionPoints>
|
||||
<extensionPoint name="acc" beanClass="ExtBeanWithAccessors"/>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<idea-plugin>
|
||||
<id>foo</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<extensionPoints>
|
||||
<extensionPoint interface="java.lang.Runnable" name="<weak_warning descr="Invalid EP name 'Smth', must contain only latin characters, digits and dots, must not start/end with dot, each fragment must start with lowercase character, last fragment words must not repeat any previous fragment">Smth</weak_warning>"/>
|
||||
<extensionPoint interface="java.lang.Runnable" name="<weak_warning descr="Invalid EP name '.smth', must contain only latin characters, digits and dots, must not start/end with dot, each fragment must start with lowercase character, last fragment words must not repeat any previous fragment">.smth</weak_warning>"/>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<idea-plugin>
|
||||
<id>foo</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<extensionPoints>
|
||||
<<error descr="<extensionPoint> must not specify both 'name' and 'qualifiedName' attributes">extensionPoint</error> name="myName" qualifiedName="myQualifiedName" interface="java.lang.Runnable"/>
|
||||
<<error descr="<extensionPoint> must not specify both 'interface' and 'beanClass' attributes">extensionPoint</error> interface="java.lang.Runnable" beanClass="java.lang.Runnable" name="aaa"/>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<extensionPoints>
|
||||
<extensionPoint name="tags" beanClass="ExtBeanWithInnerTags"/>
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij"/>
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<extensionPoints>
|
||||
<extensionPoint name="myIconEP" beanClass="MyIconAttributeEPBean"/>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<extensionPoints>
|
||||
<extensionPoint name="myLanguageEP" beanClass="MyLanguageAttributeEPBean"/>
|
||||
|
||||
+3
@@ -1,4 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<idea-version since-build="129.0" until-build="129.9999"/>
|
||||
</idea-plugin>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
<idea-version since-build="145.0" until-build="<error descr="Don't use '10000' in 'until-build', use '*' instead">145.10000</error>"/>
|
||||
</idea-plugin>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<idea-version since-build="145.0" until-build="<error descr="Don't use '9999' in 'until-build', use '*' instead">145.9999</error>"/>
|
||||
</idea-plugin>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<idea-version since-build="145.0" until-build="145.99"/>
|
||||
</idea-plugin>
|
||||
|
||||
+3
@@ -1,4 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<idea-version since-build="145.0" until-build="145.*"/>
|
||||
</idea-plugin>
|
||||
|
||||
+3
@@ -1,4 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<idea-version since-build="145.0" until-build="<caret>145.9999"/>
|
||||
</idea-plugin>
|
||||
|
||||
+3
@@ -1,4 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<idea-version since-build="145" until-build="<error descr="Plain numbers in 'until-build' attribute may be misleading. '145' means the same as '145.0', so the plugin won't be compatible with 145.* builds. It's better to specify '144.*' instead.">145</error>"/>
|
||||
</idea-plugin>
|
||||
|
||||
+3
@@ -1,4 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<vendor>JetBrains, me</vendor>
|
||||
</idea-plugin>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<version>1.0</version>
|
||||
<vendor>JetBrains</vendor>
|
||||
</idea-plugin>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<idea-plugin>
|
||||
<id>com.intellij</id>
|
||||
<name>IDEA CORE</name>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<module value="com.intellij.modules.platform"/>
|
||||
<module value="com.intellij.modules.lang"/>
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<idea-version since-build="145.99" until-build="<error descr="\"until-build\" must be greater than \"since-build\"">145.98</error>"/>
|
||||
</idea-plugin>
|
||||
@@ -1,4 +1,7 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<idea-version since-build="145.0" until-build="145.*"/>
|
||||
</idea-plugin>
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
<idea-plugin>
|
||||
<id>test</id>
|
||||
<<error descr="Plugin developed as a part of IntelliJ IDEA project should include 'JetBrains' as one of its vendors">vendor</error>>me</vendor>
|
||||
<version>1</version>
|
||||
<vendor><error descr="Plugin developed as a part of IntelliJ IDEA project should include 'JetBrains' as one of its vendors">me</error></vendor>
|
||||
</idea-plugin>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<id>foo</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<extensionPoints>
|
||||
<extensionPoint name="bar" interface="java.util.List"/>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<error descr="Plugin developed as a part of IntelliJ IDEA project should specify 'JetBrains' as its vendor"><idea-plugin>
|
||||
<id>test</id>
|
||||
<version>1</version>
|
||||
</idea-plugin>
|
||||
</error>
|
||||
+3
@@ -1,5 +1,8 @@
|
||||
<idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<xi:include href="/idea/JavaActions.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
<extensionPoints>
|
||||
|
||||
+3
@@ -1,5 +1,8 @@
|
||||
<idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<id>com.intellij.myPlugin</id>
|
||||
<vendor>JetBrains</vendor>
|
||||
<version>1.0</version>
|
||||
|
||||
<xi:include href="/idea/JavaActions.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||
|
||||
<extensionPoints>
|
||||
|
||||
+16
@@ -521,4 +521,20 @@ public class MyErrorHandler extends ErrorReportSubmitter {}
|
||||
"registrationCheck/module/MainModulePlugin_after.xml",
|
||||
true)
|
||||
}
|
||||
|
||||
void testValuesMaxLengths() {
|
||||
myFixture.testHighlighting("ValuesMaxLengths.xml")
|
||||
}
|
||||
|
||||
void testValuesRequired() {
|
||||
myFixture.testHighlighting("ValuesRequired.xml")
|
||||
}
|
||||
|
||||
void testValuesTemplateTexts() {
|
||||
myFixture.testHighlighting("ValuesTemplateTexts.xml")
|
||||
}
|
||||
|
||||
void testPluginWithSinceBuildGreaterThanUntilBuild() {
|
||||
myFixture.testHighlighting("pluginWithSinceBuildGreaterThanUntilBuild.xml")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user