Contributing to GEF Context menu [message #82079] |
Wed, 04 June 2003 21:19 |
Eclipse User |
|
|
|
Originally posted by: schmerl+gef.cs.cmu.edu
Hi,
I'm trying to work out how to use plugin extensions to add contributions to
the context menu that comes up in the GEF diagram. Is this possible? If so,
could someone direct me to the documentation to do it?
So far, I've tried the objectContribution extension, using edit parts as the
objectClass, and also the class of the editor that registers the context
menu, to no avail.
Any help much appreciated,
Bradley.
P.S. This is what I've tried so far:
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
id="myId"
objectClass="org.eclipse.gef.editparts.AbstractGraphicalEditPart ">
...
</objectContribution>
</extension>
<extension point="org.eclipse.ui.popupMenus">
<viewerContribution id="myId"
targetID="org.eclipse.gef.examples.logicdesigner.LogicEditor ">
....
</viewerContribution>
</extension>
|
|
|
Re: Contributing to GEF Context menu [message #82110 is a reply to message #82079] |
Thu, 05 June 2003 02:28 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
There is another step required in the code that created the MenuManager.
The logic editor does not register its menus for contribution, I don't
believe.
"Bradley Schmerl" <schmerl+gef@cs.cmu.edu> wrote in message
news:bblnps$nr3$1@rogue.oti.com...
> Hi,
>
> I'm trying to work out how to use plugin extensions to add contributions
to
> the context menu that comes up in the GEF diagram. Is this possible? If
so,
> could someone direct me to the documentation to do it?
>
> So far, I've tried the objectContribution extension, using edit parts as
the
> objectClass, and also the class of the editor that registers the context
> menu, to no avail.
>
> Any help much appreciated,
> Bradley.
>
> P.S. This is what I've tried so far:
>
> <extension point="org.eclipse.ui.popupMenus">
> <objectContribution
> id="myId"
>
> objectClass="org.eclipse.gef.editparts.AbstractGraphicalEditPart ">
> ...
> </objectContribution>
> </extension>
>
> <extension point="org.eclipse.ui.popupMenus">
> <viewerContribution id="myId"
> targetID="org.eclipse.gef.examples.logicdesigner.LogicEditor ">
> ....
> </viewerContribution>
> </extension>
>
>
|
|
|
Re: Contributing to GEF Context menu [message #82264 is a reply to message #82110] |
Thu, 05 June 2003 13:37 |
Eclipse User |
|
|
|
Originally posted by: schmerl+gef.cs.cmu.edu
That's right. The constructor for org.eclipse.gef.ContextMenuProvider only
allows an EditPartViewer as a parameter. I can't find out how to set the id
for the menu (which is private to MenuManager and only seems to be settable
through construction). Is there a way to set the ID?
Bradley.
"Randy Hudson" <none@us.ibm.com> wrote in message
news:bbm9s5$1sn$1@rogue.oti.com...
> There is another step required in the code that created the MenuManager.
> The logic editor does not register its menus for contribution, I don't
> believe.
>
> "Bradley Schmerl" <schmerl+gef@cs.cmu.edu> wrote in message
> news:bblnps$nr3$1@rogue.oti.com...
> > Hi,
> >
> > I'm trying to work out how to use plugin extensions to add contributions
> to
> > the context menu that comes up in the GEF diagram. Is this possible? If
> so,
> > could someone direct me to the documentation to do it?
> >
> > So far, I've tried the objectContribution extension, using edit parts as
> the
> > objectClass, and also the class of the editor that registers the context
> > menu, to no avail.
> >
> > Any help much appreciated,
> > Bradley.
> >
> > P.S. This is what I've tried so far:
> >
> > <extension point="org.eclipse.ui.popupMenus">
> > <objectContribution
> > id="myId"
> >
> > objectClass="org.eclipse.gef.editparts.AbstractGraphicalEditPart ">
> > ...
> > </objectContribution>
> > </extension>
> >
> > <extension point="org.eclipse.ui.popupMenus">
> > <viewerContribution id="myId"
> >
targetID="org.eclipse.gef.examples.logicdesigner.LogicEditor ">
> > ....
> > </viewerContribution>
> > </extension>
> >
> >
>
>
|
|
|
Re: Contributing to GEF Context menu [message #82526 is a reply to message #82264] |
Fri, 06 June 2003 02:48 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
You do not need to set the ID. I think this is only for submenus? Use:
IWorkbenchtPartSite#registerContextMenu (ID, menu, provider);
Hey, do you Randy Pausch? He was one of my professors.
"Bradley Schmerl" <schmerl+gef@cs.cmu.edu> wrote in message
news:bbnh38$b1$1@rogue.oti.com...
> That's right. The constructor for org.eclipse.gef.ContextMenuProvider only
> allows an EditPartViewer as a parameter. I can't find out how to set the
id
> for the menu (which is private to MenuManager and only seems to be
settable
> through construction). Is there a way to set the ID?
>
> Bradley.
|
|
|
|
|
Re: Contributing to GEF Context menu [message #899712 is a reply to message #899630] |
Thu, 02 August 2012 05:10 |
Karthikeyan Missing name Messages: 47 Registered: July 2011 |
Member |
|
|
Hi,
Thank you for your reply. Sorry myself new to this. Kindly clarify below doubts.
In buildContextmenu in mycontextProvider, how to add palette tools into that.
In plugin.xml
<command
commandId="someCommandId"
style="push">
</command>
what commandId need to be given and from where. And how it is being used.
Note: My requirement is to bring Palette tools into the GEF editor on user mouse click, as like GMF and graphiti ie show in attached image. Kindly refer it. Is it possible?
Thanks & Regards,
Karthikeyan.B
[Updated on: Thu, 02 August 2012 06:45] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05025 seconds