diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java index 115888790..2ffe8c6e5 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java @@ -27,7 +27,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate; * @since 3.3 */ public abstract class ElementContentProvider implements IElementContentProvider { - + protected static final Object[] EMPTY = new Object[0]; /* (non-Javadoc) @@ -43,7 +43,7 @@ public abstract class ElementContentProvider implements IElementContentProvider if (!update.isCanceled()) { retrieveChildren(update); } - update.done(); + update.done(); } return Status.OK_STATUS; } @@ -75,10 +75,10 @@ public abstract class ElementContentProvider implements IElementContentProvider job.setRule(getRule(updates)); job.schedule(); } - + /** * Computes the children for the given parent in the specified context. - * + * * @param update update request */ protected void retrieveChildren(IChildrenUpdate update) { @@ -99,12 +99,12 @@ public abstract class ElementContentProvider implements IElementContentProvider status = e.getStatus(); } update.setStatus(status); - } + } } - + /** * Computes whether the given element is a container. - * + * * @param parent potential parent * @param context presentation context * @param monitor result to report to @@ -126,13 +126,13 @@ public abstract class ElementContentProvider implements IElementContentProvider status = e.getStatus(); } update.setStatus(status); - } - } - + } + } + /** * Returns the children for the given parent at the specified index in the specified context * or <code>null</code> if none. - * + * * @param parent element to retrieve children for * @param index child index * @param length number of children to retrieve @@ -141,41 +141,41 @@ public abstract class ElementContentProvider implements IElementContentProvider * @throws CoreException if an exception occurs retrieving child */ protected abstract Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException; - + /** * Returns the number of children for the given element. - * + * * @param elementPath element that may have children * @param context context element will be presented in * @return number of children * @throws CoreException if an exception occurs determining child count */ - protected abstract int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException; + protected abstract int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException; /** * Returns whether this adapter supports the given context. - * + * * @param context * @return whether this adapter supports the given context */ protected boolean supportsContext(IPresentationContext context) { return supportsContextId(context.getId()); } - + /** * Returns whether this adapter provides content in the specified context id. - * + * * @param id part id * @return whether this adapter provides content in the specified context id */ - protected abstract boolean supportsContextId(String id); + protected abstract boolean supportsContextId(String id); /** - * Returns the range of elements from <code>index</code> to <code>index + length</code> + * Returns the range of elements from <code>index</code> to <code>index + length</code> * or <code>null</code> if the index and range is outside the bounds of the original element array. - * + * * @param elements the original element array - * @param index the initial index to start copying from + * @param index the initial index to start copying from * @param length the number of elements we want to copy into the returned array * @return element or <code>null</code> */ @@ -205,19 +205,19 @@ public abstract class ElementContentProvider implements IElementContentProvider if (!update.isCanceled()) { updateHasChildren(update); } - update.done(); + update.done(); } return Status.OK_STATUS; } }; job.setSystem(true); job.setRule(getRule(updates)); - job.schedule(); + job.schedule(); } /** * Updates whether the given elements have children. - * + * * @param update specifies element and progress monitor */ protected void updateHasChildren(IHasChildrenUpdate update) { @@ -237,14 +237,14 @@ public abstract class ElementContentProvider implements IElementContentProvider status = e.getStatus(); } update.setStatus(status); - } - + } + } /** * Returns whether the given element has children in the specified context. * Subclasses can override to be more efficient. - * + * * @param element * @param context * @param monitor @@ -253,38 +253,38 @@ public abstract class ElementContentProvider implements IElementContentProvider protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException { return getChildCount(element, context, monitor) > 0; } - + /** * Returns a scheduling rule to use when performing the given updates or * <code>null</code> if none. - * + * * @param updates * @return scheduling rule or <code>null</code> if none */ protected ISchedulingRule getRule(IChildrenCountUpdate[] updates) { return null; } - + /** * Returns a scheduling rule to use when performing the given updates or * <code>null</code> if none. - * + * * @param updates * @return scheduling rule or <code>null</code> if none */ protected ISchedulingRule getRule(IChildrenUpdate[] updates) { return null; - } - + } + /** * Returns a scheduling rule to use when performing the given updates or * <code>null</code> if none. - * + * * @param updates * @return scheduling rule or <code>null</code> if none */ protected ISchedulingRule getRule(IHasChildrenUpdate[] updates) { return null; - } - + } + } |