[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Yet another newbie
|
Thanks, Wes! That nailed the problem, both the yellows and the reds.
But FYI the problem is more serious than a red squigly under aspect
declarations as the documentation says. This causes the red error
indicator I reported, or at least they appear when annotations are
enabled and disappear when they're turned off.
It would also help if the upgrade instructions are moved to the top
of the page. Right now they're buried at the bottom of what looks
like like a boring upgrade history list of no relevance to newbies.
Just swap the order; that should do the trick.
At 1:43 PM -0700 7/29/03, Wes Isberg wrote:
> Actually I do, and did, but missed it somehow.
It's easy to miss amidst the screenshots:
Disabling early problem indication for AspectJ elements:
The early problem indication feature of the JDT underlines
potential errors in the editor as you type (before
compilation). This feature is not AspectJ-aware. As a
result, AspectJ keywords may be highlighted as errors by
underlining with a req "squiggle" [...]
You can disable these annotations by selecting "Preferences"
from the "Window" menu and then expanding the "Java" node.
Click on "Editor" and then select the "Annotations" tab.
Finally, deselect the "Analyse annotations while typing"
option and press apply
For example, at line 65 in Display1.java
...
objects[i].paint(g);
See the next lines:
static aspect SpaceObjectPainting {
abstract private void SpaceObject.paint(Graphics g);
But that's pure happenstance.
The IDE support should eventually be able to navigate
to an inter-type declaration from any use thereof.
It has such links back for advice, but apparantly not for
declarations. That would be a good request-for-enhancement
to submit as an AJDT or AspectJ AJDE/IDE bug.
Generally, it's a safe bet that the compiler and the
example code is correct, because so many people have beat
on it, and that the IDE support is mostly correct but
incomplete. It can help a lot with documentation and
with prioritizing new features when new users point out
confusing parts and behaviors. Thanks for the feedback.
Wes
Brad Cox, Ph.D. wrote:
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.
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users
--
Brad J. Cox, PhD, 703 361 4751, http://virtualschool.edu
http://virtualschool.edu/mybank Digital Rights Management System
http://virtualschool.edu/jwaa Java Web Application Architecture
http://virtualschool.edu/java+ Java Preprocessor
http://virtualschool.edu/mideast Support Israel and Palestine