/** * {@inheritDoc} */ @Override protected IStatus run(IProgressMonitor monitor) { if (cmrRepositoryDefinition.getOnlineStatus() == OnlineStatus.OFFLINE) { return Status.CANCEL_STATUS; } try { AgentMappings mappings = cmrRepositoryDefinition.getConfigurationInterfaceService().getAgentMappings(); Collection<Environment> environments = cmrRepositoryDefinition.getConfigurationInterfaceService().getAllEnvironments(); final AgentMappingInput input = new AgentMappingInput(cmrRepositoryDefinition, mappings, environments); Display.getDefault().asyncExec(new Runnable() { @Override public void run() { try { activePage.openEditor(input, AgentMappingEditor.ID, true); } catch (PartInitException e) { InspectIT.getDefault().createErrorDialog("Exception occurred opening the Agent mapping settings editor.", e, -1); } } }); return Status.OK_STATUS; } catch (Exception e) { return new Status(IStatus.ERROR, InspectIT.ID, "Exception occurred loading the data from the CMR.", e); } }
AgentMappings updatedAgentMappings = repositoryDefinition.getConfigurationInterfaceService().getAgentMappings(); Collection<Environment> updatedEnvironments = repositoryDefinition.getConfigurationInterfaceService().getAllEnvironments();