Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » About Action
About Action [message #143729] Wed, 21 July 2004 08:29 Go to next message
zhang wei is currently offline zhang weiFriend
Messages: 84
Registered: July 2009
Member
Hello everyone:

We build a project based on the GEF(Graphical Editing Framework), and
now we met a problem during the development.

By the requirement, we need a popup menu in our graphical editor. We
make the popup menu through using org.eclipse.gef.ContextMenuProvider.

And then, we need some actions(extends
org.eclipse.gef.ui.actions.SelectionAction) in this popup menu, and we
also need these actions to appear at the Eclipse’s tool bar & menu, but we
do not want to rewrite the same code for almost same action, and we
strongly need these actions which appears at tool bar, menu and popup menu
own same status at the same time, so we are going to reuse these actions,
but there is a question?

We use a class(extends org.eclipse.gef.ui.actions.ActionBarContributor)
for tool bar and menu associated with a specified editor, but how can we
get the object of these actions in method contributeToToolBar and
contributeToMenu, because they need the instance of
org.eclipse.ui.part.IWorkbenchPart for their creation.

Many thanks!
Re: About Action [message #143845 is a reply to message #143729] Wed, 21 July 2004 21:51 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
How about using RetargetActions? The logic example does the same with
incrementing and decrementing the value of an LED.

"Wei Zhang" <zhang-wei@sinocom.cn> wrote in message
news:cdl9gt$f2f$1@eclipse.org...
> Hello everyone:
>
> We build a project based on the GEF(Graphical Editing Framework), and
> now we met a problem during the development.
>
> By the requirement, we need a popup menu in our graphical editor. We
> make the popup menu through using org.eclipse.gef.ContextMenuProvider.
>
> And then, we need some actions(extends
> org.eclipse.gef.ui.actions.SelectionAction) in this popup menu, and we
> also need these actions to appear at the Eclipse
Re: About Action [message #143868 is a reply to message #143845] Thu, 22 July 2004 05:15 Go to previous message
zhang wei is currently offline zhang weiFriend
Messages: 84
Registered: July 2009
Member
Pratik Shah wrote:

> How about using RetargetActions? The logic example does the same with
> incrementing and decrementing the value of an LED.

> "Wei Zhang" <zhang-wei@sinocom.cn> wrote in message
> news:cdl9gt$f2f$1@eclipse.org...
> > Hello everyone:
> >
> > We build a project based on the GEF(Graphical Editing Framework), and
> > now we met a problem during the development.
> >
> > By the requirement, we need a popup menu in our graphical editor. We
> > make the popup menu through using org.eclipse.gef.ContextMenuProvider.
> >
> > And then, we need some actions(extends
> > org.eclipse.gef.ui.actions.SelectionAction) in this popup menu, and we
> > also need these actions to appear at the Eclipse’s tool bar & menu, but we
> > do not want to rewrite the same code for almost same action, and we
> > strongly need these actions which appears at tool bar, menu and popup menu
> > own same status at the same time, so we are going to reuse these actions,
> > but there is a question?
> >
> > We use a class(extends org.eclipse.gef.ui.actions.ActionBarContributor)
> > for tool bar and menu associated with a specified editor, but how can we
> > get the object of these actions in method contributeToToolBar and
> > contributeToMenu, because they need the instance of
> > org.eclipse.ui.part.IWorkbenchPart for their creation.
> >
> > Many thanks!
> >
thanks
Previous Topic:UpdateAction in GEF 2.0.3 (see Redbook sample)?
Next Topic:Can I position PolylineConnection end point anywhere on the Figure ( ie, inside the boundary of Figu
Goto Forum:
  


Current Time: Sat Oct 19 18:42:08 GMT 2024

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

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

Back to the top