Skip to content

Commit

Permalink
[ui] Add the commands for toggling breakpoints.
Browse files Browse the repository at this point in the history
These commands are still commented (even they are deprecated) since
there is no clear replacement of the corresponding old actions by
handlers.

see #136

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Dec 4, 2014
1 parent ddba065 commit e7e2b61
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 12 deletions.
1 change: 1 addition & 0 deletions plugins/io.sarl.lang.ui/OSGI-INF/l10n/bundle.properties
Expand Up @@ -30,6 +30,7 @@ command.tooltip.6 = Quick Type Hierarchy
command.tooltip.7 = Open Call Hierarchy
action.label = Not Used
action.label.0 = Toggle Breakpoint
action.label.1 = Breakpoint Properties
viewer.label = SARL Compare
Bundle-Vendor = SARL.io
Bundle-Name = SARL Language compiler IDE tools
79 changes: 74 additions & 5 deletions plugins/io.sarl.lang.ui/plugin.xml
Expand Up @@ -468,6 +468,7 @@
</command>
</menuContribution>
</extension>
<!-- Breakpoints -->
<extension
point="org.eclipse.core.runtime.adapters">
<factory class="io.sarl.lang.ui.SARLExecutableExtensionFactory:org.eclipse.xtext.builder.smap.StratumBreakpointAdapterFactory"
Expand All @@ -479,7 +480,7 @@
<editorContribution targetID="io.sarl.lang.SARL"
id="io.sarl.lang.SARL.ide.rulerActions">
<action
label="%action.label"
label="%action.label.0"
class="io.sarl.lang.ui.SARLExecutableExtensionFactory:org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
style="push"
actionID="RulerDoubleClick"
Expand All @@ -488,16 +489,84 @@
</extension>
<extension point="org.eclipse.ui.popupMenus">
<viewerContribution
targetID="example.rulerContextMenuId"
id="io.sarl.lang.SARL.ide.RulerPopupActions">
targetID="io.sarl.lang.SARL.RulerContext"
id="io.sarl.lang.SARL.RulerPopupActions">
<action
label="%action.label.0"
class="io.sarl.lang.ui.SARLExecutableExtensionFactory:org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
menubarPath="additions"
id="io.sarl.lang.SARL.ide.rulerContextMenu.toggleBreakpointAction">
menubarPath="debug"
id="io.sarl.lang.SARL.rulerContextMenu.toggleBreakpointAction">
</action>
<action
label="%action.label"
class="io.sarl.lang.ui.SARLExecutableExtensionFactory:org.eclipse.debug.ui.actions.RulerEnableDisableBreakpointActionDelegate"
menubarPath="debug"
id="io.sarl.lang.SARL.rulerContextMenu.enableDisableBreakpointAction">
</action>
<action
label="%action.label.1"
helpContextId="breakpoint_properties_action_context"
class="io.sarl.lang.ui.SARLExecutableExtensionFactory:org.eclipse.jdt.debug.ui.actions.JavaBreakpointPropertiesRulerActionDelegate"
menubarPath="group.properties"
id="io.sarl.lang.SARL.rulerContextMenu.openBreapointPropertiesAction">
</action>
</viewerContribution>
</extension>
<!--
<extension point="org.eclipse.ui.handlers">
<handler
class="io.sarl.lang.ui.SARLExecutableExtensionFactory:org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
commandId="io.sarl.lang.SARL.breakpoint.ToggleBreakpointCommand">
<activeWhen>
<reference definitionId="io.sarl.lang.SARL.Editor.opened"/>
</activeWhen>
</handler>
<handler
class="io.sarl.lang.ui.SARLExecutableExtensionFactory:org.eclipse.debug.ui.actions.RulerEnableDisableBreakpointActionDelegate"
commandId="io.sarl.lang.SARL.breakpoint.EnableDisableBreakpointCommand">
<activeWhen>
<reference definitionId="io.sarl.lang.SARL.Editor.opened"/>
</activeWhen>
</handler>
<handler
class="io.sarl.lang.ui.SARLExecutableExtensionFactory:org.eclipse.jdt.debug.ui.actions.JavaBreakpointPropertiesRulerActionDelegate"
commandId="io.sarl.lang.SARL.breakpoint.OpenBreakpointPropertyCommand">
<activeWhen>
<reference definitionId="io.sarl.lang.SARL.Editor.opened"/>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.ui.commands">
<command
description="%action.label.0"
id="io.sarl.lang.SARL.breakpoint.ToggleBreakpointCommand"
name="%action.label.0"/>
<command
description="%action.label"
id="io.sarl.lang.SARL.breakpoint.EnableDisableBreakpointCommand"
name="%action.label"/>
<command
helpContextId="breakpoint_properties_action_context"
description="%action.label.1"
id="io.sarl.lang.SARL.breakpoint.OpenBreakpointPropertyCommand"
name="%action.label.1"/>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:io.sarl.lang.SARL.RulerContext?after=debug">
<command
commandId="io.sarl.lang.SARL.breakpoint.ToggleBreakpointCommand"
id="io.sarl.lang.SARL.rulerContextMenu.toggleBreakpointAction"/>
<command
commandId="io.sarl.lang.SARL.breakpoint.EnableDisableBreakpointCommand"
id="io.sarl.lang.SARL.rulerContextMenu.enableDisableBreakpointAction"/>
</menuContribution>
<menuContribution locationURI="popup:io.sarl.lang.SARL.RulerContext?after=group.properties">
<command
commandId="io.sarl.lang.SARL.breakpoint.OpenBreakpointPropertyCommand"
id="io.sarl.lang.SARL.rulerContextMenu.openBreapointPropertiesAction"/>
</menuContribution>
</extension>
-->

<!-- Introduce Local Variable Refactoring -->
<extension point="org.eclipse.ui.handlers">
Expand Down
12 changes: 6 additions & 6 deletions plugins/io.sarl.lang.ui/plugin.xml_gen
Expand Up @@ -478,7 +478,7 @@
</extension>
<extension point="org.eclipse.ui.editorActions">
<editorContribution targetID="io.sarl.lang.SARL"
id="io.sarl.lang.SARL.ide.rulerActions">
id="io.sarl.lang.SARL.rulerActions">
<action
label="Not Used"
class="io.sarl.lang.ui.SARLExecutableExtensionFactory:org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
Expand All @@ -489,26 +489,26 @@
</extension>
<extension point="org.eclipse.ui.popupMenus">
<viewerContribution
targetID="io.sarl.lang.SARL.ide.rulerContextMenu"
id="io.sarl.lang.SARL.ide.RulerPopupActions">
targetID="io.sarl.lang.SARL.RulerContext"
id="io.sarl.lang.SARL.RulerPopupActions">
<action
label="Toggle Breakpoint"
class="io.sarl.lang.ui.SARLExecutableExtensionFactory:org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
menubarPath="debug"
id="io.sarl.lang.SARL.ide.rulerContextMenu.toggleBreakpointAction">
id="io.sarl.lang.SARL.rulerContextMenu.toggleBreakpointAction">
</action>
<action
label="Not used"
class="io.sarl.lang.ui.SARLExecutableExtensionFactory:org.eclipse.debug.ui.actions.RulerEnableDisableBreakpointActionDelegate"
menubarPath="debug"
id="io.sarl.lang.SARL.ide.rulerContextMenu.enableDisableBreakpointAction">
id="io.sarl.lang.SARL.rulerContextMenu.enableDisableBreakpointAction">
</action>
<action
label="Breakpoint Properties"
helpContextId="breakpoint_properties_action_context"
class="io.sarl.lang.ui.SARLExecutableExtensionFactory:org.eclipse.jdt.debug.ui.actions.JavaBreakpointPropertiesRulerActionDelegate"
menubarPath="group.properties"
id="io.sarl.lang.SARL.ide.rulerContextMenu.openBreapointPropertiesAction">
id="io.sarl.lang.SARL.rulerContextMenu.openBreapointPropertiesAction">
</action>
</viewerContribution>
</extension>
Expand Down
3 changes: 2 additions & 1 deletion tests/io.sarl.lang.tests/META-INF/MANIFEST.MF
Expand Up @@ -26,4 +26,5 @@ Import-Package: foo,
org.junit.runners;version="4.5.0",
org.junit.runners.model;version="4.5.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: io.sarl.lang.tests
Export-Package: io.sarl.lang.tests,
io.sarl.lang

0 comments on commit e7e2b61

Please sign in to comment.