Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2007 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation dakshinamurthy.karra@gmail.com - bug 165371 /
package org.eclipse.ant.internal.ui.launchConfigurations;
    /* (non-Javadoc)
     * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
     */
    public void initializeFrom(ILaunchConfiguration configuration) {
        try {
            boolean captureOutput = configuration.getAttribute(.true);
            if (!captureOutput && configuration instanceof ILaunchConfigurationWorkingCopy) {
                ILaunchConfigurationWorkingCopy copy = (ILaunchConfigurationWorkingCopyconfiguration;
                copy.setAttribute(., (String)null);
                copy.setAttribute(.false);
                copy.setAttribute(.false);
            }
        } catch (CoreException e) {
        }
        super.initializeFrom(configuration);
    }
    
	/* (non-Javadoc)
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
	 */
	public void createTabs(ILaunchConfigurationDialog dialogString mode) {
			new AntMainTab(),
			new RefreshTab(),
			new AntJRETab(),
			new CommonTab()
		};
		setTabs(tabs);
	}
	/* (non-Javadoc)
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
	 */
	public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
		//set default name for script
		IResource resource = DebugUITools.getSelectedResource();
		if (resource != null && resource instanceof IFile) {
			IFile file = (IFile)resource;
			String extension = file.getFileExtension();
			if (extension != null && extension.equalsIgnoreCase("xml")) { //$NON-NLS-1$
				String projectNamefile.getProject().getName();
				StringBuffer buffer = new StringBuffer(projectName);
				buffer.append(' ');
				buffer.append(file.getName());
				String name = buffer.toString().trim();
				configuration.rename(name);
				//set the project name so that the correct default VM install can be determined
						VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression("workspace_loc"file.getFullPath().toString())); //$NON-NLS-1$
			}		
		}
		configuration.setAttribute(."org.eclipse.ant.ui.AntClasspathProvider"); //$NON-NLS-1$
		super.setDefaults(configuration);
	}	
New to GrepCode? Check out our FAQ X