1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 23:25:26 +02:00

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.
This commit is contained in:
Randy Rohrbach 2007-08-20 17:19:14 +00:00
parent dc3e238402
commit d88e7ec51f
4 changed files with 80 additions and 3 deletions

View file

@ -209,5 +209,56 @@
id="org.eclipse.dd.dsf.debug.ui.viewmodel.detailPaneFactory">
</detailFactories>
</extension>
<extension point="org.eclipse.ui.viewActions">
<viewContribution
targetID="org.eclipse.debug.ui.RegisterView"
id="org.eclipse.debug.ui.PulldownActions">
<menu id="numberFormat"
label="Number Format"
path="additions"/>
<action
class="org.eclipse.dd.dsf.debug.ui.viewmodel.formatsupport.SetDefaultFormatHex"
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Hex_helpContext"
id="com.windriver.ide.debug.internal.ui.NumberFormat.Hex"
label="Hex"
menubarPath="numberFormat/additions"
style="radio">
</action>
<action
class="org.eclipse.dd.dsf.debug.ui.viewmodel.formatsupport.SetDefaultFormatDecimal"
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Decimal_helpContext"
id="com.windriver.ide.debug.internal.ui.NumberFormat.Decimal"
label="Decimal"
menubarPath="numberFormat/additions"
style="radio">
</action>
<action
class="org.eclipse.dd.dsf.debug.ui.viewmodel.formatsupport.SetDefaultFormatOctal"
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Octal_helpContext"
id="com.windriver.ide.debug.internal.ui.NumberFormat.Octal"
label="Octal"
menubarPath="numberFormat/additions"
style="radio">
</action>
<action
class="org.eclipse.dd.dsf.debug.ui.viewmodel.formatsupport.SetDefaultFormatBinary"
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Binary_helpContext"
id="com.windriver.ide.debug.internal.ui.NumberFormat.Binary"
label="Binary"
menubarPath="numberFormat/additions"
style="radio">
</action>
<action
class="org.eclipse.dd.dsf.debug.ui.viewmodel.formatsupport.SetDefaultFormatNatural"
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Natural_helpContext"
id="com.windriver.ide.debug.internal.ui.NumberFormat.Natural"
label="Natural"
menubarPath="numberFormat/additions"
state="true"
style="radio">
</action>
</viewContribution>
</extension>
</plugin>

View file

@ -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$
}

View file

@ -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;
}
}

View file

@ -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.