/** * Handle the click on the finish button, fill the configuration object and check it's validity. * {@inheritDoc} */ @Override public boolean performFinish() { updateConfiguration(); if (!analysisWorkflowConfiguration.isValid()) { return false; } if (getContainer().getCurrentPage().equals(resultHandlingPage)) { switch (analysisWorkflowConfiguration.getPresentation()) { case RELATIONSHIP_GRAPH_ONLY: runAnalysisAndOpenVPMGraphViewer(); break; case REFINEMENT_BROWSER: runAnalysisAndOpenRefinementEditor(); break; default: logger.error("Invalid result handling option"); break; } } return true; }
/** * Trigger the configured analysis and open the resulting refinement recommendations in the * refinement editor. */ private void runAnalysisAndOpenRefinementEditor() { final SPLevoBlackBoard spLevoBlackBoard = new SPLevoBlackBoard(); Runnable openRefinementEditorRunnable = new OpenRefinementBrowserRunnable( analysisWorkflowConfiguration.getSplevoProjectEditor(), spLevoBlackBoard); VPMAnalysisWorkflowDelegate delegate = new VPMAnalysisWorkflowDelegate(analysisWorkflowConfiguration, spLevoBlackBoard, true); WorkflowListenerUtil.runWorkflowAndRunUITask( delegate, "Analyze VPM", openRefinementEditorRunnable); }
/** Update the configuration object with the current wizard content. */ public void updateConfiguration() { List<VPMAnalyzer> analyzers = analyzerPage.getAnalyzers(); analysisWorkflowConfiguration.getAnalyzers().clear(); analysisWorkflowConfiguration.getAnalyzers().addAll(analyzers); ResultPresentation resultPresentation = resultHandlingPage.getResultPresentation(); analysisWorkflowConfiguration.setPresentation(resultPresentation); analysisWorkflowConfiguration.getDetectionRules().clear(); analysisWorkflowConfiguration .getDetectionRules() .addAll(resultHandlingPage.getDetectionRules()); analysisWorkflowConfiguration.setUseMergeDetection(resultHandlingPage.isUseMergeDetection()); analysisWorkflowConfiguration.setFullRefinementReasons( resultHandlingPage.isFullRefinementReasons()); }