Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Re: Eclipse 3.4/emf 2.4
Re: Eclipse 3.4/emf 2.4 [message #616254] Sun, 13 April 2008 19:22
Ed Merks is currently offline Ed MerksFriend
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.&nbsp; I think it's Ecore
Tools.&nbsp; 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>&nbsp; protected void
createContextMenuFor(StructuredViewer viewer)</small><br>
<small>&nbsp; {</small><br>
<small>&nbsp;&nbsp;&nbsp; MenuManager contextMenu = new MenuManager("#PopUp");</small><br>
<small>&nbsp;&nbsp;&nbsp; contextMenu.add(new Separator("additions"));</small><br>
<small>&nbsp;&nbsp;&nbsp; contextMenu.setRemoveAllWhenShown(true);</small><br>
<small>&nbsp;&nbsp;&nbsp; contextMenu.addMenuListener(this);</small><br>
<small>&nbsp;&nbsp;&nbsp; Menu menu=
contextMenu.createContextMenu(viewer.getControl());</small> <br>
<small>&nbsp;&nbsp;&nbsp; viewer.getControl().setMenu(menu);</small><br>
<small>&nbsp;&nbsp;&nbsp; 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/
Previous Topic:[Net4j]
Next Topic:EMFT Ecore Editor
Goto Forum:
  


Current Time: Sat Apr 27 00:25:25 GMT 2024

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

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

Back to the top