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


Java CodeInsightTestFixture类代码示例

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


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

示例1: createCodeInsightFixture

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
protected CodeInsightTestFixture createCodeInsightFixture(final String relativeTestDataPath)
    throws Exception {
  final String testDataPath = new File(getTestDataPath(), relativeTestDataPath).getAbsolutePath();
  final CodeInsightTestFixture codeInsightFixture =
      JavaTestFixtureFactory.getFixtureFactory().createCodeInsightFixture(myProjectFixture);
  codeInsightFixture.setTestDataPath(testDataPath);
  final TempDirTestFixture tempDir = codeInsightFixture.getTempDirFixture();
  myModuleBuilder.addSourceContentRoot(tempDir.getTempDirPath());
  codeInsightFixture.setUp();
  final VirtualFile dir = LocalFileSystem.getInstance().refreshAndFindFileByPath(testDataPath);
  Assert.assertNotNull("Test data directory not found: " + testDataPath, dir);
  VfsUtil.processFilesRecursively(dir, new CommonProcessors.CollectProcessor<VirtualFile>());
  dir.refresh(false, true);
  tempDir.copyAll(
      testDataPath,
      "",
      new VirtualFileFilter() {
        @Override
        public boolean accept(VirtualFile file) {
          return !file.getName().contains("_after");
        }
      });
  return codeInsightFixture;
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:25,代码来源:AppEngineCodeInsightTestCase.java

示例2: createCodeInsightFixture

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
@Override
public CodeInsightTestFixture createCodeInsightFixture(String dataPath, String projectFileName) {
  TempDirTestFixtureImpl tempDirTestFixture = new TempDirTestFixtureImpl();
  CodeInsightTestFixture fixture = IdeaTestFixtureFactory
    .getFixtureFactory()
    .createCodeInsightFixture(new ImportProjectTestFixture(dataPath, projectFileName, tempDirTestFixture), tempDirTestFixture);
  fixture.setTestDataPath(dataPath);
  return fixture;
}
 
开发者ID:seanhenry,项目名称:TearDownGenerator,代码行数:10,代码来源:ImportProjectTestFixtureFactoryImpl.java

示例3: createFileByText

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
/**
 * Creates command file by text and  {@link #createCommands() fills it with commands}
 * @param testFixture fixture
 * @param text command text
 * @return command file
 * @see #createCommands()
 */
@NotNull
static CommandLineFile createFileByText(@NotNull final CodeInsightTestFixture testFixture, @NotNull final String text) {
  final CommandLineFile file =
    (CommandLineFile)testFixture.configureByText(CommandLineFileType.INSTANCE, text);
  file.setCommands(createCommands());
  return file;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:CommandTestTools.java

示例4: createContentFixture

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
protected CodeInsightTestFixture createContentFixture(IdeaTestFixtureFactory factory) {
  final TestFixtureBuilder<IdeaProjectTestFixture> builder = factory.createFixtureBuilder(getName());
  final EmptyModuleFixtureBuilder moduleBuilder = builder.addModule(EmptyModuleFixtureBuilder.class);
  final IdeaProjectTestFixture fixture = builder.getFixture();

  final CodeInsightTestFixture testFixture = factory.createCodeInsightFixture(fixture);

  final String root = testFixture.getTempDirPath();
  moduleBuilder.addContentRoot(root);
  moduleBuilder.addSourceRoot("/");

  return testFixture;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:HighlightingTestBase.java

示例5: createFixture

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
protected CodeInsightTestFixture createFixture(IdeaTestFixtureFactory factory) {
  final TestFixtureBuilder<IdeaProjectTestFixture> builder = factory.createLightFixtureBuilder();
  final IdeaProjectTestFixture fixture = builder.getFixture();

  final CodeInsightTestFixture testFixture;
  testFixture = factory.createCodeInsightFixture(fixture);

  return testFixture;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:10,代码来源:HighlightingTestBase.java

示例6: createContentFixture

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
protected CodeInsightTestFixture createContentFixture(IdeaTestFixtureFactory factory) {
  final TestFixtureBuilder<IdeaProjectTestFixture> builder = factory.createFixtureBuilder(getName());
  final EmptyModuleFixtureBuilder moduleBuilder = builder.addModule(EmptyModuleFixtureBuilder.class);
  final IdeaProjectTestFixture fixture = builder.getFixture();

  final CodeInsightTestFixture testFixture;
  testFixture = factory.createCodeInsightFixture(fixture);

  final String root = testFixture.getTempDirPath();
  moduleBuilder.addContentRoot(root);
  moduleBuilder.addSourceRoot("/");

  return testFixture;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:HighlightingTestBase.java

示例7: createCreateParameterInfoContext

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
private static CreateParameterInfoContext createCreateParameterInfoContext(CodeInsightTestFixture fixture)
{
	return new ShowParameterInfoContext(fixture.getEditor(), fixture.getProject(), fixture.getFile(), fixture.getEditor().getCaretModel().getOffset(), 0)
	{
		@Override
		public void showHint(final PsiElement element, final int offset, final ParameterInfoHandler handler)
		{
		}
	};
}
 
开发者ID:consulo,项目名称:consulo-apache-velocity,代码行数:11,代码来源:VtlParameterInfoTest.java

示例8: FixtureChain

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
FixtureChain(final CodeInsightTestFixture myFixture) {
    fixture = myFixture;
}
 
开发者ID:rentalhost,项目名称:laravel-insight,代码行数:4,代码来源:FixtureChain.java

示例9: getFixture

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
protected CodeInsightTestFixture getFixture() {
  return fixture;
}
 
开发者ID:seanhenry,项目名称:TearDownGenerator,代码行数:4,代码来源:ImportProjectTestCase.java

示例10: FileStructureTestFixture

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
public FileStructureTestFixture(CodeInsightTestFixture fixture) {
  myFixture = fixture;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:FileStructureTestFixture.java

示例11: createFixture

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
@Override
protected CodeInsightTestFixture createFixture(@NotNull IdeaTestFixtureFactory factory) {
  return createContentFixture(factory);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:RncRenameTest.java

示例12: createFixture

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
protected CodeInsightTestFixture createFixture(@NotNull IdeaTestFixtureFactory factory) {
  final TestFixtureBuilder<IdeaProjectTestFixture> builder = factory.createLightFixtureBuilder();
  final IdeaProjectTestFixture fixture = builder.getFixture();

  return factory.createCodeInsightFixture(fixture);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:HighlightingTestBase.java

示例13: getFixture

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
@Override
public CodeInsightTestFixture getFixture() {
  return myTestFixture;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:HighlightingTestBase.java

示例14: createFixture

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
@Override
protected final CodeInsightTestFixture createFixture(@NotNull IdeaTestFixtureFactory factory) {
  return createContentFixture(factory);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AbstractIndexTest.java

示例15: EditorTestHelper

import com.intellij.testFramework.fixtures.CodeInsightTestFixture; //导入依赖的package包/类
public EditorTestHelper(Project project, CodeInsightTestFixture testFixture) {
  this.project = project;
  this.testFixture = testFixture;
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:5,代码来源:EditorTestHelper.java


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