mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 09:15:38 +02:00
Bug 350499: Ask user to confirm toolchain change
When a user switches toolchain integration used, all the settings will be lost. Rather than having the user find this out the hard way, prompt about it and highlight the implications of changing toolchain. Contributed by STMicroelectronics Change-Id: I885bc5544d7222eb1aeee7c92ac98c0d1c083cb1 Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
This commit is contained in:
parent
61d1a02f32
commit
3c58527d53
3 changed files with 17 additions and 1 deletions
|
@ -286,6 +286,10 @@ public class Messages extends NLS {
|
|||
public static String WizardDefaultsTab_0;
|
||||
public static String WizardDefaultsTab_1;
|
||||
public static String RefreshPolicyTab_resourcesTreeLabel;
|
||||
public static String BuilderSettingsTab_23;
|
||||
public static String BuilderSettingsTab_24;
|
||||
public static String BuilderSettingsTab_25;
|
||||
public static String BuilderSettingsTab_26;
|
||||
|
||||
static {
|
||||
// Initialize resource bundle.
|
||||
|
|
|
@ -41,6 +41,10 @@ BuilderSettingsTab_19=Build (Incremental build)
|
|||
BuilderSettingsTab_20=Clean
|
||||
BuilderSettingsTab_21=Build location
|
||||
BuilderSettingsTab_22=Build &directory:
|
||||
BuilderSettingsTab_23=Confirm toolchain change
|
||||
BuilderSettingsTab_24=Changing toolchain will reset all tool settings to default values. Existing settings will be unrecoverable.
|
||||
BuilderSettingsTab_25=Continue
|
||||
BuilderSettingsTab_26=Cancel
|
||||
BuilderSettingsTab_Configure_Build_Arguments_In_the_Behavior_tab=Configure build arguments in the Behavior tab.
|
||||
BuildStepsTab_0=Command:
|
||||
BuildStepsTab_1=Description:
|
||||
|
|
|
@ -44,6 +44,7 @@ import org.eclipse.cdt.managedbuilder.tcmodification.IToolModification;
|
|||
import org.eclipse.cdt.ui.CDTSharedImages;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
|
@ -113,7 +114,14 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
|
|||
c_toolchain.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
modifyToolchain();
|
||||
if (MessageDialog.open(MessageDialog.WARNING, c_toolchain.getShell(), Messages.BuilderSettingsTab_23,
|
||||
Messages.BuilderSettingsTab_24, SWT.NONE, Messages.BuilderSettingsTab_25,
|
||||
Messages.BuilderSettingsTab_26) == MessageDialog.OK) {
|
||||
modifyToolchain();
|
||||
} else {
|
||||
e.doit = false;
|
||||
fillToolChainCombo();
|
||||
}
|
||||
}
|
||||
});
|
||||
c_toolchain.setEnabled(!page.isForFile());
|
||||
|
|
Loading…
Add table
Reference in a new issue