Bug 103847 - Need id attribute added to org.eclipse.core.resources.marker
Summary: Need id attribute added to org.eclipse.core.resources.marker
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: 3.3 M5   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 104831
  Show dependency tree
 
Reported: 2005-07-14 12:19 EDT by Randy Giffen CLA
Modified: 2007-01-25 15:50 EST (History)
2 users (show)

See Also:


Attachments
Clip showing markers with id's prepended to their description (179.74 KB, image/bmp)
2007-01-22 13:55 EST, Randy Giffen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Giffen CLA 2005-07-14 12:19:37 EDT
Need to have a marker id attribute to identify a marker and its creator.
For example this id could have a value such as WID2345
This is important for large component based applications.
This id could be optionally shown in the UI to provide the user 
with an id that can be used when talking to support etc.
Comment 1 John Arthorne CLA 2005-07-14 14:07:21 EDT
Just to clarify the request, are you just looking for a new marker attribute
constant such as IMarker.SEVERITY, IMarker.LINE_NUMBER, etc?  I.e., defining a
key but leaving up to clients whether they assign a value.  Or, are you asking
that we internally assign an id to every marker that is created (different from
the IMarker.getId() that we currently use)?
Comment 2 Randy Giffen CLA 2005-07-14 16:26:22 EDT
The former.
We are looking for an attribute to be defined for this purpose.
As you indicate its use would be optional.
Comment 3 John Arthorne CLA 2005-11-18 16:26:49 EST

*** This bug has been marked as a duplicate of 38136 ***
Comment 4 Randy Giffen CLA 2007-01-22 13:53:36 EST
I'm reopening this defect because the term "generatedBy" does not
have the same meaning as the attribute I requested ex. "markerId"
This attribute could be used to determine what exactly the marker was being used to identify.
Currently this value is often prepended to the message (see attachment)
By having a separate attribute we will be able to see more of the message in 
the eclipse UI and we will be able to easily target the marker using eclipse's markerHelp and markerResolution extension points.

The reason I need eclipse core to add this attribute (rather than adding it
myself) is so that I can ask eclipse UI to display this attribute in the UI
(ex. problems view). Some large organizations have very specific requirements
to include such id's with marker messages. 

Note that I have suggested "markerId" but some developers have likely already defined a "markerId" attribute in their own plugin. Actually marker
attribute names should probably be qualified (ex. (org.eclipse.core.resources.markerId or at least createrMarkerId).
Comment 5 Randy Giffen CLA 2007-01-22 13:55:49 EST
Created attachment 57278 [details]
Clip showing markers with id's prepended to their description
Comment 6 John Arthorne CLA 2007-01-23 13:23:40 EST
"Marker ID" doesn't work because there already is a generic notion of marker id (see IMarker.getId()).  How about "creatorId" or "generatorId"? What exactly does the value signify - is it like a marker type?

CCing Philippe because we'll need to coordinate the breaking change with JDT, since they have already adopted the "generatedBy" attribute.  Currently the Java builder assigns a value of "JDT" for this attribute - is this an appropriate value?
Comment 7 Randy Giffen CLA 2007-01-23 14:00:29 EST
It is like a marker type. A given resource could have many instances of markers with a given value of this attribute.
In the case of a problem marker it indicates a specific kind of problem.
It is often used by support. The user tells support this value and they
then look up a full explaination and resolution.

Comment 8 Randy Giffen CLA 2007-01-23 16:51:56 EST
Suggestion here is sourceId
This value can be as specific as required. 
It can represent just the generator as requested in the other defect (so "JDT" is valid)
Or the source can be taken to mean the specific "issue" being marked.
Having "Source Id" in the UI will also reflect how the value is used.
It identifies the source of the marker (and leads to its explaination and resolution)
Comment 9 John Arthorne CLA 2007-01-25 10:44:07 EST
I have released the new attribute IMarker.SOURCE_ID, and deprecated the IMarker.GENERATED_BY attribute.  I have entered bug 171648 against JDT core to fix their reference to the old attribute, and bug 171682 against Platform Resources to remove the GENERATED_BY attribute once JDT core has fixed their reference.

Here is the javadoc text of the new SOURCE_ID constant. Randy, please let me know if you have suggestions for better wording:

"Source id attribute.  A string attribute that can be used by tools that generate markers to indicate the source of the marker. Use of this attribute is optional and its format or existence is not enforced.  This attribute is intended to improve serviceability by providing a value that product support personnel can use to determine appropriate resolutions for problems."
Comment 10 Randy Giffen CLA 2007-01-25 14:44:54 EST
Thank-you. I have updated 104831 to have the value surfaced in the UI

Suggest minor change in wording.
"Source id attribute.  A string attribute that can be used by tools that
generate markers to indicate the source of the marker. Use of this attribute is
optional and its format or existence is not enforced.  This attribute is
intended to improve serviceability by providing a value that product support
personnel or automated tools can use to determine appropriate help and resolutions for markers."
Comment 11 John Arthorne CLA 2007-01-25 15:50:20 EST
Thanks, I have released your suggested wording changes.