Bug 579498

Summary: MarkerSupportView: It should be possible dynamically update the Types in the FiltersConfigurationDialog.
Product: [Eclipse Project] Platform Reporter: Evelyn Lynch <e.lynch>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: e.obrien
Version: 4.23   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Evelyn Lynch CLA 2022-03-30 04:45:16 EDT
For our use case we require to only show the Marker Types that are applicable to our application in the Types section of the FiltersConfigurationDialog.

From searching the code, I see that this Types section is populated by the attribute markerTypes in the ContentGeneratorDescriptor.  markerTypes is a collection of all the extension point="org.eclipse.core.resources.markers" in the plugin.xml.  We are only interested in our types and wish to remove the others.  

The issue is that both ContentGeneratorDescriptor and markerTypes are not accessible through the Eclipse API and so it is not possible for us to manipulate this Types section.  There needs to be some mechanism to allow us to remove the markerTypes that we are not interested in.
Comment 1 Enda O Brien CLA 2022-06-16 12:30:34 EDT
I found that this issue can be mostly resolved by using a supertype marker. 

The markerTypeReference given in the markerContentGenerator can point to the new super marker instead of problemmarker.
Now, all the markers that need to be included in the type section of the filter dialog need to be updated to have the new marker as their super.

There is just one small issue that remaining. The new super marker is now included in the filter dialog type section along with all its suptypes.

I have a patch proposal to resolve this last problem. 

The patch adds a new 'application' attribute to markerTypeReference to describe how the reference should be applied.
i.e. Does it refer to type only, type and subtypes or subtypes only.

patch is here: https://github.com/eclipse-platform/eclipse.platform.ui/pull/144