Search in sources :

Example 1 with OfflineProblemDescriptorNode

use of com.intellij.codeInspection.offlineViewer.OfflineProblemDescriptorNode in project intellij-community by JetBrains.

the class OfflineInspectionResultViewTest method testOfflineWithInvalid.

public void testOfflineWithInvalid() throws Exception {
    ApplicationManager.getApplication().runWriteAction(() -> getJavaFacade().findClass("Test2").getContainingFile().delete());
    myView.getGlobalInspectionContext().getUIOptions().SHOW_STRUCTURE = true;
    InspectionTree tree = updateTree();
    TreeUtil.expandAll(tree);
    PlatformTestUtil.assertTreeEqual(tree, "-" + getProject() + "\n" + " -Declaration redundancy\n" + "  -" + myUnusedToolWrapper + "\n" + "   -" + getModule() + "\n" + "    -<default>\n" + "     -Test\n" + "      -foo()\n" + "       " + varMessage() + "\n" + "      -main(String[])\n" + "       " + varMessage() + "\n" + "      -f()\n" + "       -D\n" + "        -b()\n" + "         " + varMessage() + "\n" + "         -anonymous (java.lang.Runnable)\n" + "          -run()\n" + "           " + varMessage() + "\n" + "      -ff()\n" + "       " + varMessage() + "\n" + "       " + varMessage() + "\n" + " -Probable bugs\n" + "  -" + myDataFlowToolWrapper + "\n" + "   -Module: 'testOfflineWithInvalid'\n" + "    -<default>\n" + "     -Test\n" + "      -m()\n" + "       'equals()' called on itself\n" + "     -null\n" + "      Identical qualifier and argument to <code>equals()</code> call\n");
    tree.setSelectionRow(27);
    final OfflineProblemDescriptorNode node = (OfflineProblemDescriptorNode) tree.getSelectionModel().getSelectionPath().getLastPathComponent();
    assertFalse(node.isValid());
}
Also used : OfflineProblemDescriptorNode(com.intellij.codeInspection.offlineViewer.OfflineProblemDescriptorNode) InspectionTree(com.intellij.codeInspection.ui.InspectionTree)

Aggregations

OfflineProblemDescriptorNode (com.intellij.codeInspection.offlineViewer.OfflineProblemDescriptorNode)1 InspectionTree (com.intellij.codeInspection.ui.InspectionTree)1