Community
Participate
Working Groups
Take the aspect below, remove the “:” from the PCD and recompile (full or incremental). As well as an error message in the Problems view you will get (4) errors in the log like: Error 2005-04-26 15:59:06.340 afterThrowing() [in Aspect [in [Working copy] Aspect.aj [in bug_nnnnn [in src [in Bugzilla]]]]] does not exist Syntax error on token ")", : expected after this token Aspect.aj public aspect Aspect { after () throwing (Throwable th) : execution(* *(..)) { System.err.println(thisEnclosingJoinPointStaticPart); } }
I believe this error is originating from the cross references view because it does not happen if the view is closed, or if you have not saved the correct version of the aspect beforehand. As a side note it might be worth extending our FFDC aspect in all the AJDT projects so that we could get stack traces for things like this.
These errors were occuring because the update to the xref view was being driven by a build and in this case the IJavaElement the cross reference view was using as it's input no longer existed. The fix is in the selectionChanged(..) method inside the XReferenceView class. In here we call out to another method to get a list of the XReferenceAdapters corresponding to the current editor selection. There was a null check, however, in the case of this bug, the list wasn't null, it was empty. Therefore, adding a check to see whether the returned list is empty and if it is then to clear the view fixes the problem. The test for this is in org.eclipse.ajdt.ui.tests.visual.XReferenceView. The fix can be found in build: BUILD COMPLETE - build.443 Date of build: 07/05/2005 11:13:48 Time to build: 44 minutes 22 seconds Last changed: 07/05/2005 10:39:03