Java 类com.intellij.psi.stubs.IStubElementType 实例源码

项目:intellij-ce-playground    文件:AnchorElementInfoFactory.java   
@Override
@Nullable
public SmartPointerElementInfo createElementInfo(@NotNull PsiElement element, @NotNull PsiFile containingFile) {
  if (element instanceof StubBasedPsiElement && containingFile instanceof PsiFileWithStubSupport) {
    PsiFileWithStubSupport stubFile = (PsiFileWithStubSupport)containingFile;
    StubTree stubTree = stubFile.getStubTree();
    if (stubTree != null) {
      // use stubs when tree is not loaded
      StubBasedPsiElement stubPsi = (StubBasedPsiElement)element;
      int stubId = PsiAnchor.calcStubIndex(stubPsi);
      IStubElementType myStubElementType = stubPsi.getElementType();
      IElementType contentElementType = ((PsiFileImpl)containingFile).getContentElementType();
      if (stubId != -1 && contentElementType instanceof IStubFileElementType) { // TemplateDataElementType is not IStubFileElementType
        return new AnchorElementInfo(element, stubFile, stubId, myStubElementType);
      }
    }
  }

  PsiElement anchor = getAnchor(element);
  if (anchor != null) {
    return new AnchorElementInfo(anchor, containingFile);
  }
  return null;
}
项目:intellij-ce-playground    文件:PsiAnchor.java   
@Nullable
public static StubIndexReference createStubReference(@NotNull PsiElement element, @NotNull PsiFile containingFile) {
  if (element instanceof StubBasedPsiElement &&
      element.isPhysical() &&
      (element instanceof PsiCompiledElement || canHaveStub(containingFile))) {
    final StubBasedPsiElement elt = (StubBasedPsiElement)element;
    final IStubElementType elementType = elt.getElementType();
    if (elt.getStub() != null || elementType.shouldCreateStub(element.getNode())) {
      int index = calcStubIndex((StubBasedPsiElement)element);
      if (index != -1) {
        return new StubIndexReference(containingFile, index, containingFile.getLanguage(), elementType);
      }
    }
  }
  return null;
}
项目:lua-for-idea    文件:LuaGlobalDeclarationStubImpl.java   
public LuaGlobalDeclarationStubImpl(@Nullable StubElement parent, IStubElementType elementType,
                                    @Nullable StringRef name, @Nullable StringRef module, byte[] type,
                                    LuaType luaType) {
    super(parent, elementType, name);
    myModule = module;
    myType = type;
    this.luaType = luaType;
}
项目:epigraph    文件:SchemaTypeDefStubBaseImpl.java   
SchemaTypeDefStubBaseImpl(StubElement parent,
                          final IStubElementType elementType,
                          final String name,
                          final String namespace,
                          @Nullable final List<SerializedFqnTypeRef> extendsTypeRefs) {
  super(parent, elementType);
  this.name = name;
  this.namespace = namespace;
  this.extendsTypeRefs = extendsTypeRefs;
}
项目:intellij-ce-playground    文件:AnchorElementInfo.java   
AnchorElementInfo(@NotNull PsiElement anchor,
                  @NotNull PsiFileWithStubSupport containingFile,
                  int stubId,
                  @NotNull IStubElementType stubElementType) {
  super(containingFile.getProject(), new ProperTextRange(0, 0), anchor.getClass(), containingFile, containingFile.getLanguage(), false);
  myStubElementTypeAndId = pack(stubId, stubElementType);
  assert !(anchor instanceof PsiFile) : "FileElementInfo must be used for file: "+anchor;
}
项目:intellij-ce-playground    文件:PsiAnchor.java   
private StubIndexReference(@NotNull final PsiFile file, final int index, @NotNull Language language, IStubElementType elementType) {
  myLanguage = language;
  myElementType = elementType;
  myVirtualFile = file.getVirtualFile();
  myProject = file.getProject();
  myIndex = index;
}
项目:intellij-ce-playground    文件:PyFromImportStatementStubImpl.java   
public PyFromImportStatementStubImpl(QualifiedName importSourceQName, boolean isStarImport, int relativeLevel,
                                     final StubElement parent, IStubElementType elementType) {
  super(parent, elementType);
  myImportSourceQName = importSourceQName;
  myStarImport = isStarImport;
  myRelativeLevel = relativeLevel;
}
项目:intellij-ce-playground    文件:PyClassStubImpl.java   
public PyClassStubImpl(final String name, StubElement parentStub, final QualifiedName[] superClasses, @Nullable QualifiedName metaClass,
                       final List<String> slots, String docString, IStubElementType stubElementType) {
  super(parentStub, stubElementType);
  myName = name;
  mySuperClasses = superClasses;
  myMetaClass = metaClass;
  mySlots = slots;
  myDocString = docString;
}
项目:intellij-ce-playground    文件:PyNamedParameterStubImpl.java   
public PyNamedParameterStubImpl(String name, boolean isPositionalContainer, boolean isKeywordContainer, boolean hasDefaultValue,
                                StubElement parent, IStubElementType stubElementType) {
  super(parent, stubElementType);
  myName = name;
  myPositionalContainer = isPositionalContainer;
  myKeywordContainer = isKeywordContainer;
  myHasDefaultValue = hasDefaultValue;
}
项目:intellij-ce-playground    文件:PyFunctionStubImpl.java   
public PyFunctionStubImpl(final String name, final String docString, @Nullable final StringRef deprecationMessage, boolean isAsync,
                          final StubElement parent, IStubElementType stubElementType) {
  super(parent, stubElementType);
  myName = name;
  myDocString = docString;
  myDeprecationMessage = deprecationMessage;
  myAsync = isAsync;
}
项目:intellij-ce-playground    文件:GrImportStatementStub.java   
public GrImportStatementStub(StubElement parent,
                             @NotNull IStubElementType elementType,
                             @Nullable String referenceText,
                             @Nullable String aliasName,
                             byte flags) {
  super(parent, elementType);

  myFlags = flags;

  myReferenceText = referenceText;
  myAliasName = aliasName;
}
项目:epigraph    文件:SchemaRecordTypeDefStubImpl.java   
SchemaRecordTypeDefStubImpl(StubElement parent,
                            String name,
                            String namespace,
                            @Nullable final List<SerializedFqnTypeRef> extendsTypeRefs,
                            @Nullable final List<SerializedFqnTypeRef> supplementedTypeRefs) {
  super(parent, (IStubElementType) SchemaElementTypes.S_RECORD_TYPE_DEF, name, namespace, extendsTypeRefs);
  this.supplementedTypeRefs = supplementedTypeRefs;
}
项目:reasonml-idea-plugin    文件:PsiTypeImpl.java   
public PsiTypeImpl(@NotNull MlTypes types, PsiTypeStub stub, IStubElementType nodeType) {
    super(stub, nodeType);
    m_types = types;
}
项目:reasonml-idea-plugin    文件:PsiLetImpl.java   
public PsiLetImpl(@NotNull PsiLetStub stub, @NotNull IStubElementType nodeType) {
    super(stub, nodeType);
}
项目:reasonml-idea-plugin    文件:PsiModuleImpl.java   
public PsiModuleImpl(ModuleStub stub, IStubElementType nodeType) {
    super(stub, nodeType);
}
项目:reasonml-idea-plugin    文件:PsiLetStub.java   
public PsiLetStub(StubElement parent, @NotNull IStubElementType elementType, String name) {
    super(parent, elementType, name);
}
项目:reasonml-idea-plugin    文件:PsiLetStub.java   
public PsiLetStub(StubElement parent, @NotNull IStubElementType elementType, StringRef name) {
    super(parent, elementType, name);
}
项目:reasonml-idea-plugin    文件:PsiTypeStub.java   
public PsiTypeStub(StubElement parent, @NotNull IStubElementType elementType, String name) {
    super(parent, elementType, name);
}
项目:reasonml-idea-plugin    文件:PsiTypeStub.java   
public PsiTypeStub(StubElement parent, @NotNull IStubElementType elementType, StringRef name) {
    super(parent, elementType, name);
}
项目:reasonml-idea-plugin    文件:ModuleStub.java   
public ModuleStub(StubElement parent, @NotNull IStubElementType elementType, String name, ModulePath modulePath) {
    super(parent, elementType, name);
    m_modulePath = modulePath;
}
项目:reasonml-idea-plugin    文件:ModuleStub.java   
public ModuleStub(StubElement parent, @NotNull IStubElementType elementType, StringRef name, ModulePath modulePath) {
    super(parent, elementType, name);
    m_modulePath = modulePath;
}
项目:bamboo-soy    文件:AtParamMixin.java   
public AtParamMixin(AtParamStub stub, IStubElementType type) {
  super(stub, type);
}
项目:bamboo-soy    文件:NamespaceDeclarationMixin.java   
public NamespaceDeclarationMixin(NamespaceDeclarationStub stub, IStubElementType type) {
  super(stub, type);
}
项目:bamboo-soy    文件:TemplateDefinitionMixin.java   
public TemplateDefinitionMixin(TemplateDefinitionStub stub, IStubElementType type) {
  super(stub, type);
}
项目:bamboo-soy    文件:SoyStubBasedPsiElementBase.java   
public SoyStubBasedPsiElementBase(@NotNull T stub, @NotNull IStubElementType nodeType) {
  super(stub, nodeType);
}
项目:bamboo-soy    文件:TemplateBlockMixin.java   
public TemplateBlockMixin(TemplateBlockStub stub, IStubElementType type) {
  super(stub, type);
}
项目:bamboo-soy    文件:StubFactory.java   
public static IStubElementType<?, ?> getType(String elementName) {
  return stubTypeByElement.get(elementName);
}
项目:lua-for-idea    文件:LuaGlobalDeclarationImpl.java   
@NotNull
@Override
public IStubElementType getElementType() {
    return LuaElementTypes.GLOBAL_NAME_DECL;
}
项目:epigraph    文件:SchemaNamespaceDeclImpl.java   
public SchemaNamespaceDeclImpl(SchemaNamespaceDeclStub stub, IStubElementType type) {
  super(stub, type);
}
项目:epigraph    文件:SchemaPrimitiveTypeDefStubImpl.java   
SchemaPrimitiveTypeDefStubImpl(StubElement parent) {
  super(parent, (IStubElementType) SchemaElementTypes.S_PRIMITIVE_TYPE_DEF);
}
项目:lua-for-idea    文件:LuaStubElementBase.java   
protected LuaStubElementBase(final T stub, IStubElementType nodeType) {
    super(stub, nodeType);
}
项目:epigraph    文件:SchemaTypeDefWrapperStubImpl.java   
SchemaTypeDefWrapperStubImpl(StubElement parent) {
  super(parent, (IStubElementType) SchemaElementTypes.S_TYPE_DEF_WRAPPER);
}
项目:intellij-neos    文件:FusionStubbedElementImpl.java   
public FusionStubbedElementImpl(@NotNull StubT stub, @NotNull IStubElementType nodeType) {
    super(stub, nodeType);
}
项目:intellij-neos    文件:FusionStubbedNamedElementImpl.java   
public FusionStubbedNamedElementImpl(@NotNull StubT stub, @NotNull IStubElementType nodeType) {
    super(stub, nodeType);
}
项目:intellij-neos    文件:FusionPrototypeSignatureImplMixin.java   
public FusionPrototypeSignatureImplMixin(@NotNull FusionPrototypeSignatureStub stub, @NotNull IStubElementType nodeType) {
    super(stub, nodeType);
}
项目:intellij-neos    文件:FusionNamespaceDeclarationImplMixin.java   
public FusionNamespaceDeclarationImplMixin(@NotNull FusionNamespaceDeclarationStub stub, @NotNull IStubElementType nodeType) {
    super(stub, nodeType);
}
项目:protobuf-jetbrains-plugin    文件:GroupNode.java   
public GroupNode(GroupStub stub, IStubElementType type) {
    super(stub, type);
}
项目:protobuf-jetbrains-plugin    文件:DataTypeStub.java   
DataTypeStub(StubElement parent, IStubElementType<?, T> type, String fullName, String name) {
    super(parent, type, name);
    this.fullName = fullName;
}
项目:epigraph    文件:SchemaSupplementDefImpl.java   
public SchemaSupplementDefImpl(SchemaSupplementDefStub stub, IStubElementType type) {
  super(stub, type);
}
项目:epigraph    文件:SchemaPrimitiveTypeDefImplBase.java   
SchemaPrimitiveTypeDefImplBase(@NotNull SchemaPrimitiveTypeDefStub stub, @NotNull IStubElementType nodeType) {
  super(stub, nodeType);
}