Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2008 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 Remy Chi Jian Suen <remy.suen@gmail.com> - Bug 214696 Expose WorkingDirectoryBlock as API /
package org.eclipse.ant.internal.ui.launchConfigurations;
Returns the default working directory path

Returns:
the default working directory path
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.internal.debug.ui.launcher.WorkingDirectoryBlock#setDefaultWorkingDir()
	 */
	protected void setDefaultWorkingDir() {
		if ( == null) {
			return;
		}
	}
	/* (non-Javadoc)
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
	 */
	public void initializeFrom(ILaunchConfiguration configuration) {
		setLaunchConfiguration(configuration);
		try {
			try {
				= ExternalToolsUtil.getLocation(configuration).removeLastSegments(1).toOSString();
			}
			catch(CoreException ce){}
			if (wd != null || !isSameAsDefault(wd)) {
			}
catch (CoreException e) {
			AntUIPlugin.log(e);
		}
	}
	private boolean isSameAsDefault(String workingDir) {
		return workingDir == null || (workingDir.equals() || workingDir.equals(System.getProperty("user.dir"))); //$NON-NLS-1$
	}
New to GrepCode? Check out our FAQ X