Re: Eclipse 3.4/emf 2.4 [message #616254] |
Sun, 13 April 2008 19:22 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------000705030805090104070505
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Martin,
Oddly enough, I'm not sure who's providing this and hadn't even noticed
since I don't normally use the project explore. I think it's Ecore
Tools. It doesn't seem to support the usual popup menu actions which
are normally made available this way in the generated editor...
protected void createContextMenuFor(StructuredViewer viewer)
{
MenuManager contextMenu = new MenuManager("#PopUp");
contextMenu.add(new Separator("additions"));
contextMenu.setRemoveAllWhenShown(true);
contextMenu.addMenuListener(this);
Menu menu= contextMenu.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
getSite().registerContextMenu(contextMenu, new
UnwrappingSelectionProvider(viewer));
Martin Taal wrote:
> Hi,
> I noticed in Eclipse 3.4 that the ecore file can be opened as a
> (folder) tree in the project explorer. This is really nice. My
> question is if it is possible to attach a right-click context menu to
> the ecore file and the model elements inside it? Is there an extension
> point which I can use?
>
--------------000705030805090104070505
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Martin,<br>
<br>
Oddly enough, I'm not sure who's providing this and hadn't even noticed
since I don't normally use the project explore. I think it's Ecore
Tools. It doesn't seem to support the usual popup menu actions which
are normally made available this way in the generated editor...<br>
<blockquote><small> protected void
createContextMenuFor(StructuredViewer viewer)</small><br>
<small> {</small><br>
<small> MenuManager contextMenu = new MenuManager("#PopUp");</small><br>
<small> contextMenu.add(new Separator("additions"));</small><br>
<small> contextMenu.setRemoveAllWhenShown(true);</small><br>
<small> contextMenu.addMenuListener(this);</small><br>
<small> Menu menu=
contextMenu.createContextMenu(viewer.getControl());</small> <br>
<small> viewer.getControl().setMenu(menu);</small><br>
<small> getSite().registerContextMenu(contextMenu, new
UnwrappingSelectionProvider(viewer));</small><br>
</blockquote>
<br>
Martin Taal wrote:
<blockquote cite="mid:ftti0l$ire$1@build.eclipse.org" type="cite">Hi,
<br>
I noticed in Eclipse 3.4 that the ecore file can be opened as a
(folder) tree in the project explorer. This is really nice. My question
is if it is possible to attach a right-click context menu to the ecore
file and the model elements inside it? Is there an extension point
which I can use?
<br>
<br>
</blockquote>
<br>
</body>
</html>
--------------000705030805090104070505--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03237 seconds