Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2010-05-04 16:52:09 +0000
committerPawel Piech2010-05-04 16:52:09 +0000
commit0cfc66350571db233810c85b42382f720294cbc5 (patch)
treedcdce9eacb5f336e36d05274487d2b601dea4c0a
parentdd03e0de6e6dcc7e32223803868a14419f83fbc4 (diff)
downloadeclipse.platform.debug-0cfc66350571db233810c85b42382f720294cbc5.tar.gz
eclipse.platform.debug-0cfc66350571db233810c85b42382f720294cbc5.tar.xz
eclipse.platform.debug-0cfc66350571db233810c85b42382f720294cbc5.zip
Bug 311457 - [breakpoints] When grouping breakpoints, the "Other" category should be listed last.
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/ElementComparator.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/ElementComparator.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/ElementComparator.java
index 5120e20e4..e176f4063 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/ElementComparator.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/ElementComparator.java
@@ -20,6 +20,7 @@ import org.eclipse.debug.core.model.ILineBreakpoint;
import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.OtherBreakpointCategory;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.internal.ui.views.DebugModelPresentationContext;
@@ -62,6 +63,18 @@ public class ElementComparator implements Comparator {
* @return
*/
private int compare(IBreakpointContainer c1, IBreakpointContainer c2) {
+ // The "Other" breakpoint category should be listed last.
+ // (Bug 311457).
+ if (c1.getCategory() instanceof OtherBreakpointCategory) {
+ if (c2.getCategory() instanceof OtherBreakpointCategory) {
+ return 0;
+ }
+ return 1;
+ } else if (c2.getCategory() instanceof OtherBreakpointCategory) {
+ return -1;
+ }
+
+ // Rest of categories should be listed alphabetically.
if (fContext != null) {
String name1 = fContext.getModelPresentation().getText(c1);
String name2 = fContext.getModelPresentation().getText(c2);

Back to the top