Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Popup Menu Example Project
Popup Menu Example Project [message #32717] Fri, 14 November 2008 16:01 Go to next message
David Smith is currently offline David SmithFriend
Messages: 7
Registered: July 2009
Junior Member
Hi,

Eclipse Version 3.4.1 Build id: M20080911-1700
JDK Version 1.6.0_10
Windows XP

I am trying to learn about Eclipse Plugins and I have created a Plugin
Project based on the Popup Menu example. I can launch it as an Eclipse
Application and see my plugin in the list of plugins available from
"Help->About Eclipse Platform". I created a test Java project in the
launched application, but no matter where I right-click I don't see my
sub-menu. What am I missing here?

I tried adding System.out.println() calls in each method of the plugin
classes but nothing was output (that I could find) in any Console or log
file. What is the best method to use to output debug information in a
plugin?

Thanks,
David
Re: Popup Menu Example Project [message #32771 is a reply to message #32717] Fri, 14 November 2008 16:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

David Smith wrote:
> Hi,
>
> Eclipse Version 3.4.1 Build id: M20080911-1700
> JDK Version 1.6.0_10
> Windows XP
>
> I am trying to learn about Eclipse Plugins and I have created a Plugin
> Project based on the Popup Menu example. I can launch it as an Eclipse
> Application and see my plugin in the list of plugins available from
> "Help->About Eclipse Platform". I created a test Java project in the
> launched application, but no matter where I right-click I don't see my
> sub-menu. What am I missing here?
Open Resource Perspective
Create a: General -> Project
Create a: General -> File
Right button on top of created File
You should see the menu and the System.out.println() lines in the console.
> I tried adding System.out.println() calls in each method of the plugin
> classes but nothing was output (that I could find) in any Console or
> log file. What is the best method to use to output debug information
> in a plugin?
>
> Thanks,
> David
Re: Popup Menu Example Project [message #32872 is a reply to message #32771] Fri, 14 November 2008 16:47 Go to previous messageGo to next message
David Smith is currently offline David SmithFriend
Messages: 7
Registered: July 2009
Junior Member
Chemi wrote:
> Open Resource Perspective
> Create a: General -> Project
> Create a: General -> File
> Right button on top of created File
> You should see the menu and the System.out.println() lines in the console.

Duh! Yes that worked great, thanks for the pointer. To push my luck a
little :) how would I get the menu to appear for, say, a Java file?

I see that the bit of magic I was missing is the "objectClass:
org.eclipse.core.resources.IFile", but what would I want this to be for a
Java file? I tried putting "org.eclipse.core.resources." in the java class
and using auto-completion to suggest things, but nothing jumped out at me.

Pushing my luck a little further, is there some document I can read about
all this, or maybe some javadoc.

Thanks again,
David
Re: Popup Menu Example Project [message #32977 is a reply to message #32872] Fri, 14 November 2008 17:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

David Smith wrote:
> Duh! Yes that worked great, thanks for the pointer. To push my luck a
> little :) how would I get the menu to appear for, say, a Java file?
>
> I see that the bit of magic I was missing is the "objectClass:
> org.eclipse.core.resources.IFile", but what would I want this to be
> for a Java file? I tried putting "org.eclipse.core.resources." in the
> java class and using auto-completion to suggest things, but nothing
> jumped out at me.
>
> Pushing my luck a little further, is there some document I can read
> about all this, or maybe some javadoc.
>
> Thanks again,
> David
Try IClassFile for example but I haven't done this before so it is just
an idea:
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.jdt.doc.isv/reference/api/org/eclipse/jdt/core/IClassFile. html
You will need to add a dependency to org.eclipse.jdt.core

General documentation about the Extension Point you are playing with:
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/reference/extension-points/org_eclipse_ui _popupMenus.html

Hope this helps,

Chemi.
Re: Popup Menu Example Project [message #33011 is a reply to message #32977] Fri, 14 November 2008 17:30 Go to previous message
David Smith is currently offline David SmithFriend
Messages: 7
Registered: July 2009
Junior Member
Chemi wrote:
> Try IClassFile for example but I haven't done this before so it is just
> an idea:
>
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.jdt.doc.isv/reference/api/org/eclipse/jdt/core/IClassFile. html

Close, using the link you provided, I found that I need ICompilationUnit
to get the menu to appear for a Java file.

> General documentation about the Extension Point you are playing with:
>
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/reference/extension-points/org_eclipse_ui _popupMenus.html

> Hope this helps,

It certainly did! Looks like I have got some reading to do this weekend.

Thanks,
David
Re: Popup Menu Example Project [message #585102 is a reply to message #32717] Fri, 14 November 2008 16:23 Go to previous message
Chemi is currently offline ChemiFriend
Messages: 107
Registered: July 2009
Senior Member
David Smith wrote:
> Hi,
>
> Eclipse Version 3.4.1 Build id: M20080911-1700
> JDK Version 1.6.0_10
> Windows XP
>
> I am trying to learn about Eclipse Plugins and I have created a Plugin
> Project based on the Popup Menu example. I can launch it as an Eclipse
> Application and see my plugin in the list of plugins available from
> "Help->About Eclipse Platform". I created a test Java project in the
> launched application, but no matter where I right-click I don't see my
> sub-menu. What am I missing here?
Open Resource Perspective
Create a: General -> Project
Create a: General -> File
Right button on top of created File
You should see the menu and the System.out.println() lines in the console.
> I tried adding System.out.println() calls in each method of the plugin
> classes but nothing was output (that I could find) in any Console or
> log file. What is the best method to use to output debug information
> in a plugin?
>
> Thanks,
> David
Re: Popup Menu Example Project [message #585134 is a reply to message #32771] Fri, 14 November 2008 16:47 Go to previous message
David Smith is currently offline David SmithFriend
Messages: 7
Registered: July 2009
Junior Member
Chemi wrote:
> Open Resource Perspective
> Create a: General -> Project
> Create a: General -> File
> Right button on top of created File
> You should see the menu and the System.out.println() lines in the console.

Duh! Yes that worked great, thanks for the pointer. To push my luck a
little :) how would I get the menu to appear for, say, a Java file?

I see that the bit of magic I was missing is the "objectClass:
org.eclipse.core.resources.IFile", but what would I want this to be for a
Java file? I tried putting "org.eclipse.core.resources." in the java class
and using auto-completion to suggest things, but nothing jumped out at me.

Pushing my luck a little further, is there some document I can read about
all this, or maybe some javadoc.

Thanks again,
David
Re: Popup Menu Example Project [message #585186 is a reply to message #32872] Fri, 14 November 2008 17:10 Go to previous message
Chemi is currently offline ChemiFriend
Messages: 107
Registered: July 2009
Senior Member
David Smith wrote:
> Duh! Yes that worked great, thanks for the pointer. To push my luck a
> little :) how would I get the menu to appear for, say, a Java file?
>
> I see that the bit of magic I was missing is the "objectClass:
> org.eclipse.core.resources.IFile", but what would I want this to be
> for a Java file? I tried putting "org.eclipse.core.resources." in the
> java class and using auto-completion to suggest things, but nothing
> jumped out at me.
>
> Pushing my luck a little further, is there some document I can read
> about all this, or maybe some javadoc.
>
> Thanks again,
> David
Try IClassFile for example but I haven't done this before so it is just
an idea:
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.jdt.doc.isv/reference/api/org/eclipse/jdt/core/IClassFile. html
You will need to add a dependency to org.eclipse.jdt.core

General documentation about the Extension Point you are playing with:
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/reference/extension-points/org_eclipse_ui _popupMenus.html

Hope this helps,

Chemi.
Re: Popup Menu Example Project [message #585202 is a reply to message #32977] Fri, 14 November 2008 17:30 Go to previous message
David Smith is currently offline David SmithFriend
Messages: 7
Registered: July 2009
Junior Member
Chemi wrote:
> Try IClassFile for example but I haven't done this before so it is just
> an idea:
>
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.jdt.doc.isv/reference/api/org/eclipse/jdt/core/IClassFile. html

Close, using the link you provided, I found that I need ICompilationUnit
to get the menu to appear for a Java file.

> General documentation about the Extension Point you are playing with:
>
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/reference/extension-points/org_eclipse_ui _popupMenus.html

> Hope this helps,

It certainly did! Looks like I have got some reading to do this weekend.

Thanks,
David
Previous Topic:problems to boot solution
Next Topic:PDE build support for pack 200
Goto Forum:
  


Current Time: Thu Apr 25 09:34:06 GMT 2024

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

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

Back to the top