Bug 54950 - Revisit message handling implementation
Summary: Revisit message handling implementation
Status: REOPENED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-16 05:03 EST by Adrian Colyer CLA
Modified: 2009-08-30 02:48 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Colyer CLA 2004-03-16 05:03:02 EST
(From Wes...)

Since you're looking at this now, a step back might help,
for now or later...

It seems like IMessage is not perfect for handling some kinds
of messages we have:

- error line and defining declare error or warning
- one of many conflicting member declarations
- (Do any xlint warnings have different structures?)
- info from weaver?

We're augmenting it by kind (WEAVER_INFO?) and appendage
(details, extra source location...), so it is starting to smell.
(Details appears vestigial.  Extra source location has no context
for why it is being appended.)

One way to work around this now is instead to have different
IMessage implementations (e.g., DeclaredMessage, XLintMessage,
ConflictMessage, subclassing Message or EclipseMessage(?)).
Further, we might want an ISourceLocation implementation
"BinaryLocation" for sources in jar files.  (It might even
take on responsibility for pulling associated text from
a source path or src.zip.)

Doing this means that clients of IMessage and ISourceLocation
continue to work, but clients that know about BinaryLocation
and DeclareMessage, etc. can tailor accordingly.  This change
is nice b/c we don't change anything about how we handle messages
per se, and changing to subtypes should make sense in the context
they are being generated.  We can even have a "normal" message
subtype and audit away direct (non-testing) uses of Message.

Two unanswered and deferred questions:

(1) Whether we can continue to generate each message incrementally
but easily gather all associated messsages (deow, conflicts).
to facilitate message-handling strategies that group related
messages.  [defer until needed by client/strategy]

(2) Whether we should delegate to the smarter types for their
command-line renderings or keep using a renderer. [defer until
need renderer-less rendering]
Comment 1 Adrian Colyer CLA 2004-03-16 05:03:37 EST
Raised so that we don't lose this post 1.2...
Comment 2 Adrian Colyer CLA 2005-08-17 14:43:00 EDT
no immediate plans to change the message handling implementation, but these comments remain valid 
for consideration if we have to go in there again in the future.
Comment 3 Eclipse Webmaster CLA 2009-08-30 02:48:41 EDT
LATER/REMIND bugs are being automatically reopened as P5 because the LATER and REMIND resolutions are deprecated.