Bug 75373 - problem-markers created by other builders on java-resources disappear
Summary: problem-markers created by other builders on java-resources disappear
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: UI (show other bugs)
Version: 1.2.0 M1   Edit
Hardware: PC Windows All
: P3 normal (vote)
Target Milestone: 1.2.0 M2   Edit
Assignee: Sian January CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 71061 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-30 06:19 EDT by gerdziegler CLA
Modified: 2004-11-18 12:08 EST (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 gerdziegler CLA 2004-09-30 06:19:27 EDT
I wrote a builder that generates .aj files. The builder runs before the aspectj
builder and creates problem markers on java resources. The problem is: these
markers disappear after the aspectj-builder has run. If I disable the aspectj
builder the markers behave correctly.

    IMarker marker = res.createMarker(IMarker.PROBLEM);
    if (marker.exists())
    {
      marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
      marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH);
      marker.setAttribute(IMarker.USER_EDITABLE, false);
      marker.setAttribute(IMarker.TRANSIENT, false);
      marker.setAttribute(IMarker.MESSAGE, e.getMessage());
      ...
Comment 1 gerdziegler CLA 2004-11-09 04:57:55 EST
Same behavior if i define and use my own problem-marker type.
Comment 2 Sian January CLA 2004-11-10 10:43:22 EST
Fixed in latest development build and will be included in the 1.2.0 M2 release.
Comment 3 Sian January CLA 2004-11-15 06:46:18 EST
*** Bug 71061 has been marked as a duplicate of this bug. ***
Comment 4 gerdziegler CLA 2004-11-16 16:31:38 EST
Bug still in 
Version: 1.2.0
Build id: 20041115201304
AspectJ version: 1.2.0

code:

    IMarker marker = res.createMarker("pluginid.marker");
    assert marker.exists() : "unable to create marker on resource " + res;

    marker.setAttribute(IMarker.MESSAGE, msg);
    if(location.getLineNumber()>=0)
    {
      marker.setAttribute(IMarker.LINE_NUMBER, location.getLineNumber());
    }
    else if(location.getCharStart()>=0)
    {
      marker.setAttribute(IMarker.CHAR_START, location.getCharStart());
      marker.setAttribute(IMarker.CHAR_END, location.getCharEnd());
    }
    marker.setAttribute(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
    marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH);
    marker.setAttribute(IMarker.USER_EDITABLE, false);
    marker.setAttribute(IMarker.TRANSIENT, false);


plugin.xml:

  	<extension point="org.eclipse.core.resources.markers"
        id="marker"
        name="mymarker"> 
      	    <super type="org.eclipse.jdt.core.problem"/> 
	    <persistent value="true"/>  
  	</extension>  
Comment 5 Sian January CLA 2004-11-17 09:09:43 EST
Oops..  I'm very sorry - we were still removing subtypes of JDT problem 
markers as well as JDT markers themselves.  Thanks for the prompt response and 
the clear test case.  This should be fixed now and another build should be 
uploaded tomorrow morning.
Comment 6 Sian January CLA 2004-11-18 12:08:01 EST
Build uploaded