Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Ping - is anyone home? Anthony? any of the people
Ping - is anyone home? Anthony? any of the people [message #235079] Tue, 05 June 2007 14:19 Go to next message
Eclipse UserFriend
Originally posted by: mlevison.gmail.com

In the past week I've asked 6 questions that have gone unanswered. I
realize that I don't have a divine right to a reply but some hints would
helpful. As my questions get answered I promise to document the answers
in public - along with any other discoveries I make - but first I need
help.

The posts include:
What is a retargetAction?
ActionBarConbtriubtor vs. ActionBarAdvisor
.....


Is the entire GEF team on vacation? (I know there are hundreds of you).

Lost, Lonely and Struggling in GEF land
Mark
----------------------
Most recent posts:
Eclipse/GEF More questions that answers
http://www.notesfromatooluser.com/2007/06/eclipsegef_more.ht ml
12 Easy steps for generating Index Cards from your Sprint Backlog
http://www.notesfromatooluser.com/2007/06/12_easy_steps_f.ht ml
Scrum in a Nutshell Presentation
http://www.notesfromatooluser.com/2007/05/scrum_in_a_nuts.ht ml
Re: Ping - is anyone home? Anthony? any of the people [message #235103 is a reply to message #235079] Tue, 05 June 2007 22:51 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Mark,

*Action* is not actually a GEF API but an Eclipse Core UI.

If you google "eclipse retargetAction example" you get a bunch of answers
back. That may be the place to start.

Cheers...
Anthony

"Mark Levison" <mlevison@gmail.com> wrote in message
news:f43rdh$b2s$1@build.eclipse.org...
> In the past week I've asked 6 questions that have gone unanswered. I
> realize that I don't have a divine right to a reply but some hints would
> helpful. As my questions get answered I promise to document the answers in
> public - along with any other discoveries I make - but first I need
> help.
>
> The posts include:
> What is a retargetAction?
> ActionBarConbtriubtor vs. ActionBarAdvisor
> ....
>
>
> Is the entire GEF team on vacation? (I know there are hundreds of you).
>
> Lost, Lonely and Struggling in GEF land
> Mark
> ----------------------
> Most recent posts:
> Eclipse/GEF More questions that answers
> http://www.notesfromatooluser.com/2007/06/eclipsegef_more.ht ml
> 12 Easy steps for generating Index Cards from your Sprint Backlog
> http://www.notesfromatooluser.com/2007/06/12_easy_steps_f.ht ml
> Scrum in a Nutshell Presentation
> http://www.notesfromatooluser.com/2007/05/scrum_in_a_nuts.ht ml
Re: Ping - is anyone home? Anthony? any of the people [message #235138 is a reply to message #235103] Tue, 05 June 2007 23:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mlevison.gmail.com

Anthony Hunter wrote:
> Hi Mark,
>
> *Action* is not actually a GEF API but an Eclipse Core UI.
>
> If you google "eclipse retargetAction example" you get a bunch of answers
> back. That may be the place to start.
>

Thanks for the reply Anthony unfortunately none of the examples answer
the question (or any of the others that I asked recently). The java doc
and the examples answer the question - how to subclass a retargetAction.
But they don't answer:
1) What is a retargetActions?
2) How do they differ from IAction's
3) Are they compatible with Paul W.'s work on action Handler's in 3.3?
4) Why do some actions require retarget actions (cut, copy and paste)
and others not (print).
5) When I implement my own actions when do I need a retargetAction? When
don't I?

I also have another batch of open questions:
1) Why use ActionContributor vs. adding Actions in the ActionBarAdvisor?
2) When adding actions via an ActionBarContributor should you add the
actions to a ‘global handler’:
• pageSite.getActionBars().setGlobalActionHandler() as per the
logic editor sample **or** editor handler
• getEditorSite().getService(IHandlerService.class).
activateHandler() as per the shapes example?
3) If you’re using the ActionBarContributor how do you contribute to a
menu that already exists – perhaps file? In a specific place in that menu?
4) What did registering the print action and declaring the global action
key do? As per the redbook example. It certainly didn't add them to the
File Menu or Coolbar.
5) If I need strongly typed constructors and so don't want to use
plugin.xml is there an elegant/appropriate way to install a print action
in the menu?

I'm sorry for being a pain and repeating my questions I genuinely don't
know how else I'm going to get the answers I need to build a product.

Cheers
Mark Levison
Re: Ping - is anyone home? Anthony? any of the people [message #235165 is a reply to message #235138] Wed, 06 June 2007 10:32 Go to previous message
Eclipse UserFriend
Originally posted by: modica.cs.tu-berlin.deNOSPAM

Hi Mark,

I don't claim to be an expert but this is how I believe RetargetActions
work:

> 1) What is a retargetActions?
I can not express it clearlier than the JavaDoc:

* A <code>RetargetAction</code> tracks the active part in the workbench.
* Each RetargetAction has an ID. If the active part provides an action
* handler for the ID the enable and check state of the RetargetAction
* is determined from the enable and check state of the handler. If the
* active part does not provide an action handler then this action is
* disabled.

> 2) How do they differ from IAction's
RetargetActions implement IAction but they are just a kind of
placeholder that call concrete action that does something.

> 4) Why do some actions require retarget actions (cut, copy and paste)
> and others not (print).
Actually it seems that CopyRetargetAction is deprecated and refers to
ActionFactory that builds all kinds of RetargetActiosn including one for
Print!

> 5) When I implement my own actions when do I need a retargetAction? When
> don't I?
As you mentioned copy, cut, paste: It can be useful that a single button
(which is representing an IAction) in the top action bar can be shared
by different views, editors, etc. So a textual editor can tell this RA
that it shoulc C/C/P text. If you switch to a GEF editor the handle of
the RA is updated, so it would call the handling action provided by the
GEF editor.

I think global actions with overloaded notions like copy, cut, paste or
all the other stuff in ActionFactory should indeed be RAs while specific
actions of a single editor should be normal actions as it is unefficient
to set up two actions (the RA and the handle) when one is sufficient.
Previous Topic:Does ScaledGraphics implement setBackgroundPattern() in 3.3?
Next Topic:How to get Content Provider
Goto Forum:
  


Current Time: Sun Sep 25 14:48:03 GMT 2022

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

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

Back to the top