Skip to main content



      Home
Home » Eclipse Projects » GEF » About Action
About Action [message #143729] Wed, 21 July 2004 04:29 Go to next message
Eclipse UserFriend
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 17:51 Go to previous messageGo to next message
Eclipse UserFriend
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 01:15 Go to previous message
Eclipse UserFriend
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: Tue May 06 12:01:38 EDT 2025

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

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

Back to the top