use of com.intellij.structuralsearch.inspection.highlightTemplate.SSBasedInspection in project intellij-community by JetBrains.
the class SSBasedInspectionTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
SSBasedInspection inspection = new SSBasedInspection();
List<Configuration> configurations = new ArrayList<>();
SearchConfiguration configuration = new SearchConfiguration();
MatchOptions options = new MatchOptions();
options.setFileType(StdFileTypes.JAVA);
options.setSearchPattern("int i;");
configuration.setMatchOptions(options);
configurations.add(configuration);
configuration = new SearchConfiguration();
options = new MatchOptions();
options.setFileType(StdFileTypes.JAVA);
options.setSearchPattern("f();");
configuration.setMatchOptions(options);
configurations.add(configuration);
inspection.setConfigurations(configurations, myProject);
myWrapper = new LocalInspectionToolWrapper(inspection);
}
use of com.intellij.structuralsearch.inspection.highlightTemplate.SSBasedInspection in project intellij-community by JetBrains.
the class SSRCodeInsightTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
IdeaTestFixtureFactory factory = IdeaTestFixtureFactory.getFixtureFactory();
TestFixtureBuilder<IdeaProjectTestFixture> fixtureBuilder = factory.createLightFixtureBuilder(new DefaultLightProjectDescriptor());
final IdeaProjectTestFixture fixture = fixtureBuilder.getFixture();
myFixture = IdeaTestFixtureFactory.getFixtureFactory().createCodeInsightFixture(fixture, new LightTempDirTestFixtureImpl(true));
myInspection = new SSBasedInspection();
myFixture.setUp();
myFixture.enableInspections(myInspection);
myFixture.setTestDataPath(getTestDataPath());
}
Aggregations