From 7e59f0d68ceec966cbbbe0fee0bf5d587ed1f62b Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Wed, 26 Mar 2014 17:24:20 +0400 Subject: [PATCH] Rename: AnnotationStub -> AnnotationEntryStub --- .../jet/lang/psi/JetAnnotationEntry.java | 6 ++--- ...ub.java => PsiJetAnnotationEntryStub.java} | 2 +- ...ava => JetAnnotationEntryElementType.java} | 22 +++++++++---------- .../stubs/elements/JetStubElementTypes.java | 4 ++-- .../psi/stubs/elements/StubIndexService.java | 4 ++-- ...ava => PsiJetAnnotationEntryStubImpl.java} | 10 ++++----- .../stubindex/StubIndexServiceImpl.java | 2 +- 7 files changed, 25 insertions(+), 25 deletions(-) rename compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/{PsiJetAnnotationStub.java => PsiJetAnnotationEntryStub.java} (90%) rename compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/{JetAnnotationElementType.java => JetAnnotationEntryElementType.java} (62%) rename compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/{PsiJetAnnotationStubImpl.java => PsiJetAnnotationEntryStubImpl.java} (77%) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotationEntry.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotationEntry.java index 895ae9e6abd..4580a56ebcc 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotationEntry.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetAnnotationEntry.java @@ -20,18 +20,18 @@ import com.intellij.lang.ASTNode; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.JetNodeTypes; -import org.jetbrains.jet.lang.psi.stubs.PsiJetAnnotationStub; +import org.jetbrains.jet.lang.psi.stubs.PsiJetAnnotationEntryStub; import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes; import java.util.Collections; import java.util.List; -public class JetAnnotationEntry extends JetElementImplStub implements JetCallElement { +public class JetAnnotationEntry extends JetElementImplStub implements JetCallElement { public JetAnnotationEntry(@NotNull ASTNode node) { super(node); } - public JetAnnotationEntry(@NotNull PsiJetAnnotationStub stub) { + public JetAnnotationEntry(@NotNull PsiJetAnnotationEntryStub stub) { super(stub, JetStubElementTypes.ANNOTATION_ENTRY); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetAnnotationStub.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetAnnotationEntryStub.java similarity index 90% rename from compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetAnnotationStub.java rename to compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetAnnotationEntryStub.java index 3e9c0d42924..c6c1f6e05dc 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetAnnotationStub.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/PsiJetAnnotationEntryStub.java @@ -19,6 +19,6 @@ package org.jetbrains.jet.lang.psi.stubs; import com.intellij.psi.stubs.StubElement; import org.jetbrains.jet.lang.psi.JetAnnotationEntry; -public interface PsiJetAnnotationStub extends StubElement { +public interface PsiJetAnnotationEntryStub extends StubElement { String getShortName(); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetAnnotationElementType.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetAnnotationEntryElementType.java similarity index 62% rename from compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetAnnotationElementType.java rename to compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetAnnotationEntryElementType.java index 5503d240d5e..2c19af718bc 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetAnnotationElementType.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetAnnotationEntryElementType.java @@ -25,39 +25,39 @@ import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.psi.JetAnnotationEntry; import org.jetbrains.jet.lang.psi.JetPsiUtil; -import org.jetbrains.jet.lang.psi.stubs.PsiJetAnnotationStub; -import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetAnnotationStubImpl; +import org.jetbrains.jet.lang.psi.stubs.PsiJetAnnotationEntryStub; +import org.jetbrains.jet.lang.psi.stubs.impl.PsiJetAnnotationEntryStubImpl; import org.jetbrains.jet.lang.resolve.name.Name; import java.io.IOException; -public class JetAnnotationElementType extends JetStubElementType { +public class JetAnnotationEntryElementType extends JetStubElementType { - public JetAnnotationElementType(@NotNull @NonNls String debugName) { - super(debugName, JetAnnotationEntry.class, PsiJetAnnotationStub.class); + public JetAnnotationEntryElementType(@NotNull @NonNls String debugName) { + super(debugName, JetAnnotationEntry.class, PsiJetAnnotationEntryStub.class); } @Override - public PsiJetAnnotationStub createStub(@NotNull JetAnnotationEntry psi, StubElement parentStub) { + public PsiJetAnnotationEntryStub createStub(@NotNull JetAnnotationEntry psi, StubElement parentStub) { Name shortName = JetPsiUtil.getShortName(psi); String resultName = shortName != null ? shortName.asString() : psi.getText(); - return new PsiJetAnnotationStubImpl(parentStub, resultName); + return new PsiJetAnnotationEntryStubImpl(parentStub, resultName); } @Override - public void serialize(@NotNull PsiJetAnnotationStub stub, @NotNull StubOutputStream dataStream) throws IOException { + public void serialize(@NotNull PsiJetAnnotationEntryStub stub, @NotNull StubOutputStream dataStream) throws IOException { dataStream.writeName(stub.getShortName()); } @NotNull @Override - public PsiJetAnnotationStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException { + public PsiJetAnnotationEntryStub deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException { StringRef text = dataStream.readName(); - return new PsiJetAnnotationStubImpl(parentStub, text); + return new PsiJetAnnotationEntryStubImpl(parentStub, text); } @Override - public void indexStub(@NotNull PsiJetAnnotationStub stub, @NotNull IndexSink sink) { + public void indexStub(@NotNull PsiJetAnnotationEntryStub stub, @NotNull IndexSink sink) { StubIndexServiceFactory.getInstance().indexAnnotation(stub, sink); } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java index 5166dbd19a8..c0eec054806 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/JetStubElementTypes.java @@ -35,7 +35,7 @@ public interface JetStubElementTypes { JetPlaceHolderStubElementType TYPE_PARAMETER_LIST = new JetPlaceHolderStubElementType("TYPE_PARAMETER_LIST", JetTypeParameterList.class); - JetAnnotationElementType ANNOTATION_ENTRY = new JetAnnotationElementType("ANNOTATION_ENTRY"); + JetAnnotationEntryElementType ANNOTATION_ENTRY = new JetAnnotationEntryElementType("ANNOTATION_ENTRY"); JetPlaceHolderStubElementType CLASS_BODY = new JetPlaceHolderStubElementType("CLASS_BODY", JetClassBody.class); @@ -56,6 +56,6 @@ public interface JetStubElementTypes { JetPlaceHolderStubElementType TYPE_REFERENCE = new JetPlaceHolderStubElementType("TYPE_REFERENCE", JetTypeReference.class);; - + JetUserTypeElementType USER_TYPE = new JetUserTypeElementType("USER_TYPE"); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/StubIndexService.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/StubIndexService.java index 86d7ee01ee7..398e7cc7a74 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/StubIndexService.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/elements/StubIndexService.java @@ -46,7 +46,7 @@ public interface StubIndexService { } @Override - public void indexAnnotation(PsiJetAnnotationStub stub, IndexSink sink) { + public void indexAnnotation(PsiJetAnnotationEntryStub stub, IndexSink sink) { } }; @@ -55,5 +55,5 @@ public interface StubIndexService { void indexFunction(PsiJetFunctionStub stub, IndexSink sink); void indexObject(PsiJetObjectStub stub, IndexSink sink); void indexProperty(PsiJetPropertyStub stub, IndexSink sink); - void indexAnnotation(PsiJetAnnotationStub stub, IndexSink sink); + void indexAnnotation(PsiJetAnnotationEntryStub stub, IndexSink sink); } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetAnnotationStubImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetAnnotationEntryStubImpl.java similarity index 77% rename from compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetAnnotationStubImpl.java rename to compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetAnnotationEntryStubImpl.java index f601d038e54..7ba99480c8d 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetAnnotationStubImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/stubs/impl/PsiJetAnnotationEntryStubImpl.java @@ -21,17 +21,17 @@ import com.intellij.psi.stubs.StubElement; import com.intellij.util.io.StringRef; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.psi.JetAnnotationEntry; -import org.jetbrains.jet.lang.psi.stubs.PsiJetAnnotationStub; +import org.jetbrains.jet.lang.psi.stubs.PsiJetAnnotationEntryStub; import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes; -public class PsiJetAnnotationStubImpl extends StubBase implements PsiJetAnnotationStub { +public class PsiJetAnnotationEntryStubImpl extends StubBase implements PsiJetAnnotationEntryStub { private final StringRef shortName; - public PsiJetAnnotationStubImpl(StubElement parent, @NotNull String shortName) { + public PsiJetAnnotationEntryStubImpl(StubElement parent, @NotNull String shortName) { this(parent, StringRef.fromString(shortName)); } - public PsiJetAnnotationStubImpl(StubElement parent, StringRef shortName) { + public PsiJetAnnotationEntryStubImpl(StubElement parent, StringRef shortName) { super(parent, JetStubElementTypes.ANNOTATION_ENTRY); this.shortName = shortName; } @@ -44,7 +44,7 @@ public class PsiJetAnnotationStubImpl extends StubBase imple @Override public String toString() { StringBuilder builder = new StringBuilder(); - builder.append("PsiJetAnnotationStubImpl["); + builder.append("PsiJetAnnotationEntryStubImpl["); builder.append("shortName=").append(getShortName()); builder.append("]"); return builder.toString(); diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/StubIndexServiceImpl.java b/idea/src/org/jetbrains/jet/plugin/stubindex/StubIndexServiceImpl.java index d9676f2f133..928896073cb 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/StubIndexServiceImpl.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/StubIndexServiceImpl.java @@ -143,7 +143,7 @@ public class StubIndexServiceImpl implements StubIndexService { } @Override - public void indexAnnotation(PsiJetAnnotationStub stub, IndexSink sink) { + public void indexAnnotation(PsiJetAnnotationEntryStub stub, IndexSink sink) { sink.occurrence(JetAnnotationsIndex.getInstance().getKey(), stub.getShortName()); } }