/** * clears the content of client * * @param alsoProjectIndependent whether also project independent editors should be closed such as * the testresultviewer */ public static void clearClient(final boolean alsoProjectIndependent) { final DataEventDispatcher ded = DataEventDispatcher.getInstance(); TestExecution.getInstance().stopExecution(); GeneralStorage gs = GeneralStorage.getInstance(); if (gs != null && Persistor.instance() != null) { IProjectPO currProj = gs.getProject(); if (currProj != null) { gs.nullProject(); } gs.reset(); } Plugin.getDisplay() .syncExec( new Runnable() { public void run() { Plugin.clearAllEditorsClipboard(); final ProblemsBP problemsBP = ProblemsBP.getInstance(); problemsBP.clearOldProblems(); problemsBP.cleanupProblems(); TestExecutionContributor.getInstance().getClientTest().resetToTesting(); ded.fireRecordModeStateChanged(RecordModeState.notRunning); ded.fireOMStateChanged(OMState.notRunning); ded.fireProjectStateChanged(ProjectState.closed); Plugin.closeAllOpenedJubulaEditors(alsoProjectIndependent); ded.fireTestresultChanged(TestresultState.Clear); setTreeViewerInputNull(Constants.TESTRE_ID); for (TestCaseBrowser tcb : MultipleTCBTracker.getInstance().getOpenTCBs()) { tcb.getTreeViewer().setInput(null); } setTreeViewerInputNull(Constants.TS_BROWSER_ID); setTreeViewerInputNull(Constants.COMPNAMEBROWSER_ID); clearAnalyzeResultPage(); } }); ded.fireProjectLoadedListener(new NullProgressMonitor()); }