Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Extending PDE and JDT popupmenus
Extending PDE and JDT popupmenus [message #154698] Sun, 09 November 2003 20:14 Go to next message
Donald Dunne is currently offline Donald DunneFriend
Messages: 194
Registered: July 2009
Senior Member
I have created a plugin that extends the popupmenu to allow an external
editor to be kicked off from the Navigator window. (Yes, I know you can
right click and use "Open With", but that only works when you don't have
the window open and it also defaults the operation. I don't want that.)

Anyway, the plugin works great with the resource perspective on all files
as specified in the namefilter of the objectContribution extension. The
problem comes when I change to the PDE or JDT perspectives. My plugin
works great for files such as "plugin.xml", "build.properties" and any
file at the highest level. BUT, when I go into the src directories and
find a .java file, the extension to the popupmenu isn't there anymore.

What am I missing?

Thanks!!

Here's my plugin.xml:

<?xml version="1.0" encoding="UTF-8"?>
<plugin
id="org.mcap.extedit"
name="Extedit Plug-in"
version="1.0.0"
provider-name=""
class="org.mcap.extedit.ExtEditPlugin">

<runtime>
<library name="extedit.jar"/>
</runtime>
<requires>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.ui"/>
</requires>


<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="org.eclipse.core.resources.IFile"
nameFilter="*"
id="org.mcap.extedit.contribution1">
<menu
label="External Edit"
path="additions"
id="org.mcap.extedit.menu1">
<separator
name="group1">
</separator>
</menu>
<action
label="Xemacs"
class="org.mcap.extedit.popup.actions.ExtEditXemacs"
menubarPath="org.mcap.extedit.menu1/group1"
enablesFor="1"
id="org.mcap.extedit.exteditaction">
</action>
<action
label="Gvim"
class="org.mcap.extedit.popup.actions.ExtEditGvim"
menubarPath="org.mcap.extedit.menu1/group1"
enablesFor="1"
id="org.mcap.extedit.exteditaction">
</action>
</objectContribution>
</extension>

</plugin>
Re: Extending PDE and JDT popupmenus [message #154745 is a reply to message #154698] Sun, 09 November 2003 23:00 Go to previous message
Eclipse UserFriend
Originally posted by: pascal_rapicault.yahoo.fr

The problem is that objects that are presented in those PDE and Java
navigators are not IResource. Navigators, although they have a consistent
look, do not have a common implementation (there is a work item on 3.0 for
generic navigator).
For example in java navigator, java file are ICompilationUnit and that's the
type you need to put for your object contribution.

PaScaL

"Don Dunne" <donald.g.dunne@boeing.com> a
Previous Topic:To add to standart Java highlightings functions
Next Topic:Good Documentation on Plugin Communication
Goto Forum:
  


Current Time: Sat Nov 09 04:12:54 GMT 2024

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

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

Back to the top