Search in sources :

Example 1 with TestCaseGeneratorResultsView

use of com.rockwellcollins.atc.tcg.views.TestCaseGeneratorResultsView in project AGREE by loonwerks.

the class VerifyHandler method clearView.

protected void clearView() {
    getWindow().getShell().getDisplay().syncExec(() -> {
        try {
            TestCaseGeneratorResultsView page = (TestCaseGeneratorResultsView) getWindow().getActivePage().showView(TestCaseGeneratorResultsView.ID);
            page.setInput(new CompositeAnalysisResult("empty"), null);
        } catch (PartInitException e) {
            e.printStackTrace();
        }
    });
}
Also used : TestCaseGeneratorResultsView(com.rockwellcollins.atc.tcg.views.TestCaseGeneratorResultsView) CompositeAnalysisResult(jkind.api.results.CompositeAnalysisResult) PartInitException(org.eclipse.ui.PartInitException)

Example 2 with TestCaseGeneratorResultsView

use of com.rockwellcollins.atc.tcg.views.TestCaseGeneratorResultsView in project AGREE by loonwerks.

the class VerifyHandler method showView.

protected void showView(final AnalysisResult result, final AgreeResultsLinker linker) {
    /*
		 * This command is executed while the xtext document is locked. Thus it must be async
		 * otherwise we can get a deadlock condition if the UI tries to lock the document,
		 * e.g., to pull up hover information.
		 */
    getWindow().getShell().getDisplay().asyncExec(() -> {
        try {
            TestCaseGeneratorResultsView page = (TestCaseGeneratorResultsView) getWindow().getActivePage().showView(TestCaseGeneratorResultsView.ID);
            page.setInput(result, linker);
        } catch (PartInitException e) {
            e.printStackTrace();
        }
    });
}
Also used : TestCaseGeneratorResultsView(com.rockwellcollins.atc.tcg.views.TestCaseGeneratorResultsView) PartInitException(org.eclipse.ui.PartInitException)

Aggregations

TestCaseGeneratorResultsView (com.rockwellcollins.atc.tcg.views.TestCaseGeneratorResultsView)2 PartInitException (org.eclipse.ui.PartInitException)2 CompositeAnalysisResult (jkind.api.results.CompositeAnalysisResult)1