objectContribution for an editor [message #218700] |
Wed, 28 June 2006 11:56 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.03546 seconds