Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Ajdt plugin questions
Ajdt plugin questions [message #21856] Fri, 16 May 2003 05:09 Go to next message
Eclipse UserFriend
Originally posted by: delasoul.operamail.com

Hello,

I am still quite new to aop and hope to find some answers to my questions
here:

I have installed Eclipse 2.1 with the newest ajdt plugin and am trying to
run the examples that come with aspectj from Eclipse.

1. Is there any way to have code completion when coding an aspect(Eclipse
wants
a class or interface keyword instead of aspect)

2. Do I have to create an AspectJ project - or will a normal java project,
where I create my aspects and compile with the aspectj compiler do as
well?
Which disadvantages come with this approach?

3. When trying to run the tracing examples in Eclipse I have the following
problem:
In Tracing version 2, where you have an abstract aspect that holds the
tracing methods and an aspect that inherits from this one, the main()
is also in this derived aspect.
When trying to run this in Eclipse it complains about "This selection
does
not contain a main type"
I then tried to write a class with a main but there the methods of the
aspects are not recognized.

Is there any way to run this in Eclipse - or can I only do it from
command
line?

Thanks very much in advance for any help

deLaSoul
Re: Ajdt plugin questions [message #21949 is a reply to message #21856] Fri, 16 May 2003 08:21 Go to previous message
Eclipse UserFriend
Originally posted by: clemas.hursley.ibm.com

Hi,

Let me go through your questions...


> 1. Is there any way to have code completion when coding an aspect(Eclipse
> wants a class or interface keyword instead of aspect)

Not yet. Because the eclipse parser doesn't understand the format of code
within aspects, it can't provide either the eager parsing facility or the
code completion behaviour. But that will come in time, its on our to-do
list :)


> 2. Do I have to create an AspectJ project - or will a normal java project,
> where I create my aspects and compile with the aspectj compiler do as
> well?
> Which disadvantages come with this approach?

If it is a normal Java project, then it will use the normal java builder -
this won't understand aspects. If you change the java project to an
AspectJ project, we swap out the java builder and swap in the aspectj
builder (ajc). The main disadvantage of using the aspectj builder rather
than the java builder is that we don't fully support incremental
compilation yet - so you have to do a full build every time. There is
some experimental incremental compilation behaviour in the latest AJDT
(1.1.2) but its not ready for production use yet.


> 3. When trying to run the tracing examples in Eclipse I have the following
> problem:
> In Tracing version 2, where you have an abstract aspect that holds the
> tracing methods and an aspect that inherits from this one, the main()
> is also in this derived aspect.
> When trying to run this in Eclipse it complains about "This selection
> does
> not contain a main type"
> I then tried to write a class with a main but there the methods of the
> aspects are not recognized.

> Is there any way to run this in Eclipse - or can I only do it from
> command
> line?

Hmm - I've never run that example from aspectj in eclipse - can anyone
else help with this point?

On the second point, you can run everything from the command line, but
you'll need to download the aspectj install image (see
http://eclipse.org/aspectj) - if you download and install AspectJ 1.1 you
will get the command line compiler 'ajc'.

cheers,
Andy.
AJDT Development.
Re: Ajdt plugin questions [message #567308 is a reply to message #21856] Fri, 16 May 2003 08:21 Go to previous message
Andrew Clement is currently offline Andrew ClementFriend
Messages: 162
Registered: July 2009
Senior Member
Hi,

Let me go through your questions...


> 1. Is there any way to have code completion when coding an aspect(Eclipse
> wants a class or interface keyword instead of aspect)

Not yet. Because the eclipse parser doesn't understand the format of code
within aspects, it can't provide either the eager parsing facility or the
code completion behaviour. But that will come in time, its on our to-do
list :)


> 2. Do I have to create an AspectJ project - or will a normal java project,
> where I create my aspects and compile with the aspectj compiler do as
> well?
> Which disadvantages come with this approach?

If it is a normal Java project, then it will use the normal java builder -
this won't understand aspects. If you change the java project to an
AspectJ project, we swap out the java builder and swap in the aspectj
builder (ajc). The main disadvantage of using the aspectj builder rather
than the java builder is that we don't fully support incremental
compilation yet - so you have to do a full build every time. There is
some experimental incremental compilation behaviour in the latest AJDT
(1.1.2) but its not ready for production use yet.


> 3. When trying to run the tracing examples in Eclipse I have the following
> problem:
> In Tracing version 2, where you have an abstract aspect that holds the
> tracing methods and an aspect that inherits from this one, the main()
> is also in this derived aspect.
> When trying to run this in Eclipse it complains about "This selection
> does
> not contain a main type"
> I then tried to write a class with a main but there the methods of the
> aspects are not recognized.

> Is there any way to run this in Eclipse - or can I only do it from
> command
> line?

Hmm - I've never run that example from aspectj in eclipse - can anyone
else help with this point?

On the second point, you can run everything from the command line, but
you'll need to download the aspectj install image (see
http://eclipse.org/aspectj) - if you download and install AspectJ 1.1 you
will get the command line compiler 'ajc'.

cheers,
Andy.
AJDT Development.
Previous Topic:Ajdt plugin question2
Next Topic:Ajdt plugin question2
Goto Forum:
  


Current Time: Tue Mar 19 10:41:02 GMT 2024

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

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

Back to the top