Search in sources :

Example 6 with InspectionTree

use of com.intellij.codeInspection.ui.InspectionTree in project intellij-community by JetBrains.

the class IdeFrameFixture method inspectCode.

@NotNull
public InspectionsFixture inspectCode() {
    invokeMenuPath("Analyze", "Inspect Code...");
    //final Ref<FileChooserDialogImpl> wrapperRef = new Ref<FileChooserDialogImpl>();
    JDialog dialog = robot().finder().find(new GenericTypeMatcher<JDialog>(JDialog.class) {

        @Override
        protected boolean isMatching(@NotNull JDialog dialog) {
            return "Specify Inspection Scope".equals(dialog.getTitle());
        }
    });
    JButton button = robot().finder().find(dialog, JButtonMatcher.withText("OK").andShowing());
    robot().click(button);
    final InspectionTree tree = GuiTestUtil.waitUntilFound(robot(), new GenericTypeMatcher<InspectionTree>(InspectionTree.class) {

        @Override
        protected boolean isMatching(@NotNull InspectionTree component) {
            return true;
        }
    });
    return new InspectionsFixture(robot(), getProject(), tree);
}
Also used : InspectionTree(com.intellij.codeInspection.ui.InspectionTree) Assert.assertNotNull(junit.framework.Assert.assertNotNull) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

InspectionTree (com.intellij.codeInspection.ui.InspectionTree)6 InspectionResultsView (com.intellij.codeInspection.ui.InspectionResultsView)2 OfflineProblemDescriptorNode (com.intellij.codeInspection.offlineViewer.OfflineProblemDescriptorNode)1 InspectionTreeNode (com.intellij.codeInspection.ui.InspectionTreeNode)1 ProgressIndicator (com.intellij.openapi.progress.ProgressIndicator)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 THashSet (gnu.trove.THashSet)1 Assert.assertNotNull (junit.framework.Assert.assertNotNull)1 NotNull (org.jetbrains.annotations.NotNull)1