Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 20:42 Go to next message
Matthieu Wipliez is currently offline Matthieu WipliezFriend
Messages: 27
Registered: March 2010
Junior Member
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 09:42 Go to previous message
Stéphane Galland is currently offline Stéphane GallandFriend
Messages: 8
Registered: July 2014
Junior Member
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:Intro Page not shown in Eclipse E4 Application Project
Goto Forum:
  


Current Time: Sun Dec 21 16:47:28 GMT 2014

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

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