Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How I get the 'Team' Menu int my popup from jface.viewers.TreeViewer
How I get the 'Team' Menu int my popup from jface.viewers.TreeViewer [message #1743298] Wed, 14 September 2016 08:13 Go to next message
Sabine Greiser is currently offline Sabine GreiserFriend
Messages: 2
Registered: September 2016
Junior Member
Hey,

in my e4 rcp application I have a Part with a jface.viewers.TreeViewer.
This TreeViewer displays files (like PackageExplorer) but in different order and some files will be hidden.

I configured in the e4xmi a popup menu for the part and I registered it to the treeViewer
menuService.registerContextMenu(treeViewer.getControl(), "...");


it works fine.

Now I want add the "Team" menu (SVN) to this popup Menu. But I dont have any idea how I can make that.

The SVN Plugin is active, I can see this "Team" menu in the popup-Menu from the PackageExplorer in my e4-App and I can also "Import" -> SVN -> Project from SVN and it works fine. But in my own view, it seems, that I dont have any connection to SVN.
Re: How I get the 'Team' Menu int my popup from jface.viewers.TreeViewer [message #1743397 is a reply to message #1743298] Thu, 15 September 2016 01:21 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 772
Registered: January 2012
Senior Member

The Team menu is defined in org.eclipse.team.ui:

   <extension point="org.eclipse.ui.menus">
      <menuContribution
            locationURI="popup:org.eclipse.ui.popup.any?after=additions">
         <menu
               id="team.main"
               label="%TeamGroupMenu.label">
         ... etc ...

So the Team menu should appear on any context menus with a separator or something with id 'additions'.

Whether the SVN contributions appear may depend on the objects selected.

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: How I get the 'Team' Menu int my popup from jface.viewers.TreeViewer [message #1743425 is a reply to message #1743397] Thu, 15 September 2016 10:26 Go to previous message
Sabine Greiser is currently offline Sabine GreiserFriend
Messages: 2
Registered: September 2016
Junior Member
I have tryed to advance the e4xmi to the following:

<menus xsi:type="menu:PopupMenu" xmi:id="_YXXYcGj4EeaEt_WVwSEwbA" elementId="..." label="main context menu">
                  <children xsi:type="menu:HandledMenuItem" xmi:id="_i9uy0Gj7EeaEt_WVwSEwbA" .../>
                  <children xsi:type="menu:MenuSeparator" xmi:id="_pAdKQGj7EeaEt_WVwSEwbA" .../>
                  <children xsi:type="menu:HandledMenuItem" xmi:id="_GE434Gj-EeaEt_WVwSEwbA" .../>
                  <children xsi:type="menu:Menu" xmi:id="_INA08HaGEeaPvt_gV5bJIQ" elementId="org.il.e4.rcp.miau.menu.team2" label="Team2">
                  <children xsi:type="menu:HandledMenuItem" xmi:id="_y37mYHaIEeaPvt_gV5bJIQ" elementId="....handledmenuitem.commit" label="Commit" iconURI="platform:/plugin/.../icons/full/subversive/copy.gif" command="_CnGuJmnOEeaPoaUFexTCZg"/>
                  </children>
                 <children xsi:type="menu:MenuSeparator" xmi:id="_2Lyp0HsoEeaZwKHDlISFUQ" elementId="additions"/>
                  
 </menus>


But nothing happens. My TreeViewer has user-defined object nodes, do these objects implement something? Or is something missing in the plugin.xml? There is no connection to the the extention point org.eclipse.ui.menus.
Previous Topic:Strange bundle-Error
Next Topic:Associating a Perspective with a File Type
Goto Forum:
  


Current Time: Thu Sep 20 06:28:47 GMT 2018

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

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

Back to the top