use of com.intellij.codeInspection.deadCode.UnusedDeclarationInspection in project android by JetBrains.
the class AndroidMenuTest method testOnClickHighlightingJava.
public void testOnClickHighlightingJava() throws Throwable {
myFixture.enableInspections(new UnusedDeclarationInspection());
final VirtualFile f = myFixture.copyFileToProject(myTestFolder + "/" + getTestName(true) + ".java", "src/p1/p2/MyActivity1.java");
myFixture.configureFromExistingVirtualFile(f);
myFixture.checkHighlighting(true, false, false);
}
use of com.intellij.codeInspection.deadCode.UnusedDeclarationInspection in project android by JetBrains.
the class AndroidInspectionsTest method getUnusedDeclarationWrapper.
private static GlobalInspectionToolWrapper getUnusedDeclarationWrapper() {
final InspectionEP ep = new InspectionEP();
ep.presentation = UnusedDeclarationPresentation.class.getName();
ep.implementationClass = UnusedDeclarationInspection.class.getName();
ep.shortName = UnusedDeclarationInspectionBase.SHORT_NAME;
UnusedDeclarationInspection tool = new UnusedDeclarationInspection(true);
return new GlobalInspectionToolWrapper(tool, ep);
}
use of com.intellij.codeInspection.deadCode.UnusedDeclarationInspection in project android by JetBrains.
the class AndroidInspectionsTest method getAndroidEntryPoint.
@NotNull
private AndroidComponentEntryPoint getAndroidEntryPoint() {
AndroidComponentEntryPoint result = null;
for (EntryPoint entryPoint : ((UnusedDeclarationInspection) myUnusedDeclarationToolWrapper.getTool()).getExtensions()) {
if (entryPoint instanceof AndroidComponentEntryPoint) {
try {
result = (AndroidComponentEntryPoint) entryPoint;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
assertNotNull(result);
return result;
}
use of com.intellij.codeInspection.deadCode.UnusedDeclarationInspection in project android by JetBrains.
the class AndroidLayoutDomTest method testOnClickHighlightingJava.
public void testOnClickHighlightingJava() throws Throwable {
myFixture.enableInspections(new UnusedDeclarationInspection());
VirtualFile f = myFixture.copyFileToProject(myTestFolder + "/" + getTestName(true) + ".java", "src/p1/p2/MyActivity1.java");
myFixture.configureFromExistingVirtualFile(f);
myFixture.checkHighlighting(true, false, false);
}
Aggregations