From d88e7ec51f28a271821184c22667af9170146172 Mon Sep 17 00:00:00 2001 From: Randy Rohrbach Date: Mon, 20 Aug 2007 17:19:14 +0000 Subject: [PATCH] Bugzilla 200568 IFormattedValues.java - Added DECIMAL_FORMAT format ID. DetailPane.java - Added displaying DECIMNAL_FORMAT display output. SetDefautlFormatDecimal.java - new menu action for setting style to DECIMAL_FORMAT plugin.xml for org.eclipse.dd.dsf.debug.ui - Added complete set of format selections for the Register View MIRegisters.java - Added support for all format types. --- .../org.eclipse.dd.dsf.debug.ui/plugin.xml | 51 +++++++++++++++++++ .../detailpanesupport/DetailPane.java | 3 ++ .../SetDefaultFormatDecimal.java | 22 ++++++++ .../dsf/debug/service/IFormattedValues.java | 7 +-- 4 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/formatsupport/SetDefaultFormatDecimal.java diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/plugin.xml b/plugins/org.eclipse.dd.dsf.debug.ui/plugin.xml index 4d8023afd96..3c4464e8077 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/plugin.xml +++ b/plugins/org.eclipse.dd.dsf.debug.ui/plugin.xml @@ -209,5 +209,56 @@ id="org.eclipse.dd.dsf.debug.ui.viewmodel.detailPaneFactory"> + + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/DetailPane.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/DetailPane.java index 9d910f1d37f..4c860a6b4bd 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/DetailPane.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/DetailPane.java @@ -424,6 +424,9 @@ public class DetailPane implements IDetailPane, IAdaptable, IPropertyChangeListe else if ( str == IFormattedValues.BINARY_FORMAT) { detailComputed(null, "Binary. : " + getData().getFormattedValue()); //$NON-NLS-1$ } + else if ( str == IFormattedValues.DECIMAL_FORMAT) { + detailComputed(null, "Decimal : " + getData().getFormattedValue()); //$NON-NLS-1$ + } else { detailComputed(null, "Other.. : " + getData().getFormattedValue()); //$NON-NLS-1$ } diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/formatsupport/SetDefaultFormatDecimal.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/formatsupport/SetDefaultFormatDecimal.java new file mode 100644 index 00000000000..8e0baca3c27 --- /dev/null +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/formatsupport/SetDefaultFormatDecimal.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright (c) 2006 Wind River Systems 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Wind River Systems - initial API and implementation + *******************************************************************************/ +package org.eclipse.dd.dsf.debug.ui.viewmodel.formatsupport; + +import org.eclipse.dd.dsf.debug.service.IFormattedValues; + +@SuppressWarnings("restriction") +public class SetDefaultFormatDecimal extends AbstractSetFormatStyle { + + @Override + protected String getFormatStyle() { + return IFormattedValues.DECIMAL_FORMAT; + } +} diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IFormattedValues.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IFormattedValues.java index 30307a3f407..88c601e33d1 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IFormattedValues.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IFormattedValues.java @@ -28,10 +28,11 @@ public interface IFormattedValues extends IDMService { * specifically available from the backend are what is returned from the * getID() method. */ - public final static String HEX_FORMAT = "HEX.Format" ; //$NON-NLS-1$ - public final static String OCTAL_FORMAT = "OCTAL.Format" ; //$NON-NLS-1$ + public final static String HEX_FORMAT = "HEX.Format" ; //$NON-NLS-1$ + public final static String OCTAL_FORMAT = "OCTAL.Format" ; //$NON-NLS-1$ public final static String NATURAL_FORMAT = "NATURAL.Format" ; //$NON-NLS-1$ - public final static String BINARY_FORMAT = "BINARY.Format" ; //$NON-NLS-1$ + public final static String BINARY_FORMAT = "BINARY.Format" ; //$NON-NLS-1$ + public final static String DECIMAL_FORMAT = "DECIMAL.Format" ; //$NON-NLS-1$ /** * Retrieves the available formats that the given data is available in.