Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Programatically access to Actions
Programatically access to Actions [message #209] Wed, 16 April 2003 15:14 Go to next message
Eclipse UserFriend
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 #1632 is a reply to message #209] Tue, 22 April 2003 02:40 Go to previous messageGo to next message
Eclipse UserFriend
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 #1681 is a reply to message #1632] Tue, 22 April 2003 06:22 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
&nbsp;My conclusion was that it was difficult to get to the actions of
the workbench. &nbsp;For the most part, initialized actions live in a class
called ActionPresentation and this class builds the Actions using a PluginActionBuilder
and ActionsetDescriptors. &nbsp;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. &nbsp;With this you can pull
out ActionsetDescriptors. &nbsp;The trick is to then initialize or build
Actions using these descriptors. &nbsp;You'll need a class like PluginActionbuilder
to do this but it's contained in an &quot;internal&quot; 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_=--
Previous Topic:Problem changing menu font for eclipse 2.1 linux-gtk
Next Topic:Help ! Java Perspective Broken ( Package Explorer)
Goto Forum:
  


Current Time: Thu Mar 13 15:34:40 EDT 2025

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

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

Back to the top