Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 207246 Details for
Bug 364039
[Markers] Add "Delete All Markers" in severity group context menu in Problems view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
bug-364039-Markers-Add-Delete-All-Markers-in-severit.patch (text/plain), 4.00 KB, created by
Andrew Gvozdev
on 2011-11-18 14:54:55 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Andrew Gvozdev
Created:
2011-11-18 14:54:55 EST
Size:
4.00 KB
patch
obsolete
>From b17ed169d887cc7b7761c4133212642951b895f2 Fri, 18 Nov 2011 14:17:55 -0500 >From: Andrew Gvozdev <angvoz.dev@gmail.com> >Date: Fri, 18 Nov 2011 14:13:21 -0500 >Subject: [PATCH] bug 364039: [Markers] Add "Delete All Markers" in severity group context menu in Problems view > >diff --git a/bundles/org.eclipse.ui.ide/plugin.xml b/bundles/org.eclipse.ui.ide/plugin.xml >index 5771e27..58255c2 100644 >--- a/bundles/org.eclipse.ui.ide/plugin.xml >+++ b/bundles/org.eclipse.ui.ide/plugin.xml >@@ -2155,7 +2155,10 @@ > <iterate > ifEmpty="false" > operator="and"> >- <instanceof value="org.eclipse.ui.internal.views.markers.MarkerEntry"/> >+ <or> >+ <instanceof value="org.eclipse.ui.internal.views.markers.MarkerCategory"/> >+ <instanceof value="org.eclipse.ui.internal.views.markers.MarkerEntry"/> >+ </or> > <test > forcePluginActivation="false" > property="org.eclipse.ui.ide.editable"> >diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/EditablePropertyTester.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/EditablePropertyTester.java >index 33d7e1d..d4d30ff 100644 >--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/EditablePropertyTester.java >+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/EditablePropertyTester.java >@@ -10,6 +10,10 @@ > *******************************************************************************/ > package org.eclipse.ui.internal.views.markers; > >+import java.util.HashSet; >+import java.util.Iterator; >+import java.util.Set; >+ > import org.eclipse.core.expressions.PropertyTester; > import org.eclipse.core.resources.IMarker; > >@@ -37,9 +41,27 @@ > public boolean test(Object receiver, String property, Object[] args, > Object expectedValue) { > if (property.equals(EDITABLE)) { >- IMarker marker = ((MarkerEntry) receiver).getMarker(); >- if (marker != null) >- return marker.getAttribute(IMarker.USER_EDITABLE, true); >+ MarkerSupportItem item = (MarkerSupportItem) receiver; >+ Set/*<IMarker>*/ markers = new HashSet(); >+ if (item.isConcrete()) { >+ markers.add(((MarkerEntry) receiver).getMarker()); >+ } else { >+ MarkerSupportItem[] children = item.getChildren(); >+ for (int i = 0; i < children.length; i++) { >+ if (children[i].isConcrete()) >+ markers.add(((MarkerEntry) children[i]).getMarker()); >+ } >+ } >+ >+ if (!markers.isEmpty()) { >+ Iterator elements = markers.iterator(); >+ while (elements.hasNext()) { >+ IMarker marker = (IMarker) elements.next(); >+ if (marker.getAttribute(IMarker.USER_EDITABLE, true) == false) >+ return false; >+ } >+ return true; >+ } > } > return false; > } >diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java >index e466a6e..5613ef0 100644 >--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java >+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java >@@ -891,11 +891,18 @@ > if (selection instanceof IStructuredSelection) { > IStructuredSelection structured = (IStructuredSelection) selection; > Iterator elements = structured.iterator(); >- Collection result = new ArrayList(); >+ Collection result = new HashSet(); > while (elements.hasNext()) { > MarkerSupportItem next = (MarkerSupportItem) elements.next(); >- if (next.isConcrete()) >+ if (next.isConcrete()) { > result.add(((MarkerEntry) next).getMarker()); >+ } else { >+ MarkerSupportItem[] children = next.getChildren(); >+ for (int i = 0; i < children.length; i++) { >+ if (children[i].isConcrete()) >+ result.add(((MarkerEntry) children[i]).getMarker()); >+ } >+ } > } > if (result.isEmpty()) > return MarkerSupportInternalUtilities.EMPTY_MARKER_ARRAY;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ob1.eclipse
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 364039
: 207246