popupMenus folder Problem [message #18584] |
Mon, 28 April 2003 08:49  |
Eclipse User |
|
|
|
Originally posted by: hawkini.myrealbox.com
Hi, I have been trying to write a plugin, where when you right click on a
source folder (in a java project for example) a new menu item appears and
when you click that, I want an IStructuredSelection to be returned so I
can use it in the run() method of my action. So far, I have the menu item,
when I click it the run() method executes (as I have a test dialog that
appears). I also have a IStructuredSelection cast from the ISelection that
contains more than one item.
However, I am getting very frustrated as I expect some IFolders and IFiles
to be in this selection, but all I get are IPackageFragmentRoots and
IPackageFragments - I have tried casting these to everything under the sun
but keep getting the infamous "Unhandled exception caught in event loop."
everytime I try and do ANYTHING other than handle objects in my selection.
Please please please can someone offer up some code, as I have scoured the
web but none seems to be available - I just need a simple example where I
can do some processing on the IFolder (not IFile) that the user right
clicked on.
Kind regards,
Matt Hawkins
|
|
|
|
|
Re: popupMenus folder Problem [message #19701 is a reply to message #19475] |
Mon, 28 April 2003 11:09  |
Eclipse User |
|
|
|
To tell you the truth, I don't know where you find it out. There may be
something in the help somewhere, but often it is just looking at other
code to see how they did it.
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.03761 seconds