Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » objectContribution for an editor
objectContribution for an editor [message #218700] Wed, 28 June 2006 11:56 Go to next message
Eclipse UserFriend
Originally posted by: Dieter.Bogdoll.siemens.com

Hello,

how can I add an action into the context menu of a GEF Editor?
I tried to enter another action into the Shape example of GEF.
For that I created a new plugin project with the following
plugin.xml:

<plugin>

<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
adaptable="false"
id="cmt.action"
objectClass="org.eclipse.gef.examples.shapes.model.Shape">
<action
class="cmt.dummyAction"
id="cmt.action1"
label="Test"/>
</objectContribution>
</extension>

</plugin>

But this contribution won't be shown if I open the context menu
over a Shape in the GEF Editor. Neither displays the context
menu of the Outlineview this action.

Thanks.

Bye
Dieter
Re: objectContribution for an editor [message #218896 is a reply to message #218700] Tue, 04 July 2006 14:20 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

I think that contributing to the context menu is a JFace concept. All you
have to do, is register your editor's context menu with the workbench
appropriately, and the workbench will add actions to that menu based on the
contribution mechanism used, such as expressions. If you see anyhthing that
GEF should be doing above and beyond JFace, open a feature request.

"Dieter Bogdoll" <Dieter.Bogdoll@siemens.com> wrote in message
news:71c6b2d3bea82b0a161e60d991b958bb$1@www.eclipse.org...
> Hello,
>
> how can I add an action into the context menu of a GEF Editor?
> I tried to enter another action into the Shape example of GEF.
> For that I created a new plugin project with the following
> plugin.xml:
>
> <plugin>
>
> <extension
> point="org.eclipse.ui.popupMenus">
> <objectContribution
> adaptable="false"
> id="cmt.action"
> objectClass="org.eclipse.gef.examples.shapes.model.Shape">
> <action
> class="cmt.dummyAction"
> id="cmt.action1"
> label="Test"/>
> </objectContribution>
> </extension>
>
> </plugin>
>
> But this contribution won't be shown if I open the context menu
> over a Shape in the GEF Editor. Neither displays the context
> menu of the Outlineview this action.
> Thanks.
>
> Bye
> Dieter
>
Previous Topic:Connection problem
Next Topic:NativeGraphics2DCanvas - where can I find it?
Goto Forum:
  


Current Time: Fri Apr 26 06:08:41 GMT 2024

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

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

Back to the top