/** * Needs to be implemented because of IExportWizard/IWorkbenchWizard. Entry point. * * @param workbench the current workbench * @param selection the current object selection */ public void init(IWorkbench workbench, IStructuredSelection selection) { try { if (finishedRiskAnalysis == null) { StartNewRiskAnalysis command = new StartNewRiskAnalysis(cnaElement); command = ServiceFactory.lookupCommandService().executeCommand(command); finishedRiskAnalysis = command.getFinishedRiskAnalysis(); finishedRiskLists = command.getFinishedRiskLists(); } else { finishedRiskLists = FinishedRiskAnalysisListsHome.getInstance().loadById(finishedRiskAnalysis.getDbId()); previousAnalysis = true; } } catch (CommandException e) { ExceptionUtil.log(e, Messages.RiskAnalysisWizard_1); } loadAllGefaehrdungen(); loadAllMassnahmen(); loadAssociatedGefaehrdungen(); loadOwnGefaehrdungen(); addOwnGefaehrdungen(); addRisikoMassnahmenUmsetzungen(loadRisikomassnahmen()); }