Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2013-05-03 18:32:52 -0400
committerAndrew Gvozdev2013-05-04 07:30:39 -0400
commite35e32e8b0d09390ada90cb22f02fdecad60a866 (patch)
treebfc2e1d0cd7d4c2ba7d4db628a183b6e11025c67 /build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder
parentc4bbdc90765c577123a308c256533b74453f2fd8 (diff)
downloadorg.eclipse.cdt-e35e32e8b0d09390ada90cb22f02fdecad60a866.tar.gz
org.eclipse.cdt-e35e32e8b0d09390ada90cb22f02fdecad60a866.tar.xz
org.eclipse.cdt-e35e32e8b0d09390ada90cb22f02fdecad60a866.zip
bug 407087: Hide old "Scanner Discovery" page in project properties by default
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder')
-rwxr-xr-xbuild/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/Messages.properties12
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/preferences/PropertyPageDefsTab.java31
2 files changed, 32 insertions, 11 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/Messages.properties b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/Messages.properties
index 16f394e16a..3e3cc73ada 100755
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/Messages.properties
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/Messages.properties
@@ -262,22 +262,22 @@ PropertyMultiCfgTab_7=Show all elements except doubles (disjunction)
PropertyMultiCfgTab_8=String List Write Mode
PropertyMultiCfgTab_9=Define how to save changes in string lists for different configurations:
PropertyPageDefsTab_0=Show "Manage Configurations..." button
-PropertyPageDefsTab_1=Display "Data Hierarchy" tab
-PropertyPageDefsTab_10=Display "Export Settings" tab
+PropertyPageDefsTab_1=Display "Data Hierarchy" tab on Paths and Symbols page
+PropertyPageDefsTab_10=Display "Export Settings" page
PropertyPageDefsTab_11=Save Property Dialog Bounds
PropertyPageDefsTab_12=Save size and position
PropertyPageDefsTab_13=Save size only
PropertyPageDefsTab_14=Do not save at all
PropertyPageDefsTab_16=Display tool option tips of "Tool Settings" tab at fixed location
-PropertyPageDefsTab_4=Display "Tool Chain Editor" tab
+PropertyPageDefsTab_4=Display "Tool Chain Editor" page
PropertyPageDefsTab_5=Discovery Profiles Naming Rule
PropertyPageDefsTab_6=Show disc. page names if they are unique. Else names + profile IDs.
PropertyPageDefsTab_7=Show disc. page names if they are unique. Else show profile IDs.
PropertyPageDefsTab_8=Always show names + profile IDs
PropertyPageDefsTab_9=Always show profile IDs only
-PropertyPageDefsTab_showIncludeFileTab=Display "Include Files" tab
-PropertyPageDefsTab_showProvidersTab=Display "Preprocessor Include Paths" tab and enable language settings providers
-PropertyPageDefsTab_showScannerDiscoveryTab=Display "Scanner Discovery" tab
+PropertyPageDefsTab_showIncludeFileTab=Display "Include Files" tab on Paths and Symbols page
+PropertyPageDefsTab_showProvidersTab=Display "Preprocessor Include Paths" page
+PropertyPageDefsTab_showScannerDiscoveryTab=Display "Discovery Options" page
ProjectConvert_convertersList=Converters List
AbstractPrefPage_0=\ Preference settings will be applied to new projects \n only when there were no toolchains selected.
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 c54c02609f..fbe7d16aae 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
@@ -17,6 +17,8 @@ import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -52,6 +54,8 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
private Button s_1;
private Button s_2;
+ private Group discGrp;
+
@Override
public void createControls(Composite parent) {
super.createControls(parent);
@@ -80,6 +84,16 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
show_sd = new Button(usercomp, SWT.CHECK);
show_sd.setText(Messages.PropertyPageDefsTab_showScannerDiscoveryTab);
show_sd.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ show_sd.addSelectionListener(new SelectionListener() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ showDiscoveryProfiles(show_sd.getSelection());
+ }
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ showDiscoveryProfiles(show_sd.getSelection());
+ }
+ });
show_providers_tab = new Button(usercomp, SWT.CHECK);
show_providers_tab.setText(Messages.PropertyPageDefsTab_showProvidersTab);
@@ -105,7 +119,7 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
s_2 = new Button(saveGrp, SWT.RADIO);
s_2.setText(Messages.PropertyPageDefsTab_14);
- Group discGrp = new Group(usercomp, SWT.NONE);
+ discGrp = new Group(usercomp, SWT.NONE);
discGrp.setText(Messages.PropertyPageDefsTab_5);
discGrp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
fl = new FillLayout(SWT.VERTICAL);
@@ -122,14 +136,14 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
b_2.setText(Messages.PropertyPageDefsTab_8);
b_3 = new Button(discGrp, SWT.RADIO);
b_3.setText(Messages.PropertyPageDefsTab_9);
+ showDiscoveryProfiles(show_sd.getSelection());
show_inc_files.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_SHOW_INC_FILES));
show_tree.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_DTREE));
show_mng.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOMNG));
show_tool.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOTOOLM));
show_exp.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_EXPORT));
- // ensure default is "true" for scanner discovery tab
- show_sd.setSelection(!CDTPrefUtil.getStr(CDTPrefUtil.KEY_SHOW_SD).equals(Boolean.FALSE.toString()));
+ show_sd.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_SHOW_SD));
show_providers_tab.setSelection(ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(null));
show_tipbox.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_TIPBOX));
@@ -147,6 +161,14 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
}
}
+ private void showDiscoveryProfiles(boolean visible) {
+ discGrp.setVisible(visible);
+ b_0.setVisible(visible);
+ b_1.setVisible(visible);
+ b_2.setVisible(visible);
+ b_3.setVisible(visible);
+ }
+
@Override
protected void performOK() {
CDTPrefUtil.setBool(CDTPrefUtil.KEY_SHOW_INC_FILES, show_inc_files.getSelection());
@@ -154,8 +176,7 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOMNG, !show_mng.getSelection());
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOTOOLM, !show_tool.getSelection());
CDTPrefUtil.setBool(CDTPrefUtil.KEY_EXPORT, show_exp.getSelection());
- // ensure default is "true" for scanner discovery tab
- CDTPrefUtil.setStr(CDTPrefUtil.KEY_SHOW_SD, Boolean.toString(show_sd.getSelection()));
+ CDTPrefUtil.setBool(CDTPrefUtil.KEY_SHOW_SD, show_sd.getSelection());
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(null, show_providers_tab.getSelection());
CDTPrefUtil.setBool(CDTPrefUtil.KEY_TIPBOX, show_tipbox.getSelection());
int x = 0;

Back to the top