Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] Getting selected proect from popup menu in 3M8


Hi,,

your problem can be solved if you use IAdaptable. check if the object is of type IAdaptable and then convert the object to iadaptable object, then using getAdapter(class) method you can get the correpsonding object , on which you can check the correpondingly on your requirements. Also make sure inplugin descriptor file , you gave the attribute ,
<adaptable = "true"> or not,,

all the best...
Rk



Hello,

I've built a templating utility that I want to integrate into eclipse as a
plugin using the IncrementalBuilder mechanism. I understand how the builders
work, and how they are called to do builds and so on and that looks like
just what I want.

What I'm trying to work out is how to get my builder registered for a
particular project. My current approach has been to use one of the sample
popup menu plugin wizards, and match it to an IProject. This works great,
and the popup only show when you right click on a project in the navigator
window. Using the "selectionChanged()" method from the IObjectActionDelegate
interface lets me see the project that has been selected, and if I iterate
thru the (one) selected item I can see that it's a
org.eclipse.core.internal.resource.Project (from memory) class, so that
seems to work.

But I can't seem to do anything with the object, if I cast it to a IProject,
or Project I get NoClassDefFound exceptions. I figured this was to do with
dependencies, so I added the org.eclipse.core.resources plugin as a
dependency, and also the org.eclipse.osgi.services as well, but it doesn't
seem to make any difference.

If anyone has any help it would MOST appreciated :) I've been bangin my head
against this wall for a while now but I'm sure theres a real simple
solution.

Thanks in advance.

Lukas Hazlehurst
Colts Ltd

_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/pde-dev

ForwardSourceID:NT00006626    
DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery
of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. 
Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter.
Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message 
that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you.


Back to the top