Bug 579498 - MarkerSupportView: It should be possible dynamically update the Types in the FiltersConfigurationDialog.
Summary: MarkerSupportView: It should be possible dynamically update the Types in the ...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.23   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-30 04:45 EDT by Evelyn Lynch CLA
Modified: 2022-06-16 12:30 EDT (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 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