mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
blinking test
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package com.intellij.codeInspection;
|
||||
|
||||
import com.intellij.codeInsight.daemon.HighlightDisplayKey;
|
||||
import com.intellij.codeInspection.dataFlow.DataFlowInspection;
|
||||
import com.intellij.codeInspection.deadCode.UnusedDeclarationInspection;
|
||||
import com.intellij.codeInspection.ex.*;
|
||||
import com.intellij.openapi.util.JDOMUtil;
|
||||
@@ -254,7 +255,8 @@ public class InspectionProfileTest extends LightIdeaTestCase {
|
||||
assertEquals(0, countInitializedTools(profile));
|
||||
InspectionProfileEntry[] tools = profile.getInspectionTools(null);
|
||||
assertTrue(tools.length > 0);
|
||||
InspectionProfileEntry tool = tools[0];
|
||||
InspectionProfileEntry tool = profile.getInspectionTool(new DataFlowInspection().getShortName());
|
||||
assertNotNull(tool);
|
||||
String id = tool.getShortName();
|
||||
System.out.println(id);
|
||||
if (profile.isToolEnabled(HighlightDisplayKey.findById(id))) {
|
||||
@@ -269,7 +271,6 @@ public class InspectionProfileTest extends LightIdeaTestCase {
|
||||
if (initializedTools.size() != 1) {
|
||||
for (InspectionProfileEntry initializedTool : initializedTools) {
|
||||
System.out.println(initializedTool.getShortName());
|
||||
((InspectionToolWrapper)initializedTool).instantated.printStackTrace();
|
||||
}
|
||||
fail();
|
||||
}
|
||||
|
||||
@@ -67,9 +67,6 @@ public abstract class InspectionToolWrapper<T extends InspectionProfileEntry, E
|
||||
public T getTool() {
|
||||
if (myTool == null) {
|
||||
//noinspection unchecked
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
instantated = new Throwable();
|
||||
}
|
||||
myTool = (T)myEP.instantiateTool();
|
||||
if (!myTool.getShortName().equals(myEP.getShortName())) {
|
||||
LOG.error("Short name not matched for " +
|
||||
@@ -83,9 +80,6 @@ public abstract class InspectionToolWrapper<T extends InspectionProfileEntry, E
|
||||
return myTool;
|
||||
}
|
||||
|
||||
// todo remove it
|
||||
public Throwable instantated;
|
||||
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
return myTool != null;
|
||||
|
||||
Reference in New Issue
Block a user