From f5495a21d2489291a969bebad994f72f25fef3a9 Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Mon, 19 May 2014 19:35:03 +0400 Subject: [PATCH] Minor: rename and move constant --- .../jetbrains/jet/lang/psi/JetDotQualifiedExpression.java | 4 ++-- .../src/org/jetbrains/jet/lang/psi/JetImportDirective.java | 6 +----- .../src/org/jetbrains/jet/lang/psi/JetPackageDirective.java | 3 +-- .../jet/lang/psi/stubs/elements/JetStubElementTypes.java | 5 +++-- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetDotQualifiedExpression.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetDotQualifiedExpression.java index 80f0815ffa3..7d632b17711 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetDotQualifiedExpression.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetDotQualifiedExpression.java @@ -24,7 +24,7 @@ import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub; import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes; import org.jetbrains.jet.lexer.JetToken; -import static org.jetbrains.jet.lang.psi.JetImportDirective.IMPORT_DIRECTIVE_EXPRESSIONS; +import static org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes.INSIDE_DIRECTIVE_EXPRESSIONS; public class JetDotQualifiedExpression extends JetExpressionImplStub> implements JetQualifiedExpression { @@ -80,7 +80,7 @@ public class JetDotQualifiedExpression extends JetExpressionImplStub 2) { LOG.error("Invalid stub structure. DOT_QUALIFIED_EXPRESSION must have one or two children. Was: " + expressions.length + "\nFile text:\n" + getContainingFile().getText()); diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetImportDirective.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetImportDirective.java index 4e211403b58..5cbc8efdb12 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetImportDirective.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetImportDirective.java @@ -18,7 +18,6 @@ package org.jetbrains.jet.lang.psi; import com.intellij.lang.ASTNode; import com.intellij.psi.tree.IElementType; -import com.intellij.psi.tree.TokenSet; import com.intellij.psi.util.PsiTreeUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -31,9 +30,6 @@ import org.jetbrains.jet.lexer.JetTokens; public class JetImportDirective extends JetElementImplStub { - public static final TokenSet IMPORT_DIRECTIVE_EXPRESSIONS = - TokenSet.create(JetStubElementTypes.REFERENCE_EXPRESSION, JetStubElementTypes.DOT_QUALIFIED_EXPRESSION); - public JetImportDirective(@NotNull ASTNode node) { super(node); } @@ -57,7 +53,7 @@ public class JetImportDirective extends JetElementImplStub 0) { return references[0]; } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetPackageDirective.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetPackageDirective.java index 05eb86fb3d8..f920448f520 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetPackageDirective.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetPackageDirective.java @@ -18,7 +18,6 @@ package org.jetbrains.jet.lang.psi; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; -import com.intellij.util.ArrayFactory; import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -46,7 +45,7 @@ public class JetPackageDirective extends JetModifierListOwnerStub TYPE_ARGUMENT_LIST = new JetPlaceHolderStubElementType("TYPE_ARGUMENT_LIST", JetTypeArgumentList.class); @@ -98,13 +97,13 @@ public interface JetStubElementTypes { JetPlaceHolderStubElementType DELEGATOR_BY = new JetPlaceHolderStubElementType("DELEGATOR_BY", JetDelegatorByExpressionSpecifier.class); + JetPlaceHolderStubElementType DELEGATOR_SUPER_CALL = new JetPlaceHolderStubElementType("DELEGATOR_SUPER_CALL", JetDelegatorToSuperCall.class); JetPlaceHolderStubElementType DELEGATOR_SUPER_CLASS = new JetPlaceHolderStubElementType("DELEGATOR_SUPER_CLASS", JetDelegatorToSuperClass.class); JetPlaceHolderStubElementType THIS_CALL = new JetPlaceHolderStubElementType("THIS_CALL", JetDelegatorToThisCall.class); - JetPlaceHolderStubElementType CONSTRUCTOR_CALLEE = new JetPlaceHolderStubElementType("CONSTRUCTOR_CALLEE", JetConstructorCalleeExpression.class); @@ -114,4 +113,6 @@ public interface JetStubElementTypes { TokenSet DELEGATION_SPECIFIER_TYPES = TokenSet.create(DELEGATOR_BY, DELEGATOR_SUPER_CALL, DELEGATOR_SUPER_CLASS, THIS_CALL); TokenSet TYPE_ELEMENT_TYPES = TokenSet.create(USER_TYPE, NULLABLE_TYPE, FUNCTION_TYPE); + + TokenSet INSIDE_DIRECTIVE_EXPRESSIONS = TokenSet.create(REFERENCE_EXPRESSION, DOT_QUALIFIED_EXPRESSION); }