Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Editor Doesn't Like Intertype Declarations

Just to clarify, the problem occurs because the Java editor uses the
Java eager parser which isn't aware of the ITDs. The answer is to
either open the .java file with the AspectJ editor, as you discovered,
or change the extension to .aj so that the AspectJ editor is used
anyway. The only thing to note with the first option is that the
editor association is global, so the AspectJ editor will then be used
in Java projects also, although as it's an extension to the Java
editor that shouldn't be a problem.

Regards,

Matt.

On 28/09/05, Tobias Dunn-Krahn <tdunn-krahn@xxxxxxxxxxxxxxxx> wrote:
> Hi Charles,
>
> Actually what I ended up doing (based on your suggestion) was to
> associate the AspectJ/Java editor with .java files, which worked.
> Thanks for the tip.
>
> Tobias
>
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Charles Zhang
> Sent: Tuesday, September 27, 2005 2:40 PM
> To: aspectj-users@xxxxxxxxxxx
> Subject: Re: [aspectj-users] Editor Doesn't Like Intertype Declarations
>
> I had the similar problem. Try to use "Java editor"
> and check if you still have the error.
>
> Charles
>
> --- Tobias Dunn-Krahn <tdunn-krahn@xxxxxxxxxxxxxxxx>
> wrote:
>
> > Hello All,
> >
> >
> >
> > Under Eclipse 3.1, latest dev AJDT: when
> > implementing a mixin using
> > intertype declarations, it seems that the eclipse
> > editor complains about
> > the introduced type but the compiler does not.  My
> > aspect looks
> > something like this (taken from the AspectJ
> > Programming Guide):
> >
> >
> >
> >   aspect A {
> >     private interface HasName {}
> >     declare parents: (MyClass) implements HasName;
> >
> >     private String HasName.name;
> >     public  String HasName.getName()  { return name;
> > }
> >   }
> >
> >
> >
> > When I add a getName() call to MyClass, an error
> > shows up in the editor
> > (to the effect that getName() is not declared).
> > However, there is
> > nothing in the problems view (and the compiled code
> > runs fine).  Any
> > ideas?
> >
> >
> >
> > Thanks,
> >
> > Tobias
> >
> > > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> >
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
>
>
> Yawn !!
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top