Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/BinaryParsTab.java31
1 files changed, 27 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/BinaryParsTab.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/BinaryParsTab.java
index 0e801986688..6965ee573d0 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/BinaryParsTab.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/BinaryParsTab.java
@@ -38,6 +38,7 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.model.CoreModelUtil;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
import org.eclipse.cdt.core.settings.model.ICTargetPlatformSetting;
import org.eclipse.cdt.ui.CUIPlugin;
@@ -71,6 +72,8 @@ public class BinaryParsTab extends AbstractCPropertyTab {
protected Table table;
protected CheckboxTableViewer tv;
protected Composite parserGroup;
+
+ private ICTargetPlatformSetting tps;
// private ICTargetPlatformSetting tps;
@@ -169,7 +172,19 @@ public class BinaryParsTab extends AbstractCPropertyTab {
}
public void updateData(ICResourceDescription cfgd) {
- String[] ids = CoreModelUtil.getBinaryParserIds(page.getCfgsEditable());
+ String[] ids = null;
+ if (page.isForPrefs()) { // prefs
+ if (cfgd != null && cfgd.getConfiguration() != null) {
+ tps = cfgd.getConfiguration().getTargetPlatformSetting();
+ if (tps != null)
+ ids = tps.getBinaryParserIds();
+ }
+ if (ids == null)
+ ids = new String[0]; // no selection
+ } else { // project
+ ICConfigurationDescription[] cfgs = page.getCfgsEditable();
+ ids = CoreModelUtil.getBinaryParserIds(cfgs);
+ }
Object[] data = new Object[configMap.size()];
HashMap clone = new HashMap(configMap);
// add checked elements
@@ -294,8 +309,12 @@ public class BinaryParsTab extends AbstractCPropertyTab {
}
}
- protected void performDefaults() {
- CoreModelUtil.setBinaryParserIds(page.getCfgsEditable(), null);
+ protected void performDefaults() {
+ if (page.isForProject())
+ CoreModelUtil.setBinaryParserIds(page.getCfgsEditable(), null);
+ else
+ if (tps != null)
+ tps.setBinaryParserIds(null);
informPages(false);
updateData(getResDesc());
}
@@ -357,7 +376,11 @@ public class BinaryParsTab extends AbstractCPropertyTab {
ids[i] = ((BinaryParserConfiguration)objs[i]).getID();
}
}
- CoreModelUtil.setBinaryParserIds(page.getCfgsEditable(), ids);
+ if (page.isForPrefs()) {
+ if (tps != null) tps.setBinaryParserIds(ids);
+ } else {
+ CoreModelUtil.setBinaryParserIds(page.getCfgsEditable(), ids);
+ }
}
// This page can be displayed for project only
public boolean canBeVisible() {

Back to the top