mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 16:55:38 +02:00
- cleanup UI
- fixed problems with make target editor
This commit is contained in:
parent
44e85901c9
commit
c1d289e14d
6 changed files with 72 additions and 67 deletions
|
@ -27,11 +27,10 @@ WizardCheckboxTablePart.WizardCheckboxTablePart.counter={0} of {1} Selected
|
||||||
SettingsBlock.label=Make Builder
|
SettingsBlock.label=Make Builder
|
||||||
SettingsBlock.message=Make builder settings.
|
SettingsBlock.message=Make builder settings.
|
||||||
SettingsBlock.makeSetting.group_label=Build Setting
|
SettingsBlock.makeSetting.group_label=Build Setting
|
||||||
SettingsBlock.makeSetting.keepOnGoing=Keep Going On Error
|
SettingsBlock.makeSetting.stopOnError=Stop on first build error.
|
||||||
SettingsBlock.makeSetting.stopOnError=Stop On Error
|
SettingsBlock.makeCmd.group_label=Build command
|
||||||
SettingsBlock.makeCmd.group_label=Build Command
|
SettingsBlock.makeCmd.use_default=Use default
|
||||||
SettingsBlock.makeCmd.use_default=Use Default
|
SettingsBlock.makeCmd.label=Build command:
|
||||||
SettingsBlock.makeCmd.label=Build Command:
|
|
||||||
SettingsBlock.makeDir.group_label=Build Directory
|
SettingsBlock.makeDir.group_label=Build Directory
|
||||||
SettingsBlock.makeDir.label=Build directory:
|
SettingsBlock.makeDir.label=Build directory:
|
||||||
SettingsBlock.makeDir.browse=Browse...
|
SettingsBlock.makeDir.browse=Browse...
|
||||||
|
|
|
@ -76,6 +76,6 @@ public class LexicalSortingAction extends Action {
|
||||||
}
|
}
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class MakefileSourceConfiguration extends SourceViewerConfiguration {
|
||||||
public SingleTokenScanner(TextAttribute attribute) {
|
public SingleTokenScanner(TextAttribute attribute) {
|
||||||
setDefaultReturnToken(new Token(attribute));
|
setDefaultReturnToken(new Token(attribute));
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for MakeConfiguration
|
* Constructor for MakeConfiguration
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
package org.eclipse.cdt.make.ui;
|
package org.eclipse.cdt.make.ui;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) Copyright QNX Software Systems Ltd. 2002.
|
* (c) Copyright QNX Software Systems Ltd. 2002. All Rights Reserved.
|
||||||
* All Rights Reserved.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -194,7 +193,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
|
||||||
if (viewer instanceof AbstractTreeViewer) {
|
if (viewer instanceof AbstractTreeViewer) {
|
||||||
((AbstractTreeViewer) viewer).remove(affected.toArray());
|
((AbstractTreeViewer) viewer).remove(affected.toArray());
|
||||||
} else {
|
} else {
|
||||||
((StructuredViewer) viewer).refresh(resource);
|
viewer.refresh(resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -212,7 +211,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
|
||||||
if (viewer instanceof AbstractTreeViewer) {
|
if (viewer instanceof AbstractTreeViewer) {
|
||||||
((AbstractTreeViewer) viewer).add(resource, affected.toArray());
|
((AbstractTreeViewer) viewer).add(resource, affected.toArray());
|
||||||
} else {
|
} else {
|
||||||
((StructuredViewer) viewer).refresh(resource);
|
viewer.refresh(resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,7 +222,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
|
||||||
Control ctrl = viewer.getControl();
|
Control ctrl = viewer.getControl();
|
||||||
if (ctrl != null && !ctrl.isDisposed()) {
|
if (ctrl != null && !ctrl.isDisposed()) {
|
||||||
// Do a sync exec, not an async exec, since the resource delta
|
// Do a sync exec, not an async exec, since the resource delta
|
||||||
// must be traversed in this method. It is destroyed
|
// must be traversed in this method. It is destroyed
|
||||||
// when this method returns.
|
// when this method returns.
|
||||||
ctrl.getDisplay().syncExec(new Runnable() {
|
ctrl.getDisplay().syncExec(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
|
@ -1,21 +1,19 @@
|
||||||
/*
|
/*******************************************************************************
|
||||||
* Created on 22-Aug-2003
|
* Created on 22-Aug-2003
|
||||||
*
|
*
|
||||||
* Copyright (c) 2002,2003 QNX Software Systems Ltd.
|
* Copyright (c) 2002,2003 QNX Software Systems Ltd.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors: QNX Software Systems - Initial API and implementation
|
||||||
* QNX Software Systems - Initial API and implementation
|
******************************************************************************/
|
||||||
***********************************************************************/
|
|
||||||
package org.eclipse.cdt.make.ui.dialogs;
|
package org.eclipse.cdt.make.ui.dialogs;
|
||||||
|
|
||||||
import org.eclipse.cdt.make.core.IMakeBuilderInfo;
|
import org.eclipse.cdt.make.core.IMakeBuilderInfo;
|
||||||
import org.eclipse.cdt.make.core.IMakeTarget;
|
import org.eclipse.cdt.make.core.IMakeTarget;
|
||||||
import org.eclipse.cdt.make.core.IMakeTargetManager;
|
import org.eclipse.cdt.make.core.IMakeTargetManager;
|
||||||
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
||||||
import org.eclipse.cdt.make.internal.ui.*;
|
|
||||||
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
|
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
|
||||||
|
import org.eclipse.cdt.make.internal.ui.MessageLine;
|
||||||
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
||||||
import org.eclipse.cdt.utils.ui.controls.RadioButtonsArea;
|
|
||||||
import org.eclipse.core.resources.IContainer;
|
import org.eclipse.core.resources.IContainer;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
@ -52,18 +50,14 @@ public class MakeTargetDialog extends Dialog {
|
||||||
private static final String SETTING_PREFIX = "SettingsBlock"; //$NON-NLS-1$
|
private static final String SETTING_PREFIX = "SettingsBlock"; //$NON-NLS-1$
|
||||||
|
|
||||||
private static final String MAKE_SETTING_GROUP = SETTING_PREFIX + ".makeSetting.group_label"; //$NON-NLS-1$
|
private static final String MAKE_SETTING_GROUP = SETTING_PREFIX + ".makeSetting.group_label"; //$NON-NLS-1$
|
||||||
private static final String MAKE_SETTING_KEEP_GOING = SETTING_PREFIX + ".makeSetting.keepOnGoing"; //$NON-NLS-1$
|
|
||||||
private static final String MAKE_SETTING_STOP_ERROR = SETTING_PREFIX + ".makeSetting.stopOnError"; //$NON-NLS-1$
|
private static final String MAKE_SETTING_STOP_ERROR = SETTING_PREFIX + ".makeSetting.stopOnError"; //$NON-NLS-1$
|
||||||
|
|
||||||
private static final String MAKE_CMD_GROUP = SETTING_PREFIX + ".makeCmd.group_label"; //$NON-NLS-1$
|
private static final String MAKE_CMD_GROUP = SETTING_PREFIX + ".makeCmd.group_label"; //$NON-NLS-1$
|
||||||
private static final String MAKE_CMD_USE_DEFAULT = SETTING_PREFIX + ".makeCmd.use_default"; //$NON-NLS-1$
|
private static final String MAKE_CMD_USE_DEFAULT = SETTING_PREFIX + ".makeCmd.use_default"; //$NON-NLS-1$
|
||||||
private static final String MAKE_CMD_LABEL = SETTING_PREFIX + ".makeCmd.label"; //$NON-NLS-1$
|
private static final String MAKE_CMD_LABEL = SETTING_PREFIX + ".makeCmd.label"; //$NON-NLS-1$
|
||||||
|
|
||||||
private static final String KEEP_ARG = "keep"; //$NON-NLS-1$
|
|
||||||
private static final String STOP_ARG = "stop"; //$NON-NLS-1$
|
|
||||||
|
|
||||||
Text targetNameText;
|
Text targetNameText;
|
||||||
RadioButtonsArea stopRadioButtons;
|
Button stopOnErrorButton;
|
||||||
Text commandText;
|
Text commandText;
|
||||||
Button defButton;
|
Button defButton;
|
||||||
Text targetText;
|
Text targetText;
|
||||||
|
@ -115,7 +109,6 @@ public class MakeTargetDialog extends Dialog {
|
||||||
buildCommand = buildInfo.getBuildCommand();
|
buildCommand = buildInfo.getBuildCommand();
|
||||||
buildArguments = buildInfo.getBuildArguments();
|
buildArguments = buildInfo.getBuildArguments();
|
||||||
targetString = buildInfo.getIncrementalBuildTarget();
|
targetString = buildInfo.getIncrementalBuildTarget();
|
||||||
targetName = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void configureShell(Shell newShell) {
|
protected void configureShell(Shell newShell) {
|
||||||
|
@ -129,7 +122,9 @@ public class MakeTargetDialog extends Dialog {
|
||||||
super.configureShell(newShell);
|
super.configureShell(newShell);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
* @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
|
* @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
|
||||||
*/
|
*/
|
||||||
protected Control createDialogArea(Composite parent) {
|
protected Control createDialogArea(Composite parent) {
|
||||||
|
@ -152,14 +147,15 @@ public class MakeTargetDialog extends Dialog {
|
||||||
|
|
||||||
createNameControl(composite);
|
createNameControl(composite);
|
||||||
createTargetControl(composite);
|
createTargetControl(composite);
|
||||||
createSettingControls(composite);
|
|
||||||
createBuildCmdControls(composite);
|
createBuildCmdControls(composite);
|
||||||
|
createSettingControls(composite);
|
||||||
return composite;
|
return composite;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void createNameControl(Composite parent) {
|
protected void createNameControl(Composite parent) {
|
||||||
Composite composite = ControlFactory.createComposite(parent, 2);
|
Composite composite = ControlFactory.createComposite(parent, 2);
|
||||||
((GridLayout) composite.getLayout()).makeColumnsEqualWidth = false;
|
((GridLayout) composite.getLayout()).makeColumnsEqualWidth = false;
|
||||||
|
((GridLayout) composite.getLayout()).horizontalSpacing = 0;
|
||||||
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
Label label = ControlFactory.createLabel(composite, MakeUIPlugin.getResourceString(TARGET_NAME_LABEL));
|
Label label = ControlFactory.createLabel(composite, MakeUIPlugin.getResourceString(TARGET_NAME_LABEL));
|
||||||
((GridData) (label.getLayoutData())).horizontalAlignment = GridData.BEGINNING;
|
((GridData) (label.getLayoutData())).horizontalAlignment = GridData.BEGINNING;
|
||||||
|
@ -167,7 +163,6 @@ public class MakeTargetDialog extends Dialog {
|
||||||
targetNameText = ControlFactory.createTextField(composite, SWT.SINGLE | SWT.BORDER);
|
targetNameText = ControlFactory.createTextField(composite, SWT.SINGLE | SWT.BORDER);
|
||||||
((GridData) (targetNameText.getLayoutData())).horizontalAlignment = GridData.FILL;
|
((GridData) (targetNameText.getLayoutData())).horizontalAlignment = GridData.FILL;
|
||||||
((GridData) (targetNameText.getLayoutData())).grabExcessHorizontalSpace = true;
|
((GridData) (targetNameText.getLayoutData())).grabExcessHorizontalSpace = true;
|
||||||
targetNameText.setText(targetName);
|
|
||||||
targetNameText.addListener(SWT.Modify, new Listener() {
|
targetNameText.addListener(SWT.Modify, new Listener() {
|
||||||
public void handleEvent(Event e) {
|
public void handleEvent(Event e) {
|
||||||
String newName = targetNameText.getText().trim();
|
String newName = targetNameText.getText().trim();
|
||||||
|
@ -185,25 +180,28 @@ public class MakeTargetDialog extends Dialog {
|
||||||
getButton(IDialogConstants.OK_ID).setEnabled(false);
|
getButton(IDialogConstants.OK_ID).setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void createSettingControls(Composite parent) {
|
protected void createSettingControls(Composite parent) {
|
||||||
String[][] radios = new String[][] { { MakeUIPlugin.getResourceString(MAKE_SETTING_STOP_ERROR), STOP_ARG }, {
|
Group group = ControlFactory.createGroup(parent, MakeUIPlugin.getResourceString(MAKE_SETTING_GROUP), 1);
|
||||||
MakeUIPlugin.getResourceString(MAKE_SETTING_KEEP_GOING), KEEP_ARG }
|
stopOnErrorButton = new Button(group, SWT.CHECK);
|
||||||
};
|
stopOnErrorButton.setText(MakeUIPlugin.getResourceString(MAKE_SETTING_STOP_ERROR));
|
||||||
stopRadioButtons = new RadioButtonsArea(parent, MakeUIPlugin.getResourceString(MAKE_SETTING_GROUP), 1, radios);
|
if (isStopOnError) {
|
||||||
if (isStopOnError)
|
stopOnErrorButton.setSelection(true);
|
||||||
stopRadioButtons.setSelectValue(STOP_ARG);
|
}
|
||||||
else
|
if (isDefaultCommand) {
|
||||||
stopRadioButtons.setSelectValue(KEEP_ARG);
|
stopOnErrorButton.setEnabled(true);
|
||||||
|
} else {
|
||||||
|
stopOnErrorButton.setEnabled(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void createBuildCmdControls(Composite parent) {
|
protected void createBuildCmdControls(Composite parent) {
|
||||||
Group group = ControlFactory.createGroup(parent, MakeUIPlugin.getResourceString(MAKE_CMD_GROUP), 1);
|
Group group = ControlFactory.createGroup(parent, MakeUIPlugin.getResourceString(MAKE_CMD_GROUP), 1);
|
||||||
GridLayout layout = new GridLayout();
|
GridLayout layout = new GridLayout();
|
||||||
layout.numColumns = 2;
|
layout.numColumns = 2;
|
||||||
|
layout.horizontalSpacing = 0;
|
||||||
layout.makeColumnsEqualWidth = false;
|
layout.makeColumnsEqualWidth = false;
|
||||||
group.setLayout(layout);
|
group.setLayout(layout);
|
||||||
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
@ -212,10 +210,10 @@ public class MakeTargetDialog extends Dialog {
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
if (defButton.getSelection() == true) {
|
if (defButton.getSelection() == true) {
|
||||||
commandText.setEnabled(false);
|
commandText.setEnabled(false);
|
||||||
stopRadioButtons.setEnabled(true);
|
stopOnErrorButton.setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
commandText.setEnabled(true);
|
commandText.setEnabled(true);
|
||||||
stopRadioButtons.setEnabled(false);
|
stopOnErrorButton.setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -249,7 +247,7 @@ public class MakeTargetDialog extends Dialog {
|
||||||
if (isDefaultCommand) {
|
if (isDefaultCommand) {
|
||||||
commandText.setEnabled(false);
|
commandText.setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
stopRadioButtons.setEnabled(false);
|
commandText.setEnabled(true);
|
||||||
}
|
}
|
||||||
defButton.setSelection(isDefaultCommand);
|
defButton.setSelection(isDefaultCommand);
|
||||||
}
|
}
|
||||||
|
@ -277,10 +275,28 @@ public class MakeTargetDialog extends Dialog {
|
||||||
createButton(parent, IDialogConstants.OK_ID, "Create", true);
|
createButton(parent, IDialogConstants.OK_ID, "Create", true);
|
||||||
}
|
}
|
||||||
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
|
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
|
||||||
|
//do this here because setting the text will set enablement on the ok button
|
||||||
|
targetNameText.setFocus();
|
||||||
|
if (targetName != null) {
|
||||||
|
targetNameText.setText(targetName);
|
||||||
|
} else {
|
||||||
|
targetNameText.setText(generateUniqueName(targetString));
|
||||||
|
}
|
||||||
|
targetNameText.selectAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
private String generateUniqueName(String targetString) {
|
||||||
|
String newName = targetString;
|
||||||
|
int i = 0;
|
||||||
|
while(fTargetManager.findTarget(fContainer, newName) != null) {
|
||||||
|
i++;
|
||||||
|
newName = targetString + " (" + Integer.toString(i) + ")";
|
||||||
|
}
|
||||||
|
return newName;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isStopOnError() {
|
private boolean isStopOnError() {
|
||||||
return stopRadioButtons.getSelectedValue().equals(STOP_ARG);
|
return stopOnErrorButton.getSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean useDefaultBuildCmd() {
|
private boolean useDefaultBuildCmd() {
|
||||||
|
|
|
@ -12,7 +12,6 @@ import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
|
||||||
import org.eclipse.cdt.ui.dialogs.AbstractCOptionPage;
|
import org.eclipse.cdt.ui.dialogs.AbstractCOptionPage;
|
||||||
import org.eclipse.cdt.ui.dialogs.ICOptionContainer;
|
import org.eclipse.cdt.ui.dialogs.ICOptionContainer;
|
||||||
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
||||||
import org.eclipse.cdt.utils.ui.controls.RadioButtonsArea;
|
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
import org.eclipse.core.resources.IWorkspace;
|
||||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -43,7 +42,6 @@ public class SettingsBlock extends AbstractCOptionPage {
|
||||||
private static final String MAKE_MESSAGE = PREFIX + ".message"; //$NON-NLS-1$
|
private static final String MAKE_MESSAGE = PREFIX + ".message"; //$NON-NLS-1$
|
||||||
|
|
||||||
private static final String MAKE_SETTING_GROUP = PREFIX + ".makeSetting.group_label"; //$NON-NLS-1$
|
private static final String MAKE_SETTING_GROUP = PREFIX + ".makeSetting.group_label"; //$NON-NLS-1$
|
||||||
private static final String MAKE_SETTING_KEEP_GOING = PREFIX + ".makeSetting.keepOnGoing"; //$NON-NLS-1$
|
|
||||||
private static final String MAKE_SETTING_STOP_ERROR = PREFIX + ".makeSetting.stopOnError"; //$NON-NLS-1$
|
private static final String MAKE_SETTING_STOP_ERROR = PREFIX + ".makeSetting.stopOnError"; //$NON-NLS-1$
|
||||||
|
|
||||||
private static final String MAKE_CMD_GROUP = PREFIX + ".makeCmd.group_label"; //$NON-NLS-1$
|
private static final String MAKE_CMD_GROUP = PREFIX + ".makeCmd.group_label"; //$NON-NLS-1$
|
||||||
|
@ -61,10 +59,7 @@ public class SettingsBlock extends AbstractCOptionPage {
|
||||||
private static final String MAKE_BUILD_DIR_LABEL = PREFIX + ".makeDir.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 = PREFIX + ".makeDir.browse"; //$NON-NLS-1$
|
private static final String MAKE_BUILD_DIR_BROWSE = PREFIX + ".makeDir.browse"; //$NON-NLS-1$
|
||||||
|
|
||||||
private static final String KEEP_ARG = "keep"; //$NON-NLS-1$
|
Button stopOnErrorButton;
|
||||||
private static final String STOP_ARG = "stop"; //$NON-NLS-1$
|
|
||||||
|
|
||||||
RadioButtonsArea stopRadioButtons;
|
|
||||||
|
|
||||||
Button defButton;
|
Button defButton;
|
||||||
Text buildCommand;
|
Text buildCommand;
|
||||||
|
@ -90,18 +85,12 @@ public class SettingsBlock extends AbstractCOptionPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void createSettingControls(Composite parent) {
|
protected void createSettingControls(Composite parent) {
|
||||||
String[][] radios = new String[][] { { MakeUIPlugin.getResourceString(MAKE_SETTING_STOP_ERROR), STOP_ARG }, {
|
Group group = ControlFactory.createGroup(parent, MakeUIPlugin.getResourceString(MAKE_SETTING_GROUP), 1);
|
||||||
MakeUIPlugin.getResourceString(MAKE_SETTING_KEEP_GOING), KEEP_ARG }
|
stopOnErrorButton = new Button(group, SWT.CHECK);
|
||||||
};
|
stopOnErrorButton.setText(MakeUIPlugin.getResourceString(MAKE_SETTING_STOP_ERROR));
|
||||||
stopRadioButtons = new RadioButtonsArea(parent, MakeUIPlugin.getResourceString(MAKE_SETTING_GROUP), 1, radios);
|
if (fBuildInfo.isStopOnError()) {
|
||||||
GridLayout layout = new GridLayout();
|
stopOnErrorButton.setSelection(true);
|
||||||
layout.marginHeight = 0;
|
}
|
||||||
layout.marginWidth = 0;
|
|
||||||
stopRadioButtons.setLayout(layout);
|
|
||||||
if (fBuildInfo.isStopOnError())
|
|
||||||
stopRadioButtons.setSelectValue(STOP_ARG);
|
|
||||||
else
|
|
||||||
stopRadioButtons.setSelectValue(KEEP_ARG);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void createBuildCmdControls(Composite parent) {
|
protected void createBuildCmdControls(Composite parent) {
|
||||||
|
@ -117,11 +106,11 @@ public class SettingsBlock extends AbstractCOptionPage {
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
if (defButton.getSelection() == true) {
|
if (defButton.getSelection() == true) {
|
||||||
buildCommand.setEnabled(false);
|
buildCommand.setEnabled(false);
|
||||||
stopRadioButtons.setEnabled(true);
|
stopOnErrorButton.setEnabled(true);
|
||||||
getContainer().updateContainer();
|
getContainer().updateContainer();
|
||||||
} else {
|
} else {
|
||||||
buildCommand.setEnabled(true);
|
buildCommand.setEnabled(true);
|
||||||
stopRadioButtons.setEnabled(false);
|
stopOnErrorButton.setEnabled(false);
|
||||||
getContainer().updateContainer();
|
getContainer().updateContainer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,7 +143,7 @@ public class SettingsBlock extends AbstractCOptionPage {
|
||||||
if (fBuildInfo.isDefaultBuildCmd()) {
|
if (fBuildInfo.isDefaultBuildCmd()) {
|
||||||
buildCommand.setEnabled(false);
|
buildCommand.setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
stopRadioButtons.setEnabled(false);
|
stopOnErrorButton.setEnabled(false);
|
||||||
}
|
}
|
||||||
defButton.setSelection(fBuildInfo.isDefaultBuildCmd());
|
defButton.setSelection(fBuildInfo.isDefaultBuildCmd());
|
||||||
}
|
}
|
||||||
|
@ -254,8 +243,8 @@ public class SettingsBlock extends AbstractCOptionPage {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
createSettingControls(composite);
|
|
||||||
createBuildCmdControls(composite);
|
createBuildCmdControls(composite);
|
||||||
|
createSettingControls(composite);
|
||||||
createWorkBenchBuildControls(composite);
|
createWorkBenchBuildControls(composite);
|
||||||
|
|
||||||
if (getContainer().getProject() != null) {
|
if (getContainer().getProject() != null) {
|
||||||
|
@ -335,9 +324,9 @@ public class SettingsBlock extends AbstractCOptionPage {
|
||||||
info = MakeCorePlugin.createBuildInfo(fPrefs, fBuilderID, true);
|
info = MakeCorePlugin.createBuildInfo(fPrefs, fBuilderID, true);
|
||||||
}
|
}
|
||||||
if (info.isStopOnError())
|
if (info.isStopOnError())
|
||||||
stopRadioButtons.setSelectValue(STOP_ARG);
|
stopOnErrorButton.setSelection(true);
|
||||||
else
|
else
|
||||||
stopRadioButtons.setSelectValue(KEEP_ARG);
|
stopOnErrorButton.setSelection(false);
|
||||||
if (info.getBuildCommand() != null) {
|
if (info.getBuildCommand() != null) {
|
||||||
StringBuffer cmd = new StringBuffer(info.getBuildCommand().toOSString());
|
StringBuffer cmd = new StringBuffer(info.getBuildCommand().toOSString());
|
||||||
if (!info.isDefaultBuildCmd()) {
|
if (!info.isDefaultBuildCmd()) {
|
||||||
|
@ -351,8 +340,10 @@ public class SettingsBlock extends AbstractCOptionPage {
|
||||||
}
|
}
|
||||||
if (info.isDefaultBuildCmd()) {
|
if (info.isDefaultBuildCmd()) {
|
||||||
buildCommand.setEnabled(false);
|
buildCommand.setEnabled(false);
|
||||||
|
stopOnErrorButton.setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
stopRadioButtons.setEnabled(false);
|
buildCommand.setEnabled(true);
|
||||||
|
stopOnErrorButton.setEnabled(false);
|
||||||
}
|
}
|
||||||
defButton.setSelection(info.isDefaultBuildCmd());
|
defButton.setSelection(info.isDefaultBuildCmd());
|
||||||
autoButton.setSelection(info.isAutoBuildEnable());
|
autoButton.setSelection(info.isAutoBuildEnable());
|
||||||
|
@ -364,7 +355,7 @@ public class SettingsBlock extends AbstractCOptionPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isStopOnError() {
|
private boolean isStopOnError() {
|
||||||
return stopRadioButtons.getSelectedValue().equals(STOP_ARG);
|
return stopOnErrorButton.getSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean useDefaultBuildCmd() {
|
private boolean useDefaultBuildCmd() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue