mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
debugging blinking test
This commit is contained in:
@@ -265,7 +265,13 @@ public class InspectionProfileTest extends LightIdeaTestCase {
|
||||
}
|
||||
profile.writeExternal(new Element("profile"));
|
||||
List<InspectionProfileEntry> initializedTools = getInitializedTools(profile);
|
||||
assertEquals(initializedTools.toString(), 1, initializedTools.size());
|
||||
if (initializedTools.size() != 1) {
|
||||
for (InspectionProfileEntry initializedTool : initializedTools) {
|
||||
System.out.println(initializedTool.getShortName());
|
||||
((InspectionToolWrapper)initializedTool).instantated.printStackTrace();
|
||||
}
|
||||
fail();
|
||||
}
|
||||
}
|
||||
|
||||
public void testInspectionInitializationForSerialization() throws Exception {
|
||||
|
||||
@@ -67,6 +67,9 @@ 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 " +
|
||||
@@ -80,6 +83,9 @@ 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