Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IMP » Proposed API change to IMessageHandler
Proposed API change to IMessageHandler [message #578057] Tue, 24 August 2010 18:46 Go to next message
Adam Taylor is currently offline Adam TaylorFriend
Messages: 12
Registered: August 2010
Junior Member
*** Problem: ***

Quick Fix support:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=323532


*** Diagnosis: ***

For some quickfixes additional information is needed (an error code for example) when creating IMarkers and Annotations.


*** Proposed IMP API change: ***

Add the following method:

public interface IMessageHandler{
// ...

void handleSimpleMessage(String msg, int startOffset, int endOffset,
int startCol, int endCol,
int startLine, int endLine, Map<String, Object> attributeMap);

// ...
}

Also since this is a breaking change to this API, I suggest that IMessageHandlerExtension is thrown out and its method be added to IMessageHandler as well
Re: Proposed API change to IMessageHandler [message #578075 is a reply to message #578057] Tue, 24 August 2010 19:11 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Adam

In my experience, functions with many arguments have many arguments
because there is a missing configuration/state object.

If you're breaking the API why not break it properly. Why are seven
attributes privileged while the rest are mapped? Surely severity,
source,... deserve to be privileged too? Why not allow derived
implementations to manage the representation to taste.

Generally at least one of startOffset or startLine/startCol is
redundant, ditto end... Putting them in the interface mandates that the
redundant one is calculated and that redundant state is propagated.

Regards

Ed Willink

On 24/08/2010 19:46, Adam Taylor wrote:
> *** Problem: ***
>
> Quick Fix support:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=323532
>
>
> *** Diagnosis: ***
>
> For some quickfixes additional information is needed (an error code for
> example) when creating IMarkers and Annotations.
>
> *** Proposed IMP API change: ***
>
> Add the following method:
>
> public interface IMessageHandler{
> // ...
>
> void handleSimpleMessage(String msg, int startOffset, int endOffset,
> int startCol, int endCol,
> int startLine, int endLine, Map<String, Object> attributeMap);
>
> // ...
> }
>
> Also since this is a breaking change to this API, I suggest that
> IMessageHandlerExtension is thrown out and its method be added to
> IMessageHandler as well
Previous Topic:Proposed API change to IEditorService
Next Topic:Proposed API change -- Make TextEditorActionContributor public
Goto Forum:
  


Current Time: Thu Apr 25 04:24:49 GMT 2024

Powered by FUDForum. Page generated in 0.02644 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top