Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] StructuredSelection returns jdt project nature, but I want ajdt version

Hi Pat,

An AspectJ project *is* a Java project - a real
org.eclipse.jdt.core.IJavaElement. The org.aspectj.* versions of JDT
classes are for the AspectJ compiler. When working at the Eclipse
level, you need to work in terms of the real eclipse classes, not the
org.aspectj ones. So after getting an IProject object, you can
determine whether it is an AspectJ project by checking whether it has
the AspectJ nature (see AspectJPlugin.isAJProject() in the
org.eclipse.ajdt.core plugin).

Regards,

Matt.

On 06/07/06, pat o hora <pat.ohora@xxxxxxxxx> wrote:
Hi,

Im hoping someone can help me with a problem Im having,regarding the
development of an AspectJ Plugin (ajdt1.3) in Eclipse RC.3.1.

A core requirement of the plugin is the ability to allow a user to select an
AspectJ project (currently existing in the Runtime Workspace), which the
plugin will then, using the selectionChanged(IWorkbenchPart part, ISelection
selection) command, be able to determine the project entities such as
name,packages,aspects..etc

However when tracing the code, when the Structured Selection is converted to
an object it is of type org.eclipse.jdt.core.IJavaElement,
and not (what I expect)
org.aspectj.org.eclipse.jdt.core.IJavaElement

 Is there a way to convert the jdt project returned from the
StructuredSelection to its AJDT form?

Sorry if this is a newbie question,or asked badly on the wrong list, but I
have trawled through much code,and questions on the mailing list,and have
been unable to find anything which helps.



Plugin dependency jars are:
org.aspectj.runtime
org.aspectj.ajde
org.eclipse.ajdt.core
org.eclipse.ajdt.ui
org.eclipse.aspectj
org.eclipse.jdt.core

Thanks in advance for any help!

Pat


_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev





Back to the top