Search in sources :

Example 1 with AgreeResultsView

use of com.rockwellcollins.atc.agree.analysis.views.AgreeResultsView in project AGREE by loonwerks.

the class VerifyHandler method findView.

protected AgreeResultsView findView() {
    AgreeResultsView result = null;
    IViewPart part = getWindow().getActivePage().findView(AgreeResultsView.ID);
    if (part instanceof AgreeResultsView) {
        result = (AgreeResultsView) part;
    } else {
        try {
            result = (AgreeResultsView) getWindow().getActivePage().showView(AgreeResultsView.ID);
        } catch (PartInitException e) {
            e.printStackTrace();
        }
    }
    return result;
}
Also used : AgreeResultsView(com.rockwellcollins.atc.agree.analysis.views.AgreeResultsView) IViewPart(org.eclipse.ui.IViewPart) PartInitException(org.eclipse.ui.PartInitException)

Example 2 with AgreeResultsView

use of com.rockwellcollins.atc.agree.analysis.views.AgreeResultsView 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 {
            AgreeResultsView page = (AgreeResultsView) getWindow().getActivePage().showView(AgreeResultsView.ID);
            page.setInput(result, linker);
        } catch (PartInitException e) {
            e.printStackTrace();
        }
    });
}
Also used : AgreeResultsView(com.rockwellcollins.atc.agree.analysis.views.AgreeResultsView) PartInitException(org.eclipse.ui.PartInitException)

Example 3 with AgreeResultsView

use of com.rockwellcollins.atc.agree.analysis.views.AgreeResultsView in project AGREE by loonwerks.

the class VerifyHandler method clearView.

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

Aggregations

AgreeResultsView (com.rockwellcollins.atc.agree.analysis.views.AgreeResultsView)3 PartInitException (org.eclipse.ui.PartInitException)3 CompositeAnalysisResult (jkind.api.results.CompositeAnalysisResult)1 IViewPart (org.eclipse.ui.IViewPart)1