Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Extending the ContentOutline(Adding context menu entries for ContentOutline)
Extending the ContentOutline [message #806882] Sat, 25 February 2012 16:58 Go to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 6
Registered: November 2011
Junior Member
Hi,

I try to add an new entry for the context menu that is displayed in the content outline.

I tried it like this:

<menuContribution
            allPopups="false"
            locationURI="popup:org.eclipse.ui.views.ContentOutline?after=additions">
         <command
              //......
         </command>
      </menuContribution>


I am sure that my command is working adding an entry to other context menus worked (e.g. package explorer). But I am not sure why it does not work for the content outline. I assume that the content outline and the context menu depends on the currently opened file in the editor (would make sense).
I tried to extend the menu with this locationUri:
Quote:
org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage

but that did not work either.

How can I add a menu entry to the context menu if a java file is edited. There must be an extension point or an id for it (if I use the popup.any locationUri my entry does appear, but then its everywhere...). How do I find correct locationUri for the various contents of the ContentOutline for extension?

Thx for help, this problem is bothering me for some time. I would appreciate any hint.
Re: Extending the ContentOutline [message #807644 is a reply to message #806882] Sun, 26 February 2012 20:42 Go to previous messageGo to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 6
Registered: November 2011
Junior Member
no one any ideas?
Re: Extending the ContentOutline [message #1703175 is a reply to message #807644] Wed, 29 July 2015 07:09 Go to previous messageGo to next message
Simon Laffoy is currently offline Simon LaffoyFriend
Messages: 19
Registered: January 2015
Junior Member
Maybe you can't remember anymore, but did you ever solve this problem?

There seems to be plenty of archived discussions on various websites where people are trying to solve this problem, but none of them actually have a solution.
Re: Extending the ContentOutline [message #1703185 is a reply to message #1703175] Wed, 29 July 2015 07:53 Go to previous message
Simon Laffoy is currently offline Simon LaffoyFriend
Messages: 19
Registered: January 2015
Junior Member
Found a solution, answering for future generations

If you are only interested in the outline for Java code, the locationURI for the JavaOutlinePage (which implements the IContentOutlinePage) is

popup:org.eclipse.jdt.ui.outline

The JavaDoc at the top of the JavaOutlinePage's file includes the line:

"Publishes its context menu under JavaPlugin.getDefault().getPluginId() + ".outline"."

Quickly printing out JavaPlugin.getDefault().getPluginId() gave "org.eclipse.jdt.ui".
Previous Topic:How can I refresh text file ?
Next Topic:specify icon for the launcher
Goto Forum:
  


Current Time: Fri Apr 19 08:03:07 GMT 2024

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

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

Back to the top