Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » General Question about Handlers & Commands
General Question about Handlers & Commands [message #484494] Mon, 07 September 2009 14:25 Go to next message
Eclipse UserFriend
I can set state to a command using the State object, but what is the exact
same paradigm for a handler? In other words how to I set set State or
something similiar to a handler. The handler parameters will not work for
me because they only support strings.

thanks.
Re: General Question about Handlers & Commands [message #484523 is a reply to message #484494] Tue, 08 September 2009 01:40 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I'm not sure if that is your question but you can use your own
AbstractSourceProvider for example to enable your commands.

This is described here:
http://www.vogella.de/articles/EclipseCommands/article.html# commmands_sourceprovider

Best regards, Lars


--
http://www.vogella.de/ - Eclipse plugin and Eclipse RCP Tutorials
http://www.twitter.com/vogella - vogella on Twitter

kentusha wrote:
> I can set state to a command using the State object, but what is the
> exact same paradigm for a handler? In other words how to I set set State
> or something similiar to a handler. The handler parameters will not work
> for me because they only support strings.
>
> thanks.
>
Re: General Question about Handlers & Commands [message #485205 is a reply to message #484523] Thu, 10 September 2009 15:24 Go to previous messageGo to next message
Eclipse UserFriend
thanks, very interesting article.
Re: General Question about Handlers & Commands [message #485365 is a reply to message #484494] Fri, 11 September 2009 09:53 Go to previous message
Eclipse UserFriend
Once you inform the command that it has a state object, you can easily get access to the state by subclassing org.eclipse.core.commands.AbstractHandlerWithState

When a handler becomes active, it is handed the current state from the Command.

PW
Previous Topic:save editor state
Next Topic:How to set services into handler
Goto Forum:
  


Current Time: Sat Jun 14 04:53:57 EDT 2025

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

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

Back to the top