diff options
author | Darin Wright | 2005-01-19 17:13:23 +0000 |
---|---|---|
committer | Darin Wright | 2005-01-19 17:13:23 +0000 |
commit | 0ce9e300febe1809ccbaaf493ebe308cca557c9a (patch) | |
tree | 8e2ecbf4345ff1119227ffaed83a4505f50f8db9 /org.eclipse.debug.ui | |
parent | 63661b4b1c2674db705eb778a1119e1d9e07d679 (diff) | |
download | eclipse.platform.debug-0ce9e300febe1809ccbaaf493ebe308cca557c9a.tar.gz eclipse.platform.debug-0ce9e300febe1809ccbaaf493ebe308cca557c9a.tar.xz eclipse.platform.debug-0ce9e300febe1809ccbaaf493ebe308cca557c9a.zip |
Bug 75891 - Stratum line breakpoints should be grouped by stratum.
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeOrganizer.java | 12 | ||||
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.java (renamed from org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeCategory.java) | 13 | ||||
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointTypeCategory.java | 37 |
3 files changed, 54 insertions, 8 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeOrganizer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeOrganizer.java index 5617a8014..9d4c24ab2 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeOrganizer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeOrganizer.java @@ -17,6 +17,8 @@ import org.eclipse.core.runtime.IAdaptable; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.model.IBreakpoint; import org.eclipse.debug.ui.AbstractBreakpointOrganizer; +import org.eclipse.debug.ui.BreakpointTypeCategory; +import org.eclipse.debug.ui.IBreakpointTypeCategory; /** * Breakpoint organizers for breakpoint types. @@ -31,14 +33,18 @@ public class BreakpointTypeOrganizer extends AbstractBreakpointOrganizer { * @see org.eclipse.debug.ui.IBreakpointOrganizerDelegate#getCategories(org.eclipse.debug.core.model.IBreakpoint) */ public IAdaptable[] getCategories(IBreakpoint breakpoint) { + IBreakpointTypeCategory category = (IBreakpointTypeCategory) breakpoint.getAdapter(IBreakpointTypeCategory.class); + if (category != null) { + return new IAdaptable[]{category}; + } String name = DebugPlugin.getDefault().getBreakpointManager().getTypeName(breakpoint); if (name != null) { - IAdaptable[] category = (IAdaptable[]) fTypes.get(name); + IAdaptable[] categories = (IAdaptable[]) fTypes.get(name); if (category == null) { - category = new IAdaptable[]{new BreakpointTypeCategory(name)}; + categories = new IAdaptable[]{new BreakpointTypeCategory(name)}; fTypes.put(name, category); } - return category; + return categories; } return null; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeCategory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.java index 7cbbb721f..48b84e178 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeCategory.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.java @@ -8,7 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -package org.eclipse.debug.internal.ui.views.breakpoints; +package org.eclipse.debug.ui; import org.eclipse.core.runtime.PlatformObject; import org.eclipse.debug.internal.ui.DebugPluginImages; @@ -17,11 +17,14 @@ import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.model.IWorkbenchAdapter; /** - * Represents a breakpoint type for breakpoint organization. - * + * Default implementation for a breakpoint type category. + * <p> + * Clients providing breakpoint type category adapters may instantiate + * and subclass this class. + * </p> * @since 3.1 */ -public class BreakpointTypeCategory extends PlatformObject implements IWorkbenchAdapter { +public class BreakpointTypeCategory extends PlatformObject implements IBreakpointTypeCategory, IWorkbenchAdapter { private String fName; @@ -39,7 +42,7 @@ public class BreakpointTypeCategory extends PlatformObject implements IWorkbench * * @return the name of this category's breakpoint type */ - public String getName() { + protected String getName() { return fName; } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointTypeCategory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointTypeCategory.java new file mode 100644 index 000000000..7c4e72386 --- /dev/null +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointTypeCategory.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2000, 2004 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.debug.ui; + +import org.eclipse.core.runtime.IAdaptable; + +/** + * Represents a breakpoint's type to support organization of breakpoints + * by type in the breakpoints view. A default breakpoint type adapter + * is provided for breakpoints by the debug platform, but clients may override + * the default adapter by providing their own adapter for breakpoints. + * <p> + * A breakpoint type category is an adaptable that must provide an + * <code>IWorkbenchAdapter</code> such that it can be rendered in the + * breakpoints view. + * </p> + * <p> + * Implementations should ensure that <code>equals</code> and <code>hashCode</code> + * are implemented properly to reflect the equality of type categories. + * </p> + * <p> + * Clients may implement this interface. + * </p> + * @see org.eclipse.debug.ui.BreakpointTypeCategory + * @since 3.1 + */ +public interface IBreakpointTypeCategory extends IAdaptable { + +} |