Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323088

Summary: [Markers] Could you improve the Marker Support doc?
Product: [Eclipse Project] Platform Reporter: Miwako Tokugawa <miwako.tokugawa>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: prakash
Version: 4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Miwako Tokugawa CLA 2010-08-18 17:18:05 EDT
Build Identifier: 

Hi.
Could you please improve the help doc on “Marker Support” (org.eclipse.ui.ide.markerSupport)?
To begin with, I am having a problem with "problemFilter"
I checked out the unit tests in org.eclipse.ui.tets but didn’t get much insight from it either.



Reproducible: Always

Steps to Reproduce:
To reproduce
1.	check out CDT head
2.	Create a helloc in runtime eclipse that will cause gcc to give warning.  Build to make sure you can see the warning in Problems view
3.	Add the following to org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
<extension point="org.eclipse.ui.ide.markerSupport">
<problemFilter
enabled="true"
scope="ON_ANY"
onDescription="ABC" (I tried with “ABC” and “!ABC” here)
name="filter1"
(I tried with and without “severity="WARNING" “ here)
id="filter1">
<selectedType markerId="org.eclipse.core.resources.problemmarker"/>
</problemFilter>
</extension>
to org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
4.	no warning is shown in problems view no matter what you do
a) "ABC" and no "severity"
b) "!ABC" and no "severity"
c) "ABC" and "severity=WARNING"
d) "!ABC" and "severity=WARNING"
According to “Marker Support” on help.eclipse.org, this should cause only the warning string that contains “ABC”  in the problem view.. right? Or am I missing something?
Comment 1 Miwako Tokugawa CLA 2010-08-20 18:22:53 EDT
A similar case is this.
I take it that the following should display problem markers that contains the string “MY” in the description field in the “MY View” view. Well, it doesn’t. MY View displays all problem markers, whether their description field contains "MY" or not.

<!—define a new marker type -->        
<extension point="org.eclipse.core.resources.markers"
        id="com.intel.compiler.cdt.managedbuilder.ui.MYMarkerType">
        <super type="org.eclipse.core.resources.problemmarker"/>
        <super type="org.eclipse.core.resources.textmarker"/>
        <attribute name="description"/>
        <persistent value="true"/>
</extension>
<!-- MYMarkerType is subset of problemmarker that contains "MY" in the description string -->
<extension point="org.eclipse.ui.ide.markerSupport">
        <problemFilter
                enabled="true"
                scope="ON_ANY"
                onDescription="MY"
                name="filter"
                id="com.intel.compiler.cdt.manageduilbder.ui.MYFilter">^M
                <selectedType markerId="com.intel.compiler.cdt.managedbuilder.ui.MYMarkerType"/>^M
	</problemFilter>
	<!-- Associate MYMarkersView with MYMarkerGenerato -->
	<!-- markerContentGenerator id is passed to the MYMarkersView constructor -->
        <markerContentGenerator
        id="com.intel.compiler.cdt.managedbuilder.ui.MYMarkerGenerator"
        name="dum">
        <markerTypeReference id="com.intel.compiler.cdt.managedbuilder.ui.MYMarkerType"/>
        <markerTypeReference id="org.eclipse.core.resources.problemmarker"/>
        <markerTypeReference id="org.eclipse.core.resources.marker"/>
        <markerFieldReference id="org.eclipse.ui.ide.descriptionField"/>
        </markerContentGenerator>
        </extension>
</extension>

<!-- define a new view -->
<extension point="org.eclipse.ui.views">
        <view class="com.intel.compiler.cdt.managedbuilder.ui.MYMarkersView"
        id="com.intel.compiler.cdt.managedbuilder.ui.MYMarker"
        name="MY View">
        </view>
</extension>
Comment 2 Miwako Tokugawa CLA 2010-08-25 13:42:29 EDT
Also, the comment in MarkerContentGenerator.java says
 // Honour the deprecated problemFilters

Is problemFilters deprecated? What should I be using instead if it is?
Comment 3 Miwako Tokugawa CLA 2010-08-25 13:46:11 EDT
(In reply to comment #2)
Please never mind this comment. This does seem to be documented (though I googled and still can't get to it as of now)
Comment 4 Eclipse Webmaster CLA 2019-09-06 15:35:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.