com.intellij.psi.stubs.IndexSink Java Examples
The following examples show how to use
com.intellij.psi.stubs.IndexSink.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CSharpTypeStubElementType.java From consulo-csharp with Apache License 2.0 | 6 votes |
@Override @RequiredReadAction public void indexStub(@Nonnull CSharpTypeDeclStub stub, @Nonnull IndexSink indexSink) { String name = getName(stub); if(!StringUtil.isEmpty(name)) { indexSink.occurrence(CSharpIndexKeys.TYPE_INDEX, name); String parentQName = stub.getParentQName(); if(!stub.isNested()) { DotNetNamespaceStubUtil.indexStub(indexSink, CSharpIndexKeys.MEMBER_BY_NAMESPACE_QNAME_INDEX, CSharpIndexKeys.MEMBER_BY_ALL_NAMESPACE_QNAME_INDEX, parentQName, name); if(BitUtil.isSet(stub.getOtherModifierMask(), CSharpTypeDeclStub.HAVE_EXTENSIONS)) { indexSink.occurrence(CSharpIndexKeys.TYPE_WITH_EXTENSION_METHODS_INDEX, DotNetNamespaceStubUtil.getIndexableNamespace(parentQName)); } } indexSink.occurrence(CSharpIndexKeys.TYPE_BY_VMQNAME_INDEX, stub.getVmQName().hashCode()); } }
Example #2
Source File: CSharpMsilStubIndexer.java From consulo-csharp with Apache License 2.0 | 6 votes |
@Override public void indexClass(@Nonnull MsilClassEntryStub stub, @Nonnull IndexSink indexSink) { String name = stub.getName(); if(StringUtil.isEmpty(name)) { return; } if(stub.isNested()) { return; } List<StubElement> childrenStubs = stub.getChildrenStubs(); for(StubElement childrenStub : childrenStubs) { if(childrenStub instanceof MsilCustomAttributeStub && Comparing.equal(((MsilCustomAttributeStub) childrenStub).getTypeRef(), DotNetTypes.System.Runtime.CompilerServices .ExtensionAttribute)) { indexSink.occurrence(CSharpIndexKeys.TYPE_WITH_EXTENSION_METHODS_INDEX, DotNetNamespaceStubUtil.getIndexableNamespace(stub.getNamespace())); break; } } }
Example #3
Source File: BashSimpleCommandElementType.java From BashSupport with Apache License 2.0 | 5 votes |
@Override public void indexStub(@NotNull BashCommandStub stub, @NotNull IndexSink sink) { final String filename = stub.getBashCommandName(); if (filename != null) { sink.occurrence(BashCommandNameIndex.KEY, filename); } }
Example #4
Source File: CSharpTypeListElementType.java From consulo-csharp with Apache License 2.0 | 5 votes |
@Override public void indexStub(@Nonnull CSharpTypeListStub cSharpTypeListStub, @Nonnull IndexSink indexSink) { if(cSharpTypeListStub.getStubType() == CSharpStubElements.EXTENDS_LIST) { for(String ref : cSharpTypeListStub.geShortReferences()) { indexSink.occurrence(CSharpIndexKeys.EXTENDS_LIST_INDEX, ref); } } }
Example #5
Source File: CSharpEnumConstantStubElementType.java From consulo-csharp with Apache License 2.0 | 5 votes |
@Override @RequiredReadAction public void indexStub(@Nonnull CSharpVariableDeclStub<CSharpEnumConstantDeclarationImpl> stub, @Nonnull IndexSink indexSink) { String name = getName(stub); if(!StringUtil.isEmpty(name)) { indexSink.occurrence(CSharpIndexKeys.FIELD_INDEX, name); } }
Example #6
Source File: CSharpEventElementType.java From consulo-csharp with Apache License 2.0 | 5 votes |
@Override public void indexStub(@Nonnull CSharpVariableDeclStub<DotNetEventDeclaration> stub, @Nonnull IndexSink indexSink) { String name = getName(stub); if(!StringUtil.isEmpty(name)) { indexSink.occurrence(CSharpIndexKeys.EVENT_INDEX, name); } }
Example #7
Source File: CSharpPropertyElementType.java From consulo-csharp with Apache License 2.0 | 5 votes |
@Override @RequiredReadAction public void indexStub(@Nonnull CSharpVariableDeclStub<CSharpPropertyDeclarationImpl> stub, @Nonnull IndexSink indexSink) { String name = getName(stub); if(!StringUtil.isEmpty(name)) { indexSink.occurrence(CSharpIndexKeys.PROPERTY_INDEX, name); } }
Example #8
Source File: CSharpFieldStubElementType.java From consulo-csharp with Apache License 2.0 | 5 votes |
@Override @RequiredReadAction public void indexStub(@Nonnull CSharpVariableDeclStub<DotNetFieldDeclaration> stub, @Nonnull IndexSink indexSink) { String name = getName(stub); if(!StringUtil.isEmpty(name)) { indexSink.occurrence(CSharpIndexKeys.FIELD_INDEX, name); } }
Example #9
Source File: CSharpMethodStubElementType.java From consulo-csharp with Apache License 2.0 | 5 votes |
@Override @RequiredReadAction public void indexStub(@Nonnull CSharpMethodDeclStub stub, @Nonnull IndexSink indexSink) { String name = getName(stub); if(!StringUtil.isEmpty(name)) { indexSink.occurrence(CSharpIndexKeys.METHOD_INDEX, name); if(!stub.isNested()) { if(BitUtil.isSet(stub.getOtherModifierMask(), CSharpMethodDeclStub.DELEGATE_MASK)) { String parentQName = stub.getParentQName(); DotNetNamespaceStubUtil.indexStub(indexSink, CSharpIndexKeys.MEMBER_BY_NAMESPACE_QNAME_INDEX, CSharpIndexKeys.MEMBER_BY_ALL_NAMESPACE_QNAME_INDEX, parentQName, name); } } if(BitUtil.isSet(stub.getOtherModifierMask(), CSharpMethodDeclStub.EXTENSION_MASK)) { indexSink.occurrence(CSharpIndexKeys.EXTENSION_METHOD_BY_NAME_INDEX, name); } if(BitUtil.isSet(stub.getOtherModifierMask(), CSharpMethodDeclStub.DELEGATE_MASK)) { indexSink.occurrence(CSharpIndexKeys.DELEGATE_METHOD_BY_NAME_INDEX, name); } } }
Example #10
Source File: CSharpAttributeListStubElementType.java From consulo-csharp with Apache License 2.0 | 5 votes |
@Override public void indexStub(@Nonnull CSharpAttributeListStub stub, @Nonnull IndexSink indexSink) { DotNetAttributeTargetType targetType = stub.getTargetType(); if(targetType != null) { indexSink.occurrence(CSharpIndexKeys.ATTRIBUTE_LIST_INDEX, targetType); } }
Example #11
Source File: CSharpMsilStubIndexer.java From consulo-csharp with Apache License 2.0 | 5 votes |
@Override public void indexMethod(@Nonnull MsilMethodEntryStub stub, @Nonnull IndexSink indexSink) { List<StubElement> childrenStubs = stub.getChildrenStubs(); for(StubElement childrenStub : childrenStubs) { if(childrenStub instanceof MsilCustomAttributeStub && Comparing.equal(((MsilCustomAttributeStub) childrenStub).getTypeRef(), DotNetTypes.System.Runtime.CompilerServices .ExtensionAttribute)) { indexSink.occurrence(CSharpIndexKeys.EXTENSION_METHOD_BY_NAME_INDEX, stub.getNameFromBytecode()); break; } } }
Example #12
Source File: HaskellNamedStubElementType.java From intellij-haskforce with Apache License 2.0 | 5 votes |
@Override public void indexStub(@NotNull S stub, @NotNull IndexSink sink) { final String name = stub.getName(); if (name != null) { sink.occurrence(HaskellAllNameIndex.KEY, name); } }
Example #13
Source File: BashFunctionDefElementType.java From BashSupport with Apache License 2.0 | 5 votes |
@Override public void indexStub(@NotNull BashFunctionDefStub stub, @NotNull IndexSink sink) { final String name = stub.getName(); if (name != null) { sink.occurrence(BashFunctionNameIndex.KEY, name); } }
Example #14
Source File: BashVarDefElementType.java From BashSupport with Apache License 2.0 | 5 votes |
@Override public void indexStub(@NotNull BashVarDefStub stub, @NotNull IndexSink sink) { final String name = stub.getName(); if (name != null) { sink.occurrence(BashVarDefIndex.KEY, name); } }
Example #15
Source File: BashVarElementType.java From BashSupport with Apache License 2.0 | 5 votes |
@Override public void indexStub(@NotNull BashVarStub stub, @NotNull IndexSink sink) { final String name = stub.getName(); if (name != null) { sink.occurrence(BashVarIndex.KEY, name); } }
Example #16
Source File: BashIncludeCommandElementType.java From BashSupport with Apache License 2.0 | 5 votes |
@Override public void indexStub(@NotNull BashIncludeCommandStub stub, @NotNull IndexSink sink) { final String filenamef = stub.getIncludedFilename(); if (filenamef != null) { sink.occurrence(BashIncludedFilenamesIndex.KEY, filenamef); } String includerFilePath = stub.getIncluderFilePath(); if (includerFilePath != null) { sink.occurrence(BashIncludeCommandIndex.KEY, includerFilePath); } }
Example #17
Source File: PsiModuleStubElementType.java From reasonml-idea-plugin with MIT License | 5 votes |
public void indexStub(@NotNull final PsiModuleStub stub, @NotNull final IndexSink sink) { String name = stub.getName(); if (name != null) { sink.occurrence(IndexKeys.MODULES, name); } String fqn = stub.getQualifiedName(); sink.occurrence(IndexKeys.MODULES_FQN, fqn.hashCode()); if (stub.isComponent()) { sink.occurrence(IndexKeys.MODULES_COMP, fqn); } }
Example #18
Source File: NASMFileElementType.java From JetBrains-NASM-Language with MIT License | 4 votes |
@Override public void indexStub(@NotNull NASMFileStub stub, @NotNull IndexSink sink) { super.indexStub(stub, sink); }
Example #19
Source File: UnityScriptIndexer.java From consulo-unity3d with Apache License 2.0 | 4 votes |
@Override public void indexFile(@Nonnull JSFileStub fileStub, @Nonnull IndexSink sink) { String nameWithoutExtension = FileUtilRt.getNameWithoutExtension(fileStub.getName()); sink.occurrence(UnityScriptIndexKeys.FILE_BY_NAME_INDEX, nameWithoutExtension); }
Example #20
Source File: GroupStub.java From protobuf-jetbrains-plugin with Apache License 2.0 | 4 votes |
@Override public void indexStub(@NotNull GroupStub stub, @NotNull IndexSink sink) { sink.occurrence(DataTypeFullNameIndex.KEY, stub.getFullName()); sink.occurrence(DataTypeNameIndex.KEY, stub.getName()); }
Example #21
Source File: MessageStub.java From protobuf-jetbrains-plugin with Apache License 2.0 | 4 votes |
@Override public void indexStub(@NotNull MessageStub stub, @NotNull IndexSink sink) { sink.occurrence(DataTypeFullNameIndex.KEY, stub.getFullName()); sink.occurrence(DataTypeNameIndex.KEY, stub.getName()); }
Example #22
Source File: EnumStub.java From protobuf-jetbrains-plugin with Apache License 2.0 | 4 votes |
@Override public void indexStub(@NotNull EnumStub stub, @NotNull IndexSink sink) { sink.occurrence(DataTypeFullNameIndex.KEY, stub.getFullName()); sink.occurrence(DataTypeNameIndex.KEY, stub.getName()); }
Example #23
Source File: TemplateBlockStub.java From bamboo-soy with Apache License 2.0 | 4 votes |
@Override public void indexStub(@NotNull TemplateBlockStub stub, @NotNull IndexSink sink) { sink.occurrence(TemplateBlockIndex.KEY, stub.getFullyQualifiedName()); }
Example #24
Source File: AtParamStub.java From bamboo-soy with Apache License 2.0 | 4 votes |
@Override public void indexStub(@NotNull AtParamStub stub, @NotNull IndexSink sink) {}
Example #25
Source File: NamespaceDeclarationStub.java From bamboo-soy with Apache License 2.0 | 4 votes |
@Override public void indexStub(@NotNull NamespaceDeclarationStub stub, @NotNull IndexSink sink) { sink.occurrence(NamespaceDeclarationIndex.KEY, stub.getName()); }
Example #26
Source File: TemplateDefinitionStub.java From bamboo-soy with Apache License 2.0 | 4 votes |
@Override public void indexStub(@NotNull TemplateDefinitionStub stub, @NotNull IndexSink sink) {}
Example #27
Source File: AtStateStub.java From bamboo-soy with Apache License 2.0 | 4 votes |
@Override public void indexStub(@NotNull AtStateStub stub, @NotNull IndexSink sink) { }
Example #28
Source File: CSharpAbstractStubElementType.java From consulo-csharp with Apache License 2.0 | 4 votes |
@Override public void indexStub(@Nonnull S s, @Nonnull IndexSink indexSink) { }
Example #29
Source File: PsiRecordFieldStubElementType.java From reasonml-idea-plugin with MIT License | 4 votes |
public void indexStub(@NotNull final PsiRecordFieldStub stub, @NotNull final IndexSink sink) { String name = stub.getName(); if (name != null) { sink.occurrence(IndexKeys.RECORD_FIELDS, name); } }