Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Problems with HelloWorld example with eclipse 3.0M8
Problems with HelloWorld example with eclipse 3.0M8 [message #35516] Mon, 10 May 2004 14:40 Go to next message
Eclipse UserFriend
Originally posted by: Michael-Scharf.gmx.de

Hello,

I am trying AJDT with eclipse 3.0M8. I followed the tutorial and
I have problems with the HelloWorld example.

- aspectj compiler version 1.2rc1
- aspectj plugin version 0.6.8

When I create the aspect "World.aj" or "World.java" I get the following problems:

01 public class World {
02 pointcut greeting(): execution(* HelloWorld.sayHello(..));
03 after() : greeting() {
04 System.out.println("Hello to you too...")
05 }
06 }


Syntax error on token ";", invalid PseudoToken World.java aspectj line 2
Syntax error, insert ";" to complete ClassBodyDeclarations World.java aspectj line 3
Syntax error, insert ";" to complete BlockStatements World.java aspectj line 3

I use the aspectj editor. The syntax highlight highlights the aspectj keywords
correctly.

Any help or hints on what I am doing wrong?

Michael
Re: Problems with HelloWorld example with eclipse 3.0M8 [message #35548 is a reply to message #35516] Mon, 10 May 2004 17:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Michael-Scharf.gmx.de

Hi,

I found the problem :-D, my fault!

I wrote "class" instead of "aspect"


> Hello,
>
> I am trying AJDT with eclipse 3.0M8. I followed the tutorial and
> I have problems with the HelloWorld example.
>
> - aspectj compiler version 1.2rc1
> - aspectj plugin version 0.6.8
>
> When I create the aspect "World.aj" or "World.java" I get the following
> problems:
>
> 01 public class World {

This is the real problem: i wrote "class"instead of "aspect"...

> 02 pointcut greeting(): execution(* HelloWorld.sayHello(..));
> 03 after() : greeting() {
> 04 System.out.println("Hello to you too...")
> 05 }
> 06 }
>
>
> Syntax error on token ";", invalid PseudoToken World.java
> aspectj line 2
> Syntax error, insert ";" to complete ClassBodyDeclarations
> World.java aspectj line 3
> Syntax error, insert ";" to complete BlockStatements World.java
> aspectj line 3
>
> I use the aspectj editor. The syntax highlight highlights the aspectj
> keywords
> correctly.
>
> Any help or hints on what I am doing wrong?
>
> Michael
Re: Problems with HelloWorld example with eclipse 3.0M8 [message #35616 is a reply to message #35548] Thu, 13 May 2004 07:32 Go to previous message
Eclipse UserFriend
Originally posted by: clemas.uk.ibm.com

Hi Michael,

Just a quick word of warning - that might not have been your fault!!
1.1.8 does offer some code assist but the mechanism is a bit shaky. When
you press Ctrl+Space whilst in an aspect, we transform the word 'aspect'
to 'class ' and ask the normal JDT code to work out possible completions.
When it has worked them out, we switch it back from 'class ' to 'aspect'.
Sometimes switching it back doesn't quite work (I dont know why) and it
stays as 'class '. The reason it looks like this is what happened in your
case:

> > 01 public class World {

is that you have an extra space between class and World which is just how
it looks if the switch back to 'aspect' doesn't work !

Andy.
---
AJDT Dev.
Re: Problems with HelloWorld example with eclipse 3.0M8 [message #579455 is a reply to message #35516] Mon, 10 May 2004 17:55 Go to previous message
Michael Scharf is currently offline Michael ScharfFriend
Messages: 301
Registered: July 2009
Senior Member
Hi,

I found the problem :-D, my fault!

I wrote "class" instead of "aspect"


> Hello,
>
> I am trying AJDT with eclipse 3.0M8. I followed the tutorial and
> I have problems with the HelloWorld example.
>
> - aspectj compiler version 1.2rc1
> - aspectj plugin version 0.6.8
>
> When I create the aspect "World.aj" or "World.java" I get the following
> problems:
>
> 01 public class World {

This is the real problem: i wrote "class"instead of "aspect"...

> 02 pointcut greeting(): execution(* HelloWorld.sayHello(..));
> 03 after() : greeting() {
> 04 System.out.println("Hello to you too...")
> 05 }
> 06 }
>
>
> Syntax error on token ";", invalid PseudoToken World.java
> aspectj line 2
> Syntax error, insert ";" to complete ClassBodyDeclarations
> World.java aspectj line 3
> Syntax error, insert ";" to complete BlockStatements World.java
> aspectj line 3
>
> I use the aspectj editor. The syntax highlight highlights the aspectj
> keywords
> correctly.
>
> Any help or hints on what I am doing wrong?
>
> Michael
Re: Problems with HelloWorld example with eclipse 3.0M8 [message #579525 is a reply to message #35548] Thu, 13 May 2004 07:32 Go to previous message
Andrew Clement is currently offline Andrew ClementFriend
Messages: 162
Registered: July 2009
Senior Member
Hi Michael,

Just a quick word of warning - that might not have been your fault!!
1.1.8 does offer some code assist but the mechanism is a bit shaky. When
you press Ctrl+Space whilst in an aspect, we transform the word 'aspect'
to 'class ' and ask the normal JDT code to work out possible completions.
When it has worked them out, we switch it back from 'class ' to 'aspect'.
Sometimes switching it back doesn't quite work (I dont know why) and it
stays as 'class '. The reason it looks like this is what happened in your
case:

> > 01 public class World {

is that you have an extra space between class and World which is just how
it looks if the switch back to 'aspect' doesn't work !

Andy.
---
AJDT Dev.
Previous Topic:How to add aspects to multiple eclipse plugin projects?
Next Topic:AJDT 1.1.9 available
Goto Forum:
  


Current Time: Tue Mar 19 09:03:11 GMT 2024

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

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

Back to the top