Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorJohn Cortell2010-06-17 18:44:33 +0000
committerJohn Cortell2010-06-17 18:44:33 +0000
commit7425204ea19cfa26bc0ff6387ef4035cbd2989d0 (patch)
tree4fa00a151bb7670624cfa4972d7b2c1b93ccfe78 /debug
parent7d0898c8392bc55cc1fe7dfa9401b549c86d87dc (diff)
downloadorg.eclipse.cdt-7425204ea19cfa26bc0ff6387ef4035cbd2989d0.tar.gz
org.eclipse.cdt-7425204ea19cfa26bc0ff6387ef4035cbd2989d0.tar.xz
org.eclipse.cdt-7425204ea19cfa26bc0ff6387ef4035cbd2989d0.zip
Bug 316987: Show full paths preference under C/C++->Debug is not really necessary
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/ICDebugInternalConstants.java8
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java15
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java10
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/PreferenceMessages.properties1
5 files changed, 13 insertions, 23 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF
index 0a7b35e0735..098589df549 100644
--- a/debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF
+++ b/debug/org.eclipse.cdt.debug.core/META-INF/MANIFEST.MF
@@ -18,7 +18,7 @@ Export-Package: org.eclipse.cdt.debug.core,
org.eclipse.cdt.debug.core.model,
org.eclipse.cdt.debug.core.model.provisional;x-friends:="org.eclipse.cdt.dsf,org.eclipse.cdt.debug.ui.memory.memorybrowser,org.eclipse.cdt.dsf.gdb",
org.eclipse.cdt.debug.core.sourcelookup,
- org.eclipse.cdt.debug.internal.core;x-friends:="org.eclipse.cdt.dsf.gdb.ui",
+ org.eclipse.cdt.debug.internal.core;x-friends:="org.eclipse.cdt.dsf.gdb.ui,org.eclipse.cdt.dsf,org.eclipse.cdt.dsf.ui",
org.eclipse.cdt.debug.internal.core.breakpoints;x-friends:="org.eclipse.cdt.debug.edc,org.eclipse.cdt.dsf.gdb",
org.eclipse.cdt.debug.internal.core.executables;x-internal:=true,
org.eclipse.cdt.debug.internal.core.model;x-internal:=true,
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/ICDebugInternalConstants.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/ICDebugInternalConstants.java
index 1b8cb974f9d..6e8c8e1f6e3 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/ICDebugInternalConstants.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/ICDebugInternalConstants.java
@@ -28,4 +28,12 @@ public class ICDebugInternalConstants {
* String preference for the common source containers.
*/
public static final String PREF_COMMON_SOURCE_CONTAINERS = CDebugCorePlugin.getUniqueIdentifier() + ".cDebug.common_source_containers"; //$NON-NLS-1$
+
+ /**
+ * Boolean preference indicating the on/off state of the Show Full Paths
+ * toggle action. Actually, as the action appears in multiple views, and the
+ * state is preserved for each view, the full preference key is the view ID
+ * plus this key
+ */
+ public static final String SHOW_FULL_PATHS_PREF_KEY = "org.eclipse.cdt.debug.ui.cDebug.show_full_paths"; //$NON-NLS-1$
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java
index 19d3f959117..642ad191b6a 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java
@@ -12,8 +12,8 @@
package org.eclipse.cdt.debug.internal.ui.actions;
import org.eclipse.cdt.debug.core.CDIDebugModel;
+import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
import org.eclipse.cdt.debug.internal.ui.CDebugModelPresentation;
-import org.eclipse.cdt.debug.internal.ui.preferences.ICDebugPreferenceConstants;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
@@ -22,7 +22,6 @@ import org.eclipse.debug.internal.ui.views.launch.LaunchView;
import org.eclipse.debug.ui.IDebugModelPresentation;
import org.eclipse.debug.ui.IDebugView;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.Viewer;
@@ -40,7 +39,7 @@ public class ShowFullPathsAction extends ViewFilterAction {
* @see org.eclipse.cdt.debug.internal.ui.actions.ViewFilterAction#getPreferenceKey()
*/
protected String getPreferenceKey() {
- return ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS;
+ return ICDebugInternalConstants.SHOW_FULL_PATHS_PREF_KEY;
}
/* (non-Javadoc)
@@ -64,14 +63,8 @@ public class ShowFullPathsAction extends ViewFilterAction {
BusyIndicator.showWhile( viewer.getControl().getDisplay(),
new Runnable() {
public void run() {
- IPreferenceStore store = getPreferenceStore();
String key = getView().getSite().getId() + "." + getPreferenceKey(); //$NON-NLS-1$
- // We must first set a special key, to be able to tell that our preference is really set
- // This is because when we set a boolean preference to false, the key is automatically
- // removed, because the default value is 'false'
- String isSetKey = key + IS_SET_SUFFIX;
- store.setValue( isSetKey, true );
- store.setValue( key, getValue() );
+ getPreferenceStore().setValue( key, getValue() );
CDebugUIPlugin.getDefault().savePluginPreferences();
// Refresh the viewer after we've set the preference because
@@ -100,7 +93,7 @@ public class ShowFullPathsAction extends ViewFilterAction {
ILaunchManager launchmgr = DebugPlugin.getDefault().getLaunchManager();
ILaunch[] launches = launchmgr.getLaunches();
for (ILaunch launch : launches) {
- if (launch.getAttribute(ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS) != null &&
+ if (launch.getAttribute(getPreferenceKey()) != null &&
launch.isTerminated() == false) {
setEnabled(true);
return;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java
index ec99ec317d0..621fbae580a 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java
@@ -56,9 +56,6 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
private IWorkbench fWorkbench;
- // View setting widgets
- private Button fPathsButton;
-
private Combo fVariableFormatCombo;
private Combo fExpressionFormatCombo;
@@ -67,8 +64,6 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
private Combo fCharsetCombo;
- private static final int NUMBER_OF_DIGITS = 3;
-
// Format constants
private static int[] fFormatIds = new int[]{ ICDIFormat.NATURAL, ICDIFormat.HEXADECIMAL, ICDIFormat.DECIMAL, ICDIFormat.BINARY };
@@ -152,7 +147,6 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
*/
private void setValues() {
IPreferenceStore store = getPreferenceStore();
- fPathsButton.setSelection( store.getBoolean( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS ) );
fVariableFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT ) ) );
fExpressionFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT ) ) );
fRegisterFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT ) ) );
@@ -181,7 +175,6 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
*/
public static void initDefaults( IPreferenceStore store ) {
store.setDefault( ICDebugPreferenceConstants.PREF_SHOW_HEX_VALUES, false );
- store.setDefault( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS, true );
PreferenceConverter.setDefault( store, IInternalCDebugUIConstants.DISASSEMBLY_SOURCE_LINE_COLOR, IInternalCDebugUIConstants.DEFAULT_DISASSEMBLY_SOURCE_LINE_RGB );
}
@@ -198,7 +191,6 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
*/
private void createViewSettingPreferences( Composite parent ) {
Composite comp = createGroupComposite( parent, 1, PreferenceMessages.getString( "CDebugPreferencePage.4" ) ); //$NON-NLS-1$
- fPathsButton = createCheckButton( comp, PreferenceMessages.getString( "CDebugPreferencePage.5" ) ); //$NON-NLS-1$
Composite formatComposite = ControlFactory.createCompositeEx( comp, 2, 0 );
((GridLayout)formatComposite.getLayout()).makeColumnsEqualWidth = true;
fVariableFormatCombo = createComboBox( formatComposite, PreferenceMessages.getString( "CDebugPreferencePage.8" ), fFormatLabels, fFormatLabels[0] ); //$NON-NLS-1$
@@ -308,7 +300,6 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
*/
private void storeValues() {
IPreferenceStore store = getPreferenceStore();
- store.setValue( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS, fPathsButton.getSelection() );
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT, getFormatId( fVariableFormatCombo.getSelectionIndex() ) );
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT, getFormatId( fExpressionFormatCombo.getSelectionIndex() ) );
CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT, getFormatId( fRegisterFormatCombo.getSelectionIndex() ) );
@@ -328,7 +319,6 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
private void setDefaultValues() {
IPreferenceStore store = getPreferenceStore();
- fPathsButton.setSelection( store.getDefaultBoolean( ICDebugPreferenceConstants.PREF_SHOW_FULL_PATHS ) );
fVariableFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT ) ) );
fExpressionFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultInt( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT ) ) );
fRegisterFormatCombo.select( getFormatIndex( CDebugCorePlugin.getDefault().getPluginPreferences().getDefaultInt( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT ) ) );
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/PreferenceMessages.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/PreferenceMessages.properties
index 86745c68980..369e4b42227 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/PreferenceMessages.properties
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/PreferenceMessages.properties
@@ -16,7 +16,6 @@ CDebugPreferencePage.1=Hexadecimal
CDebugPreferencePage.2=Decimal
CDebugPreferencePage.3=General settings for C/C++ Debugging.
CDebugPreferencePage.4=Opened view default settings
-CDebugPreferencePage.5=Show full &paths
CDebugPreferencePage.8=Default variable format:
CDebugPreferencePage.9=Default expression format:
CDebugPreferencePage.10=Default register format:

Back to the top