/** * By default, delegate to all of the tabs in this group. * * @see ILaunchConfigurationTabGroup#initializeFrom(ILaunchConfiguration) */ @Override public void initializeFrom(ILaunchConfiguration configuration) { ILaunchConfigurationTab[] tabs = getTabs(); for (int i = 0; i < tabs.length; i++) { tabs[i].initializeFrom(configuration); } }
@Override protected void setTabs(ILaunchConfigurationTab[] tabs) { //Override the function for automatic injection within the tabs. if (this.injector != null) { for (final ILaunchConfigurationTab tab : tabs) { this.injector.injectMembers(tab); } } // super.setTabs(tabs); }
/** * Configures defaults on newly created launch configurations. * This function also passes the launch configuration copy to the default * registered OSGi framework, giving it an opportunity to initialize and override * more defaults on the launch configuration. * Refer to the <code>org.eclipse.pde.core.osgiFrameworks</code> extension point for more details * on OSGi frameworks. * * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) */ @Override public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { super.setDefaults(configuration); OSGiFrameworkManager manager = PDELaunchingPlugin.getDefault().getOSGiFrameworkManager(); manager.getDefaultInitializer().initialize(configuration); }
@Override @SuppressWarnings("deprecation") public void initializeFrom(ILaunchConfiguration configuration) { try { boolean captureOutput = configuration.getAttribute(IExternalToolConstants.ATTR_CAPTURE_OUTPUT, true); if (!captureOutput && configuration instanceof ILaunchConfigurationWorkingCopy) { ILaunchConfigurationWorkingCopy copy = (ILaunchConfigurationWorkingCopy) configuration; copy.setAttribute(IExternalToolConstants.ATTR_CAPTURE_OUTPUT, (String) null); copy.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, false); copy.setAttribute(IDebugUIConstants.ATTR_CAPTURE_IN_CONSOLE, false); } } catch (CoreException e) { // do nothing } super.initializeFrom(configuration); }
/** * Delegates to all tabs to set defaults. * It then sets program and VM arguments based on values on the * <b>Plug-in Development > Target Platform > Launching Arguments</b> preference page. * * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) */ @Override public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { super.setDefaults(configuration); if (TargetPlatformHelper.usesNewApplicationModel()) configuration.setAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, "3.3"); //$NON-NLS-1$ else if (TargetPlatformHelper.getTargetVersion() >= 3.2) configuration.setAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, "3.2a"); //$NON-NLS-1$ configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, PDESourcePathProvider.ID); // Set Program/VM arguments with preference values String programArgs = LaunchArgumentsHelper.getInitialProgramArguments().trim(); if (programArgs.length() > 0) configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, programArgs); String vmArgs = LaunchArgumentsHelper.getInitialVMArguments().trim(); if (vmArgs.length() > 0) configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArgs); configuration.setAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, true); }
@Override public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { // set default name for script IResource resource = DebugUITools.getSelectedResource(); if (resource != null && resource instanceof IFile) { IFile file = (IFile) resource; if (AntUtil.isKnownAntFile(file)) { String projectName = file.getProject().getName(); StringBuffer buffer = new StringBuffer(projectName); buffer.append(' '); buffer.append(file.getName()); String name = buffer.toString().trim(); name = DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(name); configuration.rename(name); // set the project name so that the correct default VM install can be determined configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName); configuration.setAttribute(IExternalToolConstants.ATTR_LOCATION, VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression("workspace_loc", file.getFullPath().toString())); //$NON-NLS-1$ } } configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, "org.eclipse.ant.ui.AntClasspathProvider"); //$NON-NLS-1$ super.setDefaults(configuration); } }
/** * By default, delegate to all of the tabs in this group. * * @see ILaunchConfigurationTabGroup#performApply(ILaunchConfigurationWorkingCopy) */ @Override public void performApply(ILaunchConfigurationWorkingCopy configuration) { ILaunchConfigurationTab[] tabs = getTabs(); for (int i = 0; i < tabs.length; i++) { tabs[i].performApply(configuration); } }
/** * By default, delegate to all of the tabs in this group. * * @see ILaunchConfigurationTabGroup#setDefaults(ILaunchConfigurationWorkingCopy) */ @Override public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { ILaunchConfigurationTab[] tabs = getTabs(); for (int i = 0; i < tabs.length; i++) { tabs[i].setDefaults(configuration); } }
/** * By default, delegate to all of the tabs in this group. * * @see ILaunchConfigurationTabGroup#launched(ILaunch) * @deprecated As of R3.0, this method is no longer called by the launch * framework. Since tabs do not exist when launching is performed elsewhere * than the launch dialog, this method cannot be relied upon for launching * functionality. */ @Deprecated @Override public void launched(ILaunch launch) { ILaunchConfigurationTab[] tabs = getTabs(); for (int i = 0; i < tabs.length; i++) { tabs[i].launched(launch); } }
/** * By default, dispose all the tabs in this group. * * @see ILaunchConfigurationTabGroup#dispose() */ @Override public void dispose() { ILaunchConfigurationTab[] tabs = getTabs(); if (tabs != null) { for (int i = 0; i < tabs.length; i++) { tabs[i].dispose(); } } }