Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Yet another newbie

On Mon, 2003-07-28 at 16:41, Adrian Colyer wrote:
> Hi Brad,
> I'm guessing what you're seeing is the following:
> 
> The yellow warnings are probably eclipse complaining about unused
> imports in the files 

Yep. Downloaded a fresh distro this am, stayed away from the organize
imports button, and no yellow alerts initially, but they reappeared when
I clicked Compile Project. But read on...

> The red alerts appearing in your file are probably the 'early error
> indication annotations' that eclipse JDT has enabled by default
> (causing e.g. the aspect keyword to be underlined). We explain how to
> turn these off in the release notes and welcome page (I know, I know,
> no-one reads the doc!). 

Actually I do, and did, but missed it somehow. In fact I looked again
more carefully this AM and didn't find it then either.

Most of the red alerts could be parser errors as you describe (syntax
errors on aspect definitions, typically. But some seem to refer to
outright errors in the spacewar code. 

For example, at line 65 in Display1.java

    void paintObjects(Graphics g) {
        SpaceObject[] objects = game.getRegistry().getObjects();
        final int len = objects.length;
        for (int i = 0; i < len; i++) {
            objects[i].paint(g);
        }
    }
the paint(g) is flagged as a red error; paint(g) is not defined for
SpaceObject, and indeed there is no such method defined in
SpaceObject.java.

Of course, I'm very new to aspectj and could be confused, but something
non-cosmetic sure looks busted to me.



Back to the top