plugin.xml support: dom for modules

This commit is contained in:
Dmitry Avdeev
2009-12-30 13:48:09 +03:00
parent 785ca9f217
commit 50ae861f09
8 changed files with 60 additions and 1 deletions
+1
View File
@@ -22,6 +22,7 @@ package org.jetbrains.idea.devkit.dom;
import com.intellij.psi.PsiClass;
import com.intellij.util.xml.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.idea.devkit.dom.impl.PluginPsiClassConverter;
import java.util.List;
+1
View File
@@ -22,6 +22,7 @@ package org.jetbrains.idea.devkit.dom;
import com.intellij.psi.PsiClass;
import com.intellij.util.xml.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.idea.devkit.dom.impl.PluginPsiClassConverter;
import java.util.List;
@@ -18,6 +18,7 @@ package org.jetbrains.idea.devkit.dom;
import com.intellij.psi.PsiClass;
import com.intellij.util.xml.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.idea.devkit.dom.impl.PluginPsiClassConverter;
/**
* @author mike
+3
View File
@@ -91,6 +91,9 @@ public interface IdeaPlugin extends DomElement {
@SubTagList("depends")
Dependency addDependency();
@NotNull
@SubTagList("module")
List<PluginModule> getModules();
@NotNull
@SubTagList("extensions")
+32
View File
@@ -0,0 +1,32 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
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 org.jetbrains.annotations.NotNull;
/**
* @author Dmitry Avdeev
*/
public interface PluginModule extends DomElement {
@NotNull
@NameValue
GenericAttributeValue<String> getValue();
}
@@ -13,11 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.util.xml;
package org.jetbrains.idea.devkit.dom.impl;
import com.intellij.psi.PsiClass;
import com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.util.xml.ConvertContext;
import com.intellij.util.xml.ExtendClass;
import com.intellij.util.xml.GenericDomValue;
import com.intellij.util.xml.PsiClassConverter;
/**
* @author peter
@@ -0,0 +1,13 @@
<idea-plugin version="2" xmlns:xi="http://www.w3.org/2001/XInclude">
<id>com.intellij</id>
<name>IDEA CORE</name>
<module value="com.intellij.modules.platform"/>
<module value="com.intellij.modules.lang"/>
<module value="com.intellij.modules.vcs"/>
<module value="com.intellij.modules.xdebugger"/>
<module value="com.intellij.modules.xml"/>
<module value="com.intellij.modules.java"/>
<module value="com.intellij.modules.all"/>
</idea-plugin>
@@ -122,4 +122,8 @@ public class PluginXmlFunctionalTest extends JavaCodeInsightFixtureTestCase {
myFixture.checkResultByFile(getTestName(false) + "_after.xml");
}
public void testPluginModule() throws Throwable {
myFixture.testHighlighting("pluginWithModules.xml");
}
}