当前位置: 首页>>代码示例>>Java>>正文


Java StubBuilder类代码示例

本文整理汇总了Java中com.intellij.psi.StubBuilder的典型用法代码示例。如果您正苦于以下问题:Java StubBuilder类的具体用法?Java StubBuilder怎么用?Java StubBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


StubBuilder类属于com.intellij.psi包,在下文中一共展示了StubBuilder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doTest

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
public void doTest() throws Exception {
  final List<String> data = TestUtils.readInput(getTestDataPath() + "/" + getTestName(true) + ".test");
  String fileText = data.get(0);

  PsiFile psiFile = TestUtils.createPseudoPhysicalGroovyFile(getProject(), fileText);

  ASTNode node = psiFile.getNode();
  Assert.assertNotNull(node);
  IElementType type = node.getElementType();
  Assert.assertTrue(type instanceof IStubFileElementType);

  IStubFileElementType stubFileType = (IStubFileElementType) type;
  StubBuilder builder = stubFileType.getBuilder();
  StubElement element = builder.buildStubTree(psiFile);
  StringBuffer buffer = new StringBuffer();
  getStubsTreeImpl(element, buffer, "");
  String stubTree = buffer.toString().trim();
  assertEquals(data.get(1), stubTree);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:StubsTest.java

示例2: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
@Override
public StubBuilder getBuilder()
{
	return new DefaultStubBuilder()
	{
		@NotNull
		@Override
		protected StubElement createStubForFile(@NotNull PsiFile file)
		{
			if(file instanceof CSharpFileImpl)
			{
				return new CSharpFileStub((CSharpFileImpl) file);
			}
			return super.createStubForFile(file);
		}
	};
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:18,代码来源:CSharpFileStubElementType.java

示例3: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
@Override
public StubBuilder getBuilder()
{
	return new DefaultStubBuilder()
	{
		@NotNull
		@Override
		protected StubElement createStubForFile(@NotNull PsiFile file)
		{
			if(file instanceof MsilFile)
			{
				return new MsilFileStub((MsilFile) file);
			}
			return super.createStubForFile(file);
		}
	};
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:18,代码来源:MsilFileStubElementType.java

示例4: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
@Override
public StubBuilder getBuilder()
{
	return new DefaultStubBuilder()
	{
		@NotNull
		@Override
		protected StubElement createStubForFile(@NotNull PsiFile file)
		{
			if(file instanceof JSFile)
			{
				return new JSFileStubImpl((JSFile) file, file.getName());
			}
			return super.createStubForFile(file);
		}
	};
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:18,代码来源:JSFileElementType.java

示例5: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
@Override
public StubBuilder getBuilder() {
    return new DefaultStubBuilder() {
        @NotNull
        @Override
        protected StubElement createStubForFile(@NotNull PsiFile file) {
            if (file instanceof RmlFile) {
                return new RmlFileStub((RmlFile) file);
            }
            return super.createStubForFile(file);
        }
    };
}
 
开发者ID:reasonml-editor,项目名称:reasonml-idea-plugin,代码行数:14,代码来源:RmlFileStubElementType.java

示例6: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
@Override
public StubBuilder getBuilder() {
  return new DefaultStubBuilder() {
    @Override
    protected StubElement createStubForFile(@NotNull PsiFile file) {
      return new FileStub((SoyFile) file);
    }
  };
}
 
开发者ID:google,项目名称:bamboo-soy,代码行数:10,代码来源:FileStub.java

示例7: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
@Override
public StubBuilder getBuilder() {
    return new DefaultStubBuilder() {
        @NotNull
        @Override
        protected StubElement createStubForFile(@NotNull PsiFile file) {
            return new FusionFileStub((FusionFile) file);
        }
    };
}
 
开发者ID:cvette,项目名称:intellij-neos,代码行数:11,代码来源:FusionFileStub.java

示例8: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
@Override
public StubBuilder getBuilder() {
    return new DefaultStubBuilder() {
        @Override
        protected StubElement createStubForFile(@NotNull PsiFile file) {
            return new FileStub((ProtoPsiFileRoot) file);
        }
    };
}
 
开发者ID:protostuff,项目名称:protobuf-jetbrains-plugin,代码行数:10,代码来源:FileStub.java

示例9: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
@Override
public StubBuilder getBuilder() {
  return new DefaultStubBuilder() {
    @NotNull
    @Override
    protected StubElement createStubForFile(@NotNull final PsiFile file) {
      if (file instanceof GroovyFile) {
        return new GrFileStub((GroovyFile)file);
      }

      return super.createStubForFile(file);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:GrStubFileElementType.java

示例10: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
@Override
public StubBuilder getBuilder() {
  return new DefaultStubBuilder() {
    @NotNull
    @Override
    protected StubElement createStubForFile(@NotNull PsiFile file) {
      if (file instanceof SchemaFile) {
        SchemaFile schemaFile = (SchemaFile) file;
        Qn namespace = NamespaceManager.getNamespace(schemaFile);
        return new SchemaFileStubImpl(schemaFile, StringRef.fromNullableString(namespace == null ? null : namespace.toString()));
      } else return super.createStubForFile(file);
    }
  };
}
 
开发者ID:SumoLogic,项目名称:epigraph,代码行数:15,代码来源:SchemaFileElementType.java

示例11: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
@Override
public StubBuilder getBuilder() {
    return new DefaultStubBuilder() {
        @NotNull
        @Override
        protected StubElement createStubForFile(@NotNull PsiFile file) {
            if (file instanceof HaskellFile) {
                return new HaskellFileStub((HaskellFile)file);
            }
            return super.createStubForFile(file);
        }
    };
}
 
开发者ID:carymrobbins,项目名称:intellij-haskforce,代码行数:14,代码来源:HaskellFileStubElementType.java

示例12: skipNode

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public static boolean skipNode(@NotNull StubBuilder builder, @NotNull ASTNode parent, @NotNull ASTNode node) {
  if (builder instanceof DefaultStubBuilder) {
    return ((DefaultStubBuilder)builder).skipChildProcessingWhenBuildingStubs(parent, node);
  }
  else if (builder instanceof LightStubBuilder) {
    return ((LightStubBuilder)builder).skipChildProcessingWhenBuildingStubs(parent, node);
  }
  else {
    return builder.skipChildProcessingWhenBuildingStubs(parent, node.getElementType());
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:13,代码来源:TreeUtil.java

示例13: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
public StubBuilder getBuilder() {
  return new DefaultStubBuilder() {
    protected StubElement createStubForFile(@NotNull final PsiFile file) {
      if (file instanceof GroovyFile) {
        return new GrFileStub((GroovyFile)file);
      }

      return super.createStubForFile(file);
    }
  };
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:GrStubFileElementType.java

示例14: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
@Override
public StubBuilder getBuilder() {
    return new LuaFileStubBuilder();
}
 
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:5,代码来源:LuaStubFileElementType.java

示例15: getBuilder

import com.intellij.psi.StubBuilder; //导入依赖的package包/类
public StubBuilder getBuilder() {
  return new DefaultStubBuilder();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:IStubFileElementType.java


注:本文中的com.intellij.psi.StubBuilder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。