Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » General Question about Handlers & Commands
General Question about Handlers & Commands [message #484494] Mon, 07 September 2009 18:25 Go to next message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
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 05:40 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

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 19:24 Go to previous messageGo to next message
kent gibson is currently offline kent gibsonFriend
Messages: 114
Registered: July 2009
Senior Member
thanks, very interesting article.
Re: General Question about Handlers & Commands [message #485365 is a reply to message #484494] Fri, 11 September 2009 13:53 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 Apr 27 03:08:34 GMT 2024

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

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

Back to the top