diff --git a/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml b/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml
index 4b374ab8c76..7fab880aa16 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml
+++ b/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml
@@ -497,7 +497,7 @@
-
+
-
+
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/preferences/PropertyPageDefsTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/preferences/PropertyPageDefsTab.java
index 1cd10ae5afc..c547f2bf155 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/preferences/PropertyPageDefsTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/preferences/PropertyPageDefsTab.java
@@ -31,6 +31,7 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
private Button show_mng;
private Button show_sav;
private Button show_tool;
+ private Button show_exp;
private Button b_0;
private Button b_1;
private Button b_2;
@@ -60,6 +61,10 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
show_tool.setText(UIMessages.getString("PropertyPageDefsTab.4")); //$NON-NLS-1$
show_tool.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ show_exp = new Button(usercomp, SWT.CHECK);
+ show_exp.setText(UIMessages.getString("PropertyPageDefsTab.10")); //$NON-NLS-1$
+ show_exp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
Group discGrp = new Group(usercomp, SWT.NONE);
discGrp.setText(UIMessages.getString("PropertyPageDefsTab.5")); //$NON-NLS-1$
discGrp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -83,6 +88,7 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
show_mng.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOMNG));
show_sav.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOSAVE));
show_tool.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_TOOLM));
+ show_exp.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_EXPORT));
switch (CDTPrefUtil.getInt(CDTPrefUtil.KEY_DISC_NAMES)) {
case CDTPrefUtil.DISC_NAMING_UNIQUE_OR_BOTH: b_0.setSelection(true); break;
@@ -98,6 +104,7 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOMNG, !show_mng.getSelection());
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOSAVE, !show_sav.getSelection());
CDTPrefUtil.setBool(CDTPrefUtil.KEY_TOOLM, show_tool.getSelection());
+ CDTPrefUtil.setBool(CDTPrefUtil.KEY_EXPORT, show_exp.getSelection());
int x = 0;
if (b_1.getSelection()) x = 1;
else if (b_2.getSelection()) x = 2;
@@ -111,6 +118,7 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
show_mng.setSelection(true);
show_mng.setSelection(true);
show_tool.setSelection(false);
+ show_exp.setSelection(false);
b_0.setSelection(true);
}
diff --git a/core/org.eclipse.cdt.ui/plugin.xml b/core/org.eclipse.cdt.ui/plugin.xml
index 62d0d667d39..a18d52414a7 100644
--- a/core/org.eclipse.cdt.ui/plugin.xml
+++ b/core/org.eclipse.cdt.ui/plugin.xml
@@ -2054,7 +2054,7 @@
id="org.eclipse.cdt.Tester3"
class="org.eclipse.cdt.ui.newui.PropertyTester"
namespace="org.eclipse.cdt.ui"
- properties="toolEditEnabled"
+ properties="pageEnabled"
type="java.lang.Object"/>
0) {
for (int i = 0; i < configs.length; i++) {
if (configs[i].getName().equals(fConfigName)) {
configs[i].setActive();
- try {
- CoreModel.getDefault().setProjectDescription(prj, prjd);
- AbstractPage.updateViews(prj);
- } catch (CoreException e) { }
+ CDTPropertyManager.performOk(null);
+ AbstractPage.updateViews(prj);
break;
}
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ChangeBuildConfigMenuAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ChangeBuildConfigMenuAction.java
index 93903594ba4..6d5fd99e361 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ChangeBuildConfigMenuAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ChangeBuildConfigMenuAction.java
@@ -70,7 +70,7 @@ public class ChangeBuildConfigMenuAction extends ChangeBuildConfigActionBase imp
public void run(IAction action) {
if (fProjects.size() == 1) {
IProject project = (IProject)fProjects.toArray(new IProject[1])[0];
- ManageConfigDialog.manage(project);
+ ManageConfigDialog.manage(project, true);
} else {
MessageDialog.openInformation(CUIPlugin.getActiveWorkbenchShell(),
ActionMessages.getString("ChangeBuildConfigMenuAction.title"), //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ManageConfigsAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ManageConfigsAction.java
index 83f9eb70062..e52d85f4fe6 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ManageConfigsAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ManageConfigsAction.java
@@ -10,11 +10,6 @@
*******************************************************************************/
package org.eclipse.cdt.ui.actions;
-import org.eclipse.cdt.core.model.CoreModel;
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
-import org.eclipse.cdt.core.settings.model.ICProjectDescription;
-import org.eclipse.cdt.ui.newui.ManageConfigDialog;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.jface.action.IAction;
@@ -27,6 +22,12 @@ import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowPulldownDelegate2;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.ui.newui.ManageConfigDialog;
+
/**
* Action which changes active build configuration of the current project to
* the given one.
@@ -89,7 +90,7 @@ implements IWorkbenchWindowPulldownDelegate2, IObjectActionDelegate {
public void run(IAction action) {
if (project != null)
- ManageConfigDialog.manage(project);
+ ManageConfigDialog.manage(project, true);
}
public void dispose() { project = null; }
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
index e942edd54f6..f6138caf1f6 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
@@ -102,13 +102,10 @@ implements
IPreferencePageContainer, // dynamic pages
ICPropertyProvider // utility methods for tabs
{
- private static ArrayList pages = new ArrayList(5);
private static ICResourceDescription resd = null;
private static ICConfigurationDescription[] cfgDescs = null;
private static ICConfigurationDescription[] multiCfgs = null; // selected multi cfg
- private static ICProjectDescription prjd = null;
private static int cfgIndex = 0;
- protected static boolean saveDone = false;
// tabs
private static final String EXTENSION_POINT_ID = "org.eclipse.cdt.ui.cPropertyTab"; //$NON-NLS-1$
public static final String ELEMENT_NAME = "tab"; //$NON-NLS-1$
@@ -177,18 +174,14 @@ implements
}
}
-
/**
* Default constructor
*/
public AbstractPage() {
- // reset static values before new session
- if (pages.size() == 0) {
- prjd = null; // force getting new descriptors
- saveDone = false; // needs in performOK();
+ if (CDTPropertyManager.getPagesCount() == 0) {
+ cfgDescs = null;
+ cfgIndex = 0;
}
- // register current page
- if (!pages.contains(this)) pages.add(this);
}
protected Control createContents(Composite parent) {
@@ -263,9 +256,7 @@ implements
manageButton.setLayoutData(gd);
manageButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- performOk();
- if (ManageConfigDialog.manage(getProject())) {
- prjd = null;
+ if (ManageConfigDialog.manage(getProject(), false)) {
cfgDescs = null;
populateConfigurations();
}
@@ -432,19 +423,22 @@ implements
private boolean performSave(int mode) {
final int finalMode = mode;
if (noContentOnPage || !displayedConfig) return true;
- if ((mode == SAVE_MODE_OK || mode == SAVE_MODE_APPLYOK) && saveDone) return true; // do not duplicate
+ if ((mode == SAVE_MODE_OK || mode == SAVE_MODE_APPLYOK) && CDTPropertyManager.isSaveDone()) return true; // do not duplicate
final boolean needs = (mode != SAVE_MODE_OK);
- final ICProjectDescription local_prjd = needs ? CoreModel.getDefault().getProjectDescription(prjd.getProject()) : null;
+ final ICProjectDescription local_prjd = needs ? CoreModel.getDefault().getProjectDescription(getProject()) : null;
ICConfigurationDescription c = needs ? local_prjd.getConfigurationById(resd.getConfiguration().getId()) : null;
final ICResourceDescription local_cfgd = needs ? getResDesc(c) : null;
IRunnableWithProgress runnable = new IRunnableWithProgress() {
private void sendOK() {
- for (int j=0; j 1) return; // do not duplicate
+ if (CDTPropertyManager.getPagesCount() > 1) return; // do not duplicate
if (CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOSAVE)) return;
if (internalElement == null && !checkElement())
@@ -680,8 +673,11 @@ implements
if (excludeFromBuildCheck != null)
excludeFromBuildCheck.setSelection(resd.isExcluded());
- for (int i=0; i button
PropertyPageDefsTab.1=Display "Data hierarchy" tab
+PropertyPageDefsTab.10=Display "Export Path & Symbols" tab
PropertyPageDefsTab.2=Enable multiple configurations setting
PropertyPageDefsTab.3=Save property dialog size and position
PropertyPageDefsTab.4=Display "Toolchain modification" tab
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PropertyTester.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PropertyTester.java
index 707a95ec252..34b9b350f59 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PropertyTester.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PropertyTester.java
@@ -19,8 +19,10 @@ import org.eclipse.cdt.core.model.ITranslationUnit;
* Checks whether given object is a source file.
*/
public class PropertyTester extends org.eclipse.core.expressions.PropertyTester {
- private static final String KEY_SRC = "isSource"; //$NON-NLS-1$
- private static final String KEY_TOOL = "toolEditEnabled"; //$NON-NLS-1$
+ private static final String KEY_SRC = "isSource"; //$NON-NLS-1$
+ private static final String KEY_PAGE = "pageEnabled"; //$NON-NLS-1$
+ private static final String VAL_EXP = "export"; //$NON-NLS-1$
+ private static final String VAL_TOOL = "toolEdit"; //$NON-NLS-1$
public boolean test(Object receiver, String property, Object[] args,
Object expectedValue) {
@@ -32,8 +34,13 @@ public class PropertyTester extends org.eclipse.core.expressions.PropertyTester
IFile file = (IFile)receiver;
return CoreModel.isValidSourceUnitName(file.getProject(), file.getName());
}
- } else if (KEY_TOOL.equals(property)) {
- return CDTPrefUtil.getBool(CDTPrefUtil.KEY_TOOLM);
+ } else if (KEY_PAGE.equals(property)
+ && expectedValue instanceof String) {
+ String s = (String) expectedValue;
+ if (VAL_EXP.equalsIgnoreCase(s))
+ return CDTPrefUtil.getBool(CDTPrefUtil.KEY_EXPORT);
+ if (VAL_TOOL.equalsIgnoreCase(s))
+ return CDTPrefUtil.getBool(CDTPrefUtil.KEY_TOOLM);
}
return false;
}