mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[226005] Fixed the Update Mode sub-menu and added persistance to the update mode selection.
This commit is contained in:
parent
2bc6347b11
commit
892a7226e1
7 changed files with 368 additions and 272 deletions
|
@ -25,4 +25,19 @@ command.gotoSymbol.description=Navigate to symbolic address
|
||||||
commandContext.name= In DSF Disassembly
|
commandContext.name= In DSF Disassembly
|
||||||
commandContext.description= When debugging in assembly mode
|
commandContext.description= When debugging in assembly mode
|
||||||
|
|
||||||
|
# actions
|
||||||
action.breakpointProperties.label = Breakpoint Properties...
|
action.breakpointProperties.label = Breakpoint Properties...
|
||||||
|
|
||||||
|
action.refresh.label = Refresh
|
||||||
|
|
||||||
|
menu.updatePolicy = Update Policy
|
||||||
|
action.breakpointHitUpdatePolicy.label = Breakpoint Hit
|
||||||
|
action.manualUpdatePolicy.label = Manual
|
||||||
|
action.automaticUpdatePolicy.label = Automatic
|
||||||
|
|
||||||
|
menu.numberFormat = Number Format
|
||||||
|
action.setDefaultNumberFormatHex.label = Hex
|
||||||
|
action.setDefaultNumberFormatDecimal.label = Decimal
|
||||||
|
action.setDefaultNumberFormatOctal.label = Octal
|
||||||
|
action.setDefaultNumberFormatBinary.label = Binary
|
||||||
|
action.setDefaultNumberFormatNatural.label = Natural
|
|
@ -50,19 +50,10 @@
|
||||||
verticalRulerPreferenceValue="true">
|
verticalRulerPreferenceValue="true">
|
||||||
</specification>
|
</specification>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.ui.viewActions">
|
point="org.eclipse.ui.viewActions">
|
||||||
<viewContribution
|
<!-- Variables View menu contributions -->
|
||||||
id="org.eclipse.dd.dsf.debug.ui.viewmodel.update.Refresh"
|
|
||||||
targetID="org.eclipse.debug.ui.RegisterView">
|
|
||||||
<action
|
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.RefreshActionDelegate"
|
|
||||||
icon="icons/refresh.gif"
|
|
||||||
id="org.eclipse.dd.dsf.debug.ui.viewmodel.update.actions.Refresh"
|
|
||||||
label="Refresh"
|
|
||||||
toolbarPath="additions">
|
|
||||||
</action>
|
|
||||||
</viewContribution>
|
|
||||||
<viewContribution
|
<viewContribution
|
||||||
id="org.eclipse.dd.dsf.debug.ui.viewmodel.update.Refresh"
|
id="org.eclipse.dd.dsf.debug.ui.viewmodel.update.Refresh"
|
||||||
targetID="org.eclipse.debug.ui.VariableView">
|
targetID="org.eclipse.debug.ui.VariableView">
|
||||||
|
@ -70,10 +61,174 @@
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.RefreshActionDelegate"
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.RefreshActionDelegate"
|
||||||
icon="icons/refresh.gif"
|
icon="icons/refresh.gif"
|
||||||
id="org.eclipse.dd.dsf.debug.ui.viewmodel.update.actions.Refresh"
|
id="org.eclipse.dd.dsf.debug.ui.viewmodel.update.actions.Refresh"
|
||||||
label="Refresh"
|
label="%action.refresh.label"
|
||||||
toolbarPath="additions">
|
toolbarPath="additions">
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
|
<menu id="numberFormat"
|
||||||
|
label="%menu.numberFormat"
|
||||||
|
path="additions"/>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatHex"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Hex_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Hex"
|
||||||
|
label="%action.setDefaultNumberFormatHex.label"
|
||||||
|
menubarPath="numberFormat/additions"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatDecimal"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Decimal_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Decimal"
|
||||||
|
label="%action.setDefaultNumberFormatDecimal.label"
|
||||||
|
menubarPath="numberFormat/additions"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatOctal"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Octal_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Octal"
|
||||||
|
label="%action.setDefaultNumberFormatOctal.label"
|
||||||
|
menubarPath="numberFormat/additions"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatBinary"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Binary_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Binary"
|
||||||
|
label="%action.setDefaultNumberFormatBinary.label"
|
||||||
|
menubarPath="numberFormat/additions"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatNatural"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Natural_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Natural"
|
||||||
|
label="%action.setDefaultNumberFormatNatural.label"
|
||||||
|
menubarPath="numberFormat/additions"
|
||||||
|
state="true"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
|
||||||
|
<menu id="updatePolicy"
|
||||||
|
label="%menu.updatePolicy"
|
||||||
|
path="additions"/>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.BreakpointHitUpdatePolicyAction"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_BreakpointHit_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_BreakpointHit"
|
||||||
|
label="%action.breakpointHitUpdatePolicy.label"
|
||||||
|
menubarPath="updatePolicy/additions"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.ManualUpdatePolicyAction"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_Manual_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_Manual"
|
||||||
|
label="%action.manualUpdatePolicy.label"
|
||||||
|
menubarPath="updatePolicy/additions"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.AutomaticUpdatePolicyAction"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_Automatic_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_Automatic"
|
||||||
|
label="%action.automaticUpdatePolicy.label"
|
||||||
|
menubarPath="updatePolicy/additions"
|
||||||
|
state="true"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
</viewContribution>
|
</viewContribution>
|
||||||
|
|
||||||
|
<!-- Registers View menu contributions -->
|
||||||
|
<viewContribution
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.viewmodel.update.Refresh"
|
||||||
|
targetID="org.eclipse.debug.ui.RegisterView">
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.RefreshActionDelegate"
|
||||||
|
icon="icons/refresh.gif"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.viewmodel.update.actions.Refresh"
|
||||||
|
label="%action.refresh.label"
|
||||||
|
toolbarPath="additions">
|
||||||
|
</action>
|
||||||
|
|
||||||
|
<menu id="numberFormat"
|
||||||
|
label="%menu.numberFormat"
|
||||||
|
path="additions"/>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatHex"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Hex_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Hex"
|
||||||
|
label="%action.setDefaultNumberFormatHex.label"
|
||||||
|
menubarPath="numberFormat/additions"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatDecimal"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Decimal_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Decimal"
|
||||||
|
label="%action.setDefaultNumberFormatDecimal.label"
|
||||||
|
menubarPath="numberFormat/additions"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatOctal"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Octal_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Octal"
|
||||||
|
label="%action.setDefaultNumberFormatOctal.label"
|
||||||
|
menubarPath="numberFormat/additions"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatBinary"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Binary_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Binary"
|
||||||
|
label="%action.setDefaultNumberFormatBinary.label"
|
||||||
|
menubarPath="numberFormat/additions"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatNatural"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Natural_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Natural"
|
||||||
|
label="%action.setDefaultNumberFormatNatural.label"
|
||||||
|
menubarPath="numberFormat/additions"
|
||||||
|
state="true"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
|
||||||
|
<menu id="updatePolicy"
|
||||||
|
label="%menu.updatePolicy"
|
||||||
|
path="additions"/>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.BreakpointHitUpdatePolicyAction"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_BreakpointHit_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_BreakpointHit"
|
||||||
|
label="%action.breakpointHitUpdatePolicy.label"
|
||||||
|
menubarPath="updatePolicy/additions"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.ManualUpdatePolicyAction"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_Manual_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_Manual"
|
||||||
|
label="%action.manualUpdatePolicy.label"
|
||||||
|
menubarPath="updatePolicy/additions"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.AutomaticUpdatePolicyAction"
|
||||||
|
helpContextId="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_Automatic_helpContext"
|
||||||
|
id="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_Automatic"
|
||||||
|
label="%action.automaticUpdatePolicy.label"
|
||||||
|
menubarPath="updatePolicy/additions"
|
||||||
|
state="true"
|
||||||
|
style="radio">
|
||||||
|
</action>
|
||||||
|
|
||||||
|
</viewContribution>
|
||||||
|
|
||||||
|
<!-- Expressions View menu contributions -->
|
||||||
<viewContribution
|
<viewContribution
|
||||||
id="org.eclipse.dd.dsf.debug.ui.viewmodel.update.Refresh"
|
id="org.eclipse.dd.dsf.debug.ui.viewmodel.update.Refresh"
|
||||||
targetID="org.eclipse.debug.ui.ExpressionView">
|
targetID="org.eclipse.debug.ui.ExpressionView">
|
||||||
|
@ -81,182 +236,84 @@
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.RefreshActionDelegate"
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.RefreshActionDelegate"
|
||||||
icon="icons/refresh.gif"
|
icon="icons/refresh.gif"
|
||||||
id="org.eclipse.dd.dsf.debug.ui.viewmodel.update.actions.Refresh"
|
id="org.eclipse.dd.dsf.debug.ui.viewmodel.update.actions.Refresh"
|
||||||
label="Refresh"
|
label="%action.refresh.label"
|
||||||
toolbarPath="additions">
|
toolbarPath="additions">
|
||||||
</action>
|
</action>
|
||||||
</viewContribution>
|
|
||||||
<viewContribution
|
|
||||||
id="org.eclipse.dd.dsf.debug.ui.update.variable.updatePolicies"
|
|
||||||
targetID="org.eclipse.debug.ui.VariableView">
|
|
||||||
<action
|
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.SelectUpdatePolicyAction"
|
|
||||||
id="org.eclipse.dd.dsf.debug.ui.update.selectUpdatePolicy"
|
|
||||||
label="Update Policy"
|
|
||||||
menubarPath="additions">
|
|
||||||
</action>
|
|
||||||
</viewContribution>
|
|
||||||
<viewContribution
|
|
||||||
id="org.eclipse.dd.dsf.debug.ui.update.register.updatePolicies"
|
|
||||||
targetID="org.eclipse.debug.ui.RegisterView">
|
|
||||||
<action
|
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.SelectUpdatePolicyAction"
|
|
||||||
id="org.eclipse.dd.dsf.debug.ui.update.selectUpdatePolicy"
|
|
||||||
label="Update Policy"
|
|
||||||
menubarPath="additions">
|
|
||||||
</action>
|
|
||||||
</viewContribution>
|
|
||||||
</extension>
|
|
||||||
|
|
||||||
<extension point="org.eclipse.ui.viewActions">
|
|
||||||
<viewContribution
|
|
||||||
targetID="org.eclipse.debug.ui.RegisterView"
|
|
||||||
id="org.eclipse.debug.ui.PulldownActions">
|
|
||||||
<menu id="numberFormat"
|
<menu id="numberFormat"
|
||||||
label="Number Format"
|
label="%menu.numberFormat"
|
||||||
path="additions"/>
|
path="additions"/>
|
||||||
<action
|
<action
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatHex"
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatHex"
|
||||||
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Hex_helpContext"
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Hex_helpContext"
|
||||||
id="com.windriver.ide.debug.internal.ui.NumberFormat.Hex"
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Hex"
|
||||||
label="Hex"
|
label="%action.setDefaultNumberFormatHex.label"
|
||||||
menubarPath="numberFormat/additions"
|
menubarPath="numberFormat/additions"
|
||||||
style="radio">
|
style="radio">
|
||||||
</action>
|
</action>
|
||||||
<action
|
<action
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatDecimal"
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatDecimal"
|
||||||
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Decimal_helpContext"
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Decimal_helpContext"
|
||||||
id="com.windriver.ide.debug.internal.ui.NumberFormat.Decimal"
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Decimal"
|
||||||
label="Decimal"
|
label="%action.setDefaultNumberFormatDecimal.label"
|
||||||
menubarPath="numberFormat/additions"
|
menubarPath="numberFormat/additions"
|
||||||
style="radio">
|
style="radio">
|
||||||
</action>
|
</action>
|
||||||
<action
|
<action
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatOctal"
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatOctal"
|
||||||
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Octal_helpContext"
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Octal_helpContext"
|
||||||
id="com.windriver.ide.debug.internal.ui.NumberFormat.Octal"
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Octal"
|
||||||
label="Octal"
|
label="%action.setDefaultNumberFormatOctal.label"
|
||||||
menubarPath="numberFormat/additions"
|
menubarPath="numberFormat/additions"
|
||||||
style="radio">
|
style="radio">
|
||||||
</action>
|
</action>
|
||||||
<action
|
<action
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatBinary"
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatBinary"
|
||||||
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Binary_helpContext"
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Binary_helpContext"
|
||||||
id="com.windriver.ide.debug.internal.ui.NumberFormat.Binary"
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Binary"
|
||||||
label="Binary"
|
label="%action.setDefaultNumberFormatBinary.label"
|
||||||
menubarPath="numberFormat/additions"
|
menubarPath="numberFormat/additions"
|
||||||
style="radio">
|
style="radio">
|
||||||
</action>
|
</action>
|
||||||
<action
|
<action
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatNatural"
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatNatural"
|
||||||
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Natural_helpContext"
|
helpContextId="org.eclipse.dd.dsf.debug.ui.NumberFormat_Natural_helpContext"
|
||||||
id="com.windriver.ide.debug.internal.ui.NumberFormat.Natural"
|
id="org.eclipse.dd.dsf.debug.ui.NumberFormat_Natural"
|
||||||
label="Natural"
|
label="%action.setDefaultNumberFormatNatural.label"
|
||||||
menubarPath="numberFormat/additions"
|
menubarPath="numberFormat/additions"
|
||||||
state="true"
|
state="true"
|
||||||
style="radio">
|
style="radio">
|
||||||
</action>
|
</action>
|
||||||
</viewContribution>
|
|
||||||
</extension>
|
|
||||||
|
|
||||||
<extension point="org.eclipse.ui.viewActions">
|
<menu id="updatePolicy"
|
||||||
<viewContribution
|
label="%menu.updatePolicy"
|
||||||
targetID="org.eclipse.debug.ui.VariableView"
|
|
||||||
id="org.eclipse.debug.ui.PulldownActions">
|
|
||||||
<menu id="numberFormat"
|
|
||||||
label="Number Format"
|
|
||||||
path="additions"/>
|
path="additions"/>
|
||||||
<action
|
<action
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatHex"
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.BreakpointHitUpdatePolicyAction"
|
||||||
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Hex_helpContext"
|
helpContextId="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_BreakpointHit_helpContext"
|
||||||
id="com.windriver.ide.debug.internal.ui.NumberFormat.Hex"
|
id="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_BreakpointHit"
|
||||||
label="Hex"
|
label="%action.breakpointHitUpdatePolicy.label"
|
||||||
menubarPath="numberFormat/additions"
|
menubarPath="updatePolicy/additions"
|
||||||
style="radio">
|
style="radio">
|
||||||
</action>
|
</action>
|
||||||
<action
|
<action
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatDecimal"
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.ManualUpdatePolicyAction"
|
||||||
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Decimal_helpContext"
|
helpContextId="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_Manual_helpContext"
|
||||||
id="com.windriver.ide.debug.internal.ui.NumberFormat.Decimal"
|
id="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_Manual"
|
||||||
label="Decimal"
|
label="%action.manualUpdatePolicy.label"
|
||||||
menubarPath="numberFormat/additions"
|
menubarPath="updatePolicy/additions"
|
||||||
style="radio">
|
style="radio">
|
||||||
</action>
|
</action>
|
||||||
<action
|
<action
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.SetDefaultFormatOctal"
|
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.actions.AutomaticUpdatePolicyAction"
|
||||||
helpContextId="com.windriver.ide.debug.internal.ui.NumberFormat.Octal_helpContext"
|
helpContextId="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_Automatic_helpContext"
|
||||||
id="com.windriver.ide.debug.internal.ui.NumberFormat.Octal"
|
id="org.eclipse.dd.dsf.debug.ui.UpdatePolicy_Automatic"
|
||||||
label="Octal"
|
label="%action.automaticUpdatePolicy.label"
|
||||||
menubarPath="numberFormat/additions"
|
menubarPath="updatePolicy/additions"
|
||||||
style="radio">
|
|
||||||
</action>
|
|
||||||
<action
|
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.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.internal.provisional.ui.viewmodel.numberformat.actions.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"
|
state="true"
|
||||||
style="radio">
|
style="radio">
|
||||||
</action>
|
</action>
|
||||||
</viewContribution>
|
|
||||||
</extension>
|
|
||||||
|
|
||||||
<extension point="org.eclipse.ui.viewActions">
|
|
||||||
<viewContribution
|
|
||||||
targetID="org.eclipse.debug.ui.ExpressionView"
|
|
||||||
id="org.eclipse.debug.ui.PulldownActions">
|
|
||||||
<menu id="numberFormat"
|
|
||||||
label="Number Format"
|
|
||||||
path="additions"/>
|
|
||||||
<action
|
|
||||||
class="org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.numberformat.actions.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.internal.provisional.ui.viewmodel.numberformat.actions.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.internal.provisional.ui.viewmodel.numberformat.actions.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.internal.provisional.ui.viewmodel.numberformat.actions.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.internal.provisional.ui.viewmodel.numberformat.actions.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>
|
</viewContribution>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2008 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.internal.provisional.ui.viewmodel.update.actions;
|
||||||
|
|
||||||
|
import org.eclipse.dd.dsf.ui.viewmodel.update.AutomaticUpdatePolicy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class AutomaticUpdatePolicyAction extends SelectUpdatePolicyAction {
|
||||||
|
|
||||||
|
public AutomaticUpdatePolicyAction() {
|
||||||
|
super(AutomaticUpdatePolicy.AUTOMATIC_UPDATE_POLICY_ID);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2008 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.internal.provisional.ui.viewmodel.update.actions;
|
||||||
|
|
||||||
|
import org.eclipse.dd.dsf.debug.internal.provisional.ui.viewmodel.update.BreakpointHitUpdatePolicy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BreakpointHitUpdatePolicyAction extends SelectUpdatePolicyAction {
|
||||||
|
|
||||||
|
public BreakpointHitUpdatePolicyAction() {
|
||||||
|
super(BreakpointHitUpdatePolicy.BREAKPOINT_HIT_UPDATE_POLICY_ID);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2008 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.internal.provisional.ui.viewmodel.update.actions;
|
||||||
|
|
||||||
|
import org.eclipse.dd.dsf.ui.viewmodel.update.ManualUpdatePolicy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ManualUpdatePolicyAction extends SelectUpdatePolicyAction {
|
||||||
|
|
||||||
|
public ManualUpdatePolicyAction() {
|
||||||
|
super(ManualUpdatePolicy.MANUAL_UPDATE_POLICY_ID);
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,114 +15,71 @@ import org.eclipse.dd.dsf.ui.viewmodel.IVMProvider;
|
||||||
import org.eclipse.dd.dsf.ui.viewmodel.update.ICachingVMProvider;
|
import org.eclipse.dd.dsf.ui.viewmodel.update.ICachingVMProvider;
|
||||||
import org.eclipse.dd.dsf.ui.viewmodel.update.IVMUpdatePolicy;
|
import org.eclipse.dd.dsf.ui.viewmodel.update.IVMUpdatePolicy;
|
||||||
import org.eclipse.debug.ui.contexts.DebugContextEvent;
|
import org.eclipse.debug.ui.contexts.DebugContextEvent;
|
||||||
import org.eclipse.jface.action.Action;
|
|
||||||
import org.eclipse.jface.action.ActionContributionItem;
|
|
||||||
import org.eclipse.jface.action.IAction;
|
import org.eclipse.jface.action.IAction;
|
||||||
import org.eclipse.jface.action.IMenuCreator;
|
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
import org.eclipse.jface.viewers.ISelection;
|
||||||
import org.eclipse.swt.events.MenuAdapter;
|
|
||||||
import org.eclipse.swt.events.MenuEvent;
|
|
||||||
import org.eclipse.swt.widgets.Control;
|
|
||||||
import org.eclipse.swt.widgets.Menu;
|
|
||||||
import org.eclipse.swt.widgets.MenuItem;
|
|
||||||
import org.eclipse.ui.IViewPart;
|
import org.eclipse.ui.IViewPart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SelectUpdatePolicyAction extends AbstractVMProviderActionDelegate implements IMenuCreator {
|
public class SelectUpdatePolicyAction extends AbstractVMProviderActionDelegate {
|
||||||
|
|
||||||
|
private final String fUpdatePolicyId;
|
||||||
|
|
||||||
class SelectPolicy extends Action {
|
public SelectUpdatePolicyAction(String policyId) {
|
||||||
private ICachingVMProvider fVMProvider;
|
fUpdatePolicyId = policyId;
|
||||||
private IVMUpdatePolicy fUpdatePolicy;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (isChecked()) {
|
|
||||||
fVMProvider.setActiveUpdatePolicy(fUpdatePolicy);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectPolicy(ICachingVMProvider provider, IVMUpdatePolicy updatePolicy) {
|
|
||||||
super(updatePolicy.getName(), IAction.AS_RADIO_BUTTON);
|
|
||||||
fVMProvider = provider;
|
|
||||||
fUpdatePolicy = updatePolicy;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected String getUpdatePolicyId() {
|
||||||
public Menu getMenu(Control parent) {
|
return fUpdatePolicyId;
|
||||||
// Never called
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(IViewPart view) {
|
public void init(IViewPart view) {
|
||||||
super.init(view);
|
super.init(view);
|
||||||
getAction().setEnabled(getVMProvider() instanceof ICachingVMProvider);
|
update();
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(IAction action) {
|
|
||||||
super.init(action);
|
|
||||||
action.setMenuCreator(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(IAction action) {
|
public void run(IAction action) {
|
||||||
// Do nothing, this is a pull-down menu
|
IVMProvider provider = getVMProvider();
|
||||||
|
if (provider instanceof ICachingVMProvider) {
|
||||||
|
ICachingVMProvider cachingProvider = (ICachingVMProvider)provider;
|
||||||
|
IVMUpdatePolicy policy = getPolicyFromProvider(cachingProvider, getUpdatePolicyId());
|
||||||
|
if (policy != null) {
|
||||||
|
cachingProvider.setActiveUpdatePolicy(policy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private IVMUpdatePolicy getPolicyFromProvider(ICachingVMProvider provider, String id) {
|
||||||
|
for (IVMUpdatePolicy policy : provider.getAvailableUpdatePolicies()) {
|
||||||
|
if (policy.getID().equals(id)) {
|
||||||
|
return policy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void selectionChanged(IAction action, ISelection selection) {
|
public void selectionChanged(IAction action, ISelection selection) {
|
||||||
if (action != getAction()) {
|
|
||||||
action.setMenuCreator(this);
|
|
||||||
}
|
|
||||||
super.selectionChanged(action, selection);
|
super.selectionChanged(action, selection);
|
||||||
getAction().setEnabled(getVMProvider() instanceof ICachingVMProvider);
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void debugContextChanged(DebugContextEvent event) {
|
public void debugContextChanged(DebugContextEvent event) {
|
||||||
super.debugContextChanged(event);
|
super.debugContextChanged(event);
|
||||||
getAction().setEnabled(getVMProvider() instanceof ICachingVMProvider);
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Menu getMenu(Menu parent) {
|
protected void update() {
|
||||||
Menu menu = new Menu(parent);
|
|
||||||
menu.addMenuListener(new MenuAdapter() {
|
|
||||||
@Override
|
|
||||||
public void menuShown(MenuEvent e) {
|
|
||||||
Menu m = (Menu)e.widget;
|
|
||||||
MenuItem[] items = m.getItems();
|
|
||||||
for (int i=0; i < items.length; i++) {
|
|
||||||
items[i].dispose();
|
|
||||||
}
|
|
||||||
fillMenu(m);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void fillMenu(Menu menu) {
|
|
||||||
|
|
||||||
IVMUpdatePolicy[] updatePolicies = new IVMUpdatePolicy[0];
|
|
||||||
IVMUpdatePolicy activePolicy = null;
|
|
||||||
IVMProvider provider = getVMProvider();
|
IVMProvider provider = getVMProvider();
|
||||||
if (provider instanceof ICachingVMProvider) {
|
if (provider instanceof ICachingVMProvider) {
|
||||||
ICachingVMProvider cachingProvider = (ICachingVMProvider)provider;
|
getAction().setEnabled(true);
|
||||||
updatePolicies = cachingProvider.getAvailableUpdatePolicies();
|
IVMUpdatePolicy activePolicy = ((ICachingVMProvider)provider).getActiveUpdatePolicy();
|
||||||
activePolicy = cachingProvider.getActiveUpdatePolicy();
|
getAction().setChecked( activePolicy != null && getUpdatePolicyId().equals(activePolicy.getID()) );
|
||||||
|
} else {
|
||||||
for (IVMUpdatePolicy updatePolicy : updatePolicies) {
|
getAction().setEnabled(false);
|
||||||
SelectPolicy action = new SelectPolicy(cachingProvider, updatePolicy);
|
|
||||||
if (updatePolicy.equals(activePolicy)) {
|
|
||||||
action.setChecked(true);
|
|
||||||
}
|
|
||||||
ActionContributionItem item = new ActionContributionItem(action);
|
|
||||||
item.fill(menu, -1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,8 +208,6 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
|
||||||
|
|
||||||
protected static String SELECTED_UPDATE_MODE = "org.eclipse.dd.dsf.ui.viewmodel.update.selectedUpdateMode"; //$NON-NLS-1$
|
protected static String SELECTED_UPDATE_MODE = "org.eclipse.dd.dsf.ui.viewmodel.update.selectedUpdateMode"; //$NON-NLS-1$
|
||||||
|
|
||||||
private IVMUpdatePolicy fCurrentUpdatePolicy;
|
|
||||||
|
|
||||||
private IVMUpdatePolicy[] fAvailableUpdatePolicies;
|
private IVMUpdatePolicy[] fAvailableUpdatePolicies;
|
||||||
|
|
||||||
public Map<Object, RootElementMarkerKey> fRootMarkers = new HashMap<Object, RootElementMarkerKey>();
|
public Map<Object, RootElementMarkerKey> fRootMarkers = new HashMap<Object, RootElementMarkerKey>();
|
||||||
|
@ -238,17 +236,7 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
|
||||||
fCacheListHead.fNext = fCacheListHead;
|
fCacheListHead.fNext = fCacheListHead;
|
||||||
fCacheListHead.fPrevious = fCacheListHead;
|
fCacheListHead.fPrevious = fCacheListHead;
|
||||||
|
|
||||||
String updateModeId = (String)presentationContext.getProperty(SELECTED_UPDATE_MODE);
|
|
||||||
if (updateModeId != null) {
|
|
||||||
for (IVMUpdatePolicy updateMode : getAvailableUpdatePolicies()) {
|
|
||||||
if (updateMode.getID().equals(updateModeId)) {
|
|
||||||
fCurrentUpdatePolicy = updateMode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fAvailableUpdatePolicies = createUpdateModes();
|
fAvailableUpdatePolicies = createUpdateModes();
|
||||||
fCurrentUpdatePolicy = fAvailableUpdatePolicies[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IVMUpdatePolicy[] createUpdateModes() {
|
protected IVMUpdatePolicy[] createUpdateModes() {
|
||||||
|
@ -260,11 +248,21 @@ public class AbstractCachingVMProvider extends AbstractVMProvider implements ICa
|
||||||
}
|
}
|
||||||
|
|
||||||
public IVMUpdatePolicy getActiveUpdatePolicy() {
|
public IVMUpdatePolicy getActiveUpdatePolicy() {
|
||||||
return fCurrentUpdatePolicy;
|
String updateModeId = (String)getPresentationContext().getProperty(SELECTED_UPDATE_MODE);
|
||||||
|
if (updateModeId != null) {
|
||||||
|
for (IVMUpdatePolicy updateMode : getAvailableUpdatePolicies()) {
|
||||||
|
if (updateMode.getID().equals(updateModeId)) {
|
||||||
|
return updateMode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default to the first one.
|
||||||
|
return getAvailableUpdatePolicies()[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setActiveUpdatePolicy(IVMUpdatePolicy updatePolicy) {
|
public void setActiveUpdatePolicy(IVMUpdatePolicy updatePolicy) {
|
||||||
fCurrentUpdatePolicy = updatePolicy;
|
getPresentationContext().setProperty(SELECTED_UPDATE_MODE, updatePolicy.getID());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refresh() {
|
public void refresh() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue