Programatically access to Actions [message #209] |
Wed, 16 April 2003 15:14  |
Eclipse User |
|
|
|
Originally posted by: gsrt.terra.com.br
May be the question was aswered some time, but anyway :
How to call an Action by program ?
[]s
Glauco
|
|
|
|
Re: Programatically access to Actions [message #1681 is a reply to message #1632] |
Tue, 22 April 2003 06:22   |
Eclipse User |
|
|
|
Originally posted by: gsrt.terra.com.br
Thanks for the response, Martin.
But I need to know the process to get access to the Action object.
Eclipse mantain a list of Actions available, for the menu options and
toolbar buttons. What I want is to get access to one of these commands
and run it. For example, to close all Editors, Exit program, Save, Save
All.
Is it possible to start an Action creating an object, through new
statement? In this case, what do I need to pass in constructor ?
[]s
Glauco Reis
Martin Dulisch wrote:
> You could call the run() method of the action.
>
> Martin
>
> Glauco Reis wrote:
> > May be the question was aswered some time, but anyway :
> > How to call an Action by program ?
> >
> > []s
> > Glauco
|
|
|
Re: Programatically access to Actions [message #27375 is a reply to message #1681] |
Fri, 02 May 2003 08:45  |
Eclipse User |
|
|
|
This is a multipart message in MIME format.
--=_alternative 00461DD285256D1A_=
Content-Type: text/plain; charset="US-ASCII"
I've look at this problem once before. My conclusion was that it was
difficult to get to the actions of the workbench. For the most part,
initialized actions live in a class called ActionPresentation and this
class builds the Actions using a PluginActionBuilder and
ActionsetDescriptors. Perspectives hold arrays of ActionsetDescriptors
and pass these descriptors to the ActionPresentation when they are
activated.
The best way to get access to actions is to use the workbench's actionset
registry. With this you can pull out ActionsetDescriptors. The trick is
to then initialize or build Actions using these descriptors. You'll need
a class like PluginActionbuilder to do this but it's contained in an
"internal" package so I dared not use it.
good luck.
-m@
--=_alternative 00461DD285256D1A_=
Content-Type: text/html; charset="US-ASCII"
<br><font size=2 face="sans-serif">I've look at this problem once before.
My conclusion was that it was difficult to get to the actions of
the workbench. For the most part, initialized actions live in a class
called ActionPresentation and this class builds the Actions using a PluginActionBuilder
and ActionsetDescriptors. Perspectives hold arrays of ActionsetDescriptors
and pass these descriptors to the ActionPresentation when they are activated.</font>
<br>
<br><font size=2 face="sans-serif">The best way to get access to actions
is to use the workbench's actionset registry. With this you can pull
out ActionsetDescriptors. The trick is to then initialize or build
Actions using these descriptors. You'll need a class like PluginActionbuilder
to do this but it's contained in an "internal" package so I dared
not use it.</font>
<br>
<br><font size=2 face="sans-serif">good luck.</font>
<br>
<br><font size=2 face="sans-serif">-m@</font>
<br>
--=_alternative 00461DD285256D1A_=--
|
|
|
Powered by
FUDForum. Page generated in 0.09117 seconds