@Override protected void doCloudOp(IProgressMonitor monitor) throws Exception, OperationCanceledException { CloudAppDashElement cde = model.getApplication(appName); if (cde == null || cde.getProject() == null) { throw new CoreException( new Status( IStatus.ERROR, BootDashActivator.PLUGIN_ID, "Local project not associated to CF app '" + appName + "'")); } DevtoolsUtil.disconnectDevtoolsClientsFor(cde); // TODO: create a 'monitor' that is aware of cancelation token to apss to the launch operation. DevtoolsUtil.launchDevtools( cde, DevtoolsUtil.getSecret(cde.getProject()), startMode == RunState.DEBUGGING ? ILaunchManager.DEBUG_MODE : ILaunchManager.RUN_MODE, monitor); }
/** * Create an 'empty' BootDashViewModel with no run targets. Targets can be added by adding them to * the runTarget's LiveSet. */ public BootDashViewModel(BootDashModelContext context, RunTargetType... runTargetTypes) { runTargets = new LiveSet<RunTarget>(new LinkedHashSet<RunTarget>()); models = new BootDashModelManager(context, runTargets); manager = new RunTargetPropertiesManager(context, runTargetTypes); List<RunTarget> existingtargets = manager.getStoredTargets(); runTargets.addAll(existingtargets); runTargets.addListener(manager); this.runTargetTypes = new LinkedHashSet<RunTargetType>(Arrays.asList(runTargetTypes)); filterBox = new TagFilterBoxModel(); toggleFiltersModel = new ToggleFiltersModel(); filter = Filters.compose(filterBox.getFilter(), toggleFiltersModel.getFilter()); devtoolsProcessTracker = DevtoolsUtil.createProcessTracker(this); }