Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamantha Chan2009-10-25 21:13:50 +0000
committerSamantha Chan2009-10-25 21:13:50 +0000
commitc700104377cdb814a7d267ade582372ab4e60480 (patch)
tree33cbe83ad496da97d26d9d485424a04ef1d81d74
parent7b3337b5420cc1597557c727055bc8f6c8b4b247 (diff)
downloadeclipse.platform.debug-c700104377cdb814a7d267ade582372ab4e60480.tar.gz
eclipse.platform.debug-c700104377cdb814a7d267ade582372ab4e60480.tar.xz
eclipse.platform.debug-c700104377cdb814a7d267ade582372ab4e60480.zip
Bug 248486 - [Memory View] Need a way to set default memory view format for a particular renderer
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/FormatTableRenderingDialog.java21
1 files changed, 8 insertions, 13 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/FormatTableRenderingDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/FormatTableRenderingDialog.java
index 2f467fc01..b541a7a94 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/FormatTableRenderingDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/FormatTableRenderingDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* QNX - Alena Laskavaia Bug 240330 - [Memory View] Items per row should not be limited to 16
+ * Freescale - Teodor Madan Bug 248486 - [Memory View] Need a way to set default memory view format for a particular renderer
*******************************************************************************/
package org.eclipse.debug.internal.ui.views.memory.renderings;
@@ -489,18 +490,12 @@ public class FormatTableRenderingDialog extends TrayDialog
}
private void restoreDefaults() {
- String modelId = fRendering.getMemoryBlock().getModelIdentifier();
- int defaultRowSize = DebugUITools.getPreferenceStore().getInt(getRowPrefId(modelId));
- int defaultColSize = DebugUITools.getPreferenceStore().getInt(getColumnPrefId(modelId));
-
- if (defaultRowSize == 0 || defaultColSize == 0)
- {
- defaultRowSize = DebugUITools.getPreferenceStore().getInt(IDebugPreferenceConstants.PREF_ROW_SIZE);
- defaultColSize = DebugUITools.getPreferenceStore().getInt(IDebugPreferenceConstants.PREF_COLUMN_SIZE);
-
- DebugUITools.getPreferenceStore().setValue(getRowPrefId(modelId), defaultRowSize);
- DebugUITools.getPreferenceStore().setValue(getColumnPrefId(modelId), defaultColSize);
- }
+
+ // Determine the default values by using the following search order:
+ // IPersistableDebugElement, workspace preference, plugin defaults
+ // issue: 248486
+ int defaultRowSize = getDefaultRowSize();
+ int defaultColSize = getDefaultColumnSize();
populateControl(defaultRowSize, fRowSizes, fRowControl);
populateControl(defaultColSize, fColumnSizes, fColumnControl);

Back to the top