1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-30 20:35:38 +02:00
This commit is contained in:
David Inglis 2006-05-11 20:14:55 +00:00
parent 5faf360a12
commit 9db611cefe
3 changed files with 38 additions and 27 deletions

View file

@ -142,13 +142,12 @@ public class MakeBuilder extends ACBuilder {
removeAllMarkers(currProject);
IPath workingDirectory = info.getBuildLocation();
if (workingDirectory != null && !workingDirectory.isEmpty()) {
if (!workingDirectory.isEmpty()) {
IResource res = currProject.getParent().findMember(workingDirectory);
if (res instanceof IContainer && res.exists()) {
workingDirectory = res.getLocation();
}
}
if (workingDirectory == null) {
} else {
workingDirectory = currProject.getLocation();
}

View file

@ -67,10 +67,10 @@ SettingsBlock.makeSetting.runAllBuilders=Run all project builders.
SettingsBlock.makeCmd.group_label=Build command
SettingsBlock.makeCmd.use_default=Use default
SettingsBlock.makeCmd.label=Build command:
SettingsBlock.makeDir.group_label=Build Directory
SettingsBlock.makeLoc.group_label=Build Location
SettingsBlock.makeDir.label=Build directory:
SettingsBlock.makeDir.browseLocal=Local...
SettingsBlock.makeDir.browseWorkspace=Workspace...
SettingsBlock.makeDir.browseFilesystem=Filesystem...
SettingsBlock.makeWorkbench.group_label=Workbench Build Behavior
SettingsBlock.makeWorkbench.type=Workbench build type:
SettingsBlock.makeWorkbench.target=Make build target:

View file

@ -73,9 +73,9 @@ public class SettingsBlock extends AbstractCOptionPage {
private static final String MAKE_WORKBENCH_BUILD_FULL = PREFIX + ".makeWorkbench.full"; //$NON-NLS-1$
private static final String MAKE_WORKBENCH_BUILD_CLEAN = PREFIX + ".makeWorkbench.clean"; //$NON-NLS-1$
private static final String MAKE_BUILD_DIR_GROUP = PREFIX + ".makeDir.group_label"; //$NON-NLS-1$
private static final String MAKE_BUILD_DIR_GROUP = PREFIX + ".makeLoc.group_label"; //$NON-NLS-1$
private static final String MAKE_BUILD_DIR_LABEL = PREFIX + ".makeDir.label"; //$NON-NLS-1$
private static final String MAKE_BUILD_DIR_BROWSE_LOCAL = PREFIX + ".makeDir.browseLocal"; //$NON-NLS-1$
private static final String MAKE_BUILD_DIR_BROWSE_FILESYSTEM = PREFIX + ".makeDir.browseFilesystem"; //$NON-NLS-1$
private static final String MAKE_BUILD_DIR_BROWSE_WORKSPACE = PREFIX + ".makeDir.browseWorkspace"; //$NON-NLS-1$
private static final String MAKE_BUILD_AUTO_TARGET = PREFIX + ".makeWorkbench.autoBuildTarget"; //$NON-NLS-1$
@ -317,7 +317,7 @@ public class SettingsBlock extends AbstractCOptionPage {
protected void createBuilderWorkingDirControls(Composite parent) {
Group group = ControlFactory.createGroup(parent, MakeUIPlugin.getResourceString(MAKE_BUILD_DIR_GROUP), 1);
GridLayout layout = new GridLayout();
layout.numColumns = 5;
layout.numColumns = 2;
layout.makeColumnsEqualWidth = false;
group.setLayout(layout);
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@ -334,24 +334,18 @@ public class SettingsBlock extends AbstractCOptionPage {
}
});
Button browseLocal = new Button(group, SWT.NONE);
browseLocal.setText(MakeUIPlugin.getResourceString(MAKE_BUILD_DIR_BROWSE_LOCAL));
browseLocal.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
dialog.setText(MakeUIPlugin.getResourceString("SettingsBlock.title.selectLocationToBuildFrom"));
dialog.setFilterPath(getContainer().getProject().toString());
String directory = dialog.open();
if (directory != null) {
if (directory.trim().length() > 0) {
buildLocation.setText(directory);
}
}
}
});
Button browseWorkspace = new Button(group, SWT.NONE);
Composite buttons = ControlFactory.createComposite(group, 4);
layout = new GridLayout(4, false);
layout.marginHeight = layout.marginWidth = 0;
buttons.setLayout(layout);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
buttons.setLayoutData(gd);
Label emptyLabel = ControlFactory.createLabel(buttons, ""); //$NON-NLS-1$
emptyLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Button browseWorkspace = new Button(buttons, SWT.NONE);
browseWorkspace.setText(MakeUIPlugin.getResourceString(MAKE_BUILD_DIR_BROWSE_WORKSPACE));
browseWorkspace.addSelectionListener(new SelectionAdapter() {
@ -366,8 +360,26 @@ public class SettingsBlock extends AbstractCOptionPage {
}
}
});
Button browseFilesystem = new Button(buttons, SWT.NONE);
browseFilesystem.setText(MakeUIPlugin.getResourceString(MAKE_BUILD_DIR_BROWSE_FILESYSTEM));
browseFilesystem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
dialog.setText(MakeUIPlugin.getResourceString("SettingsBlock.title.selectLocationToBuildFrom"));
dialog.setFilterPath(getContainer().getProject().toString());
String directory = dialog.open();
if (directory != null) {
if (directory.trim().length() > 0) {
buildLocation.setText(directory);
}
}
}
});
buildLocation.setText(fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_LOCATION, "")); //$NON-NLS-1$
locationVariablesButton = addVariablesButton(group, buildLocation);
locationVariablesButton = addVariablesButton(buttons, buildLocation);
}
/**