sort out dependencies to make sure openapi doesn't depend on any impl modules

This commit is contained in:
Dmitry Jemerov
2010-11-12 14:11:14 +03:00
parent 3d7cbd7bb9
commit e96e8491df
10 changed files with 15 additions and 11 deletions
+3 -1
View File
@@ -15,7 +15,7 @@
<orderEntry type="library" name="commons-collections" level="project" />
<orderEntry type="module" module-name="xml" />
<orderEntry type="module" module-name="java-runtime" />
<orderEntry type="module" module-name="lang-impl" />
<orderEntry type="module" module-name="lang-impl" exported="" />
<orderEntry type="module" module-name="compiler-openapi" />
<orderEntry type="module" module-name="jsp-openapi" />
<orderEntry type="module" module-name="jsp-spi" />
@@ -28,6 +28,8 @@
<orderEntry type="library" name="jcip" level="project" />
<orderEntry type="library" name="Groovy" level="project" />
<orderEntry type="library" name="Guava" level="project" />
<orderEntry type="module" module-name="vcs-api" />
<orderEntry type="library" name="JUnit4" level="project" />
</component>
<component name="copyright">
<Base>
@@ -106,6 +106,12 @@ public interface Constants extends ElementType {
}
};
PsiElementArrayConstructor<PsiAnnotation> PSI_ANNOTATION_ARRAY_CONSTRUCTOR = new PsiElementArrayConstructor<PsiAnnotation>() {
public PsiAnnotation[] newPsiElementArray(int length) {
return length == 0 ? PsiAnnotation.EMPTY_ARRAY : new PsiAnnotation[length];
}
};
TokenSet CLASS_BIT_SET = TokenSet.create(CLASS, ANONYMOUS_CLASS, ENUM_CONSTANT_INITIALIZER);
TokenSet FIELD_BIT_SET = TokenSet.create(FIELD, ENUM_CONSTANT);
TokenSet METHOD_BIT_SET = TokenSet.create(METHOD, ANNOTATION_METHOD);
@@ -43,7 +43,7 @@ public class PsiMethodReceiverImpl extends CompositePsiElement implements PsiMet
@NotNull
public PsiAnnotation[] getAnnotations() {
return getChildrenAsPsiElements(ElementType.ANNOTATIONS, PsiAnnotation.PSI_ANNOTATION_ARRAY_CONSTRUCTOR);
return getChildrenAsPsiElements(ElementType.ANNOTATIONS, Constants.PSI_ANNOTATION_ARRAY_CONSTRUCTOR);
}
public PsiAnnotation findAnnotation(@NotNull @NonNls String qualifiedName) {
+1 -3
View File
@@ -8,7 +8,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="util" exported="" />
<orderEntry type="module" module-name="java-runtime" />
<orderEntry type="library" name="JUnit4" level="project" />
<orderEntry type="library" name="JDOM" level="project" />
<orderEntry type="module" module-name="forms_rt" />
@@ -21,10 +20,9 @@
<orderEntry type="module" module-name="xml-openapi" exported="" />
<orderEntry type="module" module-name="platform-api" exported="" />
<orderEntry type="module" module-name="lang-api" exported="" />
<orderEntry type="module" module-name="vcs-api" />
<orderEntry type="module" module-name="vcs-api" exported="" />
<orderEntry type="library" name="XmlRPC" level="project" />
<orderEntry type="module" module-name="dom-openapi" />
<orderEntry type="module" module-name="testFramework" exported="" />
<orderEntry type="module" module-name="resources-en" exported="" />
</component>
<component name="copyright">
@@ -16,7 +16,6 @@
package com.intellij.psi;
import com.intellij.psi.meta.PsiMetaOwner;
import com.intellij.psi.impl.source.PsiElementArrayConstructor;
import com.intellij.util.ArrayFactory;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -32,11 +31,6 @@ public interface PsiAnnotation extends PsiAnnotationMemberValue, PsiMetaOwner {
* The empty array of PSI annotations which can be reused to avoid unnecessary allocations.
*/
PsiAnnotation[] EMPTY_ARRAY = new PsiAnnotation[0];
PsiElementArrayConstructor<PsiAnnotation> PSI_ANNOTATION_ARRAY_CONSTRUCTOR = new PsiElementArrayConstructor<PsiAnnotation>() {
public PsiAnnotation[] newPsiElementArray(int length) {
return length == 0 ? EMPTY_ARRAY : new PsiAnnotation[length];
}
};
ArrayFactory<PsiAnnotation> ARRAY_FACTORY = new ArrayFactory<PsiAnnotation>() {
public PsiAnnotation[] create(final int count) {
@@ -19,6 +19,7 @@
<orderEntry type="module" module-name="java-impl" />
<orderEntry type="module" module-name="execution-impl" exported="" scope="RUNTIME" />
<orderEntry type="library" name="Groovy" level="project" />
<orderEntry type="module" module-name="testFramework" exported="" />
</component>
<component name="copyright">
<Base>
@@ -11,6 +11,9 @@
<orderEntry type="module" module-name="openapi" />
<orderEntry type="module" module-name="testFramework-java" scope="TEST" />
<orderEntry type="module" module-name="idea-tests" scope="TEST" />
<orderEntry type="module" module-name="platform-impl" />
<orderEntry type="module" module-name="lang-impl" />
<orderEntry type="module" module-name="testFramework" />
</component>
</module>