Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to contribute "Toggle Breakpoint" with org.eclipse.ui.menus extension point
How to contribute "Toggle Breakpoint" with org.eclipse.ui.menus extension point [message #929851] Mon, 01 October 2012 16:42 Go to next message
Eclipse UserFriend
Hi,

the API documentation still shows how to register a "Toggle breakpoint" action "the old way" (with editorActions and popupMenus).
This used to be fine, but now with Eclipse 4 it causes many warnings, yet I have been unable to find how I am supposed to achieve the same effect (double click in the ruler to enable or disable a breakpoint) with org.eclipse.ui.menus extension.

Did anyone succeed in doing that? After all, even JDT and Xtext both still use the deprecated editorActions and others.

Any help would be greatly appreciated!

Thanks,
Matthieu
Re: How to contribute "Toggle Breakpoint" with org.eclipse.ui.menus extension point [message #1498274 is a reply to message #929851] Thu, 04 December 2014 04:42 Go to previous message
Eclipse UserFriend
Dear all,

I have a similar problem, but for the popup menu on the ruler bar.
I have the following elements in my plugin.xml.

   	<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>
	</extension>
	<extension point="org.eclipse.ui.commands">
		<command
			description="%action.label.0"
			id="io.sarl.lang.SARL.breakpoint.ToggleBreakpointCommand"
			name="%action.label.0"/>
	</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"/>
                 </menuContribution>
	</extension>


The old version of my plugin.xml was:
   <extension point="org.eclipse.ui.popupMenus">
      <viewerContribution
         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="debug"
            id="io.sarl.lang.SARL.rulerContextMenu.toggleBreakpointAction">
         </action>
      </viewerContribution>
   </extension>


My problem in the new version of my plugin.xml is that the type "org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate" is not a IHandler.
I have not found the corresponding handler.

Does anyone have an idea?

Stéphane.
Previous Topic:Editor Shortcuts not working anymore in Luna
Next Topic:Eclipse RCP Best Practices
Goto Forum:
  


Current Time: Wed Jul 23 18:23:34 EDT 2025

Powered by FUDForum. Page generated in 0.03726 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top