Popup Menu Example Project [message #32717] |
Fri, 14 November 2008 11:01  |
Eclipse User |
|
|
|
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 #32977 is a reply to message #32872] |
Fri, 14 November 2008 12:10   |
Eclipse User |
|
|
|
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 #585102 is a reply to message #32717] |
Fri, 14 November 2008 11:23  |
Eclipse User |
|
|
|
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 11:47  |
Eclipse User |
|
|
|
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 12:10  |
Eclipse User |
|
|
|
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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03654 seconds