mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
setDefaultDir() return the IProject location as the default.
This commit is contained in:
parent
b189ce7272
commit
f7336ab6b8
1 changed files with 9 additions and 4 deletions
|
@ -1,6 +1,8 @@
|
|||
package org.eclipse.cdt.launch.internal.ui;
|
||||
import java.io.File;
|
||||
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
|
||||
import org.eclipse.cdt.launch.ICDTLaunchConfigurationConstants;
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
@ -246,12 +248,15 @@ public class WorkingDirectoryBlock extends AbstractLaunchConfigurationTab {
|
|||
* Sets the default working directory
|
||||
*/
|
||||
protected void setDefaultWorkingDir() {
|
||||
ILaunchConfiguration config = getLaunchConfiguration();
|
||||
ILaunchConfiguration config = getLaunchConfiguration();
|
||||
if (config != null) {
|
||||
// IJavaProject javaProject = JavaRuntime.getJavaProject(config);
|
||||
Object cProject = null;
|
||||
ICProject cProject = null;
|
||||
try {
|
||||
cProject = AbstractCLaunchDelegate.getCProject(config);
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
if (cProject != null) {
|
||||
// fWorkspaceDirText.setText(cProject.getPath().makeRelative().toOSString());
|
||||
fWorkspaceDirText.setText(cProject.getPath().makeRelative().toOSString());
|
||||
fLocalDirButton.setSelection(false);
|
||||
fWorkspaceDirButton.setSelection(true);
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue