Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » how to use IViewActionDelegate?
how to use IViewActionDelegate? [message #989068] Tue, 04 December 2012 08:59 Go to next message
Eclipse UserFriend
hello.

i have added a menu item to the variablesview menu by extending the org.eclipse.ui.popupMenus extension point and what im trying to do is that when someone right clicks a variable and clicks my menu item i would parse the variable's value to an Ip format.

i succeded in adding the menu item and responding to a click with the IViewActionDelegate interface, but when someone clicks on my menu item the information given by IAction event is'nt helping with knowing which Object occoured the event or what is the value of the variable.

my question is, if there is a way to locate the variable's value after clicking my menu item? or is there another way of using the interface IViewActionDelegate that i dont know of, or i dont use it correctly?.

i have checked a lot in google about how to add a menu item and found good guide: http://www.eclipse.org/articles/article.php?file=Article-action-contribution/index.html

but it does'nt solve my problem, i really need help on this subject.

thanks.

[Updated on: Tue, 04 December 2012 09:00] by Moderator

Re: how to use IViewActionDelegate? [message #989608 is a reply to message #989068] Thu, 06 December 2012 17:45 Go to previous messageGo to next message
Eclipse UserFriend
When implementing your action as a subclass of org.eclipse.ui.actions.SelectionProviderAction, calling getStructuredSelection() should give you access to the variable, I'd expect elements of the selection to be of type IJavaVariable, at least IVariable.

Hopefully an existing action like org.eclipse.debug.internal.ui.actions.variables.ChangeVariableValueAction will give you an idea to to implement your action.

HTH,
Stephan
Re: how to use IViewActionDelegate? [message #994803 is a reply to message #989608] Fri, 28 December 2012 05:11 Go to previous message
Eclipse UserFriend
greate, thanks for the help.
Previous Topic:JavaScript editor: return key does not insert newline after opening square bracket, inserts spaces
Next Topic:Override cannot be resolved to a type
Goto Forum:
  


Current Time: Mon May 19 11:55:50 EDT 2025

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

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

Back to the top