[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Tracing declare error messages back to the aspect
|
Ron's email prompts me to ask another question on declare-error:
The compiler emits error messages stating the rule and the offending
source code, but they do not trace automatically back to the declare
error/warning statement. Sometimes instead of changing the source code
you want to change or omit the rule, and you have search the aspect
sources for the error message text. This is informal at best and won't
work for library aspects.
One solution would be to have a mode in the compiler that also printed
the signature of the enclosing aspect (the declare error/warning
statement itself does not have a signature). A variant is to print the
source location for the declare, only defaulting to the signature if
source were not available. We might even want to enable this as a
"lint" mode, though that's a stretch.
Further, it would be great if IDE support could navigate back to the
declare error statement. This might be hacked into our current
IMessage/ISourceLocation implementation using a downcast to an
ISourceLocation implementation that actually carried both source
locations, but defaulted to the error source.
So:
- Do others think this is a problem?
- Are there other use-case scenarios for declare-error to consider?
- Any obviously-better implementation strategies?
For this to become a feature, we'd need to start with some demand from
users and a feature request in the bug database.
Wes