Skip to main content



      Home
Home » Eclipse Projects » GEF » Actions
Actions [message #71075] Mon, 17 March 2003 17:04 Go to next message
Eclipse UserFriend
Originally posted by: melaasar.rational.com

Hello,

My first question is : is there a reason why GEF ties the action hierarchy
to IEditorPart rather than IWorkbenchpart? It is complicating the effort of
hosting GEF viewers in other parts like JFace views.

My second question: GEF is inheriting RetargetAction, which is not intended
to be subclassed according to the Eclipse docs. Is there a necessity for
that?

My third question: GEF is also reusing the retargetable actions concept to
redirect action handlers to different instances of the same editor kind. I
thought this concept is introduced in Eclipse mainly for retargeting actions
across different workbench parts. The question is: why cannot GEF conform to
Eclipse's intended way of retargetting different instances of the same part
kind by using ActionDelegates?

I appreciate any feedback and thanks very much in advance

Maged
Re: Actions [message #71117 is a reply to message #71075] Mon, 17 March 2003 17:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

"Maged Elaasar" <melaasar@rational.com> wrote in message
news:b55gm4$gib$1@rogue.oti.com...
> Hello,
>
> My first question is : is there a reason why GEF ties the action hierarchy
> to IEditorPart rather than IWorkbenchpart? It is complicating the effort
of
> hosting GEF viewers in other parts like JFace views.

You mean workbench views? It probably isn't necessary now. We used to
obtain various notifiers from the IEditorPart, but now the Actions don't
listen to anything. They require manual updating.

If you want this changed, you'll have to bring it up on the development
mailing list. this sounds like a source-compatible change, but not a
binary-compatible change. Since we haven't released 2.1 yet, it might be
acceptable to make this type of change.

> My second question: GEF is inheriting RetargetAction, which is not
intended
> to be subclassed according to the Eclipse docs. Is there a necessity for
> that?

Our subclasses do nothing but set initial values for text and icon. We do
not override any methods, so I think that this type of subclassing provides
convenience to the client. Otherwise, you would be required to set the ID,
text, defitionID, description, rollover icon, disabled icon, and standard
icon.

> My third question: GEF is also reusing the retargetable actions concept to
> redirect action handlers to different instances of the same editor kind. I
> thought this concept is introduced in Eclipse mainly for retargeting
actions
> across different workbench parts. The question is: why cannot GEF conform
to
> Eclipse's intended way of retargetting different instances of the same
part
> kind by using ActionDelegates?

We are doing exactly what the Eclipse TextEditor does. ActionDelegates are
used by extension points. When adding actions programmatically, they are
not needed.

> I appreciate any feedback and thanks very much in advance
>
> Maged
>
>
>
Re: Actions [message #71304 is a reply to message #71117] Tue, 18 March 2003 11:34 Go to previous message
Eclipse UserFriend
Originally posted by: melaasar.rational.com

Randy,

I appreciate your feedback. I have one more comment:

As you said, extending from the Action class is good for programatically
defined actions. However, for extensibility reasons, you would want to
extend from ActionDelegate. This is extremely useful for a GEF application
with different deployable plugins that contribute their actions to the main
application. In this case, you would have to create and maintain a separate
action hierarchy (off ActionDelegate) for that. On the other hand, making a
single hierarchy that extends off the Action Delegates would be sufficient
whether extensibility is or is not required. You will also get the
retargetability for free using this mechanism.

Please let me know what you think about this.

Maged


"Randy Hudson" <none@us.ibm.com> wrote in message
news:b55i08$hfi$1@rogue.oti.com...
> "Maged Elaasar" <melaasar@rational.com> wrote in message
> news:b55gm4$gib$1@rogue.oti.com...
> > Hello,
> >
> > My first question is : is there a reason why GEF ties the action
hierarchy
> > to IEditorPart rather than IWorkbenchpart? It is complicating the effort
> of
> > hosting GEF viewers in other parts like JFace views.
>
> You mean workbench views? It probably isn't necessary now. We used to
> obtain various notifiers from the IEditorPart, but now the Actions don't
> listen to anything. They require manual updating.
>
> If you want this changed, you'll have to bring it up on the development
> mailing list. this sounds like a source-compatible change, but not a
> binary-compatible change. Since we haven't released 2.1 yet, it might be
> acceptable to make this type of change.
>
> > My second question: GEF is inheriting RetargetAction, which is not
> intended
> > to be subclassed according to the Eclipse docs. Is there a necessity for
> > that?
>
> Our subclasses do nothing but set initial values for text and icon. We do
> not override any methods, so I think that this type of subclassing
provides
> convenience to the client. Otherwise, you would be required to set the
ID,
> text, defitionID, description, rollover icon, disabled icon, and standard
> icon.
>
> > My third question: GEF is also reusing the retargetable actions concept
to
> > redirect action handlers to different instances of the same editor kind.
I
> > thought this concept is introduced in Eclipse mainly for retargeting
> actions
> > across different workbench parts. The question is: why cannot GEF
conform
> to
> > Eclipse's intended way of retargetting different instances of the same
> part
> > kind by using ActionDelegates?
>
> We are doing exactly what the Eclipse TextEditor does. ActionDelegates
are
> used by extension points. When adding actions programmatically, they are
> not needed.
>
> > I appreciate any feedback and thanks very much in advance
> >
> > Maged
> >
> >
> >
>
>
Previous Topic:Request and Factory
Next Topic:NODE_ROLE & NodeEditPolicy
Goto Forum:
  


Current Time: Sun Jul 27 01:54:15 EDT 2025

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

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

Back to the top