Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364039 - [Markers] Add "Delete All Markers" in severity group context menu in Problems view
Summary: [Markers] Add "Delete All Markers" in severity group context menu in Problems...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.8 M4   Edit
Assignee: Oleg Besedin CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2011-11-17 09:40 EST by Andrew Gvozdev CLA
Modified: 2011-11-24 12:00 EST (History)
4 users (show)

See Also:


Attachments
patch (4.00 KB, patch)
2011-11-18 14:54 EST, Andrew Gvozdev CLA
ob1.eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gvozdev CLA 2011-11-17 09:40:11 EST
The Problems view allows deleting markers, individual or selected group. However, when there are a few thousands needed to be deleted it is cumbersome to do so. Is it possible to add "Delete" item in context menu for severity group (Errors/Warnings/Infos) to be able to delete all in the group?
Comment 1 Andrew Gvozdev CLA 2011-11-18 09:58:30 EST
Well I guess "helpwanted" means no hope unless me does that. Could you give any pointers where the code that should be enhanced is located?
Comment 2 Remy Suen CLA 2011-11-18 10:03:54 EST
(In reply to comment #1)
> Could you give any
> pointers where the code that should be enhanced is located?

The changes would have to be done in the org.eclipse.ui.ide bundle. You'd have to either extend the existing marker deletion handler or create a new handler for deleting marker groups.
http://wiki.eclipse.org/Platform_UI/How_to_Contribute
Comment 3 Paul Webster CLA 2011-11-18 10:05:15 EST
And the plugin.xml will contain examples of the current marker command -> marker handler, and adding them to the different view menus.

PW
Comment 4 Andrew Gvozdev CLA 2011-11-18 14:54:55 EST
Created attachment 207246 [details]
patch

OK, how about this patch? BTW, thanks for the pointers.
Comment 5 Oleg Besedin CLA 2011-11-23 14:30:45 EST
Andrew, have you looked at the "Configure Contents" dialog? (Click on the triangle button in the corner of the view's toolbar.)

At allows you to create configuration to filter out all possible groups - both using severity (Error/Warning/Log) and using marker types.

It seems like it should be a more scalable solution to limiting output in this view. Essentially, it is the same functionality as "remove group of markers" except that is can be saved to be applied to the next session and allows fine-tuning.

Would that work for you, and if not, could you describe why?
Comment 6 Andrew Gvozdev CLA 2011-11-23 15:07:29 EST
I am familiar with the "Configure Contents" dialog and use it when I want to view filtered markers.
But this bug is about different problem. My problem is that as time goes on (while using a bunch of tools based on CDT which generate markers) the workspace accumulates a big number of unneeded markers. Why would I want to hide markers that became garbage? Besides it is more time-consuming to filter out unneeded patterns and error-prone. I am opting for something as simple and straightforward as hitting "Delete" on the category.
Comment 7 James Blackburn CLA 2011-11-23 15:11:02 EST
+1 This is a request I've had time and time again.  Being able to delete all markers would really help users when there are 10s of thousands of them.

Also the configure contents dialog is somewhat complicated (and several click too many to get to).  I've shown users it in the past, but I don't actually know anyone who uses it day-to-day to manage their markers view -- it's just too much effort.
Comment 8 Oleg Besedin CLA 2011-11-24 11:28:21 EST
(In reply to comment #7)
> +1 This is a request I've had time and time again. 

All right, I applied the patch with some minor changes, most notable copyright updates and changing supported types on the "org.eclipse.ui.ide.editable" property tester:

      <propertyTester
      ...
            type="org.eclipse.ui.internal.views.markers.MarkerSupportItem">
      </propertyTester>


3.8:
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R3_development&id=77103f0a32e6b3cf691de4c18bf7aa32603bd3b9

4.2:
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=7102254b013de0590e4a3759e7de21f4dca38f6f

Thanks Andrew!
Comment 9 Andrew Gvozdev CLA 2011-11-24 12:00:32 EST
Thanks for looking at the patch and applying, and to James for support. It's my first one for the platform which managed to get committed as far as I recall.