Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Newbie got Problems creating ANY (a little complex) aspect... or is it syntax?
Newbie got Problems creating ANY (a little complex) aspect... or is it syntax? [message #56732] Mon, 26 September 2005 10:16 Go to next message
Eclipse UserFriend
Originally posted by: Dominik.pich.info

So... is AJDT simply not far enough along and should I use aspectJ
directly or is it my fault again?
I did read tutorials and BOTH this and the aspect in my last post SEEM
fine to me but neither compiles.

- the other throwing a NullPointerException at compile-time
- this one raising an IllegalStateException: Wrong number of type
parameters supplied

---

public aspect Trace {

pointcut totrace(TraceLevel level) : execution(* * (..)) &&
@annotation(level);

before(TraceLevel level): totrace(level) {
//doTraceEntry(thisJoinPoint);
}

after(TraceLevel level): totrace(level) {
//doTraceExit(thisJoinPoint);
}

}
Re: Newbie got Problems creating ANY (a little complex) aspect... or is it synt [message #56813 is a reply to message #56732] Mon, 26 September 2005 16:56 Go to previous messageGo to next message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
Hi Dominik,

AJDT and AspectJ are being used successfully for large and complex
projects. I'm not sure why you seem to be unlucky. Could there be
something different or unusual about your environment? I couldn't
reproduce this one either. What does your TraceLevel annotation look like?

Regards,

Matt.

Dominik Pich wrote:

> So... is AJDT simply not far enough along and should I use aspectJ
> directly or is it my fault again?
> I did read tutorials and BOTH this and the aspect in my last post SEEM
> fine to me but neither compiles.

> - the other throwing a NullPointerException at compile-time
> - this one raising an IllegalStateException: Wrong number of type
> parameters supplied

> ---

> public aspect Trace {

> pointcut totrace(TraceLevel level) : execution(* * (..)) &&
> @annotation(level);

> before(TraceLevel level): totrace(level) {
> //doTraceEntry(thisJoinPoint);
> }

> after(TraceLevel level): totrace(level) {
> //doTraceExit(thisJoinPoint);
> }

> }
Re: Newbie got Problems creating ANY (a little complex) aspect... or is it synt [message #56866 is a reply to message #56813] Mon, 26 September 2005 19:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Dominik.pich.info

*sigh* I hoped the problem would not limited to me! ;)
Anyways... I cant see anything out of ordinary about my environment.

I run
Eclipse Version: 3.1.0 Build id: I20050627-1435 with AJDT Version: 1.3.0
Build id: 20050923165804 (upddated after first post, but same situation -
should I update again?)
on OSX 10.4.2
on G4 PowerBook
well... Im in Germany but neither Language nor Keyboard layout are so I
guesss that's not important :P
Re: Newbie got Problems creating ANY (a little complex) aspect... or is it synt [message #56892 is a reply to message #56813] Mon, 26 September 2005 19:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Dominik.pich.info

DOH! Forgot TraceLevel annotation:

package org.implemented.library.tracing;

import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
* Class or methods are annotated by this so code to trace method
invokations is
* created.
*
* @author dominik
* @version 0.9
*/
@Target( ElementType.METHOD )
@Retention( RetentionPolicy.RUNTIME )
public @interface TraceLevel {
/**
* The default log level as string
*/
String DEFAULT_LEVEL = "FINE";
/**
* The default log level as string
* @return the default log level
*/
String value() default DEFAULT_LEVEL;
}
Re: Newbie got Problems creating ANY (a little complex) aspect... or is it synt [message #56945 is a reply to message #56866] Mon, 26 September 2005 22:02 Go to previous message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
OS X is not quite as well tested as the other platforms, but I've just
tried it on my Mac Mini, and couldn't reproduce any exceptions. I used
AJDT 1.3.0.20050926141225, and the same Eclipse 3.1.

Maybe the best approach is as in the other thread, and raise a bug and if
possible attach a complete project. Also include the full exception from
the error log.

Regards,

Matt.

Dominik Pich wrote:

> *sigh* I hoped the problem would not limited to me! ;)
> Anyways... I cant see anything out of ordinary about my environment.

> I run
> Eclipse Version: 3.1.0 Build id: I20050627-1435 with AJDT Version: 1.3.0
> Build id: 20050923165804 (upddated after first post, but same situation -
> should I update again?)
> on OSX 10.4.2
> on G4 PowerBook
> well... Im in Germany but neither Language nor Keyboard layout are so I
> guesss that's not important :P
Re: Newbie got Problems creating ANY (a little complex) aspect... or is it synt [message #590129 is a reply to message #56732] Mon, 26 September 2005 16:56 Go to previous message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
Hi Dominik,

AJDT and AspectJ are being used successfully for large and complex
projects. I'm not sure why you seem to be unlucky. Could there be
something different or unusual about your environment? I couldn't
reproduce this one either. What does your TraceLevel annotation look like?

Regards,

Matt.

Dominik Pich wrote:

> So... is AJDT simply not far enough along and should I use aspectJ
> directly or is it my fault again?
> I did read tutorials and BOTH this and the aspect in my last post SEEM
> fine to me but neither compiles.

> - the other throwing a NullPointerException at compile-time
> - this one raising an IllegalStateException: Wrong number of type
> parameters supplied

> ---

> public aspect Trace {

> pointcut totrace(TraceLevel level) : execution(* * (..)) &&
> @annotation(level);

> before(TraceLevel level): totrace(level) {
> //doTraceEntry(thisJoinPoint);
> }

> after(TraceLevel level): totrace(level) {
> //doTraceExit(thisJoinPoint);
> }

> }
Re: Newbie got Problems creating ANY (a little complex) aspect... or is it synt [message #590155 is a reply to message #56813] Mon, 26 September 2005 19:12 Go to previous message
Eclipse UserFriend
Originally posted by: Dominik.pich.info

*sigh* I hoped the problem would not limited to me! ;)
Anyways... I cant see anything out of ordinary about my environment.

I run
Eclipse Version: 3.1.0 Build id: I20050627-1435 with AJDT Version: 1.3.0
Build id: 20050923165804 (upddated after first post, but same situation -
should I update again?)
on OSX 10.4.2
on G4 PowerBook
well... Im in Germany but neither Language nor Keyboard layout are so I
guesss that's not important :P
Re: Newbie got Problems creating ANY (a little complex) aspect... or is it synt [message #590164 is a reply to message #56813] Mon, 26 September 2005 19:14 Go to previous message
Eclipse UserFriend
Originally posted by: Dominik.pich.info

DOH! Forgot TraceLevel annotation:

package org.implemented.library.tracing;

import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
* Class or methods are annotated by this so code to trace method
invokations is
* created.
*
* @author dominik
* @version 0.9
*/
@Target( ElementType.METHOD )
@Retention( RetentionPolicy.RUNTIME )
public @interface TraceLevel {
/**
* The default log level as string
*/
String DEFAULT_LEVEL = "FINE";
/**
* The default log level as string
* @return the default log level
*/
String value() default DEFAULT_LEVEL;
}
Re: Newbie got Problems creating ANY (a little complex) aspect... or is it synt [message #590176 is a reply to message #56866] Mon, 26 September 2005 22:02 Go to previous message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
OS X is not quite as well tested as the other platforms, but I've just
tried it on my Mac Mini, and couldn't reproduce any exceptions. I used
AJDT 1.3.0.20050926141225, and the same Eclipse 3.1.

Maybe the best approach is as in the other thread, and raise a bug and if
possible attach a complete project. Also include the full exception from
the error log.

Regards,

Matt.

Dominik Pich wrote:

> *sigh* I hoped the problem would not limited to me! ;)
> Anyways... I cant see anything out of ordinary about my environment.

> I run
> Eclipse Version: 3.1.0 Build id: I20050627-1435 with AJDT Version: 1.3.0
> Build id: 20050923165804 (upddated after first post, but same situation -
> should I update again?)
> on OSX 10.4.2
> on G4 PowerBook
> well... Im in Germany but neither Language nor Keyboard layout are so I
> guesss that's not important :P
Previous Topic:AJDT New Feature of the Week: Crosscutting Comparison view
Next Topic:Reweaving Jar library
Goto Forum:
  


Current Time: Thu Apr 25 05:53:41 GMT 2024

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

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

Back to the top