Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-01-09 13:12:58 +0000
committerAndrey Loskutov2017-01-13 20:56:39 +0000
commitebb2566c95427e5c7cffd5e27f1e910b0a187b17 (patch)
treef9b87db9c4ccf476dfb8c8d4b5fcfcfd3f871bbb /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers
parent1c1d17b82a223fb8fcc69b4883a71b8744899ccb (diff)
downloadeclipse.platform.debug-ebb2566c95427e5c7cffd5e27f1e910b0a187b17.tar.gz
eclipse.platform.debug-ebb2566c95427e5c7cffd5e27f1e910b0a187b17.tar.xz
eclipse.platform.debug-ebb2566c95427e5c7cffd5e27f1e910b0a187b17.zip
Also enabled "cleanup whitespace on save" actions for debug.ui and debug.tests bundles. Change-Id: I755b879ab1d49144a1bec3f4318dbb8b29521bb3 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AbstractUpdatePolicy.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java162
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousRequestMonitor.java46
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousSchedulingRuleFactory.java30
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java44
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java30
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java276
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ChildrenRequestMonitor.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/FindElementDialog.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ILabelResult.java24
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/LabelRequestMonitor.java28
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/LabelResult.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ModelNode.java60
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/PartPresentationContext.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableAddRequestMonitor.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableEditorImpl.java28
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableInsertRequestMonitor.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableRemoveRequestMonitor.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableReplaceRequestMonitor.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableUpdatePolicy.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/AbstractBreadcrumb.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItem.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDetails.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDropDown.java38
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java60
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/IBreadcrumbDropDownSite.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/TreeViewerDropDown.java60
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java50
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java54
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java38
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementMementoRequest.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java102
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java28
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/IInternalTreeModelViewer.java118
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ILabelUpdateListener.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java112
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelLabelProvider.java26
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelViewer.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java384
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java272
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/MementoUpdate.java20
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/SubTreeModelViewer.java114
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TimeTriggeredProgressMonitorDialog.java32
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java272
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java122
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerAdapterService.java64
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerInputUpdate.java30
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java330
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerUpdateMonitor.java84
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java78
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java78
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckUpdate.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckboxModelProxy.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IChildrenCountUpdate.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IChildrenUpdate.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentation.java34
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentation2.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentationFactory.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementCompareRequest.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementContentProvider.java24
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementEditor.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementLabelProvider.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementMementoProvider.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementMementoRequest.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IHasChildrenUpdate.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ILabelUpdate.java26
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelChangedListener.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDelta.java72
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDeltaVisitor.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy.java36
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy2.java20
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory2.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelSelectionPolicy.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelSelectionPolicyFactory.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java56
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStateUpdateListener.java20
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStatusMonitor.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ITreeModelViewer.java114
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewActionProvider.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputProvider.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputRequestor.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputUpdate.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdate.java16
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdateListener.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IVirtualItemListener.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IVirtualItemValidator.java16
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java68
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java44
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewer.java84
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewerFilter.java16
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ViewerInputService.java24
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java152
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTree.java58
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTreeModelViewer.java96
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractColumnPresentation.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractModelProxy.java48
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AsynchronousContentAdapter.java46
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AsynchronousLabelAdapter.java38
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IAsynchronousContentAdapter.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IAsynchronousLabelAdapter.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IChildrenRequestMonitor.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IContainerRequestMonitor.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/ILabelRequestMonitor.java22
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointContainerProxy.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java46
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointProxy.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugEventHandler.java74
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetEventHandler.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetProxy.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultExpressionModelProxy.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelProxyFactory.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelSelectionPolicyFactory.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultSelectionPolicy.java26
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultVariableViewModelProxy.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultWatchExpressionModelProxy.java16
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java30
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionEventHandler.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionManagerModelProxy.java24
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java28
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/MemoryBlockProxy.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/MemoryRetrievalProxy.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ProcessProxy.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/StackFrameEventHandler.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ThreadEventHandler.java56
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/VariablesViewEventHandler.java2
128 files changed, 2640 insertions, 2640 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AbstractUpdatePolicy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AbstractUpdatePolicy.java
index c8bec419d..f8ca2af8d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AbstractUpdatePolicy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AbstractUpdatePolicy.java
@@ -13,7 +13,7 @@ package org.eclipse.debug.internal.ui.viewers;
/**
* An update policy updates a viewer based on deltas reported by a model proxy.
- *
+ *
* @since 3.2
*
*/
@@ -27,7 +27,7 @@ public abstract class AbstractUpdatePolicy {
public void init(AsynchronousViewer viewer) {
fViewer = viewer;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.viewers.IUpdatePolicy#dispose()
*/
@@ -38,13 +38,13 @@ public abstract class AbstractUpdatePolicy {
/**
* Returns the viewer this policy is installed on or <code>null</code>
* if disposed.
- *
+ *
* @return presentation to update
*/
public AsynchronousViewer getViewer() {
return fViewer;
}
-
+
protected synchronized boolean isDisposed() {
return fViewer == null;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
index 484d10354..2920ebf81 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
@@ -39,11 +39,11 @@ import org.eclipse.jface.viewers.ViewerSorter;
/**
* Model for an asynchronous viewer
- *
+ *
* @since 3.2
*/
public abstract class AsynchronousModel {
-
+
private ModelNode fRoot; // root node
private Map<Object, ModelNode[]> fElementToNodes = new HashMap<Object, ModelNode[]>(); // map
// of
@@ -62,9 +62,9 @@ public abstract class AsynchronousModel {
// element
private AsynchronousViewer fViewer; // viewer this model works for
private boolean fDisposed = false; // whether disposed
-
+
class EmptyContentAdapter extends AsynchronousContentAdapter {
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.provisional.AsynchronousContentAdapter#getChildren(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
@@ -89,14 +89,14 @@ public abstract class AsynchronousModel {
return true;
}
}
-
+
protected IAsynchronousContentAdapter fEmptyContentAdapter = new EmptyContentAdapter();
-
+
/**
* List of requests currently being performed.
*/
private List<IStatusMonitor> fPendingUpdates = new ArrayList<IStatusMonitor>();
-
+
/**
* List of pending viewer updates
*/
@@ -104,7 +104,7 @@ public abstract class AsynchronousModel {
/**
* Constructs a new empty tree model
- *
+ *
* @param viewer associated viewer
*/
public AsynchronousModel(AsynchronousViewer viewer) {
@@ -119,23 +119,23 @@ public abstract class AsynchronousModel {
DebugUIPlugin.trace(buffer.toString());
}
}
-
+
/**
* Initializes this model. Called once after creation.
- *
+ *
* @param root root element or <code>null</code>
*/
public void init(Object root) {
if (root != null) {
fRoot = new ModelNode(null, root);
mapElement(root, fRoot);
- }
+ }
}
-
+
protected AsynchronousViewer getViewer() {
return fViewer;
}
-
+
/**
* Disposes this model
*/
@@ -158,7 +158,7 @@ public abstract class AsynchronousModel {
}
fElementToNodes.clear();
}
-
+
/**
* Returns whether this model has been disposed
* @return <code>true</code> if the model is disposed <code>false</code> otherwise
@@ -166,7 +166,7 @@ public abstract class AsynchronousModel {
public synchronized boolean isDisposed() {
return fDisposed;
}
-
+
/**
* Cancels all pending update requests.
*/
@@ -178,12 +178,12 @@ public abstract class AsynchronousModel {
update.setCanceled(true);
}
fPendingUpdates.clear();
- }
-
+ }
+
/**
* Installs the model proxy for the given element into this viewer
* if not already installed.
- *
+ *
* @param element element to install an update policy for
*/
public synchronized void installModelProxy(Object element) {
@@ -202,18 +202,18 @@ public abstract class AsynchronousModel {
proxy.installed(getViewer());
}
return Status.OK_STATUS;
- }
+ }
};
job.setSystem(true);
job.schedule();
}
}
}
- }
-
+ }
+
/**
* Uninstalls the model proxy installed for the given element, if any.
- *
+ *
* @param element the element context
*/
protected synchronized void disposeModelProxy(Object element) {
@@ -222,33 +222,33 @@ public abstract class AsynchronousModel {
getViewer().modelProxyRemoved(proxy);
proxy.dispose();
}
- }
-
+ }
+
/**
* Unintalls all model proxies installed for this model
*/
private void disposeAllModelProxies() {
synchronized(fModelProxies) {
for (IModelProxy proxy : fModelProxies.values()) {
- getViewer().modelProxyRemoved(proxy);
+ getViewer().modelProxyRemoved(proxy);
proxy.dispose();
}
fModelProxies.clear();
}
- }
-
+ }
+
/**
* Returns the presentation this model is installed in
- *
+ *
* @return the presentation context from the backing viewer
*/
protected IPresentationContext getPresentationContext() {
return fViewer.getPresentationContext();
}
-
+
/**
* Returns the model proxy factory for the given element of <code>null</code> if none.
- *
+ *
* @param element element to retrieve adapters for
* @return model proxy factory adapter or <code>null</code>
*/
@@ -261,11 +261,11 @@ public abstract class AsynchronousModel {
adapter = adaptable.getAdapter(IModelProxyFactory.class);
}
return adapter;
- }
-
+ }
+
/**
* Maps the given element to the given node.
- *
+ *
* @param element the element context
* @param node the model node
*/
@@ -288,10 +288,10 @@ public abstract class AsynchronousModel {
}
installModelProxy(element);
}
-
+
/**
* Unmaps the given node from its element and widget.
- *
+ *
* @param node the model node
*/
protected synchronized void unmapNode(ModelNode node) {
@@ -317,31 +317,31 @@ public abstract class AsynchronousModel {
}
}
}
-
+
/**
* Returns the nodes in this model for the given element or
* <code>null</code> if none.
- *
+ *
* @param element model element
* @return associated nodes or <code>null</code>
*/
public synchronized ModelNode[] getNodes(Object element) {
return fElementToNodes.get(element);
}
-
+
/**
* Returns the root node or <code>null</code>
- *
+ *
* @return the root node or <code>null</code>
*/
public ModelNode getRootNode() {
return fRoot;
}
-
+
/**
* Cancels any conflicting updates for children of the given item, and
* schedules the new update.
- *
+ *
* @param update the update to schedule
*/
protected void requestScheduled(IStatusMonitor update) {
@@ -357,11 +357,11 @@ public abstract class AsynchronousModel {
}
fPendingUpdates.add(update);
}
- }
-
+ }
+
/**
* Removes the update from the pending updates list.
- *
+ *
* @param update the update to remove
*/
protected void requestComplete(IStatusMonitor update) {
@@ -369,10 +369,10 @@ public abstract class AsynchronousModel {
fPendingUpdates.remove(update);
}
}
-
+
/**
* An viewer update has been scheduled due to the following update request.
- *
+ *
* @param update the update to add
*/
protected void viewerUpdateScheduled(IStatusMonitor update) {
@@ -381,11 +381,11 @@ public abstract class AsynchronousModel {
fViewerUpdates.add(update);
}
}
-
+
/**
* Returns the result of running the given elements through the
* viewers filters.
- *
+ *
* @param parent parent element
* @param elements the elements to filter
* @return only the elements which all filters accept
@@ -410,10 +410,10 @@ public abstract class AsynchronousModel {
}
return elements;
}
-
+
/**
* Refreshes the given node.
- *
+ *
* @param node the model node to update
*/
protected void updateLabel(ModelNode node) {
@@ -423,12 +423,12 @@ public abstract class AsynchronousModel {
ILabelRequestMonitor labelUpdate = new LabelRequestMonitor(node, this);
requestScheduled(labelUpdate);
adapter.retrieveLabel(element, getPresentationContext(), labelUpdate);
- }
+ }
}
-
+
/**
* Returns the label adapter for the given element or <code>null</code> if none.
- *
+ *
* @param element element to retrieve adapter for
* @return presentation adapter or <code>null</code>
*/
@@ -445,17 +445,17 @@ public abstract class AsynchronousModel {
return new AsynchronousDebugLabelAdapter();
}
return adapter;
- }
-
+ }
+
/**
* Returns the tree element adapter for the given element or
* <code>null</code> if none.
- *
+ *
* @param element
* element to retrieve adapter for
* @return presentation adapter or <code>null</code>
*/
- protected IAsynchronousContentAdapter getContentAdapter(Object element) {
+ protected IAsynchronousContentAdapter getContentAdapter(Object element) {
IAsynchronousContentAdapter adapter = null;
if (element instanceof IAsynchronousContentAdapter) {
adapter = (IAsynchronousContentAdapter) element;
@@ -464,11 +464,11 @@ public abstract class AsynchronousModel {
adapter = adaptable.getAdapter(IAsynchronousContentAdapter.class);
}
return adapter;
- }
-
+ }
+
/**
* Updates the children of the given node.
- *
+ *
* @param parent
* node of which to update children
*/
@@ -483,11 +483,11 @@ public abstract class AsynchronousModel {
requestScheduled(update);
adapter.retrieveChildren(element, getPresentationContext(), update);
}
- }
-
+ }
+
/**
* Update this model's viewer preserving its selection.
- *
+ *
* @param update the update code to run in the backing viewer's preserving selection method
*/
protected void preservingSelection(Runnable update) {
@@ -496,7 +496,7 @@ public abstract class AsynchronousModel {
/**
* The viewer updated associated with a request is complete.
- *
+ *
* @param monitor the status to remove and complete
*/
protected void viewerUpdateComplete(IStatusMonitor monitor) {
@@ -506,10 +506,10 @@ public abstract class AsynchronousModel {
}
getViewer().updateComplete(monitor);
}
-
+
/**
* An update request was cancelled
- *
+ *
* @param monitor the monitor to remove
*/
protected void requestCanceled(AsynchronousRequestMonitor monitor) {
@@ -517,10 +517,10 @@ public abstract class AsynchronousModel {
fPendingUpdates.remove(monitor);
}
}
-
+
/**
* Whether any updates are still in progress in the model or against the viewer.
- *
+ *
* @return <code>true</code> if there are pending changes <code>false</code> otherwise
*/
protected boolean hasPendingUpdates() {
@@ -528,18 +528,18 @@ public abstract class AsynchronousModel {
return !fPendingUpdates.isEmpty() || !fViewerUpdates.isEmpty();
}
}
-
+
/**
* Asynchronous update for add/set children request.
- *
+ *
* @param parent the parent model node
* @param element the element context
*/
protected abstract void add(ModelNode parent, Object element);
-
+
/**
* Notification from children request monitor
- *
+ *
* @param parentNode parent node
* @param kids list of model elements
*/
@@ -550,11 +550,11 @@ public abstract class AsynchronousModel {
if (sorter != null) {
sorter.sort(viewer, children);
}
-
+
ModelNode[] prevKids = null;
ModelNode[] newChildren = null;
- ModelNode[] unmap = null;
-
+ ModelNode[] unmap = null;
+
synchronized (this) {
if (isDisposed()) {
return;
@@ -572,7 +572,7 @@ public abstract class AsynchronousModel {
newChildren = new ModelNode[children.length];
unmap = new ModelNode[prevKids.length];
for (int i = 0; i < prevKids.length; i++) {
- unmap[i] = prevKids[i];
+ unmap[i] = prevKids[i];
}
for (int i = 0; i < children.length; i++) {
Object child = children[i];
@@ -605,9 +605,9 @@ public abstract class AsynchronousModel {
DebugUIPlugin.trace(toString());
}
}
-
+
//update viewer outside the lock
- final ModelNode[] finalUnmap = unmap;
+ final ModelNode[] finalUnmap = unmap;
preservingSelection(new Runnable() {
@Override
public void run() {
@@ -618,10 +618,10 @@ public abstract class AsynchronousModel {
}
viewer.nodeChildrenChanged(parentNode);
}
- });
+ });
}
-
+
@Override
public String toString() {
StringBuffer buf = new StringBuffer();
@@ -633,7 +633,7 @@ public abstract class AsynchronousModel {
}
return buf.toString();
}
-
+
private void append(StringBuffer buf, ModelNode node, int level) {
for (int i = 0; i < level; i++) {
buf.append('\t');
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousRequestMonitor.java
index 92071d2ac..9aa6a64fa 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousRequestMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousRequestMonitor.java
@@ -26,22 +26,22 @@ import org.eclipse.ui.progress.WorkbenchJob;
* @since 3.2
*/
public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor {
-
+
/**
* Model node the update is rooted at
*/
private ModelNode fNode;
-
+
/**
* Model the update is being performed for
*/
private AsynchronousModel fModel;
-
+
/**
* Whether this request's 'done' method has been called.
*/
private boolean fDone = false;
-
+
protected WorkbenchJob fViewerUpdateJob = new WorkbenchJob("Asynchronous viewer update") { //$NON-NLS-1$
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
@@ -64,10 +64,10 @@ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor
return Status.OK_STATUS;
}
};
-
+
/**
* Constructs an update rooted at the given item.
- *
+ *
* @param node model node
* @param model model the node is in
*/
@@ -78,39 +78,39 @@ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor
fViewerUpdateJob.setRule(getUpdateSchedulingRule());
fViewerUpdateJob.setSystem(true);
}
-
+
/**
* Returns the scheduling rule for viewer update job.
- *
+ *
* @return rule or <code>null</code>
*/
protected ISchedulingRule getUpdateSchedulingRule() {
return AsynchronousSchedulingRuleFactory.getDefault().newSerialPerObjectRule(getModel().getViewer());
}
-
+
/**
* Returns the model this update is being performed for
- *
+ *
* @return the model this update is being performed for
*/
protected AsynchronousModel getModel() {
return fModel;
}
-
+
/**
* Returns the model node this update is rooted at
- *
+ *
* @return the model node this update is rooted at
*/
protected ModelNode getNode() {
return fNode;
}
-
+
/**
* Returns whether this update contains the given node.
* That is, whether this update is for the same node or a child of
* the given node.
- *
+ *
* @param node node to test containment on
* @return whether this update contains the given node
*/
@@ -127,7 +127,7 @@ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor
}
return false;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
@@ -139,7 +139,7 @@ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor
getModel().requestCanceled(this);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitor#done()
*/
@@ -150,10 +150,10 @@ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor
}
scheduleViewerUpdate(0L);
}
-
+
/**
* Returns whether this request is done yet.
- *
+ *
* @return if the request is done
*/
protected synchronized boolean isDone() {
@@ -161,23 +161,23 @@ public abstract class AsynchronousRequestMonitor extends AbstractRequestMonitor
}
protected void scheduleViewerUpdate(long ms) {
- if(!isCanceled())
+ if(!isCanceled())
fViewerUpdateJob.schedule(ms);
}
-
+
/**
* Notification this update has been completed and should now be applied to
* this update's viewer. This method is called in the UI thread.
*/
protected abstract void performUpdate();
-
+
/**
* Returns whether this update effectively contains the given update.
* That is, whether this update will also perform the given update.
- *
+ *
* @param update update to compare to
* @return whether this update will also perform the given update
*/
protected abstract boolean contains(AsynchronousRequestMonitor update);
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousSchedulingRuleFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousSchedulingRuleFactory.java
index aa2ffa508..9daeff7cc 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousSchedulingRuleFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousSchedulingRuleFactory.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -14,11 +14,11 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
/**
* Scheduling rule factory for asynchronous operations.
- *
+ *
* @since 3.2
*/
public class AsynchronousSchedulingRuleFactory {
-
+
private static AsynchronousSchedulingRuleFactory fgFactory = null;
/**
@@ -39,11 +39,11 @@ public class AsynchronousSchedulingRuleFactory {
return rule instanceof SerialRule;
}
}
-
+
class SerialPerObjectRule implements ISchedulingRule {
-
+
private Object fObject = null;
-
+
public SerialPerObjectRule(Object lock) {
fObject = lock;
}
@@ -67,37 +67,37 @@ public class AsynchronousSchedulingRuleFactory {
}
return false;
}
-
- }
-
+
+ }
+
private AsynchronousSchedulingRuleFactory() {}
-
+
public static AsynchronousSchedulingRuleFactory getDefault() {
if (fgFactory == null) {
fgFactory = new AsynchronousSchedulingRuleFactory();
}
return fgFactory;
}
-
+
/**
* Returns a scheduling rule that allows all jobs with an instance
* of the rule to run one at a time.
- *
+ *
* @return scheduling rule
*/
public ISchedulingRule newSerialRule() {
return new SerialRule();
}
-
+
/**
* Returns a scheduling rule that allows all jobs with an instance
* of the rule on the same object to run one at a time.
- *
+ *
* @param lock object to serialize one
* @return scheduling rule
*/
public ISchedulingRule newSerialPerObjectRule(Object lock) {
return new SerialPerObjectRule(lock);
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java
index 386e2396b..31d58fbc7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -22,7 +22,7 @@ public class AsynchronousTableModel extends AsynchronousModel {
/**
* Constructs a new table model.
- *
+ *
* @param viewer the backing viewer
*/
public AsynchronousTableModel(AsynchronousViewer viewer) {
@@ -34,10 +34,10 @@ public class AsynchronousTableModel extends AsynchronousModel {
*/
@Override
protected void add(ModelNode parent, Object element) {}
-
+
/**
* Adds the given elements to the table.
- *
+ *
* @param elements the new elements to add
*/
public void add(Object[] elements) {
@@ -45,10 +45,10 @@ public class AsynchronousTableModel extends AsynchronousModel {
requestScheduled(update);
update.done();
}
-
+
/**
* Notification add request is complete.
- *
+ *
* @param elements elements to add
*/
protected void added(Object[] elements) {
@@ -75,10 +75,10 @@ public class AsynchronousTableModel extends AsynchronousModel {
setChildren(getRootNode(), kids);
}
}
-
+
/**
* Inserts the given elements to the table.
- *
+ *
* @param elements the new elements to insert
* @param index the index to insert the elements at
*/
@@ -87,10 +87,10 @@ public class AsynchronousTableModel extends AsynchronousModel {
requestScheduled(update);
update.done();
}
-
+
/**
* Notification insert request is complete.
- *
+ *
* @param elements elements to add
* @param index index to insert at
*/
@@ -118,22 +118,22 @@ public class AsynchronousTableModel extends AsynchronousModel {
if (changed) {
setChildren(getRootNode(), kids);
}
- }
+ }
/**
* Removes the given elements from the table.
- *
+ *
* @param elements the elements to remove
*/
public void remove(Object[] elements) {
TableRemoveRequestMonitor update = new TableRemoveRequestMonitor(getRootNode(), elements, this);
requestScheduled(update);
update.done();
- }
-
+ }
+
/**
* Notification remove request is complete.
- *
+ *
* @param elements elements to remove
*/
protected void removed(Object[] elements) {
@@ -156,11 +156,11 @@ public class AsynchronousTableModel extends AsynchronousModel {
if (changed) {
setChildren(getRootNode(), kids);
}
- }
-
+ }
+
/**
* Adds the given elements to the table.
- * @param element the element to replace
+ * @param element the element to replace
* @param replacement the element to replace the old element with
*/
public void replace(Object element, Object replacement) {
@@ -168,10 +168,10 @@ public class AsynchronousTableModel extends AsynchronousModel {
requestScheduled(update);
update.done();
}
-
+
/**
* Notification add request is complete.
- * @param element the element to be replaced
+ * @param element the element to be replaced
* @param replacement the element that replaced the old element
*/
protected void replaced(Object element, Object replacement) {
@@ -179,7 +179,7 @@ public class AsynchronousTableModel extends AsynchronousModel {
if (filtered.length == 0) {
remove(new Object[]{element});
return;
- }
+ }
List<ModelNode> list = new ArrayList<ModelNode>();
synchronized (this) {
ModelNode[] nodes = getNodes(element);
@@ -194,5 +194,5 @@ public class AsynchronousTableModel extends AsynchronousModel {
getViewer().nodeChanged(node);
}
}
- }
+ }
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java
index 97e5cdb13..bcc728fbb 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java
@@ -69,7 +69,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
/**
* Table must be SWT.VIRTUAL. This is intentional. Labels will never be
* retrieved for non-visible items.
- *
+ *
* @see SWT#VIRTUAL
* @param table the backing table widget
*/
@@ -89,7 +89,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
public void mouseDown(MouseEvent e) {
fTableEditorImpl.handleMouseDown(e);
}
- });
+ });
}
@Override
@@ -97,7 +97,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
fTableEditor.dispose();
fTable.dispose();
super.dispose();
- }
+ }
@Override
protected ISelection doAttemptSelectionToWidget(ISelection selection, boolean reveal) {
@@ -112,7 +112,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
ModelNode[] nodes = getModel().getRootNode().getChildrenNodes();
if (nodes != null) {
int index = 0;
-
+
// I'm not sure if it would be faster to check TableItems first...
for (int i = 0; i < nodes.length; i++) {
Object element = nodes[i].getElement();
@@ -121,7 +121,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
index++;
}
}
-
+
fTable.setSelection(indices);
if (reveal && indices.length > 0) {
TableItem item = fTable.getItem(indices[0]);
@@ -177,7 +177,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
if (node.getElement().equals(getInput())) {
updateChildren(node);
}
- }
+ }
@Override
protected void restoreLabels(Item item) {
@@ -264,7 +264,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.StructuredViewer#reveal(java.lang.Object)
*/
@Override
@@ -278,7 +278,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
/**
* Sets the cell editors of this table viewer.
- *
+ *
* @param editors
* the list of cell editors
*/
@@ -288,7 +288,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
/**
* Sets the cell modifier of this table viewer.
- *
+ *
* @param modifier
* the cell modifier
*/
@@ -375,7 +375,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
/**
* This is not asynchronous. This method must be called in the UI Thread.
- *
+ *
* @param element
* The element to edit. Each element maps to a row in the Table.
* @param column
@@ -480,12 +480,12 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
@Override
protected void setItemCount(Widget parent, int itemCount) {
fTable.setItemCount(itemCount);
- }
+ }
protected int getVisibleItemCount(int top) {
int itemCount = fTable.getItemCount();
return Math.min((fTable.getBounds().height / fTable.getItemHeight()) + 2, itemCount - top);
- }
+ }
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.viewers.AsynchronousViewer#createUpdatePolicy()
@@ -529,7 +529,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.AsynchronousViewer#clearChild(org.eclipse.swt.widgets.Widget, int)
*/
@@ -547,7 +547,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
protected void clearChildren(Widget item) {
if (item instanceof Table) {
fTable.clearAll();
- }
+ }
}
/* (non-Javadoc)
@@ -560,5 +560,5 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
}
return -1;
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java
index 6a256f403..ce0f0bb47 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java
@@ -58,7 +58,7 @@ import org.eclipse.ui.progress.WorkbenchJob;
* This viewer uses adapters to retrieve labels and content rather than
* a label provider and content provider. As such, the label provider for this viewer
* is <code>null</code> by default. The content provider returned by this viewer is
- * non-<code>null</code> to conform to the viewer specification, but performs no
+ * non-<code>null</code> to conform to the viewer specification, but performs no
* useful function.
* </p>
* <p>
@@ -66,12 +66,12 @@ import org.eclipse.ui.progress.WorkbenchJob;
* the viewer attempts to perform the selection. If the elements in the specified selection
* are not yet in the viewer, the portion of the selection that could not be honored
* becomes a pending selection. As more elements are added to viewer, the pending selection
- * is attempted to be set.
+ * is attempted to be set.
* </p>
* @since 3.2
*/
public abstract class AsynchronousViewer extends StructuredViewer implements Listener {
-
+
/**
* Model of elements for this viewer
*/
@@ -107,17 +107,17 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
private ISelection fPendingSelection;
private ISelection fCurrentSelection;
-
+
/**
* Array used to store indices of the path to an item in the viewer being mapped
- * by a 'set data' callback. Indices are bottom up. For example when 'set data' for
+ * by a 'set data' callback. Indices are bottom up. For example when 'set data' for
* the 3rd child of the 4th child of the 2nd root element were being asked for,
* the first 3 indices would look like: [3, 4, 2, ....]. We re-use an array to avoid
* creating a new one all the time. The array grows as needed to accommodate deep
* elements.
*/
private int[] fSetDataIndicies = new int[5];
-
+
/**
* The update policy for this viewer.
*/
@@ -125,9 +125,9 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
protected static final String OLD_LABEL = "old_label"; //$NON-NLS-1$
protected static final String OLD_IMAGE = "old_image"; //$NON-NLS-1$
-
+
/**
- * Creates a new viewer
+ * Creates a new viewer
*/
protected AsynchronousViewer() {
setContentProvider(new NullContentProvider());
@@ -170,7 +170,7 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
color.dispose();
}
fColorCache.clear();
-
+
if (fModel != null) {
fModel.dispose();
}
@@ -184,7 +184,7 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
/**
* Updates all occurrences of the given element in this viewer.
- *
+ *
* @param element element to update
*/
public void update(Object element) {
@@ -195,10 +195,10 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
}
}
-
+
/**
* Updates the label for a specific element (node) in the model.
- *
+ *
* @param node node to update
*/
protected void updateLabel(ModelNode node) {
@@ -207,12 +207,12 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
getModel().updateLabel(node);
}
}
-
+
/**
* Returns the presentation context to be used in update requests.
* Clients may override this method if required to provide special
* implementations of contexts.
- *
+ *
* @return presentation context
*/
public IPresentationContext getPresentationContext() {
@@ -257,13 +257,13 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
unmapAllElements();
getControl().setData(null);
}
- refresh();
+ refresh();
}
-
+
/**
* Creates a new empty model for this viewer that
* is *not* initialized.
- *
+ *
* @return a new model
*/
protected abstract AsynchronousModel createModel();
@@ -289,12 +289,12 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
return images;
}
-
+
/**
* Returns an image for the given image descriptor or <code>null</code>. Adds the image
* to a cache of images if it does not already exist. The cache is cleared when this viewer
- * is disposed.
- *
+ * is disposed.
+ *
* @param descriptor image descriptor or <code>null</code>
* @return image or <code>null</code>
*/
@@ -319,18 +319,18 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
return new Font[columns.length];
}
}
-
+
Font[] fonts = new Font[fontDatas.length];
for (int i = 0; i < fonts.length; i++) {
fonts[i] = getFont(fontDatas[i]);
}
return fonts;
}
-
+
/**
- * Returns a font for the given font data or <code>null</code>. Adds the font to this viewer's font
+ * Returns a font for the given font data or <code>null</code>. Adds the font to this viewer's font
* cache which is disposed when this viewer is disposed.
- *
+ *
* @param fontData font data or <code>null</code>
* @return font font or <code>null</code>
*/
@@ -345,7 +345,7 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
return font;
}
-
+
protected Color[] getColors(RGB[] rgb) {
if (rgb == null || rgb.length == 0) {
String[] columns = getPresentationContext().getColumns();
@@ -362,9 +362,9 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
return colors;
}
/**
- * Returns a color for the given RGB or <code>null</code>. Adds the color to this viewer's color
+ * Returns a color for the given RGB or <code>null</code>. Adds the color to this viewer's color
* cache which is disposed when this viewer is disposed.
- *
+ *
* @param rgb RGB or <code>null</code>
* @return color or <code>null</code>
*/
@@ -379,10 +379,10 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
return color;
}
-
+
/**
- * Sets the context for this viewer.
- *
+ * Sets the context for this viewer.
+ *
* @param context the presentation context
*/
public void setContext(IPresentationContext context) {
@@ -407,10 +407,10 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
return null;
}
-
+
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.viewers.StructuredViewer#doFindInputItem(java.lang.Object)
*/
@Override
@@ -422,7 +422,7 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
}
return null;
- }
+ }
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.StructuredViewer#doUpdateItem(org.eclipse.swt.widgets.Widget, java.lang.Object, boolean)
@@ -452,17 +452,17 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
}
}
-
+
/**
* Refreshes a specific occurrence of an element (a node).
- *
+ *
* @param node node to update
- *
+ *
* Subclasses should override and call super
*/
protected void internalRefresh(ModelNode node) {
updateLabel(node);
- }
+ }
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers.ISelection, boolean)
@@ -471,10 +471,10 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
public synchronized void setSelection(ISelection selection, boolean reveal) {
setSelection(selection, reveal, false);
}
-
+
/**
* Sets the selection in this viewer.
- *
+ *
* @param selection new selection
* @param reveal whether to reveal the selection
* @param force whether to force the selection change without consulting the model
@@ -491,9 +491,9 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
if (!force && !overrideSelection(fCurrentSelection, selection)) {
return;
}
-
+
fPendingSelection = selection;
-
+
if (getControl().getDisplay().getThread() == Thread.currentThread()) {
attemptSelection(reveal);
} else {
@@ -503,18 +503,18 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
attemptSelection(reveal);
return Status.OK_STATUS;
}
-
+
};
job.setSystem(true);
job.schedule();
- }
- }
-
-
+ }
+ }
+
+
/**
* Returns whether the candidate selection should override the current
* selection.
- *
+ *
* @param current the current selection
* @param candidate the new selection
* @return if the selection should be overridden
@@ -529,7 +529,7 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
return !selectionPolicy.isSticky(current, getPresentationContext());
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.StructuredViewer#getSelection()
*/
@@ -540,8 +540,8 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
return StructuredSelection.EMPTY;
}
return fCurrentSelection;
- }
-
+ }
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.StructuredViewer#handleSelect(org.eclipse.swt.events.SelectionEvent)
*/
@@ -552,8 +552,8 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
if (control != null && !control.isDisposed()) {
updateSelection(newSelectionFromWidget());
}
- }
-
+ }
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.StructuredViewer#handlePostSelect(org.eclipse.swt.events.SelectionEvent)
*/
@@ -561,20 +561,20 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
protected void handlePostSelect(SelectionEvent e) {
SelectionChangedEvent event = new SelectionChangedEvent(this, newSelectionFromWidget());
firePostSelectionChanged(event);
- }
-
+ }
+
/**
* Creates and returns a new selection from this viewer, based on the selected
* elements in the widget.
- *
+ *
* @return a new selection
*/
protected abstract ISelection newSelectionFromWidget();
-
+
/**
* Returns the selection policy associated with the given selection
* or <code>null</code> if none.
- *
+ *
* @param selection or <code>null</code>
* @return selection policy or <code>null</code>
*/
@@ -601,7 +601,7 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
// NOT USED
throw new IllegalArgumentException("This method should not be called"); //$NON-NLS-1$
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.StructuredViewer#setSelectionToWidget(java.util.List, boolean)
*/
@@ -609,11 +609,11 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
final protected void setSelectionToWidget(List l, boolean reveal) {
// NOT USED
throw new IllegalArgumentException("This method should not be called"); //$NON-NLS-1$
- }
-
+ }
+
/**
* Attempts to update any pending selection.
- *
+ *
* @param reveal whether to reveal the selection
*/
protected void attemptSelection(boolean reveal) {
@@ -638,47 +638,47 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
firePostSelectionChanged(new SelectionChangedEvent(this, currentSelection));
}
}
-
+
/**
* Controls whether selection change notification is sent even when
* successive selections are equal.
- *
+ *
* TODO: what we really want is to fire selection change on ACTIVATE model
* change, even when selection is the same.
- *
+ *
* @return whether to suppress change notification for equal successive
* selections
*/
protected boolean isSuppressEqualSelections() {
return true;
}
-
+
/**
* Attempts to selection the specified selection and returns a selection
* representing the portion of the selection that could not be honored
* and still needs to be selected.
- *
+ *
* @param selection selection to attempt
* @param reveal whether to reveal the selection
* @return remaining selection
*/
protected abstract ISelection doAttemptSelectionToWidget(ISelection selection, boolean reveal);
-
+
/**
* Returns whether this viewer supports the given selection.
- *
+ *
* @param selection a selection
* @return whether this viewer supports the given selection
*/
protected abstract boolean acceptsSelection(ISelection selection);
-
+
/**
* Returns an empty selection supported by this viewer.
- *
+ *
* @return an empty selection supported by this viewer
*/
protected abstract ISelection getEmptySelection();
-
+
/**
* A content provider that does nothing.
*/
@@ -701,7 +701,7 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
* Notification that a presentation update has failed.
* Subclasses may override as required. The default implementation
* does nothing.
- *
+ *
* @param monitor monitor for the presentation request that failed
* @param status status of update
*/
@@ -717,7 +717,7 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
ISelection oldSelection = null;
try {
// preserve selection
- oldSelection = fCurrentSelection;
+ oldSelection = fCurrentSelection;
// perform the update
updateCode.run();
} finally {
@@ -748,17 +748,17 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
return Status.OK_STATUS;
}
-
+
};
job.setSystem(true);
job.schedule();
- }
+ }
}
} else {
updateCode.run();
}
}
-
+
protected synchronized void restoreSelection(ISelection oldSelection) {
ISelection remaining = doAttemptSelectionToWidget(oldSelection, false);
// send out notification if old and new differ
@@ -779,7 +779,7 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
}
}
-
+
/**
* Returns whether the selection exists in the model
* @param selection the selection context
@@ -801,28 +801,28 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
return true;
}
-
+
/**
* Sets the color attributes of the given widget.
- *
+ *
* @param widget the widget to update
* @param foreground foreground color of the widget or <code>null</code> if default
* @param background background color of the widget or <code>null</code> if default
*/
protected abstract void setColors(Widget widget, RGB foreground[], RGB background[]);
-
+
/**
* Sets the label attributes of the given widget.
- *
+ *
* @param widget the widget to update
* @param text label text
* @param image label image or <code>null</code>
*/
protected abstract void setLabels(Widget widget, String[] text, ImageDescriptor[] image);
-
+
/**
* Sets the font attributes of the given widget.
- *
+ *
* @param widget widget to update
* @param font font of the widget or <code>null</code> if default.
*/
@@ -836,43 +836,43 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
fCurrentSelection = selection;
super.updateSelection(selection);
}
-
-
+
+
/**
* Notification the given model proxy has been added to this viewer's model.
- *
+ *
* @param proxy the model proxy that has been added
*/
protected void modelProxyAdded(IModelProxy proxy) {
if (fUpdatePolicy instanceof IModelChangedListener) {
proxy.addModelChangedListener((IModelChangedListener)fUpdatePolicy);
- }
+ }
}
-
+
/**
* Notification the given model proxy has been removed from this viewer's model.
- *
+ *
* @param proxy the model proxy that has been removed
*/
protected void modelProxyRemoved(IModelProxy proxy) {
if (fUpdatePolicy instanceof IModelChangedListener) {
proxy.removeModelChangedListener((IModelChangedListener)fUpdatePolicy);
- }
- }
-
+ }
+ }
+
/**
* Returns this viewer's model
- *
+ *
* @return model
*/
protected AsynchronousModel getModel() {
return fModel;
- }
+ }
/**
* A node in the model has been updated
- *
+ *
* @param node the model node that has been changed
*/
protected void nodeChanged(ModelNode node) {
@@ -893,7 +893,7 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
/**
* Notification from the model that the update for the given request
* has completed.
- *
+ *
* @param monitor the monitor
*/
protected void updateComplete(IStatusMonitor monitor) {
@@ -901,21 +901,21 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
/**
* Clears the given widget
- *
+ *
* @param item the widget
*/
protected abstract void clear(Widget item);
-
+
/**
* Clears the children of the widget.
- *
+ *
* @param item the widget to clear children from
*/
protected abstract void clearChildren(Widget item);
-
+
/**
* Clears the child at the given index.
- *
+ *
* @param parent the parent widget
* @param childIndex the index of the child widget to clear
*/
@@ -924,16 +924,16 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
/**
* Returns the child widget at the given index for the given parent or
* <code>null</code>
- *
+ *
* @param parent the parent widget
- * @param index the index of the child in the parent widget
+ * @param index the index of the child in the parent widget
* @return the widget at the given index in the parent or <code>null</code>
*/
protected abstract Widget getChildWidget(Widget parent, int index);
/**
* Sets the item count for a parent widget
- *
+ *
* @param parent the parent widget
* @param itemCount the new item count to set
*/
@@ -945,12 +945,12 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
protected void attemptPendingUpdates() {
attemptSelection(false);
}
-
+
/**
* Notification a node's children have changed.
* Updates the child count for the parent's widget
* and clears children to be updated.
- *
+ *
* @param parentNode the parent model node
*/
protected void nodeChildrenChanged(ModelNode parentNode) {
@@ -960,13 +960,13 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
setItemCount(widget, childCount);
clearChildren(widget);
attemptPendingUpdates();
- }
+ }
}
-
+
/**
* Notification children have been added to the end
* of the given parent.
- *
+ *
* @param parentNode the parent model node
*/
protected void nodeChildrenAdded(ModelNode parentNode) {
@@ -975,15 +975,15 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
int childCount = parentNode.getChildCount();
setItemCount(widget, childCount);
attemptPendingUpdates();
- }
+ }
}
-
+
/**
* Notification children have been added to the end
* of the given parent.
- *
+ *
* @param parentNode the parent model node
- * @param index the index of the child that was removed
+ * @param index the index of the child that was removed
*/
protected void nodeChildRemoved(ModelNode parentNode, int index) {
Widget widget = findItem(parentNode);
@@ -1000,13 +1000,13 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
clearChild(widget, i);
}
attemptPendingUpdates();
- }
- }
-
+ }
+ }
+
/**
* Unmaps the node from its widget and all of its children nodes from
* their widgets.
- *
+ *
* @param node the model node
*/
protected void unmapNode(ModelNode node) {
@@ -1034,10 +1034,10 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
return node;
}
}
- }
+ }
return null;
}
-
+
/**
* Returns the item for the node or <code>null</code>
* @param node the model node
@@ -1049,26 +1049,26 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
/*
* (non-Javadoc)
- *
+ *
* A virtual item has been exposed in the control, map its data.
- *
+ *
* @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
*/
@Override
- public void handleEvent(final Event event) {
+ public void handleEvent(final Event event) {
update((Item)event.item, event.index);
}
-
+
/**
* Update the given item.
- *
+ *
* @param item item to update
* @param index index of item in parent's children
*/
protected void update(Item item, int index) {
restoreLabels(item);
int level = 0;
-
+
Widget parentItem = getParentWidget(item);
if (DebugUIPlugin.DEBUG_VIEWER) {
DebugUIPlugin.trace("SET DATA [" + index + "]: " + parentItem); //$NON-NLS-1$//$NON-NLS-2$
@@ -1105,7 +1105,7 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
setNodeIndex(pindex, level);
parentItem = parent;
}
-
+
node = getModel().getRootNode();
if (node == null) {
if (DebugUIPlugin.DEBUG_VIEWER) {
@@ -1132,8 +1132,8 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
}
}
-
-
+
+
// map the node to the element and refresh it
if (node != null) {
mapElement(node, item);
@@ -1146,13 +1146,13 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
if (DebugUIPlugin.DEBUG_VIEWER) {
DebugUIPlugin.trace("\tFAILED - unable to find corresponding node"); //$NON-NLS-1$
}
- }
+ }
}
-
+
/**
* Sets the index of a child node being mapped at the given expansion level
* in the tree.
- *
+ *
* @param nodeIndex the index of the node
* @param level the expansion level
*/
@@ -1165,25 +1165,25 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
}
fSetDataIndicies[level] = nodeIndex;
}
-
+
/**
* Returns the index of a child node being mapped at the given expansion level in
* the tree.
- *
+ *
* @param level the expansion level
* @return the child index
*/
private int getNodeIndex(int level) {
return fSetDataIndicies[level];
}
-
+
protected abstract int indexOf(Widget parent, Widget child);
-
+
protected abstract void restoreLabels(Item item);
-
+
/**
* Returns the parent widget for the given widget or <code>null</code>
- *
+ *
* @param widget the widget to get the parent from
* @return parent widget or <code>null</code>
*/
@@ -1191,7 +1191,7 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
/**
* Updates the children of the given node.
- *
+ *
* @param parent
* node of which to update children
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ChildrenRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ChildrenRequestMonitor.java
index 6dd261a1f..9f6515481 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ChildrenRequestMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ChildrenRequestMonitor.java
@@ -18,7 +18,7 @@ import org.eclipse.debug.internal.ui.viewers.provisional.IChildrenRequestMonitor
/**
* Implementation for <code>IChildrenRequestMonitor</code>. Collects
- * children from an asynchronous tree content adapter.
+ * children from an asynchronous tree content adapter.
* <p>
* Not intended to be subclassed or instantiated by clients. For use
* speficially with <code>AsynchronousTreeViewer</code>.
@@ -26,9 +26,9 @@ import org.eclipse.debug.internal.ui.viewers.provisional.IChildrenRequestMonitor
* @since 3.2
*/
class ChildrenRequestMonitor extends AsynchronousRequestMonitor implements IChildrenRequestMonitor {
-
+
private boolean fFirstUpdate = true;
-
+
/**
* Collection of children retrieved
*/
@@ -37,14 +37,14 @@ class ChildrenRequestMonitor extends AsynchronousRequestMonitor implements IChil
/**
* Constucts a monitor to retrieve and update the children of the given
* node.
- *
+ *
* @param parent parent to retrieve children for
* @param model model being updated
*/
ChildrenRequestMonitor(ModelNode parent, AsynchronousModel model) {
super(parent, model);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.viewers.IChildrenRequestMonitor#addChild(java.lang.Object)
*/
@@ -53,7 +53,7 @@ class ChildrenRequestMonitor extends AsynchronousRequestMonitor implements IChil
synchronized (fChildren) {
fChildren.add(child);
}
-
+
scheduleViewerUpdate(250);
}
@@ -67,10 +67,10 @@ class ChildrenRequestMonitor extends AsynchronousRequestMonitor implements IChil
fChildren.add(children[i]);
}
}
-
+
scheduleViewerUpdate(0);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.viewers.AsynchronousRequestMonitor#contains(org.eclipse.debug.ui.viewers.AsynchronousRequestMonitor)
*/
@@ -91,7 +91,7 @@ class ChildrenRequestMonitor extends AsynchronousRequestMonitor implements IChil
} else {
for (Iterator<Object> iter = fChildren.iterator(); iter.hasNext();) {
Object child = iter.next();
- getModel().add(getNode(), child);
+ getModel().add(getNode(), child);
}
}
fChildren.clear();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/FindElementDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/FindElementDialog.java
index dd0d444fc..87cb65152 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/FindElementDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/FindElementDialog.java
@@ -20,15 +20,15 @@ import org.eclipse.ui.dialogs.ElementListSelectionDialog;
/**
* A dialog used to select elements from a list.
- *
+ *
* @since 3.3
*
*/
public class FindElementDialog extends ElementListSelectionDialog {
-
+
/**
* Constructs a dialog to navigate to an element in the given viewer.
- *
+ *
* @param shell shell to open on
* @param provider label provider
* @param elements elements to choose from
@@ -48,5 +48,5 @@ public class FindElementDialog extends ElementListSelectionDialog {
PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IDebugHelpContextIds.FIND_ELEMENT_DIALOG);
return comp;
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ILabelResult.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ILabelResult.java
index cde762d8e..6d0db0337 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ILabelResult.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ILabelResult.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -15,43 +15,43 @@ import org.eclipse.swt.graphics.Image;
/**
- * Results of collecting an asynchronous label in a tree.
- *
+ * Results of collecting an asynchronous label in a tree.
+ *
* @since 3.2
*/
public interface ILabelResult {
/**
* Returns the labels for the element. One for each column.
- *
+ *
* @return
*/
public String[] getLabels();
-
+
/**
* Returns the images for the element.
- *
+ *
* @return
*/
public Image[] getImages();
-
+
/**
* Returns the element the label is for.
- *
+ *
* @return
*/
public Object getElement();
-
+
/**
* Returns the path to the element in the tree.
- *
+ *
* @return
*/
public TreePath getTreePath();
-
+
/**
* Returns this element's depth in the tree.
- *
+ *
* @return
*/
public int getDepth();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/LabelRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/LabelRequestMonitor.java
index 9785246aa..2009e21f9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/LabelRequestMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/LabelRequestMonitor.java
@@ -23,7 +23,7 @@ import org.eclipse.swt.widgets.Widget;
* Not intended to be subclassed or instantiated by clients. For use speficially
* with <code>AsynchronousViewer</code>.
* </p>
- *
+ *
* @since 3.2
*/
class LabelRequestMonitor extends AsynchronousRequestMonitor implements ILabelRequestMonitor {
@@ -52,7 +52,7 @@ class LabelRequestMonitor extends AsynchronousRequestMonitor implements ILabelRe
/**
* Cosntructs a request to upate the label of the given node in the give
* model.
- *
+ *
* @param node node to update
* @param model model containing the node
*/
@@ -62,7 +62,7 @@ class LabelRequestMonitor extends AsynchronousRequestMonitor implements ILabelRe
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.debug.ui.viewers.AsynchronousRequestMonitor#performUpdate()
*/
@Override
@@ -78,7 +78,7 @@ class LabelRequestMonitor extends AsynchronousRequestMonitor implements ILabelRe
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.debug.ui.viewers.AsynchronousRequestMonitor#contains(org.eclipse.debug.ui.viewers.AsynchronousRequestMonitor)
*/
@Override
@@ -88,7 +88,7 @@ class LabelRequestMonitor extends AsynchronousRequestMonitor implements ILabelRe
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.debug.ui.viewers.ILabelRequestMonitor#setLabel(java.lang.String)
*/
@Override
@@ -98,7 +98,7 @@ class LabelRequestMonitor extends AsynchronousRequestMonitor implements ILabelRe
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.debug.ui.viewers.ILabelRequestMonitor#setFontData(org.eclipse.swt.graphics.FontData)
*/
@Override
@@ -108,7 +108,7 @@ class LabelRequestMonitor extends AsynchronousRequestMonitor implements ILabelRe
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.debug.ui.viewers.ILabelRequestMonitor#setImageDescriptor(org.eclipse.jface.resource.ImageDescriptor)
*/
@Override
@@ -118,7 +118,7 @@ class LabelRequestMonitor extends AsynchronousRequestMonitor implements ILabelRe
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.debug.ui.viewers.ILabelRequestMonitor#setForeground(org.eclipse.swt.graphics.RGB)
*/
@Override
@@ -128,30 +128,30 @@ class LabelRequestMonitor extends AsynchronousRequestMonitor implements ILabelRe
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.debug.ui.viewers.ILabelRequestMonitor#setBackground(org.eclipse.swt.graphics.RGB)
*/
@Override
public void setBackgrounds(RGB[] background) {
fBackgrounds = background;
}
-
+
protected RGB[] getBackgrounds() {
return fBackgrounds;
}
-
+
protected RGB[] getForegrounds() {
return fForegrounds;
}
-
+
protected FontData[] getFontDatas() {
return fFontDatas;
}
-
+
protected String[] getLabels() {
return fLabels;
}
-
+
protected ImageDescriptor[] getImageDescriptors() {
return fImageDescriptors;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/LabelResult.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/LabelResult.java
index 2896d964e..f7c297324 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/LabelResult.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/LabelResult.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,17 +23,17 @@ class LabelResult extends LabelRequestMonitor implements ILabelResult {
public LabelResult(ModelNode node, AsynchronousModel model) {
super(node, model);
}
-
+
@Override
protected synchronized void scheduleViewerUpdate(long ms) {
notifyAll();
}
-
+
@Override
public synchronized boolean isDone() {
return super.isDone();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.ILabelResult#getElement()
*/
@@ -80,5 +80,5 @@ class LabelResult extends LabelRequestMonitor implements ILabelResult {
return level;
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ModelNode.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ModelNode.java
index bfd3492e9..816aa70d4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ModelNode.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ModelNode.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -17,7 +17,7 @@ import org.eclipse.jface.viewers.TreePath;
/**
* A node in an asynchronous model.
- *
+ *
* @since 3.2
*/
public class ModelNode {
@@ -27,36 +27,36 @@ public class ModelNode {
private ModelNode fParent; // parent node or null for root
private ModelNode[] fChildren; // child nodes, possibly null
private boolean fDisposed; // whether this node has been disposed
-
+
public ModelNode(ModelNode parent, Object element) {
fParent = parent;
fElement = element;
}
-
+
public synchronized Object getElement() {
return fElement;
}
-
+
public synchronized void remap(Object element) {
fElement = element;
}
-
+
public ModelNode getParentNode() {
return fParent;
}
-
+
public synchronized boolean isContainer() {
return fIsContainer;
}
-
+
public synchronized ModelNode[] getChildrenNodes() {
return fChildren;
}
-
+
public synchronized boolean isDisposed() {
- return fDisposed;
+ return fDisposed;
}
-
+
public synchronized void dispose() {
fDisposed = true;
ModelNode[] childrenNodes = getChildrenNodes();
@@ -66,10 +66,10 @@ public class ModelNode {
}
}
}
-
+
/**
* Returns whether this node corresponds to the given path
- *
+ *
* @param path tree path
*/
public synchronized boolean correspondsTo(TreePath path) {
@@ -86,10 +86,10 @@ public class ModelNode {
}
return index == -1;
}
-
+
/**
* Returns a tree path corresponding to this node.
- *
+ *
* @return
*/
public synchronized TreePath getTreePath() {
@@ -101,10 +101,10 @@ public class ModelNode {
}
return new TreePath(path.toArray());
}
-
+
/**
* Adds the given child to this node.
- *
+ *
* @param child
*/
public synchronized void addChild(ModelNode child) {
@@ -117,10 +117,10 @@ public class ModelNode {
fChildren = kids;
}
}
-
+
/**
* Removes the given child from this node.
- *
+ *
* @param child
*/
public synchronized void removeChild(ModelNode child) {
@@ -138,11 +138,11 @@ public class ModelNode {
}
}
}
- }
-
+ }
+
/**
* Sets the children for this node
- *
+ *
* @param children
*/
public synchronized void setChildren(ModelNode[] children) {
@@ -153,10 +153,10 @@ public class ModelNode {
fChildren = children;
}
}
-
+
/**
* Returns the number of children for this node.
- *
+ *
* @return
*/
public synchronized int getChildCount() {
@@ -168,10 +168,10 @@ public class ModelNode {
}
return fChildren.length;
}
-
+
/**
* Returns the index of the given child in this parent, or -1
- *
+ *
* @param child
*/
public synchronized int getChildIndex(ModelNode child) {
@@ -184,16 +184,16 @@ public class ModelNode {
}
return -1;
}
-
+
/**
* Sets whether this node has children.
- *
+ *
* @param container
*/
public synchronized void setIsContainer(boolean container) {
fIsContainer = container;
}
-
+
@Override
public String toString() {
StringBuffer buf = new StringBuffer();
@@ -206,5 +206,5 @@ public class ModelNode {
buf.append(getElement());
return buf.toString();
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/PartPresentationContext.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/PartPresentationContext.java
index 7474a58bb..e416b32b8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/PartPresentationContext.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/PartPresentationContext.java
@@ -15,22 +15,22 @@ import org.eclipse.ui.IWorkbenchPart;
/**
* A presentation context tied to a part.
- *
+ *
* @since 3.3
* @deprecated getPart() is now supported by IPresentationContext itself.
*/
@Deprecated
public class PartPresentationContext extends PresentationContext {
-
+
/**
* Constructs a part presentation context.
- *
- * @param part part
+ *
+ * @param part part
*/
public PartPresentationContext(IWorkbenchPart part) {
super(part);
}
-
+
@Override
public IWorkbenchPart getPart() {
return super.getPart();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableAddRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableAddRequestMonitor.java
index 5cff2a94a..a79afdedd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableAddRequestMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableAddRequestMonitor.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ package org.eclipse.debug.internal.ui.viewers;
*
*/
public class TableAddRequestMonitor extends AsynchronousRequestMonitor {
-
+
protected Object[] fElements;
/**
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableEditorImpl.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableEditorImpl.java
index c592b5f90..50685d79d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableEditorImpl.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableEditorImpl.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -29,9 +29,9 @@ import org.eclipse.swt.widgets.Item;
/**
* This class is copied from package org.eclipse.jface.viewers.TableEditorImpl
* because the original has package access only.
- *
+ *
* TODO: complain to UI about package access to API class.
- *
+ *
*/
public abstract class TableEditorImpl {
private CellEditor fCellEditor;
@@ -53,7 +53,7 @@ public abstract class TableEditorImpl {
/**
* Returns this <code>TableViewerImpl</code> viewer
- *
+ *
* @return the viewer
*/
public StructuredViewer getViewer() {
@@ -191,7 +191,7 @@ public abstract class TableEditorImpl {
/**
* Start editing the given element.
- *
+ *
* @param element
* @param column
*/
@@ -217,7 +217,7 @@ public abstract class TableEditorImpl {
/**
* Return the array of CellEditors used in the viewer
- *
+ *
* @return the cell editors
*/
public CellEditor[] getCellEditors() {
@@ -226,7 +226,7 @@ public abstract class TableEditorImpl {
/**
* Get the cell modifier
- *
+ *
* @return the cell modifier
*/
public ICellModifier getCellModifier() {
@@ -237,7 +237,7 @@ public abstract class TableEditorImpl {
/**
* Return the properties for the column
- *
+ *
* @return the array of column properties
*/
public Object[] getColumnProperties() {
@@ -248,7 +248,7 @@ public abstract class TableEditorImpl {
/**
* Handles the mouse down event; activates the cell editor.
- *
+ *
* @param event
* the mouse event that should be handled
*/
@@ -297,7 +297,7 @@ public abstract class TableEditorImpl {
/**
* Return whether there is an active cell editor.
- *
+ *
* @return <code>true</code> if there is an active cell editor; otherwise
* <code>false</code> is returned.
*/
@@ -323,7 +323,7 @@ public abstract class TableEditorImpl {
/**
* Set the cell editors
- *
+ *
* @param editors
*/
public void setCellEditors(CellEditor[] editors) {
@@ -332,7 +332,7 @@ public abstract class TableEditorImpl {
/**
* Set the cell modifier
- *
+ *
* @param modifier
*/
public void setCellModifier(ICellModifier modifier) {
@@ -341,7 +341,7 @@ public abstract class TableEditorImpl {
/**
* Set the column properties
- *
+ *
* @param columnProperties
*/
public void setColumnProperties(String[] columnProperties) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableInsertRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableInsertRequestMonitor.java
index e7837550f..2cb20ff5e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableInsertRequestMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableInsertRequestMonitor.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ package org.eclipse.debug.internal.ui.viewers;
*
*/
public class TableInsertRequestMonitor extends TableAddRequestMonitor {
-
+
private int fIndex;
/**
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableRemoveRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableRemoveRequestMonitor.java
index 05ed29031..7d98e751e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableRemoveRequestMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableRemoveRequestMonitor.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableReplaceRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableReplaceRequestMonitor.java
index 074822a03..525a90541 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableReplaceRequestMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableReplaceRequestMonitor.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ package org.eclipse.debug.internal.ui.viewers;
*
*/
public class TableReplaceRequestMonitor extends AsynchronousRequestMonitor {
-
+
private Object fOriginal;
private Object fReplacement;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableUpdatePolicy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableUpdatePolicy.java
index 44d4eb32f..25cc12145 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableUpdatePolicy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableUpdatePolicy.java
@@ -17,7 +17,7 @@ import org.eclipse.jface.viewers.StructuredSelection;
/**
* Default update policy updates a viewer based on model deltas.
- *
+ *
* @since 3.2
*/
public class TableUpdatePolicy extends org.eclipse.debug.internal.ui.viewers.AbstractUpdatePolicy implements IModelChangedListener {
@@ -66,7 +66,7 @@ public class TableUpdatePolicy extends org.eclipse.debug.internal.ui.viewers.Abs
}
if ((flags & IModelDelta.ADDED) != 0) {
handleAdd(node);
- }
+ }
if ((flags & IModelDelta.REMOVED) != 0) {
handleRemove(node);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/AbstractBreadcrumb.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/AbstractBreadcrumb.java
index 58dc2e865..6d2b8c633 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/AbstractBreadcrumb.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/AbstractBreadcrumb.java
@@ -122,7 +122,7 @@ public abstract class AbstractBreadcrumb {
fBreadcrumbViewer.refresh();
}
}
-
+
/**
* Activates the breadcrumb. This sets the keyboard focus
* inside this breadcrumb and retargets the editor
@@ -170,7 +170,7 @@ public abstract class AbstractBreadcrumb {
@Override
public void handleEvent(Event event) {
if (fComposite.isDisposed()) return;
-
+
if (isBreadcrumbEvent(event)) {
if (fHasFocus)
return;
@@ -230,7 +230,7 @@ public abstract class AbstractBreadcrumb {
*/
private void doOpen(ISelection selection) {
if (open(selection)) {
- fBreadcrumbViewer.setInput(getCurrentInput());
+ fBreadcrumbViewer.setInput(getCurrentInput());
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItem.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItem.java
index 2a7d9d672..f6bc59242 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItem.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItem.java
@@ -38,7 +38,7 @@ import org.eclipse.swt.widgets.Shell;
class BreadcrumbItem extends Item {
private TreePath fPath;
-
+
private final BreadcrumbViewer fParent;
private Composite fContainer;
@@ -92,11 +92,11 @@ class BreadcrumbItem extends Item {
public TreePath getPath() {
return fPath;
}
-
+
public void setPath(TreePath path) {
fPath = path;
}
-
+
/**
* Should this item show a text label.
*
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDetails.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDetails.java
index 6482c4ac2..c5a756760 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDetails.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDetails.java
@@ -368,7 +368,7 @@ class BreadcrumbItemDetails {
private void openDropDown() {
Shell shell = fParent.getDropDownShell();
- if (shell == null) {
+ if (shell == null) {
fParent.openDropDownMenu();
shell = fParent.getDropDownShell();
}
@@ -417,7 +417,7 @@ class BreadcrumbItemDetails {
viewer.selectItem(fParent);
if (shell == null && e.button == 1 && e.stateMask == 0) {
fParent.getViewer().fireDoubleClick();
- }
+ }
}
@Override
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDropDown.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDropDown.java
index 84f9f1de0..c29ac5500 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDropDown.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDropDown.java
@@ -153,7 +153,7 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
// the size is not adjusted correctly in a virtual tree.
private static final int DROP_DOWN_MIN_WIDTH= 500;
private static final int DROP_DOWN_MAX_WIDTH= 501;
-
+
private static final int DROP_DOWN_DEFAULT_MIN_HEIGHT= 100;
private static final int DROP_DOWN_DEFAULT_MAX_HEIGHT= 500;
@@ -171,7 +171,7 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
private boolean fIsResizingProgrammatically;
private int fCurrentWidth = -1;
private int fCurrentHeight = -1;
-
+
public BreadcrumbItemDropDown(BreadcrumbItem parent, Composite composite) {
fParent= parent;
@@ -280,7 +280,7 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
if (DebugUIPlugin.DEBUG_BREADCRUMB) {
DebugUIPlugin.trace(" creating new shell"); //$NON-NLS-1$
}
-
+
fShell.addControlListener(new ControlAdapter() {
/*
* @see org.eclipse.swt.events.ControlAdapter#controlResized(org.eclipse.swt.events.ControlEvent)
@@ -289,7 +289,7 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
public void controlResized(ControlEvent e) {
if (fIsResizingProgrammatically)
return;
-
+
Point size= fShell.getSize();
fCurrentWidth = size.x;
fCurrentHeight = size.y;
@@ -313,7 +313,7 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
TreePath path= fParent.getPath();
Control control = fParent.getViewer().createDropDown(composite, this, path);
-
+
control.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
setShellBounds(fShell);
@@ -439,7 +439,7 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
settings= javaSettings.addNewSection(DIALOG_SETTINGS);
return settings;
}
-
+
private int getMaxWidth() {
try {
return getDialogSettings().getInt(DIALOG_WIDTH);
@@ -462,7 +462,7 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
* @param shell the shell to calculate the size for.
*/
private void setShellBounds(Shell shell) {
-
+
Rectangle rect= fParentComposite.getBounds();
Rectangle toolbarBounds= fToolBar.getBounds();
@@ -474,16 +474,16 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
if (fParent.getImage() != null) {
imageBoundsX= fParent.getImage().getImageData().width;
}
-
+
Rectangle trim= fShell.computeTrim(0, 0, width, height);
int x= toolbarBounds.x + toolbarBounds.width + 2 + trim.x - imageBoundsX;
if (!isLeft())
x+= width;
-
+
int y = rect.y;
- if (isTop())
+ if (isTop())
y+= rect.height;
- else
+ else
y-= height;
Point pt= new Point(x, y);
@@ -551,7 +551,7 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
private void resizeShell(final Shell shell) {
int maxHeight= getMaxHeight();
int maxWidth = getMaxWidth();
-
+
if (fCurrentHeight >= maxHeight && fCurrentWidth >= maxWidth)
return;
@@ -561,7 +561,7 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
if (fCurrentWidth >= DROP_DOWN_MAX_WIDTH) {
newWidth= fCurrentWidth;
} else {
- // Workaround for bug 319612: Do not resize width below the
+ // Workaround for bug 319612: Do not resize width below the
// DROP_DOWN_MIN_WIDTH. This can happen because the Shell.getSize()
// is incorrectly small on Linux.
newWidth= Math.min(Math.max(Math.max(preferedSize.x, fCurrentWidth), DROP_DOWN_MIN_WIDTH), maxWidth);
@@ -580,7 +580,7 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
shell.setSize(newWidth, newHeight);
fCurrentWidth = newWidth;
fCurrentHeight = newHeight;
-
+
Point location = shell.getLocation();
Point newLocation = location;
if (!isLeft()) {
@@ -588,7 +588,7 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
}
if (!isTop()) {
newLocation = new Point(newLocation.x, newLocation.y - (newHeight - fCurrentHeight));
- }
+ }
if (!location.equals(newLocation)) {
shell.setLocation(newLocation.x, newLocation.y);
}
@@ -610,7 +610,7 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
return (fParentComposite.getStyle() & SWT.RIGHT_TO_LEFT) == 0 &&
(fParent.getViewer().getStyle() & SWT.RIGHT) == 0;
}
-
+
/**
* Tells whether this the breadcrumb is in LTR mode or RTL mode. Or whether the breadcrumb
* is on the right-side status coolbar, which has the same effect on layout.
@@ -628,12 +628,12 @@ class BreadcrumbItemDropDown implements IBreadcrumbDropDownSite {
fShell.close();
}
}
-
+
@Override
public void notifySelection(ISelection selection) {
- fParent.getViewer().fireMenuSelection(selection);
+ fParent.getViewer().fireMenuSelection(selection);
}
-
+
@Override
public void updateSize() {
if (fShell != null && !fShell.isDisposed()) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
index 304369f20..fb83b9a8f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
@@ -75,7 +75,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
private Image fGradientBackground;
private BreadcrumbItem fSelectedItem;
-
+
/**
* Create a new <code>BreadcrumbViewer</code>.
* <p>
@@ -150,17 +150,17 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
int getStyle() {
return fStyle;
}
-
+
/**
* Configure the given drop down viewer. The given input is used for the viewers input. Clients
* must at least set the label and the content provider for the viewer.
- * @param parent the parent composite
+ * @param parent the parent composite
* @param site the site to create the drop down for
* @param path the path to show
* @return the drop down control
*/
protected abstract Control createDropDown(Composite parent, IBreadcrumbDropDownSite site, TreePath path);
-
+
/*
* @see org.eclipse.jface.viewers.Viewer#getControl()
*/
@@ -319,7 +319,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
protected void doUpdateItem(Widget widget, Object element, boolean fullMap) {
myDoUpdateItem(widget, element, fullMap);
}
-
+
private boolean myDoUpdateItem(Widget widget, Object element, boolean fullMap) {
if (widget instanceof BreadcrumbItem) {
final BreadcrumbItem item= (BreadcrumbItem) widget;
@@ -371,7 +371,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
}
return null;
}
-
+
/*
* @see org.eclipse.jface.viewers.StructuredViewer#getSelectionFromWidget()
*/
@@ -399,7 +399,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
disableRedraw();
try {
boolean layoutChanged = false;
-
+
BreadcrumbItem item= (BreadcrumbItem) doFindItem(element);
if (item == null || element != null && element.equals(getInput())) {
for (int i= 0, size= fBreadcrumbItems.size(); i < size; i++) {
@@ -409,7 +409,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
} else {
layoutChanged = refreshItem(item) || layoutChanged;
}
-
+
if (layoutChanged) {
updateSize();
fContainer.layout(true, true);
@@ -426,7 +426,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
protected void setSelectionToWidget(List l, boolean reveal) {
BreadcrumbItem focusItem= null;
- // Unselect the currently selected items, and remember the focused item.
+ // Unselect the currently selected items, and remember the focused item.
for (int i= 0, size= fBreadcrumbItems.size(); i < size; i++) {
BreadcrumbItem item= fBreadcrumbItems.get(i);
if (item.hasFocus()) {
@@ -453,8 +453,8 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
}
}
}
-
- // If there is a new selection, and it does not overlap the old selection,
+
+ // If there is a new selection, and it does not overlap the old selection,
// remove the focus marker from the old focus item.
if (fSelectedItem != null && focusItem != null) {
focusItem.setFocus(false);
@@ -590,41 +590,41 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
BreadcrumbItem last= fBreadcrumbItems.get(fBreadcrumbItems.size() - 1);
last.setIsLastItem(false);
}
-
+
int index = 0;
boolean updateLayout = false;
if (input != null) {
ITreePathContentProvider contentProvider= (ITreePathContentProvider) getContentProvider();
TreePath path = new TreePath(new Object[0]);
-
- // Top level elements need to be retrieved using getElements(), rest
+
+ // Top level elements need to be retrieved using getElements(), rest
// using getChildren().
Object[] children = contentProvider.getElements(input);
Object element = children != null && children.length != 0 ? children[0] : null;
while (element != null) {
path = path.createChildPath(element);
-
+
// All but last item are hidden if the viewer is in a vertical toolbar.
children = contentProvider.getChildren(path);
if ((getStyle() & SWT.VERTICAL) == 0 || children == null || children.length == 0) {
updateLayout = updateOrCreateItem(index++, path, element) || updateLayout;
}
-
+
if (children != null && children.length != 0) {
element = children[0];
} else {
break;
}
-
- }
+
+ }
}
-
+
BreadcrumbItem last = null;
if (index <= fBreadcrumbItems.size()) {
last = (fBreadcrumbItems.get(index - 1));
last.setIsLastItem(true);
}
-
+
while (index < fBreadcrumbItems.size()) {
updateLayout = true;
BreadcrumbItem item= fBreadcrumbItems.remove(fBreadcrumbItems.size() - 1);
@@ -646,13 +646,13 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
}
}
- /**
+ /**
* @param item Item to refresh.
* @return returns whether the item's size and layout needs to be updated.
*/
private boolean refreshItem(BreadcrumbItem item) {
boolean layoutChanged = false;
-
+
TreePath path = getTreePathFromItem(item);
ViewerLabel label = new ViewerLabel(item.getText(), item.getImage());
@@ -671,10 +671,10 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
}
return layoutChanged;
}
-
+
/**
* Creates or updates a breadcrumb item.
- * @param index the index
+ * @param index the index
* @param path the path
* @param element the element
*
@@ -693,7 +693,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
}
boolean updateLayout = false;
-
+
if (equals(element, item.getData())) {
item.setPath(path);
updateLayout = myDoUpdateItem(item, element, false);
@@ -703,7 +703,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
mapElement(element, item);
updateLayout = refreshItem(item);
}
-
+
return updateLayout;
}
@@ -864,7 +864,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
/**
* Blends c1 and c2 based in the provided ratio.
- *
+ *
* @param c1
* first color
* @param c2
@@ -880,10 +880,10 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
int b = blend(c1.blue, c2.blue, ratio);
return new RGB(r, g, b);
}
-
+
/**
* Blends two primary color components based on the provided ratio.
- *
+ *
* @param v1
* first component
* @param v2
@@ -900,7 +900,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
/*
* @see
* org.eclipse.jface.viewers.StructuredViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
- *
+ *
* @since 3.7
*/
@Override
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/IBreadcrumbDropDownSite.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/IBreadcrumbDropDownSite.java
index adea89dfd..eb1004a7b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/IBreadcrumbDropDownSite.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/IBreadcrumbDropDownSite.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -14,26 +14,26 @@ import org.eclipse.jface.viewers.ISelection;
/**
* Interface allowing breadcrumb drop-down implementors to communicate with their
- * containing breadcrumb.
- *
+ * containing breadcrumb.
+ *
* @since 3.5
*/
public interface IBreadcrumbDropDownSite {
-
+
/**
* Notifies the breadcrumb that the given selection was made in the drop-down
* viewer.
* @param selection Selection to set to breadcrumb.
*/
public void notifySelection(ISelection selection);
-
+
/**
* Notifies the breadcrumb that the drop-down viewer should be closed.
*/
public void close();
-
+
/**
- * Notifies the breadcrumb that the drop-down viewer's contents have
+ * Notifies the breadcrumb that the drop-down viewer's contents have
* changed and viewer shell should be adjusted for the new size.
*/
public void updateSize();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/TreeViewerDropDown.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/TreeViewerDropDown.java
index 365c5a400..2c3afc4a6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/TreeViewerDropDown.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/TreeViewerDropDown.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - ongoing bug fixes and enhancements
@@ -44,22 +44,22 @@ import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.progress.UIJob;
/**
- * A breadcrumb drop-down which shows a tree viewer. It implements mouse and
+ * A breadcrumb drop-down which shows a tree viewer. It implements mouse and
* key listeners to handle selection and expansion behavior of the viewer.
- * This class needs to be extended to implement
- * {@link #createTreeViewer(Composite, int, TreePath)} to instantiate the
- * concrete {@link TreeViewer} object.
- *
+ * This class needs to be extended to implement
+ * {@link #createTreeViewer(Composite, int, TreePath)} to instantiate the
+ * concrete {@link TreeViewer} object.
+ *
* @since 3.5
*/
public abstract class TreeViewerDropDown {
-
+
/**
- * Delay to control scrolling when the mouse pointer reaches the edge of
- * the tree viewer.
+ * Delay to control scrolling when the mouse pointer reaches the edge of
+ * the tree viewer.
*/
private static long MOUSE_MOVE_SCROLL_DELAY = 500;
-
+
/**
* The breadcrumb site in which the viewer is created.
*/
@@ -72,16 +72,16 @@ public abstract class TreeViewerDropDown {
/**
* Creates the viewer and installs the listeners.
- *
+ *
* @param composite Parent control of the viewer.
* @param site Breadcrumb site for the viewer.
* @param path Path to the element for which the drop-down is being opened.
* @return The control created for the viewer.
*/
public Control createDropDown(Composite composite, IBreadcrumbDropDownSite site, TreePath path) {
-
+
fDropDownSite = site;
- fDropDownViewer= createTreeViewer(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL, path);
+ fDropDownViewer= createTreeViewer(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL, path);
fDropDownViewer.addOpenListener(new IOpenListener() {
@Override
@@ -92,9 +92,9 @@ public abstract class TreeViewerDropDown {
openElement(event.getSelection());
}
});
-
+
final Tree tree = fDropDownViewer.getTree();
-
+
tree.addMouseListener(new MouseListener() {
@Override
public void mouseUp(MouseEvent e) {
@@ -123,7 +123,7 @@ public abstract class TreeViewerDropDown {
pathElements.add(0, data);
item = item.getParentItem();
}
-
+
openElement(new TreeSelection(new TreePath(pathElements.toArray())));
}
@@ -154,7 +154,7 @@ public abstract class TreeViewerDropDown {
fLastItem= (TreeItem) o;
tree.setSelection(new TreeItem[] { fLastItem });
} else if (System.currentTimeMillis() > (fLastScrollTime + MOUSE_MOVE_SCROLL_DELAY)) {
- if (e.y < tree.getItemHeight() / 4)
+ if (e.y < tree.getItemHeight() / 4)
{
// Scroll up
if (currentItem.getParentItem() == null) {
@@ -162,7 +162,7 @@ public abstract class TreeViewerDropDown {
if (index < 1) {
return;
}
-
+
fLastItem= tree.getItem(index - 1);
tree.setSelection(new TreeItem[] { fLastItem });
} else {
@@ -181,7 +181,7 @@ public abstract class TreeViewerDropDown {
if (index >= tree.getItemCount() - 1) {
return;
}
-
+
fLastItem= tree.getItem(index + 1);
tree.setSelection(new TreeItem[] { fLastItem });
} else {
@@ -211,7 +211,7 @@ public abstract class TreeViewerDropDown {
fDropDownSite.close();
return;
}
-
+
TreeItem[] selection= tree.getSelection();
if (selection.length != 1) {
return;
@@ -254,28 +254,28 @@ public abstract class TreeViewerDropDown {
}
}.schedule();
}
-
+
});
return tree;
}
-
+
/**
* Creates and returns the tree viewer.
- *
+ *
* @param composite Parent control of the viewer.
* @param style Style flags to use in creating the tree viewer.
* @param path Path to the element for which the drop-down is being opened.
* @return The newly created tree viewer.
*/
protected abstract TreeViewer createTreeViewer(Composite composite, int style, TreePath path);
-
+
/**
- * Called when the given element was selected in the viewer. It causes the
- * breadcrumb viewer to fire an opened event. If the viewer loses focus
- * as a result of the open operation, then the drop-down is closed.
+ * Called when the given element was selected in the viewer. It causes the
+ * breadcrumb viewer to fire an opened event. If the viewer loses focus
+ * as a result of the open operation, then the drop-down is closed.
* Otherwise the selected element is expanded.
- *
+ *
* @param selection The selection to open.
*/
protected void openElement(ISelection selection) {
@@ -287,7 +287,7 @@ public abstract class TreeViewerDropDown {
fDropDownSite.notifySelection(selection);
Tree tree = fDropDownViewer.getTree();
-
+
boolean treeHasFocus= !tree.isDisposed() && tree.isFocusControl();
if (DebugUIPlugin.DEBUG_TREE_VIEWER_DROPDOWN) {
@@ -323,6 +323,6 @@ public abstract class TreeViewerDropDown {
}
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java
index 4b1cf136e..84f75aff8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Wind River Systems - Fix for viewer state save/restore [188704]
+ * Wind River Systems - Fix for viewer state save/restore [188704]
* Pawel Piech (Wind River) - added support for a virtual tree model viewer (Bug 242489)
*******************************************************************************/
package org.eclipse.debug.internal.ui.viewers.model;
@@ -29,31 +29,31 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU
* Child count result.
*/
private int fCount = 0;
-
+
/**
* Other child count updates for the same content provider. Coalesced requests are
* batched together into an array.
*/
private List<ViewerUpdateMonitor> fBatchedRequests = null;
-
+
/**
- * Flag whether filtering is enabled in viewer. If filtering is enabled, then a
+ * Flag whether filtering is enabled in viewer. If filtering is enabled, then a
* children update is performed on child elements to filter them as part of the
* child count calculation.
*/
private boolean fShouldFilter = false;
-
+
/**
- * Children indexes which are currently filtered. When updating child count, also need
+ * Children indexes which are currently filtered. When updating child count, also need
* to verify that currently filtered children are still filtered.
*/
private int[] fFilteredChildren = null;
-
+
/**
* Children update used to filter children.
*/
private ChildrenUpdate fChildrenUpdate;
-
+
/**
* Constructor
* @param provider the content provider to use for the update
@@ -92,14 +92,14 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU
int endIdx = fFilteredChildren[fFilteredChildren.length - 1];
count = endIdx - startIdx + 1;
}
-
+
fChildrenUpdate = new ChildrenUpdate(getContentProvider(), getViewerInput(), getElementPath(), getElement(), startIdx, count, getElementContentProvider()) {
@Override
protected void performUpdate() {
performUpdate(true);
ChildrenCountUpdate.super.scheduleViewerUpdate();
}
-
+
@Override
protected void scheduleViewerUpdate() {
execInDisplayThread(new Runnable() {
@@ -124,8 +124,8 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU
super.scheduleViewerUpdate();
}
}
-
-
+
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.viewers.ViewerUpdateMonitor#performUpdate()
*/
@@ -142,8 +142,8 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU
if (DebugUIPlugin.DEBUG_CONTENT_PROVIDER && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
DebugUIPlugin.trace("setChildCount(" + getElement() + ", modelCount: " + fCount + " viewCount: " + viewCount + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
- // Special case for element 0 in a set of filtered elements:
- // Child 0 is automatically updated by the tree at the same time that the child count is requested. Therefore,
+ // Special case for element 0 in a set of filtered elements:
+ // Child 0 is automatically updated by the tree at the same time that the child count is requested. Therefore,
// If this child count update filtered out this element, it needs to be updated again.
if (fShouldFilter && getContentProvider().isFiltered(elementPath, 0)) {
getContentProvider().updateElement(elementPath, 0);
@@ -156,14 +156,14 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU
public void setChildCount(int numChildren) {
fCount = numChildren;
}
-
+
@Override
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("IChildrenCountUpdate: "); //$NON-NLS-1$
buf.append(getElement());
return buf.toString();
- }
+ }
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor#coalesce(org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor)
@@ -185,7 +185,7 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU
}
return false;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor#startRequest()
*/
@@ -204,7 +204,7 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU
getElementContentProvider().update(updates);
}
}
-
+
@Override
boolean containsUpdate(TreePath path) {
if (getElementPath().equals(path)) {
@@ -237,20 +237,20 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU
return path.getParentPath();
}
return path;
- }
-
+ }
+
int getCount() {
return fCount;
}
-
+
@Override
protected boolean doEquals(ViewerUpdateMonitor update) {
- return
- update instanceof ChildrenCountUpdate &&
- getViewerInput().equals(update.getViewerInput()) &&
+ return
+ update instanceof ChildrenCountUpdate &&
+ getViewerInput().equals(update.getViewerInput()) &&
getElementPath().equals(update.getElementPath());
}
-
+
@Override
protected int doHashCode() {
return getClass().hashCode() + getViewerInput().hashCode() + getElementPath().hashCode();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java
index db71f4c80..25ebff492 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Wind River Systems - Fix for viewer state save/restore [188704]
+ * Wind River Systems - Fix for viewer state save/restore [188704]
* Pawel Piech (Wind River) - added support for a virtual tree model viewer (Bug 242489)
*******************************************************************************/
package org.eclipse.debug.internal.ui.viewers.model;
@@ -19,19 +19,19 @@ import org.eclipse.jface.viewers.TreePath;
/**
* This class is public so the test suite has access - it should be default protection.
- *
- * @since 3.3
+ *
+ * @since 3.3
*/
public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpdate {
-
+
private Object[] fElements;
private int fIndex;
private int fLength;
/**
* Constructs a request to update an element
- *
- * @param provider the content provider
+ *
+ * @param provider the content provider
* @param viewerInput the current input
* @param elementPath the path to the element being update
* @param element the element
@@ -43,14 +43,14 @@ public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpda
fIndex = index;
fLength = 1;
}
-
+
public ChildrenUpdate(TreeModelContentProvider provider, Object viewerInput, TreePath elementPath, Object element, int index, int length, IElementContentProvider elementContentProvider) {
super(provider, viewerInput, elementPath, element, elementContentProvider, provider.getPresentationContext());
fIndex = index;
fLength = length;
}
-
-
+
+
protected void performUpdate(boolean updateFilterOnly) {
TreeModelContentProvider provider = getContentProvider();
TreePath elementPath = getElementPath();
@@ -94,7 +94,7 @@ public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpda
}
}
}
-
+
if (!updateFilterOnly) {
provider.getStateTracker().restorePendingStateOnUpdate(elementPath, -1, true, true, true);
}
@@ -106,14 +106,14 @@ public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpda
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.debug.ui.viewers.AsynchronousRequestMonitor#performUpdate()
*/
@Override
protected void performUpdate() {
performUpdate(false);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate#setChild(java.lang.Object, int)
*/
@@ -126,16 +126,16 @@ public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpda
}
/* (non-Javadoc)
- *
+ *
* This method is public so the test suite has access - it should be default protection.
- *
+ *
* @see org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor#coalesce(org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor)
*/
@Override
public synchronized boolean coalesce(ViewerUpdateMonitor request) {
if (request instanceof ChildrenUpdate) {
ChildrenUpdate cu = (ChildrenUpdate) request;
- if (getElement().equals(cu.getElement()) && getElementPath().equals(cu.getElementPath())) {
+ if (getElement().equals(cu.getElement()) && getElementPath().equals(cu.getElementPath())) {
int end = fIndex + fLength;
int otherStart = cu.getOffset();
int otherEnd = otherStart + cu.getLength();
@@ -153,14 +153,14 @@ public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpda
}
return false;
}
-
+
@Override
boolean containsUpdate(TreePath path) {
return getElementPath().equals(path);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate#getLength()
*/
@@ -176,7 +176,7 @@ public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpda
public int getOffset() {
return fIndex;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor#startRequest()
*/
@@ -204,37 +204,37 @@ public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpda
@Override
int getPriority() {
return 3;
- }
-
+ }
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor#getSchedulingPath()
*/
@Override
TreePath getSchedulingPath() {
return getElementPath();
- }
-
+ }
+
/**
* Sets this request's offset. Used when modifying a waiting request when
* the offset changes due to a removed element.
- *
+ *
* @param offset new offset
*/
void setOffset(int offset) {
fIndex = offset;
}
-
+
Object[] getElements() {
return fElements;
}
-
+
@Override
protected boolean doEquals(ViewerUpdateMonitor update) {
- return
+ return
update instanceof ChildrenUpdate &&
((ChildrenUpdate)update).getOffset() == getOffset() &&
((ChildrenUpdate)update).getLength() == getLength() &&
- getViewerInput().equals(update.getViewerInput()) &&
+ getViewerInput().equals(update.getViewerInput()) &&
getElementPath().equals(update.getElementPath());
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java
index 592b73664..433b8d38f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Wind River Systems - Fix for viewer state save/restore [188704]
+ * Wind River Systems - Fix for viewer state save/restore [188704]
*******************************************************************************/
package org.eclipse.debug.internal.ui.viewers.model;
@@ -28,8 +28,8 @@ public class ElementCompareRequest extends MementoUpdate implements IElementComp
private boolean fKnowsHasChildren;
private boolean fKnowsChildCount;
private boolean fCheckChildrenRealized;
-
-
+
+
/**
* @param provider the content provider to use for the update
* @param viewerInput the current input
@@ -38,15 +38,15 @@ public class ElementCompareRequest extends MementoUpdate implements IElementComp
* @param memento Memento to encode result into
* @param delta Delta to write the result comparison into.
* @param modelIndex Index of element to compare.
- * @param knowsHasChildren Flag indicating whether provider knows the has
- * children state of element.
- * @param knowsChildCount Flag indicating whether provider knows the
+ * @param knowsHasChildren Flag indicating whether provider knows the has
+ * children state of element.
+ * @param knowsChildCount Flag indicating whether provider knows the
* child count state of element.
* @param checkChildrenRealized Flag indicating if any realized children should be checked
*/
- public ElementCompareRequest(TreeModelContentProvider provider, Object viewerInput, Object element,
- TreePath elementPath, IMemento memento, ModelDelta delta, int modelIndex,
- boolean knowsHasChildren, boolean knowsChildCount, boolean checkChildrenRealized)
+ public ElementCompareRequest(TreeModelContentProvider provider, Object viewerInput, Object element,
+ TreePath elementPath, IMemento memento, ModelDelta delta, int modelIndex,
+ boolean knowsHasChildren, boolean knowsChildCount, boolean checkChildrenRealized)
{
super(provider, viewerInput, provider.getPresentationContext(), element, elementPath, memento);
fProvider = provider;
@@ -83,25 +83,25 @@ public class ElementCompareRequest extends MementoUpdate implements IElementComp
}
});
}
- }
-
+ }
+
public boolean isEqual() {
return fEqual;
}
-
+
ModelDelta getDelta() {
return fDelta;
}
-
+
int getModelIndex() {
return fModelIndex;
}
-
+
void setKnowsHasChildren(boolean hasChildren) {
fKnowsHasChildren = hasChildren;
}
-
+
boolean knowsHasChildren() {
return fKnowsHasChildren;
}
@@ -109,19 +109,19 @@ public class ElementCompareRequest extends MementoUpdate implements IElementComp
void setKnowsChildCount(boolean childCount) {
fKnowsChildCount = childCount;
}
-
+
boolean knowChildCount() {
return fKnowsChildCount;
}
void setCheckChildrenRealized(boolean checkChildrenRealized) {
- fCheckChildrenRealized = checkChildrenRealized;
+ fCheckChildrenRealized = checkChildrenRealized;
}
-
+
boolean checkChildrenRealized() {
return fCheckChildrenRealized;
}
-
+
@Override
public String toString() {
StringBuffer buf = new StringBuffer();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementMementoRequest.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementMementoRequest.java
index 6351fc3a4..6e53cf171 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementMementoRequest.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementMementoRequest.java
@@ -19,11 +19,11 @@ import org.eclipse.ui.IMemento;
/**
* Request for element memento.
- *
+ *
* @since 3.3
*/
class ElementMementoRequest extends MementoUpdate implements IElementMementoRequest {
-
+
private IElementMementoCollector fManager;
private ModelDelta fDelta;
@@ -47,7 +47,7 @@ class ElementMementoRequest extends MementoUpdate implements IElementMementoRequ
*/
@Override
public void done() {
-
+
ITreeModelViewer viewer = getContentProvider().getViewer();
if (viewer == null) return; // disposed
if (viewer.getDisplay().getThread() == Thread.currentThread()) {
@@ -60,12 +60,12 @@ class ElementMementoRequest extends MementoUpdate implements IElementMementoRequ
}
});
}
-
+
}
-
+
private void doComplete() {
if (getContentProvider().isDisposed()) return;
-
+
if (!isCanceled() && (getStatus() == null || getStatus().isOK())) {
// replace the element with a memento
fDelta.setElement(getMemento());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java
index af91ff4ea..5e207da8b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java
@@ -34,16 +34,16 @@ import org.eclipse.jface.viewers.TreePath;
public class FilterTransform {
private Node root = new Node();
-
+
class Node {
private int[] filteredIndexes = null;
private Object[] filteredElements = null;
private Map<Object, Node> children = null; // only set for parent nodes,
// indexed by child
-
+
Node() {
}
-
+
boolean addFilter(TreePath path, int childIndex, int pathIndex, Object filtered) {
if (pathIndex == path.getSegmentCount()) {
if (filteredIndexes == null) {
@@ -80,7 +80,7 @@ public class FilterTransform {
filteredElements = filt;
return true;
}
-
+
if (children == null) {
children = new HashMap<Object, Node>();
}
@@ -92,7 +92,7 @@ public class FilterTransform {
}
return node.addFilter(path, childIndex, pathIndex + 1, filtered);
}
-
+
boolean clear(TreePath path, int pathIndex) {
if (pathIndex == path.getSegmentCount()) {
return true;
@@ -109,7 +109,7 @@ public class FilterTransform {
}
return children.isEmpty() && (filteredIndexes == null || filteredIndexes.length == 0);
}
-
+
boolean clear(TreePath path, int childIndex, int pathIndex) {
if (pathIndex == path.getSegmentCount()) {
if (filteredIndexes != null) {
@@ -158,8 +158,8 @@ public class FilterTransform {
} else {
return false;
}
- }
-
+ }
+
Node find(TreePath path, int pathIndex) {
if (pathIndex == path.getSegmentCount()) {
return this;
@@ -174,7 +174,7 @@ public class FilterTransform {
}
return null;
}
-
+
int viewToModel(int childIndex) {
if (filteredIndexes == null) {
return childIndex;
@@ -185,11 +185,11 @@ public class FilterTransform {
// has asked for the model index corresponding to the 4th viewer
// index, then we want to find the 5th missing number in the
// filtered index sequence.
-
+
int count = -1; // count from 0, 1, 2...
int missingNumbers = 0; // how many numbers missing from the filtered index
int offset = 0; // offset into the filtered index
-
+
while (missingNumbers < (childIndex + 1)) {
count++;
if (offset < filteredIndexes.length) {
@@ -206,7 +206,7 @@ public class FilterTransform {
}
return count;
}
-
+
int modelToView(int childIndex) {
if (filteredIndexes == null) {
return childIndex;
@@ -222,15 +222,15 @@ public class FilterTransform {
}
}
return childIndex - offset;
- }
-
+ }
+
int modelToViewCount(int childCount) {
if (filteredIndexes == null) {
return childCount;
}
return childCount - filteredIndexes.length;
}
-
+
boolean isFiltered(int index) {
if (filteredIndexes != null) {
int location = Arrays.binarySearch(filteredIndexes, index);
@@ -238,7 +238,7 @@ public class FilterTransform {
}
return false;
}
-
+
int indexOfFilteredElement(Object element) {
if (filteredElements != null) {
for (int i = 0; i < filteredElements.length; i++) {
@@ -249,11 +249,11 @@ public class FilterTransform {
}
return -1;
}
-
+
/**
* Sets the child count for this element, trimming any filtered elements
* that were above this count.
- *
+ *
* @param childCount new child count
*/
void setModelChildCount(int childCount) {
@@ -263,7 +263,7 @@ public class FilterTransform {
// trim
if (i == 0) {
filteredIndexes = null;
- // bug 200325 - filteredElements should have the same length
+ // bug 200325 - filteredElements should have the same length
// as filteredIndexes
filteredElements = null;
return;
@@ -271,7 +271,7 @@ public class FilterTransform {
int[] temp = new int[i + 1];
System.arraycopy(filteredIndexes, 0, temp, 0, temp.length);
filteredIndexes = temp;
- // bug 200325 - filteredElements should have the same length
+ // bug 200325 - filteredElements should have the same length
// as filteredIndexes
Object[] temp2 = new Object[i + 1];
System.arraycopy(filteredElements, 0, temp2, 0, temp2.length);
@@ -281,10 +281,10 @@ public class FilterTransform {
}
}
}
-
+
/**
* Updates filter index for a removed element at the given index
- *
+ *
* @param index index at which an element was removed
*/
void removeElementFromFilters(int index) {
@@ -333,7 +333,7 @@ public class FilterTransform {
/**
* Filters the specified child of the given parent and returns
* whether the filter was added.
- *
+ *
* @param parentPath path to parent element
* @param childIndex index of filtered child relative to parent (in model coordinates)
* @param element the filtered element
@@ -343,46 +343,46 @@ public class FilterTransform {
public boolean addFilteredIndex(TreePath parentPath, int childIndex, Object element) {
return root.addFilter(parentPath, childIndex, 0, element);
}
-
+
/**
* Clears all filtered elements.
*/
public void clear() {
root = new Node();
}
-
+
/**
* Clears all filters in the subtree of the given element.
- *
+ *
* @param path element path
*/
public void clear(TreePath path) {
root.clear(path, 0);
}
-
+
/**
* Clears the given filtered index of the specified parent. I.e.
* the child still exists, but is no longer filtered.
- *
+ *
* @param parentPath parent path
* @param index index to clear
*/
public void clear(TreePath parentPath, int index) {
root.clear(parentPath, index, 0);
- }
-
+ }
+
public int indexOfFilteredElement(TreePath parentPath, Object element) {
Node parentNode = root.find(parentPath, 0);
if (parentNode == null) {
return -1;
}
- return parentNode.indexOfFilteredElement(element);
+ return parentNode.indexOfFilteredElement(element);
}
-
+
/**
* Translates and returns the given model index (raw index) into
* a view index (filtered index), or -1 if filtered.
- *
+ *
* @param parentPath path to parent element
* @param childIndex index of child element in model space
* @return the given index in view coordinates, or -1 if filtered.
@@ -394,11 +394,11 @@ public class FilterTransform {
}
return parentNode.modelToView(childIndex);
}
-
+
/**
* Translates and returns the given view index (filtered) into
* a model index (raw index).
- *
+ *
* @param parentPath path to parent element
* @param childIndex index of child element in view space
* @return the given index in model coordinates
@@ -410,10 +410,10 @@ public class FilterTransform {
}
return parentNode.viewToModel(childIndex);
}
-
+
/**
* Returns the number of children for the given parent, in the model.
- *
+ *
* @param parentPath path to parent element
* @param viewCount number of children in the view
* @return number of children in the model
@@ -427,11 +427,11 @@ public class FilterTransform {
}
return viewCount;
}
-
+
/**
* Translates and returns the given model child count (raw) into
* a view count (filtered).
- *
+ *
* @param parentPath path to parent element
* @param count child count in model space
* @return the given count in view coordinates
@@ -442,11 +442,11 @@ public class FilterTransform {
return count;
}
return parentNode.modelToViewCount(count);
- }
-
+ }
+
/**
* Returns whether the given index of the specified parent is currently filtered.
- *
+ *
* @param parentPath path to parent element
* @param index index of child element
* @return whether the child is currently filtered
@@ -458,10 +458,10 @@ public class FilterTransform {
}
return parentNode.isFiltered(index);
}
-
+
/**
* Returns filtered children of the given parent, or <code>null</code> if none.
- *
+ *
* @param parentPath Path of parent element
* @return filtered children or <code>null</code>
*/
@@ -472,10 +472,10 @@ public class FilterTransform {
}
return parentNode.filteredIndexes;
}
-
+
/**
* Clears any filters for the given parent above the given count.
- *
+ *
* @param parentPath path to parent element
* @param childCount child count
*/
@@ -485,11 +485,11 @@ public class FilterTransform {
parentNode.setModelChildCount(childCount);
}
}
-
+
/**
* The element at the given index has been removed from the parent. Update
* indexes.
- *
+ *
* @param parentPath path to parent element
* @param index index of child element in model coordinates
*/
@@ -499,11 +499,11 @@ public class FilterTransform {
parentNode.removeElementFromFilters(index);
}
}
-
+
/**
* The element has been removed from the parent. Update
* filtered indexes, in case it was a filtered object.
- *
+ *
* @param parentPath path to parent element
* @param element removed element
* @return true if element was removed
@@ -518,5 +518,5 @@ public class FilterTransform {
}
}
return false;
- }
+ }
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java
index d16ba7b2c..059f4570a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Wind River Systems - Fix for viewer state save/restore [188704]
+ * Wind River Systems - Fix for viewer state save/restore [188704]
* Pawel Piech (Wind River) - added support for a virtual tree model viewer (Bug 242489)
*******************************************************************************/
package org.eclipse.debug.internal.ui.viewers.model;
@@ -26,13 +26,13 @@ import org.eclipse.jface.viewers.TreePath;
class HasChildrenUpdate extends ViewerUpdateMonitor implements IHasChildrenUpdate {
private boolean fHasChildren = false;
-
+
private List<ViewerUpdateMonitor> fBatchedRequests = null;
-
+
/**
* Constructs a request to update an element
- *
- * @param provider the content provider
+ *
+ * @param provider the content provider
* @param viewerInput the current input
* @param elementPath the path to the element being update
* @param element the element
@@ -75,7 +75,7 @@ class HasChildrenUpdate extends ViewerUpdateMonitor implements IHasChildrenUpdat
buf.append(getElement());
return buf.toString();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor#coalesce(org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor)
*/
@@ -137,8 +137,8 @@ class HasChildrenUpdate extends ViewerUpdateMonitor implements IHasChildrenUpdat
@Override
int getPriority() {
return 1;
- }
-
+ }
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor#getSchedulingPath()
*/
@@ -149,17 +149,17 @@ class HasChildrenUpdate extends ViewerUpdateMonitor implements IHasChildrenUpdat
return path.getParentPath();
}
return path;
- }
-
+ }
+
boolean hasChildren() {
return fHasChildren;
}
-
+
@Override
protected boolean doEquals(ViewerUpdateMonitor update) {
- return
- update instanceof HasChildrenUpdate &&
- getViewerInput().equals(update.getViewerInput()) &&
+ return
+ update instanceof HasChildrenUpdate &&
+ getViewerInput().equals(update.getViewerInput()) &&
getElementPath().equals(update.getElementPath());
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/IInternalTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/IInternalTreeModelViewer.java
index 9aa4c1f62..0b66433e4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/IInternalTreeModelViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/IInternalTreeModelViewer.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - ongoing bug fixes and enhancements
@@ -22,19 +22,19 @@ import org.eclipse.swt.graphics.RGB;
/**
* This interface must be implemented by the viewer which uses the
* {@link TreeModelContentProvider} content provider. It allows the content
- * provider to update the viewer with information retrieved from the
+ * provider to update the viewer with information retrieved from the
* content, proxy, memento, and other element-based providers.
- *
+ *
* @since 3.8
*/
public interface IInternalTreeModelViewer extends ITreeModelViewer {
/**
* Returns this viewer's filters.
- *
+ *
* @return an array of viewer filters
* @see org.eclipse.jface.viewers.StructuredViewer#setFilters(ViewerFilter[])
- */
+ */
@Override
public ViewerFilter[] getFilters();
@@ -44,11 +44,11 @@ public interface IInternalTreeModelViewer extends ITreeModelViewer {
* @param index Index of the element to be revealed.
*/
public void reveal(TreePath path, int index);
-
+
/**
- * Triggers an update of the given element's state. If multiple instances
+ * Triggers an update of the given element's state. If multiple instances
* of the given element are found in the tree, they will all be updated.
- *
+ *
* @param element Element to update.
*/
public void update(Object element);
@@ -58,36 +58,36 @@ public interface IInternalTreeModelViewer extends ITreeModelViewer {
* <p>
* This method should only be called by the viewer framework.
* </p>
- *
+ *
* @param parentOrTreePath Parent object, or a tree path of the parent element.
* @param index Index at which to set the new element.
* @param element Element object.
* @noreference This method is not intended to be referenced by clients.
*/
public void replace(Object parentOrTreePath, final int index, Object element);
-
+
/**
- * Set the number of children of the given element or tree path. To set the
- * number of children of the invisible root of the tree, you can pass the
+ * Set the number of children of the given element or tree path. To set the
+ * number of children of the invisible root of the tree, you can pass the
* input object or an empty tree path.
* <p>
* This method should only be called by the viewer framework.
* </p>
- *
+ *
* @param elementOrTreePath The element, or tree path.
* @param count new value
* @noreference This method is not intended to be referenced by clients.
*/
public void setChildCount(final Object elementOrTreePath, final int count);
-
+
/**
- * Inform the viewer about whether the given element or tree path has
- * children. Avoid calling this method if the number of children has
+ * Inform the viewer about whether the given element or tree path has
+ * children. Avoid calling this method if the number of children has
* already been set.
* <p>
* This method should only be called by the viewer framework.
* </p>
- *
+ *
* @param elementOrTreePath the element, or tree path
* @param hasChildren new value.
* @noreference This method is not intended to be referenced by clients.
@@ -100,7 +100,7 @@ public interface IInternalTreeModelViewer extends ITreeModelViewer {
* <p>
* This method should only be called by the viewer framework.
* </p>
- *
+ *
* @param elementPath tree path to element to consider for expansion
* @noreference This method is not intended to be referenced by clients.
*/
@@ -118,7 +118,7 @@ public interface IInternalTreeModelViewer extends ITreeModelViewer {
* @param expanded
* <code>true</code> if the node is expanded, and
* <code>false</code> if collapsed
- *
+ *
* @noreference This method is not intended to be referenced by clients.
*/
public void setExpandedState(Object elementOrTreePath, boolean expanded);
@@ -136,7 +136,7 @@ public interface IInternalTreeModelViewer extends ITreeModelViewer {
* @param level
* non-negative level, or <code>ALL_LEVELS</code> to expand all
* levels of the tree
- *
+ *
* @noreference This method is not intended to be referenced by clients.
*/
public void expandToLevel(Object elementOrTreePath, int level);
@@ -149,7 +149,7 @@ public interface IInternalTreeModelViewer extends ITreeModelViewer {
* </p>
* @param elementOrTreePath the element, or the tree path to the element
* @noreference This method is not intended to be referenced by clients.
- */
+ */
public void remove(Object elementOrTreePath);
/**
@@ -161,7 +161,7 @@ public interface IInternalTreeModelViewer extends ITreeModelViewer {
* @param parentOrTreePath the parent element, the input element, or a tree path to the parent element
* @param index child index
* @noreference This method is not intended to be referenced by clients.
- */
+ */
public void remove(Object parentOrTreePath, final int index);
/**
@@ -172,19 +172,19 @@ public interface IInternalTreeModelViewer extends ITreeModelViewer {
* <p>
* This method should only be called by the viewer framework.
* </p>
- * @param parentOrTreePath the parent element, or the tree path to the parent
+ * @param parentOrTreePath the parent element, or the tree path to the parent
*
* @param element the element
* @param position a 0-based position relative to the model, or -1 to indicate
* the last position
* @noreference This method is not intended to be referenced by clients.
- */
+ */
public void insert(Object parentOrTreePath, Object element, int position);
/**
* Returns whether the candidate selection should override the current
* selection.
- * @param current Current selection in viewer.
+ * @param current Current selection in viewer.
* @param candidate Proposed new selection.
* @return whether new selection should override the current
*/
@@ -200,22 +200,22 @@ public interface IInternalTreeModelViewer extends ITreeModelViewer {
* <code>false</code> if collapsed
*/
public boolean getExpandedState(Object elementOrTreePath);
-
+
/**
* Returns whether the node corresponding to the given element or tree path
* has any child elements.
- *
+ *
* @param elementOrTreePath Path to element
* @return Returns whether the given element has children.
*/
public boolean getHasChildren(Object elementOrTreePath);
-
+
/**
* Returns the child count of the element at the given path. <br>
* Note: The child count may be incorrect if the element is not
* expanded in the tree.
- *
- * @param path Path to get count for.
+ *
+ * @param path Path to get count for.
* @return The child count.
*/
public int getChildCount(TreePath path);
@@ -223,98 +223,98 @@ public interface IInternalTreeModelViewer extends ITreeModelViewer {
/**
* Returns the element which is a child of the element at the
* given path, with the given index.
- *
+ *
* @param path Path to parent element.
* @param index Index of child element.
* @return Child element.
*/
public Object getChildElement(TreePath path, int index);
-
+
/**
- * Returns the tree path of the element that is at the top of the
+ * Returns the tree path of the element that is at the top of the
* viewer.
- *
- * @return the tree path of the element at the top of the
+ *
+ * @return the tree path of the element at the top of the
* viewer.
*/
public TreePath getTopElementPath();
-
- /**
+
+ /**
* Finds the index of the given element with a parent of given path.
- *
- * @param parentPath Path of parent element.
+ *
+ * @param parentPath Path of parent element.
* @param element Element to find.
- *
+ *
* @return The element's index, or -1 if not found.
*/
public int findElementIndex(TreePath parentPath, Object element);
/**
- * Returns a boolean indicating whether all the child elements of the
+ * Returns a boolean indicating whether all the child elements of the
* given parent have been realized already.
- *
+ *
* @param parentPath Path of parent element.
* @return true if all children realized
*/
public boolean getElementChildrenRealized(TreePath parentPath);
-
+
/**
* Clears the selection in the viewer, if any, without firing
* selection change notification. This is only to be used by
* the platform.
*/
public void clearSelectionQuiet();
-
+
/**
* Sets the element's display information.
* <p>
* This method should only be called by the viewer framework.
* </p>
- *
- * @param path Element path.
+ *
+ * @param path Element path.
* @param numColumns Number of columns in the data.
- * @param labels Array of labels. The array cannot to be
+ * @param labels Array of labels. The array cannot to be
* <code>null</code>, but values within the array may be.
* @param images Array of image descriptors, may be <code>null</code>.
* @param fontDatas Array of fond data objects, may be <code>null</code>.
- * @param foregrounds Array of RGB values for foreground colors, may be
+ * @param foregrounds Array of RGB values for foreground colors, may be
* <code>null</code>.
- * @param backgrounds Array of RGB values for background colors, may be
+ * @param backgrounds Array of RGB values for background colors, may be
* <code>null</code>.
* @noreference This method is not intended to be referenced by clients.
*/
- public void setElementData(TreePath path, int numColumns, String[] labels, ImageDescriptor[] images, FontData[] fontDatas, RGB[] foregrounds, RGB[] backgrounds);
+ public void setElementData(TreePath path, int numColumns, String[] labels, ImageDescriptor[] images, FontData[] fontDatas, RGB[] foregrounds, RGB[] backgrounds);
/**
* Returns identifiers of the visible columns in this viewer, or <code>null</code>
* if there is currently no column presentation.
- *
+ *
* @return visible columns or <code>null</code>
*/
- public String[] getVisibleColumns();
-
+ public String[] getVisibleColumns();
+
/**
* Sets the element check state data.
- *
+ *
* @param path Path of element to check.
* @param checked if true, item will be checked
* @param grayed if true item will be grayed
*/
- public void setElementChecked(TreePath path, boolean checked, boolean grayed);
+ public void setElementChecked(TreePath path, boolean checked, boolean grayed);
/**
* Retrieves the element check state.
- *
+ *
* @param path Path of element to return check state for.
* @return the element checked state
*/
- public boolean getElementChecked(TreePath path);
+ public boolean getElementChecked(TreePath path);
/**
* Retrieves the element's check box grayed state.
- *
+ *
* @param path Path of element to return grayed state for.
* @return the element grayed state
*/
- public boolean getElementGrayed(TreePath path);
+ public boolean getElementGrayed(TreePath path);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ILabelUpdateListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ILabelUpdateListener.java
index a53be350f..b296064a0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ILabelUpdateListener.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ILabelUpdateListener.java
@@ -14,7 +14,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
/**
* Notified of label updates.
- *
+ *
* @since 3.3
*/
public interface ILabelUpdateListener {
@@ -23,25 +23,25 @@ public interface ILabelUpdateListener {
* Notification that a sequence of viewer updates are starting.
*/
public void labelUpdatesBegin();
-
+
/**
* Notification that viewer updates are complete. Corresponds to
* a <code>viewerUpdatesBegin()</code> notification.
*/
public void labelUpdatesComplete();
-
+
/**
* Notification that a specific update has started within
* a sequence of updates.
- *
+ *
* @param update update
*/
public void labelUpdateStarted(ILabelUpdate update);
-
+
/**
* Notification that a specific update has completed within a
* sequence of updates.
- *
+ *
* @param update update
*/
public void labelUpdateComplete(ILabelUpdate update);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java
index 4c995ec2a..cf2d9bcf2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -21,65 +21,65 @@ import org.eclipse.jface.viewers.ILazyTreePathContentProvider;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.Viewer;
-/**
+/**
* {@link TreeModelViewer} content provider interface.
- *
+ *
* @since 3.5
*/
public interface ITreeModelContentProvider extends ILazyTreePathContentProvider {
/**
* Bit-mask which allows all possible model delta flags.
- *
+ *
* @since 3.6
* @see #setModelDeltaMask(int)
*/
- public static final int ALL_MODEL_DELTA_FLAGS = ~0;
+ public static final int ALL_MODEL_DELTA_FLAGS = ~0;
/**
- * Bit-mask which allows only flags which control selection and expansion.
- *
+ * Bit-mask which allows only flags which control selection and expansion.
+ *
* @since 3.6
* @see #setModelDeltaMask(int)
*/
- public static final int CONTROL_MODEL_DELTA_FLAGS =
+ public static final int CONTROL_MODEL_DELTA_FLAGS =
IModelDelta.EXPAND | IModelDelta.COLLAPSE | IModelDelta.SELECT | IModelDelta.REVEAL | IModelDelta.FORCE;
/**
* Bit-mask which allows only flags which update viewer's information
* about the model.
- *
+ *
* @since 3.6
* @see #setModelDeltaMask(int)
*/
- public static final int UPDATE_MODEL_DELTA_FLAGS =
+ public static final int UPDATE_MODEL_DELTA_FLAGS =
IModelDelta.ADDED | IModelDelta.CONTENT | IModelDelta.INSERTED | IModelDelta.INSTALL | IModelDelta.REMOVED |
IModelDelta.REPLACED | IModelDelta.STATE | IModelDelta.UNINSTALL;
/**
* Translates and returns the given child index from the viewer coordinate
* space to the model coordinate space.
- *
+ *
* @param parentPath path to parent element
* @param index index of child element in viewer (filtered) space
* @return index of child element in model (raw) space
*/
public int viewToModelIndex(TreePath parentPath, int index);
-
+
/**
* Translates and returns the given child count from the viewer coordinate
* space to the model coordinate space.
- *
+ *
* @param parentPath path to parent element
* @param count number of child elements in viewer (filtered) space
* @return number of child elements in model (raw) space
*/
public int viewToModelCount(TreePath parentPath, int count);
-
+
/**
* Translates and returns the given child index from the model coordinate
* space to the viewer coordinate space.
- *
+ *
* @param parentPath path to parent element
* @param index index of child element in model (raw) space
* @return index of child element in viewer (filtered) space or -1 if filtered
@@ -89,31 +89,31 @@ public interface ITreeModelContentProvider extends ILazyTreePathContentProvider
/**
* Returns whether the children of given element should be filtered.
* <p>This method is used to determine whether any of the registered filters
- * that extend {@link TreeModelViewerFilter} are applicable to the given
- * element. If so, then children of given element should be filtered
- * prior to populating them in the viewer.
- *
+ * that extend {@link TreeModelViewerFilter} are applicable to the given
+ * element. If so, then children of given element should be filtered
+ * prior to populating them in the viewer.
+ *
* @param parentElement
- * the parent element
- * @return whether there are any {@link TreeModelViewerFilter} filters
+ * the parent element
+ * @return whether there are any {@link TreeModelViewerFilter} filters
* applicable to given parent
*/
- public boolean areTreeModelViewerFiltersApplicable(Object parentElement);
-
+ public boolean areTreeModelViewerFiltersApplicable(Object parentElement);
+
/**
* Returns whether the given element is filtered.
- *
+ *
* @param parentElementOrTreePath
* the parent element or path
* @param element
* the child element
* @return whether to filter the element
*/
- public boolean shouldFilter(Object parentElementOrTreePath, Object element);
+ public boolean shouldFilter(Object parentElementOrTreePath, Object element);
/**
* Notification the given element is being unmapped.
- *
+ *
* @param path Path to unmap
*/
public void unmapPath(TreePath path);
@@ -122,27 +122,27 @@ public interface ITreeModelContentProvider extends ILazyTreePathContentProvider
* Sets the bit mask which will be used to filter the {@link IModelDelta}
* coming from the model. Any delta flags which are hidden by the mask
* will be ignored.
- *
+ *
* @param mask for <code>IModelDelta</code> flags
- *
+ *
* @since 3.6
*/
public void setModelDeltaMask(int mask);
-
+
/**
* Returns the current model delta mask.
- *
+ *
* @return bit mask used to filter model delta events.
- *
+ *
* @see #setModelDeltaMask(int)
* @since 3.6
*/
public int getModelDeltaMask();
-
+
/**
* Translates and returns the given child count from the model coordinate
* space to the viewer coordinate space.
- *
+ *
* @param parentPath path to parent element
* @param count child count element in model (raw) space
* @return child count in viewer (filtered) space
@@ -154,27 +154,27 @@ public interface ITreeModelContentProvider extends ILazyTreePathContentProvider
* @param listener Listener to add
*/
public void addViewerUpdateListener(IViewerUpdateListener listener);
-
+
/**
* Removes the specified listener from update notifications.
* @param listener Listener to remove
*/
public void removeViewerUpdateListener(IViewerUpdateListener listener);
-
+
/**
* Registers the given listener for model delta notification.
* This listener is called immediately after the viewer processes
- * the delta.
+ * the delta.
* @param listener Listener to add
*/
public void addModelChangedListener(IModelChangedListener listener);
-
+
/**
* Removes the given listener from model delta notification.
* @param listener Listener to remove
*/
public void removeModelChangedListener(IModelChangedListener listener);
-
+
/**
* Causes the content provider to save the expansion and selection state
* of given element. The state is then restored as the tree is lazily
@@ -200,46 +200,46 @@ public interface ITreeModelContentProvider extends ILazyTreePathContentProvider
/**
* Instructs the content provider to process the given model delta. This
* mechanism can be used to control the view's layout (expanding, selecting
- * , etc.)
- *
+ * , etc.)
+ *
* @param delta The model delta to process.
- * @param mask Mask that can be used to suppress processing of some of the
+ * @param mask Mask that can be used to suppress processing of some of the
* delta flags
- *
+ *
* @since 3.6
*/
public void updateModel(IModelDelta delta, int mask);
/**
- * Instructs the content provider to cancel any pending state changes
+ * Instructs the content provider to cancel any pending state changes
* (i.e. SELECT, REVEAL, EXPAND, COLLAPSE) for the given path. Pending
- * state changes are changes the the viewer plans to re-apply to the
+ * state changes are changes the the viewer plans to re-apply to the
* viewer following a refresh. If the user changes viewer state while
- * the viewer is being refreshed, user's change should override the
- * previous state.
- *
+ * the viewer is being refreshed, user's change should override the
+ * previous state.
+ *
* @param path Path of the element for which to cancel pending changes.
* @param flags Flags indicating the changes to cancel.
*/
public void cancelRestore(TreePath path, int flags);
-
+
/**
- * Notifies the content provider that a client called {@link Viewer#setInput(Object)},
- * and the viewer input is changed.
- * This method is guaranteed to be called after {@link IContentProvider#inputChanged(Viewer, Object, Object)}
- *
+ * Notifies the content provider that a client called {@link Viewer#setInput(Object)},
+ * and the viewer input is changed.
+ * This method is guaranteed to be called after {@link IContentProvider#inputChanged(Viewer, Object, Object)}
+ *
* @param viewer The viewer that uses this content provider.
* @param oldInput Old input object.
* @param newInput New input object.
- *
+ *
* @since 3.8
*/
public void postInputChanged(IInternalTreeModelViewer viewer, Object oldInput, Object newInput);
-
+
/**
- * Notifies the receiver that the given element has had its
+ * Notifies the receiver that the given element has had its
* checked state modified in the viewer.
- *
+ *
* @param path Path of the element that had its checked state changed
* @param checked The new checked state of the element
* @return false if the check state should not change
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelLabelProvider.java
index fe57a3bd1..190a0a8f7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelLabelProvider.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -20,10 +20,10 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.RGB;
/**
- * {@link InternalTreeModelViewer} label provider interface. In addition to
+ * {@link InternalTreeModelViewer} label provider interface. In addition to
* implementing this interface, the label provider for the TreeModelViewer
- * must also extend CellLabelProvider.
- *
+ * must also extend CellLabelProvider.
+ *
* @since 3.5
*/
public interface ITreeModelLabelProvider extends IBaseLabelProvider {
@@ -31,17 +31,17 @@ public interface ITreeModelLabelProvider extends IBaseLabelProvider {
/**
* Requests an label update label of the given element.
* @param elementPath Element to update.
- * @return true if element label provider is found and update will
+ * @return true if element label provider is found and update will
* be requested.
*/
public boolean update(TreePath elementPath);
-
+
/**
* Registers the specified listener for view label update notifications.
* @param listener Listener to add
*/
public void addLabelUpdateListener(ILabelUpdateListener listener);
-
+
/**
* Removes the specified listener from view label update notifications.
* @param listener Listener to remove
@@ -51,25 +51,25 @@ public interface ITreeModelLabelProvider extends IBaseLabelProvider {
/**
* Returns an image for the given image descriptor or <code>null</code>. Adds the image
* to a cache of images if it does not already exist.
- *
+ *
* @param descriptor image descriptor or <code>null</code>
* @return image or <code>null</code>
*/
public Image getImage(ImageDescriptor descriptor);
-
+
/**
- * Returns a font for the given font data or <code>null</code>. Adds the font to the font
+ * Returns a font for the given font data or <code>null</code>. Adds the font to the font
* cache if not yet created.
- *
+ *
* @param fontData font data or <code>null</code>
* @return font font or <code>null</code>
*/
public Font getFont(FontData fontData);
/**
- * Returns a color for the given RGB or <code>null</code>. Adds the color to the color
+ * Returns a color for the given RGB or <code>null</code>. Adds the color to the color
* cache if not yet created.
- *
+ *
* @param rgb RGB or <code>null</code>
* @return color or <code>null</code>
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelViewer.java
index 8d064cb27..aa37b49c6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelViewer.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -12,10 +12,10 @@
package org.eclipse.debug.internal.ui.viewers.model;
/**
- * This interface was moved to the {@link org.eclipse.debug.internal.ui.viewers.model.provisional}
- * package. This stub was left for backward compatibility for packages that
+ * This interface was moved to the {@link org.eclipse.debug.internal.ui.viewers.model.provisional}
+ * package. This stub was left for backward compatibility for packages that
* referenced this internal interface.
- *
+ *
* @deprecated This internal interface was replaced by {@link org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer}.
*/
@Deprecated
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java
index 38f00cd75..0aa7c1160 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java
@@ -72,58 +72,58 @@ import org.eclipse.ui.IMemento;
/**
* A tree viewer that displays a model.
- *
+ *
* @since 3.3
*/
@SuppressWarnings("deprecation")
public class InternalTreeModelViewer extends TreeViewer implements IInternalTreeModelViewer, org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer
{
-
+
private final IPresentationContext fContext;
-
+
/**
* Current column presentation or <code>null</code>
*/
- private IColumnPresentation fColumnPresentation = null;
-
+ private IColumnPresentation fColumnPresentation = null;
+
/**
* Map of columns presentation id to its visible columns id's (String[])
* When a columns presentation is not in the map, default settings are used.
*/
private final Map<String, String[]> fVisibleColumns = new HashMap<String, String[]>();
-
+
/**
* Map of column id's to persisted sizes
*/
private final Map<Object, Integer> fColumnSizes = new HashMap<Object, Integer>();
-
+
/**
* Map of column presentation id's to an array of integers representing the column order
* for that presentation, or <code>null</code> if default.
*/
private final Map<String, int[]> fColumnOrder = new HashMap<String, int[]>();
-
+
/**
* Map of column presentation id to whether columns should be displayed
- * for that presentation (the user can toggle columns on/off when a
+ * for that presentation (the user can toggle columns on/off when a
* presentation is optional.
*/
private final Map<String, Boolean> fShowColumns = new HashMap<String, Boolean>();
-
+
/**
- * Item's tree path cache
+ * Item's tree path cache
*/
private static final String TREE_PATH_KEY = "TREE_PATH_KEY"; //$NON-NLS-1$
-
+
/**
- * Memento type for column sizes. Sizes are keyed by column presentation id
+ * Memento type for column sizes. Sizes are keyed by column presentation id
*/
private static final String COLUMN_SIZES = "COLUMN_SIZES"; //$NON-NLS-1$
/**
* Memento type for the column order for a presentation context.
* A memento is created for each column presentation
*/
- private static final String COLUMN_ORDER = "COLUMN_ORDER"; //$NON-NLS-1$
+ private static final String COLUMN_ORDER = "COLUMN_ORDER"; //$NON-NLS-1$
/**
* Memento type for the visible columns for a presentation context.
* A memento is created for each column presentation keyed by column number
@@ -133,7 +133,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
* Memento type for whether columns are visible for a presentation context.
* Booleans are keyed by column presentation id
*/
- private static final String SHOW_COLUMNS = "SHOW_COLUMNS"; //$NON-NLS-1$
+ private static final String SHOW_COLUMNS = "SHOW_COLUMNS"; //$NON-NLS-1$
/**
* Memento key for the number of visible columns in a VISIBLE_COLUMNS memento
* or for the width of a column
@@ -142,21 +142,21 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
/**
* Memento key prefix a visible column
*/
- private static final String COLUMN = "COLUMN"; //$NON-NLS-1$
-
+ private static final String COLUMN = "COLUMN"; //$NON-NLS-1$
+
/**
* True while performing an insert... we allow insert with filters
*/
private boolean fInserting = false;
-
+
/**
* Whether to notify the content provider when an element is unmapped
*/
private boolean fNotifyUnmap = true;
-
+
/**
* Persist column sizes when they change.
- *
+ *
* @since 3.2
*/
class ColumnListener implements ControlListener {
@@ -176,14 +176,14 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
persistColumnSizes();
}
}
-
- private final ColumnListener fListener = new ColumnListener();
+
+ private final ColumnListener fListener = new ColumnListener();
/**
* Proxy to cell modifier/editor support
*/
class CellModifierProxy implements ICellModifier {
-
+
private ICellModifier fModifier;
/* (non-Javadoc)
@@ -236,7 +236,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
fModifier.modify(element, property, value);
}
}
-
+
/**
* Clears client's column editor and cell editors
*/
@@ -260,12 +260,12 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
}
}
-
+
}
-
+
private final CellModifierProxy fCellModifier;
-
-
+
+
/**
* @param parent the parent composite
* @param style the widget style bits
@@ -281,9 +281,9 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
fContext = context;
setContentProvider(createContentProvider());
setLabelProvider(createLabelProvider());
-
+
// A pop-up viewer is transient and does not automatically expand
- // and select elements up when requested by the model
+ // and select elements up when requested by the model
if ((style & SWT.POP_UP) != 0) {
((ITreeModelContentProvider)getContentProvider()).setModelDeltaMask(
~ITreeModelContentProvider.CONTROL_MODEL_DELTA_FLAGS);
@@ -292,7 +292,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
context.setProperty(ICheckUpdate.PROP_CHECK, Boolean.TRUE);
}
}
-
+
/**
* @return content provider for this tree viewer
*/
@@ -300,7 +300,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
{
return new TreeModelContentProvider();
}
-
+
/**
* @return label provider for this tree viewer
*/
@@ -308,12 +308,12 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
{
return new TreeModelLabelProvider(this);
}
-
+
/* (non-Javadoc)
- *
+ *
* Workaround for bug 159461: when an item is cleared it's label is cleared. To avoid
* flashing, restore its label to its previous value.
- *
+ *
* @see org.eclipse.jface.viewers.TreeViewer#hookControl(org.eclipse.swt.widgets.Control)
*/
@Override
@@ -329,9 +329,9 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
});
super.hookControl(control);
}
-
+
/**
- * @param item the item
+ * @param item the item
*/
private void preserveItem(TreeItem item) {
Object[] labels = (Object[]) item.getData(PREV_LABEL_KEY);
@@ -378,8 +378,8 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.StructuredViewer#handleInvalidSelection
- *
- * Override the default handler for invalid selection to allow model
+ *
+ * Override the default handler for invalid selection to allow model
* selection policy to select the new selection.
*/
@Override
@@ -402,7 +402,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
super.handleInvalidSelection(selection, newSelection);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ContentViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
@@ -413,20 +413,20 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
fColumnPresentation.dispose();
}
fCellModifier.clear();
-
+
super.handleDispose(event);
}
-
+
/**
* Returns this viewer's presentation context.
- *
+ *
* @return presentation context
*/
@Override
public IPresentationContext getPresentationContext() {
return fContext;
}
-
+
@Override
protected void unmapElement(Object element, Widget widget) {
if (fNotifyUnmap) {
@@ -435,7 +435,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
super.unmapElement(element, widget);
}
-
+
@Override
protected void associate(Object element, Item item) {
// see AbstractTreeViewer.associate(...)
@@ -455,9 +455,9 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
/* (non-Javadoc)
- *
+ *
* We need tree paths when disposed/unmapped in any order so cache the tree path.
- *
+ *
* @see org.eclipse.jface.viewers.TreeViewer#mapElement(java.lang.Object, org.eclipse.swt.widgets.Widget)
*/
@Override
@@ -469,11 +469,11 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
widget.setData(TREE_PATH_KEY, TreeModelContentProvider.EMPTY_TREE_PATH);
}
}
-
+
/* (non-Javadoc)
- *
+ *
* Override because we allow inserting with filters present.
- *
+ *
* @see org.eclipse.jface.viewers.AbstractTreeViewer#insert(java.lang.Object, java.lang.Object, int)
*/
@Override
@@ -485,11 +485,11 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
fInserting = false;
}
}
-
+
/* (non-Javadoc)
- *
+ *
* Override because we allow inserting with filters present.
- *
+ *
* @see org.eclipse.jface.viewers.StructuredViewer#hasFilters()
*/
@Override
@@ -499,17 +499,17 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
return super.hasFilters();
}
-
+
@Override
protected void unmapAllElements() {
- // Do nothing when called from StructuredViewer.setInput(), to avoid
+ // Do nothing when called from StructuredViewer.setInput(), to avoid
// clearing elements before viewer state is saved.
// Bug 326917
if (getControl().isDisposed()) {
unmapAllElements();
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.AbstractTreeViewer#inputChanged(java.lang.Object, java.lang.Object)
*/
@@ -521,13 +521,13 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
super.unmapAllElements();
((ITreeModelContentProvider)getContentProvider()).postInputChanged(this, oldInput, input);
super.inputChanged(input, oldInput);
-
- resetColumns(input);
+
+ resetColumns(input);
}
/**
* Configures the columns for the given viewer input.
- *
+ *
* @param input the viewer input
*/
protected void resetColumns(Object input) {
@@ -562,8 +562,8 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
}
}
- }
-
+ }
+
/**
* Configures the columns based on the current settings.
*/
@@ -573,16 +573,16 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
if (isShowColumns(fColumnPresentation.getId())) {
build = fColumnPresentation;
}
- buildColumns(build);
+ buildColumns(build);
} else {
// get rid of columns
buildColumns(null);
}
}
-
+
/**
* Toggles columns on/off for the current column presentation, if any.
- *
+ *
* @param show whether to show columns if the current input supports
* columns
*/
@@ -598,7 +598,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
refreshColumns();
}
-
+
/**
* Resets any persisted column size for the given columns
* @param columnIds the identifiers of the columns to reset
@@ -608,11 +608,11 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
fColumnSizes.remove(columnIds[i]);
}
}
-
+
/**
* Sets the id's of visible columns, or <code>null</code> to set default columns.
* Only affects the current column presentation.
- *
+ *
* @param ids visible columns
*/
public void setVisibleColumns(String[] ids) {
@@ -641,12 +641,12 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
presentationContext.setColumns(getVisibleColumns());
refreshColumns();
}
- }
+ }
@Override
protected void internalRefresh(Object element, boolean updateLabels) {
- ITreeModelContentProvider contentProvider = (ITreeModelContentProvider)getContentProvider();
-
+ ITreeModelContentProvider contentProvider = (ITreeModelContentProvider)getContentProvider();
+
if (element == null) {
internalRefresh(getControl(), getRoot(), true, updateLabels);
contentProvider.preserveState(TreePath.EMPTY);
@@ -664,7 +664,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
super.internalRefresh(element, updateLabels);
}
-
+
/**
* Refreshes the columns in the view, based on the viewer input.
*/
@@ -672,11 +672,11 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
configureColumns();
refresh();
}
-
+
/**
* Returns whether columns are being displayed currently.
- *
- * @return if columns are being shown
+ *
+ * @return if columns are being shown
*/
public boolean isShowColumns() {
if (fColumnPresentation != null) {
@@ -684,29 +684,29 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
return false;
}
-
+
/**
* Returns whether columns can be toggled on/off for the current input.
- *
+ *
* @return whether columns can be toggled on/off for the current input
*/
public boolean canToggleColumns() {
return fColumnPresentation != null && fColumnPresentation.isOptional();
}
-
+
protected boolean isShowColumns(String columnPresentationId) {
Boolean bool = fShowColumns.get(columnPresentationId);
if (bool == null) {
return true;
}
return bool.booleanValue();
- }
-
+ }
+
/**
* Creates new columns for the given presentation.
- *
+ *
* TODO: does this need to be asynchronous?
- *
+ *
* @param presentation the column presentation to build from
*/
protected void buildColumns(IColumnPresentation presentation) {
@@ -722,7 +722,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
columns[i].dispose();
}
PresentationContext presentationContext = (PresentationContext) getPresentationContext();
- if (presentation != null) {
+ if (presentation != null) {
for (int i = 0; i < visibleColumnIds.length; i++) {
String id = visibleColumnIds[i];
String header = presentation.getHeader(id);
@@ -753,13 +753,13 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
setCellModifier(null);
setColumnProperties(null);
}
-
+
int treeWidgetWidth = tree.getSize().x;
int avg = treeWidgetWidth;
if (visibleColumnIds != null) {
avg /= visibleColumnIds.length;
}
-
+
if (avg == 0) {
tree.addPaintListener(new PaintListener() {
@Override
@@ -784,7 +784,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
for (int i = 0; i < columns.length; i++) {
TreeColumn treeColumn = columns[i];
Object colData = treeColumn.getData();
- String columnId = colData instanceof String ? (String) colData : null;
+ String columnId = colData instanceof String ? (String) colData : null;
Integer width = fColumnSizes.get(colData);
if (width == null) {
int ans = getInitialColumnWidth(columnId, treeWidgetWidth, visibleColumnIds);
@@ -798,22 +798,22 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
treeColumn.addControlListener(fListener);
}
- }
-
+ }
+
/**
* Returns the current column presentation for this viewer, or <code>null</code>
* if none.
- *
+ *
* @return column presentation or <code>null</code>
*/
public IColumnPresentation getColumnPresentation() {
return fColumnPresentation;
}
-
+
/**
* Returns identifiers of the visible columns in this viewer, or <code>null</code>
* if there is currently no column presentation.
- *
+ *
* @return visible columns or <code>null</code>
*/
@Override
@@ -833,7 +833,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
columnAvailable = true;
}
}
-
+
if (!columnAvailable || presentation.getHeader(columns[i]) == null) {
// We found a column ID which is not in current list of available column IDs.
// Or the presentation cannot return a header title for the given column.
@@ -849,14 +849,14 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
}
return null;
- }
-
+ }
+
/**
* Returns initial column width of a given column, or -1
* @param columnId column Id
* @param treeWidgetWidth tree widget width
* @param visibleColumnIds visible columns
- *
+ *
* @return column width
*/
public int getInitialColumnWidth(String columnId, int treeWidgetWidth, String[] visibleColumnIds) {
@@ -873,7 +873,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
/**
* Persists column sizes in cache
*/
- protected void persistColumnSizes() {
+ protected void persistColumnSizes() {
Tree tree = getTree();
TreeColumn[] columns = tree.getColumns();
for (int i = 0; i < columns.length; i++) {
@@ -882,7 +882,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
fColumnSizes.put(id, Integer.valueOf(treeColumn.getWidth()));
}
}
-
+
/**
* Persists column ordering
*/
@@ -904,10 +904,10 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
fColumnOrder.remove(presentation.getId());
}
}
-
+
/**
* Save viewer state into the given memento.
- *
+ *
* @param memento the {@link IMemento} to save to
*/
public void saveState(IMemento memento) {
@@ -921,7 +921,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
for (Entry<String, Boolean> entry : fShowColumns.entrySet()) {
IMemento sizes = memento.createChild(SHOW_COLUMNS, entry.getKey());
sizes.putString(SHOW_COLUMNS, entry.getValue().toString());
- }
+ }
}
if (!fVisibleColumns.isEmpty()) {
for (Entry<String, String[]> entry : fVisibleColumns.entrySet()) {
@@ -950,13 +950,13 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
if (context instanceof PresentationContext) {
PresentationContext pc = (PresentationContext) context;
pc.saveProperites(memento);
-
+
}
- }
-
+ }
+
/**
* Initializes viewer state from the memento
- *
+ *
* @param memento the {@link IMemento} to read from
*/
public void initState(IMemento memento) {
@@ -1014,7 +1014,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
pc.initProperties(memento);
}
}
-
+
/**
* Returns whether the candidate selection should override the current
* selection.
@@ -1035,9 +1035,9 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
/* (non-Javadoc)
- *
+ *
* Consider selection policy
- *
+ *
* @see org.eclipse.jface.viewers.StructuredViewer#setSelection(org.eclipse.jface.viewers.ISelection, boolean)
*/
@Override
@@ -1047,7 +1047,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
super.setSelection(selection, reveal);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer#setSelection(org.eclipse.jface.viewers.ISelection, boolean, boolean)
@@ -1056,7 +1056,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
public void setSelection(ISelection selection, boolean reveal, boolean force) {
trySelection(selection, reveal, force);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer#trySelection(org.eclipse.jface.viewers.ISelection, boolean, boolean)
*/
@@ -1070,17 +1070,17 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
/**
* Registers the specified listener for view update notifications.
- *
+ *
* @param listener listener
*/
@Override
public void addViewerUpdateListener(IViewerUpdateListener listener) {
((ITreeModelContentProvider)getContentProvider()).addViewerUpdateListener(listener);
}
-
+
/**
* Removes the specified listener from update notifications.
- *
+ *
* @param listener listener
*/
@Override
@@ -1090,20 +1090,20 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
cp.removeViewerUpdateListener(listener);
}
}
-
+
/**
* Registers the given listener for model delta notification.
- *
+ *
* @param listener model delta listener
*/
@Override
public void addModelChangedListener(IModelChangedListener listener) {
- ((ITreeModelContentProvider)getContentProvider()).addModelChangedListener(listener);
+ ((ITreeModelContentProvider)getContentProvider()).addModelChangedListener(listener);
}
-
+
/**
* Unregisters the given listener from model delta notification.
- *
+ *
* @param listener model delta listener
*/
@Override
@@ -1118,7 +1118,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
public void addStateUpdateListener(IStateUpdateListener listener) {
((ITreeModelContentProvider)getContentProvider()).addStateUpdateListener(listener);
}
-
+
@Override
public void removeStateUpdateListener(IStateUpdateListener listener) {
ITreeModelContentProvider cp = (ITreeModelContentProvider)getContentProvider();
@@ -1126,7 +1126,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
cp.removeStateUpdateListener(listener);
}
}
-
+
/*
* (non-Javadoc) Method declared in AbstractTreeViewer.
*/
@@ -1140,13 +1140,13 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
unmapElement(element, treeItem);
return;
}
-
+
if ( !((ITreeModelLabelProvider)getLabelProvider()).update(getTreePathFromItem(item)) ) {
if (element instanceof String) {
item.setData(PREV_LABEL_KEY, new String[] { (String)element } );
- }
+ }
}
-
+
// As it is possible for user code to run the event
// loop check here.
@@ -1154,23 +1154,23 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
unmapElement(element, item);
}
}
-
+
@Override
public void addLabelUpdateListener(ILabelUpdateListener listener) {
((ITreeModelLabelProvider)getLabelProvider()).addLabelUpdateListener(listener);
}
-
+
@Override
public void removeLabelUpdateListener(ILabelUpdateListener listener) {
if (!getControl().isDisposed()) {
((ITreeModelLabelProvider)getLabelProvider()).removeLabelUpdateListener(listener);
}
}
-
+
/**
* Returns the item for the element at the given tree path or <code>null</code>
* if none.
- *
+ *
* @param path tree path
* @return item or <code>null</code>
*/
@@ -1189,12 +1189,12 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
return null;
}
-
+
@Override
public Item[] getChildren(Widget widget) {
return super.getChildren(widget);
}
-
+
/**
* Returns the tree path for the given item.
* @param item the item to compute the {@link TreePath} for
@@ -1203,17 +1203,17 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
@Override
protected TreePath getTreePathFromItem(Item item) {
return super.getTreePathFromItem(item);
- }
+ }
-//**************************************************************************
+//**************************************************************************
// These methods were copied from TreeViewer as a workaround for bug 183463:
// Expanded nodes in tree viewer flash on refresh
-
+
/*
* (non-Javadoc)
- *
+ *
* workaround for bug 183463
- *
+ *
* @see org.eclipse.jface.viewers.AbstractTreeViewer#internalRefreshStruct(org.eclipse.swt.widgets.Widget,
* java.lang.Object, boolean)
*/
@@ -1241,8 +1241,8 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
}
virtualRefreshExpandedItems(parent, widget, element, index);
- }
-
+ }
+
/**
* Traverses the visible (expanded) part of the tree and updates child
* counts.
@@ -1276,10 +1276,10 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
virtualRefreshExpandedItems(widget, item, data, i);
}
}
-
+
/**
* workaround for bug 183463
- *
+ *
* Update the child count
* @param widget the widget
* @param currentChildCount the current child count
@@ -1294,7 +1294,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
((ILazyTreePathContentProvider) getContentProvider())
.updateChildCount(treePath, currentChildCount);
}
-
+
/**
* Update the widget at index.
* <p>
@@ -1321,11 +1321,11 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
((ILazyTreePathContentProvider) getContentProvider())
.updateElement(treePath, index);
- }
-
-//**************************************************************************
+ }
+
+//**************************************************************************
// Another couple of methods copied from TreeViewer to workaround the UI bug 266189.
-//
+//
@Override
protected void createChildren(Widget widget) {
Object element = widget.getData();
@@ -1375,7 +1375,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
/**
* Performs auto expand on an element at the specified path if the auto expand
* level dictates the element should be expanded.
- *
+ *
* @param elementPath tree path to element to consider for expansion
*/
@Override
@@ -1417,7 +1417,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
return true;
}
-
+
@Override
public Display getDisplay() {
Control control = getControl();
@@ -1428,12 +1428,12 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
protected static final String[] STATE_PROPERTIES = new String[]{ IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE };
-
+
@Override
public void update(Object element) {
update(element, STATE_PROPERTIES);
}
-
+
/**
* Label data cache keys
* TODO: workaround for bug 159461
@@ -1448,11 +1448,11 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
@Override
public void setElementData(TreePath path, int numColumns, String[] labels, ImageDescriptor[] imageDescriptors,
- FontData[] fontDatas, RGB[] _foregrounds, RGB[] _backgrounds)
+ FontData[] fontDatas, RGB[] _foregrounds, RGB[] _backgrounds)
{
Widget widget = findItem(path);
String[] columnIds = getVisibleColumns();
-
+
if (widget != null && widget instanceof TreeItem && !widget.isDisposed()) {
TreeItem item = (TreeItem)widget;
/*Object data = item.getData();
@@ -1460,13 +1460,13 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
item.clearAll(false);
item.setData(data);
item.setItemCount(itemCount);*/
-
+
for (int i=0; i<numColumns; i++){
// text might be null if the launch has been terminated
item.setText(i,(labels[i] == null ? IInternalDebugCoreConstants.EMPTY_STRING : labels[i]));
}
item.setData(PREV_LABEL_KEY, labels);
-
+
if (imageDescriptors == null) {
for (int i=0; i<numColumns; i++){
item.setImage(i,null);
@@ -1484,8 +1484,8 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
item.setData(PREV_IMAGE_KEY, images);
}
-
- if (_foregrounds == null) {
+
+ if (_foregrounds == null) {
for (int i=0; i<numColumns; i++){
item.setForeground(i,null);
}
@@ -1504,7 +1504,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
item.setData(PREV_FOREGROUND_KEY, foregrounds);
}
-
+
if (_backgrounds == null) {
for (int i=0; i<numColumns; i++){
item.setBackground(i,null);
@@ -1524,7 +1524,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
item.setData(PREV_BACKGROUND_KEY, backgrounds);
}
-
+
if (fontDatas == null) {
for (int i=0; i<numColumns; i++){
item.setFont(i,null);
@@ -1546,13 +1546,13 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
}
}
-
+
@Override
public ViewerLabel getElementLabel(TreePath path, String columnId) {
if (path.getSegmentCount() == 0) {
return null;
}
-
+
int columnIdx = -1;
String[] visibleColumns = getVisibleColumns();
if (columnId != null && visibleColumns != null) {
@@ -1570,7 +1570,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
columnIdx = 0;
}
TreeItem item = (TreeItem)findItem(path);
-
+
if (item != null) {
ViewerLabel label = new ViewerLabel(item.getText(columnIdx), item.getImage(columnIdx));
label.setFont(item.getFont(columnIdx));
@@ -1594,7 +1594,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
getTree().setTopItem(children[index]);
}
}
-
+
@Override
public int getChildCount(TreePath path) {
if (path.getSegmentCount() == 0) {
@@ -1605,11 +1605,11 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
if (items[0] instanceof TreeItem) {
return ((TreeItem)items[0]).getItemCount();
}
- }
+ }
}
return -1;
}
-
+
@Override
public Object getChildElement(TreePath path, int index) {
TreeItem childItem = null;
@@ -1630,7 +1630,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
if (childItem != null) {
return childItem.getData();
- }
+ }
return null;
}
@@ -1642,7 +1642,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
return null;
}
-
+
@Override
public boolean saveElementState(TreePath path, ModelDelta delta, int flagsToSave) {
Tree tree = (Tree) getControl();
@@ -1651,7 +1651,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
for (int i = 0; i < selection.length; i++) {
set.add(selection[i]);
}
-
+
TreeItem[] items = null;
Widget w = internalGetWidgetToSelect(path);
if (w instanceof Tree) {
@@ -1660,7 +1660,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
if ((flagsToSave & IModelDelta.EXPAND) != 0) {
delta.setFlags(delta.getFlags() | IModelDelta.EXPAND);
}
- items = tree.getItems();
+ items = tree.getItems();
} else if (w instanceof TreeItem) {
TreeItem item = (TreeItem)w;
if (item.getExpanded()) {
@@ -1672,7 +1672,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
} else if ((flagsToSave & IModelDelta.COLLAPSE) != 0){
delta.setFlags(delta.getFlags() | IModelDelta.COLLAPSE);
}
-
+
if (set.contains(item) && (flagsToSave & IModelDelta.SELECT) != 0) {
delta.setFlags(delta.getFlags() | IModelDelta.SELECT);
}
@@ -1687,7 +1687,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
return false;
}
}
-
+
private void doSaveElementState(TreePath parentPath, ModelDelta delta, TreeItem item, Collection<TreeItem> set, int index, int flagsToSave) {
Object element = item.getData();
if (element != null) {
@@ -1696,7 +1696,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
int flags = IModelDelta.NO_CHANGE;
if (expanded && (flagsToSave & IModelDelta.EXPAND) != 0) {
flags = flags | IModelDelta.EXPAND;
- }
+ }
if (!expanded && (flagsToSave & IModelDelta.COLLAPSE) != 0) {
flags = flags | IModelDelta.COLLAPSE;
}
@@ -1710,7 +1710,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
if (expanded) {
// Only get the item count if the item is expanded. Getting
// item count triggers an update of the element (bug 335734).
- int itemCount = item.getItemCount();
+ int itemCount = item.getItemCount();
int numChildren = ((ITreeModelContentProvider)getContentProvider()).viewToModelCount(elementPath, itemCount);
childDelta.setChildCount(numChildren);
TreeItem[] items = item.getItems();
@@ -1721,7 +1721,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
}
}
-
+
@Override
public void updateViewer(IModelDelta delta) {
((ITreeModelContentProvider)getContentProvider()).updateModel(delta, ITreeModelContentProvider.ALL_MODEL_DELTA_FLAGS);
@@ -1734,56 +1734,56 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
@Override
public void setElementChecked(TreePath path, boolean checked, boolean grayed) {
Widget widget = findItem(path);
-
+
if (widget != null && widget instanceof TreeItem && !widget.isDisposed()) {
TreeItem item = (TreeItem)widget;
-
+
item.setChecked(checked);
item.setGrayed(grayed);
-
+
item.setData(PREV_CHECKED_KEY, checked ? Boolean.TRUE : Boolean.FALSE);
item.setData(PREV_GRAYED_KEY, grayed ? Boolean.TRUE : Boolean.FALSE);
}
}
-
+
@Override
public boolean getElementChecked(TreePath path) {
Widget widget = findItem(path);
-
+
if (widget != null && widget instanceof TreeItem && !widget.isDisposed()) {
TreeItem item = (TreeItem)widget;
-
+
return item.getChecked();
- }
+ }
return false;
}
/**
* Retrieves the element's check box grayed state.
- *
+ *
* @param path the path of the element to set grayed
* @return grayed
*/
@Override
public boolean getElementGrayed(TreePath path) {
Widget widget = findItem(path);
-
+
if (widget != null && widget instanceof TreeItem && !widget.isDisposed()) {
TreeItem item = (TreeItem)widget;
-
+
return item.getGrayed();
- }
+ }
return false;
}
@Override
public boolean getHasChildren(Object elementOrTreePath) {
- if (elementOrTreePath instanceof TreePath &&
- ((TreePath)elementOrTreePath).getSegmentCount() == 0)
+ if (elementOrTreePath instanceof TreePath &&
+ ((TreePath)elementOrTreePath).getSegmentCount() == 0)
{
return getTree().getItemCount() > 0;
}
-
+
Widget[] items = internalFindItems(elementOrTreePath);
if (items != null && items.length > 0) {
if (items[0] instanceof TreeItem) {
@@ -1792,10 +1792,10 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
return ((Tree)items[0]).getItemCount() > 0;
}
}
-
+
return false;
}
-
+
@Override
public TreePath[] getElementPaths(Object element) {
Widget[] items = internalFindItems(element);
@@ -1809,7 +1809,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
return paths;
}
-
+
/*
* (non-Javadoc)
* @see org.eclipse.jface.viewers.StructuredViewer#handleSelect(org.eclipse.swt.events.SelectionEvent)
@@ -1819,16 +1819,16 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
super.handleSelect(event);
TreeItem item = (TreeItem) event.item;
- if (item != null) { // item can be null when de-selected (bug 296703)
+ if (item != null) { // item can be null when de-selected (bug 296703)
Object element = item.getData();
IContentProvider contentProvider = getContentProvider();
if (element != null && contentProvider instanceof TreeModelContentProvider) {
TreePath path = getTreePathFromItem(item);
-
+
if (event.detail == SWT.CHECK) {
- boolean checked = item.getChecked();
+ boolean checked = item.getChecked();
boolean accepted = ((ITreeModelContentProvider) contentProvider).setChecked(path, checked);
-
+
// if the listen rejects the change or there is not ICheckboxModelProxy, than revert the check state
if (!accepted) {
item.setChecked(!checked);
@@ -1841,7 +1841,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
}
}
}
-
+
@Override
protected void handleTreeExpand(TreeEvent event) {
super.handleTreeExpand(event);
@@ -1851,7 +1851,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
((TreeModelContentProvider) contentProvider).cancelRestore(path, IModelDelta.COLLAPSE);
}
}
-
+
@Override
protected void handleTreeCollapse(TreeEvent event) {
super.handleTreeCollapse(event);
@@ -1861,7 +1861,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
((TreeModelContentProvider) contentProvider).cancelRestore(path, IModelDelta.EXPAND);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget#clearSelectionQuiet()
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
index e9f573aa9..fafeebd65 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - ongoing bug fixing
@@ -64,23 +64,23 @@ import org.eclipse.ui.IMemento;
* @since 3.5
*/
@SuppressWarnings("deprecation")
-public class InternalVirtualTreeModelViewer extends Viewer
- implements IVirtualItemListener,
- org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer,
+public class InternalVirtualTreeModelViewer extends Viewer
+ implements IVirtualItemListener,
+ org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer,
IInternalTreeModelViewer
{
/**
* Memento type for the visible columns for a presentation context.
* A memento is created for each column presentation keyed by column number
- */
+ */
private static final String VISIBLE_COLUMNS = "VISIBLE_COLUMNS"; //$NON-NLS-1$
-
+
/**
* Memento type for whether columns are visible for a presentation context.
* Booleans are keyed by column presentation id
*/
- private static final String SHOW_COLUMNS = "SHOW_COLUMNS"; //$NON-NLS-1$
+ private static final String SHOW_COLUMNS = "SHOW_COLUMNS"; //$NON-NLS-1$
/**
* Memento key for the number of visible columns in a VISIBLE_COLUMNS memento
* or for the width of a column
@@ -89,10 +89,10 @@ public class InternalVirtualTreeModelViewer extends Viewer
/**
* Memento key prefix a visible column
*/
- private static final String COLUMN = "COLUMN"; //$NON-NLS-1$
-
+ private static final String COLUMN = "COLUMN"; //$NON-NLS-1$
+
/**
- * Item's tree path cache
+ * Item's tree path cache
*/
private static final String TREE_PATH_KEY = "TREE_PATH_KEY"; //$NON-NLS-1$
@@ -100,7 +100,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
* Viewer filters currently configured for viewer.
*/
private ViewerFilter[] fFilters = new ViewerFilter[0];
-
+
/**
* The display that this virtual tree viewer is associated with. It is used
* for access to the UI thread.
@@ -124,12 +124,12 @@ public class InternalVirtualTreeModelViewer extends Viewer
private VirtualTree fTree;
/**
- * Mapping of data elements in the tree to the items that hold them. The
+ * Mapping of data elements in the tree to the items that hold them. The
* tree may contain the same element in several places, so the map values
- * are lists.
+ * are lists.
*/
private Map<Object, List<VirtualItem>> fItemsMap = new HashMap<Object, List<VirtualItem>>();
-
+
/**
* Whether to notify the content provider when an element is unmapped.
* Used to suppress the notification during an associate operation.
@@ -159,44 +159,44 @@ public class InternalVirtualTreeModelViewer extends Viewer
private boolean fRestoreSelection;
/**
- * Level to which the tree should automatically expand elements.
+ * Level to which the tree should automatically expand elements.
* <code>-1<code> indicates that all levels shoudl be expanded.
*/
private int fAutoExpandToLevel = 0;
-
+
/**
* Current column presentation or <code>null</code>
*/
- private IColumnPresentation fColumnPresentation = null;
-
+ private IColumnPresentation fColumnPresentation = null;
+
/**
* Map of columns presentation id to its visible columns id's (String[])
* When a columns presentation is not in the map, default settings are used.
*/
private Map<String, String[]> fVisibleColumns = new HashMap<String, String[]>();
-
+
/**
* Map of column presentation id to whether columns should be displayed
- * for that presentation (the user can toggle columns on/off when a
+ * for that presentation (the user can toggle columns on/off when a
* presentation is optional.
*/
private Map<String, Boolean> fShowColumns = new HashMap<String, Boolean>();
/**
- * Runnable for validating the virtual tree. It is scheduled to run in the
+ * Runnable for validating the virtual tree. It is scheduled to run in the
* UI thread whenever a tree validation is requested.
*/
private Runnable fValidateRunnable;
-
- public InternalVirtualTreeModelViewer(Display display, int style, IPresentationContext context, IVirtualItemValidator itemValidator) {
+
+ public InternalVirtualTreeModelViewer(Display display, int style, IPresentationContext context, IVirtualItemValidator itemValidator) {
fDisplay = display;
- fContext = context;
+ fContext = context;
fTree = new VirtualTree(style, itemValidator);
fTree.addItemListener(this);
-
+
fContentProvider = new TreeModelContentProvider();
fLabelProvider = new TreeModelLabelProvider(this);
-
+
if ((style & SWT.POP_UP) != 0) {
getContentProvider().setModelDeltaMask(~ITreeModelContentProvider.CONTROL_MODEL_DELTA_FLAGS);
}
@@ -286,7 +286,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
public VirtualTree getTree() {
return fTree;
}
-
+
@Override
public void insert(Object parentOrTreePath, Object element, int position) {
if (parentOrTreePath instanceof TreePath) {
@@ -316,18 +316,18 @@ public class InternalVirtualTreeModelViewer extends Viewer
if (parentItem.isDisposed()) {
continue;
}
-
- // Parent item is not expanded so just update its contents so that
+
+ // Parent item is not expanded so just update its contents so that
// the plus sign gets refreshed.
if (!parentItem.getExpanded()) {
parentItem.setNeedsCountUpdate();
parentItem.setItemCount(-1);
virtualLazyUpdateHasChildren(parentItem);
}
-
+
if (index < parentItem.getItemCount()) {
VirtualItem item =parentItem.getItem(new VirtualItem.Index(index));
-
+
if (item.getData() != null) {
removedPath = getTreePathFromItem(item);
disassociate(item);
@@ -347,7 +347,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
if (removed) {
setSelection(
- new TreeSelection(oldSelection.toArray(new TreePath[oldSelection.size()])),
+ new TreeSelection(oldSelection.toArray(new TreePath[oldSelection.size()])),
false);
}
}
@@ -361,18 +361,18 @@ public class InternalVirtualTreeModelViewer extends Viewer
setInput(null);
return;
}
-
+
VirtualItem[] items = findItems(elementOrPath);
if (items.length > 0) {
for (int j = 0; j < items.length; j++) {
disassociate(items[j]);
items[j].getParent().remove(items[j].getIndex());
}
- }
+ }
}
- private TreeSelection adjustSelectionForReplace(VirtualItem[] selectedItems, TreeSelection selection,
- VirtualItem item, Object element, Object parentElement)
+ private TreeSelection adjustSelectionForReplace(VirtualItem[] selectedItems, TreeSelection selection,
+ VirtualItem item, Object element, Object parentElement)
{
if (item.getData() != null || selectedItems.length == selection.size() || parentElement == null) {
// Don't do anything - we are not seeing an instance of bug 185673
@@ -398,8 +398,8 @@ public class InternalVirtualTreeModelViewer extends Viewer
return selection;
}
-// private VirtualTreeSelection adjustSelectionForReplace(VirtualTreeSelection selection, VirtualItem item,
-// Object element, Object parentElement)
+// private VirtualTreeSelection adjustSelectionForReplace(VirtualTreeSelection selection, VirtualItem item,
+// Object element, Object parentElement)
// {
// if (selection.getItems().containsKey(item)) {
// if (item.getData() == null) {
@@ -424,7 +424,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
// }
// return new VirtualTreeSelection(map, paths);
// } else if (!item.getData().equals(element)) {
-// // The current item was selected by the new element is
+// // The current item was selected by the new element is
// // different than the previous element in the item.
// // Remove this item from selection.
// Map map = new LinkedHashMap(selection.getItems());
@@ -437,7 +437,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
// paths[i++] = nextPath;
// }
// }
-// return new VirtualTreeSelection(map, paths);
+// return new VirtualTreeSelection(map, paths);
// }
// }
// if (item.getData() != null || selection.getItems().size() == selection.size() || parentElement == null) {
@@ -450,7 +450,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
// return selection;
// }
-
+
@Override
public void reveal(TreePath path, final int index) {
VirtualItem parentItem = findItem(path);
@@ -473,7 +473,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
return -1;
}
-
+
@Override
public boolean getElementChildrenRealized(TreePath parentPath) {
VirtualItem parentItem = findItem(parentPath);
@@ -511,18 +511,18 @@ public class InternalVirtualTreeModelViewer extends Viewer
private void refresh(VirtualItem item) {
getContentProvider().preserveState(getTreePathFromItem(item));
-
+
if (!item.needsDataUpdate()) {
if (item.getParent() != null) {
item.setNeedsLabelUpdate();
virtualLazyUpdateHasChildren(item);
}
-
+
VirtualItem[] items = item.getItems();
for (int i = 0; i < items.length; i++) {
items[i].setNeedsDataUpdate();
}
- }
+ }
refreshStruct(item);
}
@@ -536,8 +536,8 @@ public class InternalVirtualTreeModelViewer extends Viewer
if (item.getExpanded()) {
virtualLazyUpdateData(item);
expanded = true;
- }
- }
+ }
+ }
VirtualItem[] items = item.getItems();
for (int i = 0; i < items.length; i++) {
@@ -548,7 +548,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
}
}
-
+
private void validate() {
if (fValidateRunnable == null) {
fValidateRunnable = new Runnable() {
@@ -563,7 +563,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
getDisplay().asyncExec(fValidateRunnable);
}
}
-
+
@Override
protected void inputChanged(Object input, Object oldInput) {
resetColumns(input);
@@ -578,7 +578,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
public void setAutoExpandLevel(int level) {
fAutoExpandToLevel = level;
}
-
+
public VirtualItem findItem(TreePath path) {
if (path.getSegmentCount() == 0) {
return fTree;
@@ -592,7 +592,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
}
}
-
+
return null;
}
@@ -627,7 +627,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
item.setData(VirtualItem.FONT_KEY, fontDatas);
}
}
-
+
@Override
public void setChildCount(final Object elementOrTreePath, final int count) {
preservingSelection(new Runnable() {
@@ -641,7 +641,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
disassociate(children[j]);
}
}
-
+
items[i].setItemCount(count);
}
}
@@ -657,7 +657,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
VirtualItem[] items = findItems(elementOrTreePath);
for (int i = 0; i < items.length; i++) {
VirtualItem item = items[i];
-
+
if (!hasChildren) {
VirtualItem[] children = item.getItems();
for (int j = 0; j < children.length; j++) {
@@ -666,7 +666,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
}
}
-
+
item.setHasItems(hasChildren);
if (hasChildren) {
if (!item.getExpanded()) {
@@ -679,7 +679,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
});
}
-
+
@Override
public boolean getHasChildren(Object elementOrTreePath) {
VirtualItem[] items = findItems(elementOrTreePath);
@@ -712,7 +712,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
if (item.getData() instanceof String) {
item.setData(VirtualItem.LABEL_KEY, new String[] { (String)item.getData() } );
}
- }
+ }
}
private TreePath getTreePathFromItem(VirtualItem item) {
@@ -759,7 +759,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
// Insert the set back into the map.
fItemsMap.put(element, itemsList);
-
+
item.setData(TREE_PATH_KEY, getTreePathFromItem(item));
}
@@ -770,11 +770,11 @@ public class InternalVirtualTreeModelViewer extends Viewer
} else if (item.getData() != null) {
if (item.needsLabelUpdate()) {
virtualLazyUpdateLabel(item);
- }
+ }
if (item.needsCountUpdate() && item.getExpanded()) {
virtualLazyUpdateChildCount(item);
}
- }
+ }
}
@Override
@@ -803,7 +803,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
}
-
+
private void doAssociate(Object element, VirtualItem item) {
Object data = item.getData();
if (data != null && data != element && data.equals(element)) {
@@ -831,10 +831,10 @@ public class InternalVirtualTreeModelViewer extends Viewer
private void disassociate(VirtualItem item) {
unmapElement(item.getData(), item);
-
+
// Clear the map before we clear the data
item.setData(null);
-
+
// Disassociate the children
VirtualItem[] items = item.getItems();
for (int i = 0; i < items.length; i++) {
@@ -848,7 +848,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
public void setSelection(ISelection selection, boolean reveal) {
setSelection(selection, reveal, false);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer#setSelection(org.eclipse.jface.viewers.ISelection, boolean, boolean)
*/
@@ -856,7 +856,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
public void setSelection(ISelection selection, boolean reveal, boolean force) {
trySelection(selection, reveal, force);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer#trySelection(org.eclipse.jface.viewers.ISelection, boolean, boolean)
*/
@@ -904,7 +904,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
} else {
fTree.setSelection(EMPTY_ITEMS_ARRAY);
}
-
+
// Make sure that the new selection is properly revealed.
validate();
}
@@ -916,7 +916,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
doUpdate(items[i]);
}
}
-
+
public void doUpdate(VirtualItem item) {
item.setNeedsLabelUpdate();
validate();
@@ -940,7 +940,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
return new TreeSelection(list.toArray(new TreePath[list.size()]));
}
-
+
private void preservingSelection(Runnable updateCode) {
ISelection oldSelection = null;
@@ -1000,15 +1000,15 @@ public class InternalVirtualTreeModelViewer extends Viewer
if (!item.hasItems()) {
return;
}
-
+
item.setExpanded(true);
if (item.getData() == null) {
virtualLazyUpdateData(item);
// Cannot expand children if data is null.
- return;
+ return;
}
-
+
if (level == ALL_LEVELS || level > 1) {
VirtualItem[] children = item.getItems();
int newLevel = (level == ALL_LEVELS ? ALL_LEVELS
@@ -1040,11 +1040,11 @@ public class InternalVirtualTreeModelViewer extends Viewer
fireSelectionChanged(new SelectionChangedEvent(this, newSelection));
}
-
+
/**
* Returns whether the candidate selection should override the current
* selection.
- *
+ *
* @param current Current selection in viewer
* @param candidate New potential selection requested by model.
* @return true if candidate selection should be set to viewer.
@@ -1065,7 +1065,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
public ViewerFilter[] getFilters() {
return fFilters;
}
-
+
@Override
public void addFilter(ViewerFilter filter) {
ViewerFilter[] newFilters = new ViewerFilter[fFilters.length + 1];
@@ -1073,17 +1073,17 @@ public class InternalVirtualTreeModelViewer extends Viewer
newFilters[fFilters.length] = filter;
fFilters = newFilters;
}
-
+
@Override
public void setFilters(ViewerFilter... filters) {
fFilters = filters;
}
-
+
public void dispose() {
if (fColumnPresentation != null) {
fColumnPresentation.dispose();
}
-
+
if (fContentProvider != null) {
fContentProvider.dispose();
fContentProvider = null;
@@ -1092,14 +1092,14 @@ public class InternalVirtualTreeModelViewer extends Viewer
fLabelProvider.dispose();
fLabelProvider = null;
}
-
+
fTree.removeItemListener(this);
fTree.dispose();
}
/**
* Returns this viewer's presentation context.
- *
+ *
* @return presentation context
*/
@Override
@@ -1109,7 +1109,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
/**
* Configures the columns for the given viewer input.
- *
+ *
* @param input new viewer input
*/
private void resetColumns(Object input) {
@@ -1144,8 +1144,8 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
}
}
- }
-
+ }
+
/**
* Configures the columns based on the current settings.
*/
@@ -1155,7 +1155,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
if (isShowColumns(fColumnPresentation.getId())) {
build = fColumnPresentation;
}
- buildColumns(build);
+ buildColumns(build);
} else {
// get rid of columns
buildColumns(null);
@@ -1164,7 +1164,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
/**
* Toggles columns on/off for the current column presentation, if any.
- *
+ *
* @param show whether to show columns if the current input supports
* columns
*/
@@ -1188,9 +1188,9 @@ public class InternalVirtualTreeModelViewer extends Viewer
configureColumns();
refresh();
}
-
+
/**
- * @return Returns true if columns are being displayed currently.
+ * @return Returns true if columns are being displayed currently.
*/
public boolean isShowColumns() {
if (fColumnPresentation != null) {
@@ -1198,32 +1198,32 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
return false;
}
-
+
/**
* Returns whether columns can be toggled on/off for the current input.
- *
+ *
* @return whether columns can be toggled on/off for the current input
*/
public boolean canToggleColumns() {
return fColumnPresentation != null && fColumnPresentation.isOptional();
}
-
+
protected boolean isShowColumns(String columnPresentationId) {
Boolean bool = fShowColumns.get(columnPresentationId);
if (bool == null) {
return true;
}
return bool.booleanValue();
- }
-
+ }
+
/**
* Creates new columns for the given presentation.
- *
+ *
* @param presentation presentation context to build columns for.
*/
protected void buildColumns(IColumnPresentation presentation) {
PresentationContext presentationContext = (PresentationContext) getPresentationContext();
- if (presentation != null) {
+ if (presentation != null) {
presentationContext.setColumns(getVisibleColumns());
} else {
presentationContext.setColumns(null);
@@ -1233,7 +1233,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
/**
* Returns identifiers of the visible columns in this viewer, or <code>null</code>
* if there is currently no column presentation.
- *
+ *
* @return visible columns or <code>null</code>
*/
@Override
@@ -1249,12 +1249,12 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
}
return null;
- }
-
+ }
+
/**
* Sets the id's of visible columns, or <code>null</code> to set default columns.
* Only affects the current column presentation.
- *
+ *
* @param ids visible columns
*/
public void setVisibleColumns(String[] ids) {
@@ -1282,12 +1282,12 @@ public class InternalVirtualTreeModelViewer extends Viewer
presentationContext.setColumns(getVisibleColumns());
refreshColumns();
}
- }
-
+ }
+
/**
* Returns the current column presentation for this viewer, or <code>null</code>
* if none.
- *
+ *
* @return column presentation or <code>null</code>
*/
public IColumnPresentation getColumnPresentation() {
@@ -1296,7 +1296,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
/**
* Save viewer state into the given memento.
- *
+ *
* @param memento Memento to write state to.
*/
public void saveState(IMemento memento) {
@@ -1304,7 +1304,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
for (Entry<String, Boolean> entry : fShowColumns.entrySet()) {
IMemento sizes = memento.createChild(SHOW_COLUMNS, entry.getKey());
sizes.putString(SHOW_COLUMNS, entry.getValue().toString());
- }
+ }
}
if (!fVisibleColumns.isEmpty()) {
for (Entry<String, String[]> entry : fVisibleColumns.entrySet()) {
@@ -1321,13 +1321,13 @@ public class InternalVirtualTreeModelViewer extends Viewer
if (context instanceof PresentationContext) {
PresentationContext pc = (PresentationContext) context;
pc.saveProperites(memento);
-
+
}
- }
-
+ }
+
/**
* Initializes viewer state from the memento
- *
+ *
* @param memento Memento to read state from.
*/
public void initState(IMemento memento) {
@@ -1367,7 +1367,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
public void addViewerUpdateListener(IViewerUpdateListener listener) {
getContentProvider().addViewerUpdateListener(listener);
}
-
+
@Override
public void removeViewerUpdateListener(IViewerUpdateListener listener) {
ITreeModelContentProvider cp = getContentProvider();
@@ -1375,12 +1375,12 @@ public class InternalVirtualTreeModelViewer extends Viewer
cp.removeViewerUpdateListener(listener);
}
}
-
+
@Override
public void addModelChangedListener(IModelChangedListener listener) {
- getContentProvider().addModelChangedListener(listener);
+ getContentProvider().addModelChangedListener(listener);
}
-
+
@Override
public void removeModelChangedListener(IModelChangedListener listener) {
ITreeModelContentProvider cp = getContentProvider();
@@ -1388,12 +1388,12 @@ public class InternalVirtualTreeModelViewer extends Viewer
cp.removeModelChangedListener(listener);
}
}
-
+
@Override
public void addStateUpdateListener(IStateUpdateListener listener) {
getContentProvider().addStateUpdateListener(listener);
}
-
+
@Override
public void removeStateUpdateListener(IStateUpdateListener listener) {
ITreeModelContentProvider cp = getContentProvider();
@@ -1401,21 +1401,21 @@ public class InternalVirtualTreeModelViewer extends Viewer
cp.removeStateUpdateListener(listener);
}
}
-
+
@Override
public void addLabelUpdateListener(ILabelUpdateListener listener) {
getLabelProvider().addLabelUpdateListener(listener);
}
-
+
@Override
public void removeLabelUpdateListener(ILabelUpdateListener listener) {
getLabelProvider().removeLabelUpdateListener(listener);
}
-
+
/**
* Performs auto expand on an element at the specified path if the auto expand
* level dictates the element should be expanded.
- *
+ *
* @param elementPath tree path to element to consider for expansion
*/
@Override
@@ -1427,7 +1427,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
}
}
-
+
@Override
public int getChildCount(TreePath path) {
int childCount = -1;
@@ -1439,11 +1439,11 @@ public class InternalVirtualTreeModelViewer extends Viewer
// Return 0, if we do not know if the item has children.
if (childCount == -1) {
childCount = items[0].hasItems() ? 1 : 0;
- }
- }
+ }
+ }
return childCount;
}
-
+
@Override
public Object getChildElement(TreePath path, int index) {
VirtualItem[] items = findItems(path);
@@ -1451,7 +1451,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
if (index < items[0].getItemCount()) {
return items[0].getItem(new VirtualItem.Index(index)).getData();
}
- }
+ }
return null;
}
@@ -1468,10 +1468,10 @@ public class InternalVirtualTreeModelViewer extends Viewer
for (int i = 0; i < selection.length; i++) {
set.add(selection[i]);
}
-
+
VirtualItem[] items = null;
VirtualItem parent = findItem(path);
-
+
if (parent != null) {
delta.setChildCount(((TreeModelContentProvider)getContentProvider()).viewToModelCount(path, parent.getItemCount()));
if (parent.getExpanded()) {
@@ -1481,11 +1481,11 @@ public class InternalVirtualTreeModelViewer extends Viewer
} else if ((flagsToSave & IModelDelta.COLLAPSE) != 0 && parent.hasItems()){
delta.setFlags(delta.getFlags() | IModelDelta.COLLAPSE);
}
-
+
if (set.contains(parent) && (flagsToSave & IModelDelta.SELECT) != 0) {
delta.setFlags(delta.getFlags() | IModelDelta.SELECT);
}
-
+
items = parent.getItems();
for (int i = 0; i < items.length; i++) {
doSaveElementState(path, delta, items[i], set, flagsToSave);
@@ -1495,7 +1495,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
return false;
}
}
-
+
private void doSaveElementState(TreePath parentPath, ModelDelta delta, VirtualItem item, Collection<VirtualItem> set, int flagsToSave) {
Object element = item.getData();
if (element != null) {
@@ -1504,7 +1504,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
int flags = IModelDelta.NO_CHANGE;
if (expanded && (flagsToSave & IModelDelta.EXPAND) != 0) {
flags = flags | IModelDelta.EXPAND;
- }
+ }
if (!expanded && (flagsToSave & IModelDelta.COLLAPSE) != 0 && item.hasItems()){
flags = flags | IModelDelta.COLLAPSE;
}
@@ -1530,13 +1530,13 @@ public class InternalVirtualTreeModelViewer extends Viewer
public void updateViewer(IModelDelta delta) {
getContentProvider().updateModel(delta, ITreeModelContentProvider.ALL_MODEL_DELTA_FLAGS);
}
-
+
@Override
public ViewerLabel getElementLabel(TreePath path, String columnId) {
if (path.getSegmentCount() == 0) {
return null;
}
-
+
int columnIdx = -1;
String[] visibleColumns = getVisibleColumns();
if (columnId != null && visibleColumns != null) {
@@ -1554,7 +1554,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
columnIdx = 0;
}
VirtualItem item = findItem(path);
-
+
if (item != null) {
ViewerLabel label = new ViewerLabel(getText(item, columnIdx), getImage(item, columnIdx));
label.setFont(getFont(item, columnIdx));
@@ -1574,7 +1574,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
return paths;
}
-
+
public String getText(VirtualItem item, int columnIdx) {
String[] texts = (String[])item.getData(VirtualItem.LABEL_KEY);
@@ -1607,7 +1607,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
return null;
}
-
+
public Color getBackground(VirtualItem item, int columnIdx) {
RGB[] rgbs = (RGB[]) item.getData(VirtualItem.BACKGROUND_KEY);
if (rgbs != null) {
@@ -1623,24 +1623,24 @@ public class InternalVirtualTreeModelViewer extends Viewer
public void clearSelectionQuiet() {
getTree().setSelection(EMPTY_ITEMS_ARRAY);
}
-
+
@Override
public boolean getElementChecked(TreePath path) {
// Not supported
return false;
}
-
+
@Override
public boolean getElementGrayed(TreePath path) {
// Not supported
return false;
}
-
+
@Override
public void setElementChecked(TreePath path, boolean checked, boolean grayed) {
// Not supported
}
-
+
@Override
public String toString() {
return getTree().toString();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java
index 5bbffb307..916f66951 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java
@@ -26,7 +26,7 @@ import org.eclipse.swt.graphics.RGB;
* @since 3.3
*/
class LabelUpdate extends Request implements ILabelUpdate, ICheckUpdate {
-
+
private TreePath fElementPath;
private String[] fColumnIds;
private RGB[] fBackgrounds;
@@ -35,16 +35,16 @@ class LabelUpdate extends Request implements ILabelUpdate, ICheckUpdate {
private String[] fLabels;
private FontData[] fFontDatas;
private TreeModelLabelProvider fProvider;
- private int fNumColumns;
+ private int fNumColumns;
private IPresentationContext fContext;
private Object fViewerInput;
private boolean fChecked;
private boolean fGrayed;
-
+
/**
* @param viewerInput input at the time the request was made
* @param elementPath element the label is for
- * @param provider label provider to callback to
+ * @param provider label provider to callback to
* @param columnIds column identifiers or <code>null</code>
* @param context presentation context
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/MementoUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/MementoUpdate.java
index 081058bd1..e3b591c63 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/MementoUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/MementoUpdate.java
@@ -20,14 +20,14 @@ import org.eclipse.ui.IMemento;
* @since 3.3
*/
abstract class MementoUpdate extends Request implements IViewerUpdate {
-
+
private IPresentationContext fContext;
private Object fElement;
private TreePath fElementPath;
private IMemento fMemento;
protected TreeModelContentProvider fProvider;
protected Object fViewerInput;
-
+
/**
* Constructs a viewer state request.
* @param provider the content provider to use for the update
@@ -36,7 +36,7 @@ abstract class MementoUpdate extends Request implements IViewerUpdate {
* @param element the element to update
* @param memento Memento to update
* @param context the presentation context
- *
+ *
*/
public MementoUpdate(TreeModelContentProvider provider, Object viewerInput, IPresentationContext context, Object element, TreePath elementPath, IMemento memento) {
fContext = context;
@@ -54,7 +54,7 @@ abstract class MementoUpdate extends Request implements IViewerUpdate {
public IPresentationContext getPresentationContext() {
return fContext;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate#getElement()
*/
@@ -62,7 +62,7 @@ abstract class MementoUpdate extends Request implements IViewerUpdate {
public Object getElement() {
return fElement;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate#getElementPath()
*/
@@ -70,11 +70,11 @@ abstract class MementoUpdate extends Request implements IViewerUpdate {
public TreePath getElementPath() {
return fElementPath;
}
-
+
public IMemento getMemento() {
return fMemento;
}
-
+
public TreeModelContentProvider getContentProvider() {
return fProvider;
}
@@ -90,7 +90,7 @@ abstract class MementoUpdate extends Request implements IViewerUpdate {
public Object getViewerInput() {
return fViewerInput;
}
-
-
-
+
+
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/SubTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/SubTreeModelViewer.java
index ce7b203cc..4bc296835 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/SubTreeModelViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/SubTreeModelViewer.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - ongoing bug fixes and enhancements
@@ -36,8 +36,8 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
/**
- * Specialized tree viewer which displays only sub-tree of a full model.
- *
+ * Specialized tree viewer which displays only sub-tree of a full model.
+ *
* @since 3.5
*/
public class SubTreeModelViewer extends TreeModelViewer {
@@ -51,9 +51,9 @@ public class SubTreeModelViewer extends TreeModelViewer {
* Viewer delegate that content and label providers refer to for viewer data.
*/
private DelegatingTreeModelViewer fDelegatingViewer;
-
+
/**
- * @return Returns the root element's model tree path.
+ * @return Returns the root element's model tree path.
*/
public TreePath getRootPath() {
return fRootPath;
@@ -65,7 +65,7 @@ public class SubTreeModelViewer extends TreeModelViewer {
/**
* Sets the viewer's input and root element's path
- *
+ *
* @param input New viewer input.
* @param rootPath New root element path.
*/
@@ -73,14 +73,14 @@ public class SubTreeModelViewer extends TreeModelViewer {
fRootPath = rootPath;
super.setInput(input);
}
-
+
/**
- * A proxy for the sub tree viewer which is given to the content and
- * label providers. It translates the sub-tree paths in the viewer to the
+ * A proxy for the sub tree viewer which is given to the content and
+ * label providers. It translates the sub-tree paths in the viewer to the
* full model paths that the providers expect.
*/
- public class DelegatingTreeModelViewer extends Viewer
- implements IInternalTreeModelViewer
+ public class DelegatingTreeModelViewer extends Viewer
+ implements IInternalTreeModelViewer
{
@Override
public void reveal(TreePath path, int index) {
@@ -88,7 +88,7 @@ public class SubTreeModelViewer extends TreeModelViewer {
SubTreeModelViewer.this.reveal(createSubPath(path), index);
}
}
-
+
@Override
public void replace(Object parentOrTreePath, int index, Object element) {
if (parentOrTreePath instanceof TreePath) {
@@ -100,7 +100,7 @@ public class SubTreeModelViewer extends TreeModelViewer {
SubTreeModelViewer.this.replace(parentOrTreePath, index, element);
}
}
-
+
@Override
public void setChildCount(Object elementOrTreePath, int count) {
if (elementOrTreePath instanceof TreePath) {
@@ -112,7 +112,7 @@ public class SubTreeModelViewer extends TreeModelViewer {
SubTreeModelViewer.this.setChildCount(elementOrTreePath, count);
}
}
-
+
@Override
public void setHasChildren(Object elementOrTreePath, boolean hasChildren) {
if (elementOrTreePath instanceof TreePath) {
@@ -141,7 +141,7 @@ public class SubTreeModelViewer extends TreeModelViewer {
SubTreeModelViewer.this.setExpandedState(elementOrTreePath, expanded);
}
}
-
+
@Override
public void expandToLevel(Object elementOrTreePath, int level) {
if (elementOrTreePath instanceof TreePath) {
@@ -202,12 +202,12 @@ public class SubTreeModelViewer extends TreeModelViewer {
}
return false;
}
-
+
@Override
public int getChildCount(TreePath path) {
if (path.startsWith(fRootPath, null)) {
return SubTreeModelViewer.this.getChildCount(createSubPath(path));
- }
+ }
return -1;
}
@@ -228,20 +228,20 @@ public class SubTreeModelViewer extends TreeModelViewer {
public Object getChildElement(TreePath path, int index) {
if (path.startsWith(fRootPath, null)) {
return SubTreeModelViewer.this.getChildElement(createSubPath(path), index);
- }
+ }
return null;
}
-
+
@Override
public TreePath getTopElementPath() {
return createFullPath(SubTreeModelViewer.this.getTopElementPath());
}
-
+
@Override
public int findElementIndex(TreePath parentPath, Object element) {
if (parentPath.startsWith(fRootPath, null)) {
return SubTreeModelViewer.this.findElementIndex(createSubPath(parentPath), element);
- }
+ }
return -1;
}
@@ -249,15 +249,15 @@ public class SubTreeModelViewer extends TreeModelViewer {
public boolean getElementChildrenRealized(TreePath parentPath) {
if (parentPath.startsWith(fRootPath, null)) {
return SubTreeModelViewer.this.getElementChildrenRealized(createSubPath(parentPath));
- }
+ }
return true;
}
-
+
@Override
public void setElementData(TreePath path, int numColumns, String[] labels, ImageDescriptor[] images, FontData[] fontDatas, RGB[] foregrounds, RGB[] backgrounds) {
if (path.startsWith(fRootPath, null)) {
SubTreeModelViewer.this.setElementData(createSubPath(path), numColumns, labels, images, fontDatas, foregrounds, backgrounds);
- }
+ }
}
@Override
@@ -369,7 +369,7 @@ public class SubTreeModelViewer extends TreeModelViewer {
public void setSelection(ISelection selection, boolean reveal, boolean force) {
SubTreeModelViewer.this.setSelection(selection, reveal, force);
}
-
+
@Override
public boolean trySelection(ISelection selection, boolean reveal, boolean force) {
return SubTreeModelViewer.this.trySelection(selection, reveal, force);
@@ -380,7 +380,7 @@ public class SubTreeModelViewer extends TreeModelViewer {
SubTreeModelViewer.this.updateViewer(delta);
}
-
+
@Override
public ViewerFilter[] getFilters() {
return SubTreeModelViewer.this.getFilters();
@@ -390,12 +390,12 @@ public class SubTreeModelViewer extends TreeModelViewer {
public void addFilter(ViewerFilter filter) {
SubTreeModelViewer.this.addFilter(filter);
}
-
+
@Override
public void setFilters(ViewerFilter... filters) {
SubTreeModelViewer.this.setFilters(filters);
}
-
+
@Override
public boolean overrideSelection(ISelection current, ISelection candidate) {
return SubTreeModelViewer.this.overrideSelection(current, candidate);
@@ -410,12 +410,12 @@ public class SubTreeModelViewer extends TreeModelViewer {
public void update(Object element) {
SubTreeModelViewer.this.update(element);
}
-
+
@Override
public void clearSelectionQuiet() {
SubTreeModelViewer.this.clearSelectionQuiet();
}
-
+
@Override
public TreePath[] getElementPaths(Object element) {
TreePath[] subViewerPaths = SubTreeModelViewer.this.getElementPaths(element);
@@ -425,41 +425,41 @@ public class SubTreeModelViewer extends TreeModelViewer {
}
return retVal;
}
-
+
@Override
public boolean getElementChecked(TreePath path) {
return SubTreeModelViewer.this.getElementChecked(createSubPath(path));
}
-
+
@Override
public boolean getElementGrayed(TreePath path) {
return SubTreeModelViewer.this.getElementGrayed(createSubPath(path));
}
-
+
@Override
public void setElementChecked(TreePath path, boolean checked, boolean grayed) {
SubTreeModelViewer.this.setElementChecked(createSubPath(path), checked, grayed);
}
}
-
+
/**
- * Delegating content provider. It translates all the calls to the
+ * Delegating content provider. It translates all the calls to the
* underlying content provider to use full model tree paths.
*/
private class SubTreeModelContentProvider implements ITreeModelContentProvider {
-
+
private TreeModelContentProvider fBaseProvider;
-
+
public SubTreeModelContentProvider() {
fBaseProvider = new TreeModelContentProvider();
}
-
+
@Override
public void updateHasChildren(TreePath path) {
fBaseProvider.updateHasChildren(createFullPath(path));
}
-
+
@Override
public void updateChildCount(TreePath path, int currentChildCount) {
fBaseProvider.updateChildCount(createFullPath(path), currentChildCount);
@@ -469,12 +469,12 @@ public class SubTreeModelViewer extends TreeModelViewer {
public void updateElement(TreePath parentPath, int viewIndex) {
fBaseProvider.updateElement(createFullPath(parentPath), viewIndex);
}
-
+
@Override
public int viewToModelCount(TreePath parentPath, int count) {
return fBaseProvider.viewToModelCount(createFullPath(parentPath), count);
}
-
+
@Override
public int viewToModelIndex(TreePath parentPath, int index) {
return fBaseProvider.viewToModelIndex(createFullPath(parentPath), index);
@@ -539,7 +539,7 @@ public class SubTreeModelViewer extends TreeModelViewer {
public boolean areTreeModelViewerFiltersApplicable(Object parentElement) {
return fBaseProvider.areTreeModelViewerFiltersApplicable(parentElement);
}
-
+
@Override
public boolean shouldFilter(Object parentElementOrTreePath, Object element) {
if (parentElementOrTreePath instanceof TreePath) {
@@ -548,7 +548,7 @@ public class SubTreeModelViewer extends TreeModelViewer {
} else {
return fBaseProvider.shouldFilter(parentElementOrTreePath, element);
}
-
+
}
@Override
@@ -571,7 +571,7 @@ public class SubTreeModelViewer extends TreeModelViewer {
public void cancelRestore(TreePath path, int flags) {
fBaseProvider.cancelRestore(createFullPath(path), flags);
}
-
+
@Override
public void dispose() {
fBaseProvider.dispose();
@@ -581,13 +581,13 @@ public class SubTreeModelViewer extends TreeModelViewer {
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
fBaseProvider.inputChanged(fDelegatingViewer, oldInput, newInput);
}
-
+
@Override
public void postInputChanged(IInternalTreeModelViewer viewer,
Object oldInput, Object newInput) {
fBaseProvider.postInputChanged(viewer, oldInput, newInput);
}
-
+
@Override
public boolean setChecked(TreePath path, boolean checked) {
return fBaseProvider.setChecked(createFullPath(path), checked);
@@ -596,19 +596,19 @@ public class SubTreeModelViewer extends TreeModelViewer {
}
/**
- * Delegating label provider. It translates all the calls to the
+ * Delegating label provider. It translates all the calls to the
* underlying label provider to use full model tree paths.
*/
private class SubTreeModelLabelProvider extends ColumnLabelProvider
- implements ITreeModelLabelProvider
+ implements ITreeModelLabelProvider
{
private TreeModelLabelProvider fBaseProvider;
-
+
public SubTreeModelLabelProvider(IInternalTreeModelViewer viewer) {
fBaseProvider = new TreeModelLabelProvider(viewer);
}
-
+
@Override
public boolean update(TreePath elementPath) {
return fBaseProvider.update( createFullPath(elementPath) );
@@ -660,12 +660,12 @@ public class SubTreeModelViewer extends TreeModelViewer {
fBaseProvider.removeListener(listener);
}
}
-
+
private TreePath createFullPath(TreePath subPath) {
if (fRootPath == null) {
return TreePath.EMPTY;
}
-
+
Object[] segments = new Object[fRootPath.getSegmentCount() + subPath.getSegmentCount()];
for (int i = 0; i < fRootPath.getSegmentCount(); i++) {
segments[i] = fRootPath.getSegment(i);
@@ -675,7 +675,7 @@ public class SubTreeModelViewer extends TreeModelViewer {
}
return new TreePath(segments);
}
-
+
private TreePath createSubPath(TreePath fullPath) {
if (fRootPath == null) {
return TreePath.EMPTY;
@@ -690,23 +690,23 @@ public class SubTreeModelViewer extends TreeModelViewer {
}
return new TreePath(segments);
}
-
+
private DelegatingTreeModelViewer getDelegatingViewer() {
if (fDelegatingViewer == null) {
fDelegatingViewer = new DelegatingTreeModelViewer();
}
return fDelegatingViewer;
}
-
+
@Override
protected ITreeModelContentProvider createContentProvider() {
return new SubTreeModelContentProvider();
}
-
+
@Override
protected ITreeModelLabelProvider createLabelProvider() {
return new SubTreeModelLabelProvider(getDelegatingViewer());
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TimeTriggeredProgressMonitorDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TimeTriggeredProgressMonitorDialog.java
index da68d82c1..128101422 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TimeTriggeredProgressMonitorDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TimeTriggeredProgressMonitorDialog.java
@@ -24,7 +24,7 @@ import org.eclipse.ui.PlatformUI;
/**
* The TimeTriggeredProgressMonitorDialog is a progress monitor dialog that only
* opens if the runnable provided exceeds the specified long operation time.
- *
+ *
* @since 3.6 - Copied from org.eclipse.ui.internal.operations.TimeTriggeredProgressMonitorDialog
*/
public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
@@ -43,7 +43,7 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
* Whether or not we've already opened a dialog.
*/
private boolean dialogOpened = false;
-
+
/**
* Wrappered monitor so we can check ticks and open the dialog when
* appropriate
@@ -52,7 +52,7 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
/**
* Create a new instance of the receiver.
- *
+ *
* @param parent
* the parent of the dialog
* @param longOperationTime
@@ -68,7 +68,7 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
/**
* Create a monitor for the receiver that wrappers the superclasses monitor.
- *
+ *
*/
public void createWrapperedMonitor() {
wrapperedMonitor = new IProgressMonitor() {
@@ -78,7 +78,7 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String,
* int)
*/
@@ -105,7 +105,7 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.core.runtime.IProgressMonitor#done()
*/
@Override
@@ -116,7 +116,7 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double)
*/
@Override
@@ -127,7 +127,7 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.core.runtime.IProgressMonitor#isCanceled()
*/
@Override
@@ -137,7 +137,7 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
*/
@Override
@@ -148,7 +148,7 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String)
*/
@Override
@@ -160,7 +160,7 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String)
*/
@Override
@@ -171,7 +171,7 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.core.runtime.IProgressMonitor#worked(int)
*/
@Override
@@ -185,7 +185,7 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.dialogs.ProgressMonitorDialog#getProgressMonitor()
*/
@Override
@@ -195,10 +195,10 @@ public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
}
return wrapperedMonitor;
}
-
+
/*
- * (non-Javadoc)
- *
+ * (non-Javadoc)
+ *
* @see org.eclipse.jface.operations.IRunnableContext#run(boolean, boolean, IRunnableWithProgress)
*/
@Override
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
index 0522d316b..24e0b712d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Wind River Systems - Fix for viewer state save/restore [188704]
+ * Wind River Systems - Fix for viewer state save/restore [188704]
* Pawel Piech (Wind River) - added support for a virtual tree model viewer (Bug 242489)
* Dorin Ciuca - Top index fix (Bug 324100)
* Anton Leherbauer (Wind River) - REVEAL delta does not always work reliably (Bug 438724)
@@ -56,7 +56,7 @@ import org.eclipse.swt.widgets.Display;
/**
* Content provider for a virtual tree.
- *
+ *
* @since 3.3
*/
public class TreeModelContentProvider implements ITreeModelContentProvider, IContentProvider, IModelChangedListener {
@@ -73,7 +73,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
/**
* Map tree paths to model proxy responsible for element
- *
+ *
* Used to install different model proxy instances for one element depending
* on the tree path.
*/
@@ -85,7 +85,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
/**
* Map element to model proxy responsible for it.
- *
+ *
* Used to install a single model proxy which is responsible for all
* instances of an element in the model tree.
*/
@@ -114,7 +114,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
* @see IViewerUpdateListener
*/
private boolean fModelSequenceRunning = false;
-
+
/**
* Map of updates in progress: element path -> list of requests
*/
@@ -127,7 +127,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
private Map<TreePath, List<ViewerUpdateMonitor>> fWaitingRequests = new HashMap<TreePath, List<ViewerUpdateMonitor>>();
private List<ViewerUpdateMonitor> fCompletedUpdates = new ArrayList<ViewerUpdateMonitor>();
-
+
private Runnable fCompletedUpdatesRunnable;
private ViewerStateTracker fStateTracker = new ViewerStateTracker(this);
@@ -158,9 +158,9 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (fViewer == null) {
return;
}
-
+
Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+
// cancel pending updates
for (List<ViewerUpdateMonitor> requests : fRequestsInProgress.values()) {
for (ViewerUpdateMonitor vu : requests) {
@@ -173,7 +173,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
fModelListeners.clear();
fUpdateListeners.clear();
disposeAllModelProxies();
-
+
synchronized(this) {
fViewer = null;
}
@@ -193,18 +193,18 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
synchronized(this) {
fViewer = (IInternalTreeModelViewer) viewer;
}
-
+
Assert.isTrue( fViewer.getDisplay().getThread() == Thread.currentThread() );
if (oldInput != null) {
fStateTracker.saveViewerState(oldInput);
}
}
-
+
@Override
public void postInputChanged(IInternalTreeModelViewer viewer, Object oldInput, Object newInput) {
Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+
cancelSubtreeUpdates(TreePath.EMPTY);
disposeAllModelProxies();
cancelSubtreeUpdates(TreePath.EMPTY);
@@ -212,7 +212,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (newInput != null) {
installModelProxy(newInput, TreePath.EMPTY);
fStateTracker.restoreViewerState(newInput);
- }
+ }
}
@Override
@@ -232,9 +232,9 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
@Override
public void preserveState(TreePath path) {
- fStateTracker.appendToPendingStateDelta(path);
+ fStateTracker.appendToPendingStateDelta(path);
}
-
+
@Override
public void removeStateUpdateListener(IStateUpdateListener listener) {
fStateTracker.removeStateUpdateListener(listener);
@@ -249,7 +249,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
public void removeModelChangedListener(IModelChangedListener listener) {
fModelListeners.remove(listener);
}
-
+
@Override
public void cancelRestore(final TreePath path, final int flags) {
fStateTracker.cancelRestore(path, flags);
@@ -260,10 +260,10 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
IModelProxy elementProxy = getElementProxy(path);
if (elementProxy instanceof ICheckboxModelProxy) {
return ((ICheckboxModelProxy) elementProxy).setChecked(getPresentationContext(), getViewer().getInput(), path, checked);
- }
+ }
return false;
}
-
+
/**
* Installs the model proxy for the given element into this content provider
* if not already installed.
@@ -271,7 +271,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
* @param path the {@link TreePath} to install the proxy for
*/
private void installModelProxy(Object input, TreePath path) {
-
+
if (!fTreeModelProxies.containsKey(path) && !fModelProxies.containsKey(path.getLastSegment())) {
Object element = path.getSegmentCount() != 0 ? path.getLastSegment() : input;
IModelProxy proxy = null;
@@ -366,7 +366,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
fTreeModelProxies.clear();
}
-
+
/**
* Removes the model proxy installed for the given element, if any.
* @param path the {@link TreePath} to dispose the model proxy for
@@ -380,8 +380,8 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (proxy != null) {
proxy.dispose();
}
- }
-
+ }
+
@Override
public void modelChanged(final IModelDelta delta, final IModelProxy proxy) {
Display display = null;
@@ -394,7 +394,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
}
if (display != null) {
- // If we're in display thread, process the delta immediately to
+ // If we're in display thread, process the delta immediately to
// avoid "skid" in processing events.
if (Thread.currentThread().equals(display.getThread())) {
doModelChanged(delta, proxy);
@@ -423,16 +423,16 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
updateModel(delta, getModelDeltaMask());
- // Initiate model update sequence before notifying of the model changed.
+ // Initiate model update sequence before notifying of the model changed.
trigger(null);
-
+
// Call model listeners after updating the viewer model.
for (IModelChangedListener iModelChangedListener : fModelListeners) {
iModelChangedListener.modelChanged(delta, proxy);
}
}
}
-
+
@Override
public void setModelDeltaMask(int mask) {
fModelDeltaMask = mask;
@@ -450,20 +450,20 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (getViewer() == null || getViewer().getInput() == null) {
return;
}
-
+
fRevealPath = null;
IModelDelta[] deltaArray = new IModelDelta[] { delta };
updateNodes(deltaArray, mask & (IModelDelta.REMOVED | IModelDelta.UNINSTALL));
updateNodes(deltaArray, mask & ITreeModelContentProvider.UPDATE_MODEL_DELTA_FLAGS
& ~(IModelDelta.REMOVED | IModelDelta.UNINSTALL));
updateNodes(deltaArray, mask & ITreeModelContentProvider.CONTROL_MODEL_DELTA_FLAGS);
-
+
fStateTracker.checkIfRestoreComplete();
}
/**
* Returns a tree path for the node including the root element.
- *
+ *
* @param node
* model delta
* @return corresponding tree path
@@ -479,7 +479,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
/**
* Returns a tree path for the node, *not* including the root element.
- *
+ *
* @param node
* model delta
* @return corresponding tree path
@@ -497,7 +497,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
/**
* Returns the viewer this content provider is working for.
- *
+ *
* @return viewer
*/
protected IInternalTreeModelViewer getViewer() {
@@ -532,7 +532,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (filters.length > 0) {
for (int j = 0; j < filters.length; j++) {
if (filters[j] instanceof TreeModelViewerFilter &&
- ((TreeModelViewerFilter)filters[j]).isApplicable(fViewer, parentElement))
+ ((TreeModelViewerFilter)filters[j]).isApplicable(fViewer, parentElement))
{
return true;
}
@@ -548,7 +548,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
for (int j = 0; j < filters.length; j++) {
if (filters[j] instanceof TreeModelViewerFilter) {
// Skip the filter if not applicable to parent element
- Object parentElement = parentElementOrTreePath instanceof TreePath
+ Object parentElement = parentElementOrTreePath instanceof TreePath
? ((TreePath)parentElementOrTreePath).getLastSegment() : parentElementOrTreePath;
if (parentElement == null) {
parentElement = fViewer.getInput();
@@ -557,7 +557,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
continue;
}
}
-
+
if (!(filters[j].select((Viewer) fViewer, parentElementOrTreePath, element))) {
return true;
}
@@ -573,7 +573,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
cancelSubtreeUpdates(path);
}
-
+
boolean addFilteredIndex(TreePath parentPath, int index, Object element) {
Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
return fTransform.addFilteredIndex(parentPath, index, element);
@@ -616,12 +616,12 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
/**
* Notification an update request has started
- *
+ *
* @param update the update to notify about
*/
void updateStarted(ViewerUpdateMonitor update) {
Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+
List<ViewerUpdateMonitor> requests = fRequestsInProgress.get(update.getSchedulingPath());
if (requests == null) {
requests = new ArrayList<ViewerUpdateMonitor>();
@@ -643,7 +643,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
/**
* Notification an update request has completed
- *
+ *
* @param updates the updates to notify
*/
void updatesComplete(final List<ViewerUpdateMonitor> updates) {
@@ -654,7 +654,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
DebugUIPlugin.trace("\tEND - " + update); //$NON-NLS-1$
}
}
-
+
// Wait a single cycle to allow viewer to queue requests triggered by completed updates.
getViewer().getDisplay().asyncExec(new Runnable() {
@Override
@@ -665,7 +665,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
for (int i = 0; i < updates.size(); i++) {
ViewerUpdateMonitor update = updates.get(i);
-
+
// Search for update in list using identity test. Otherwise a completed canceled
// update may trigger removal of up-to-date running update on the same element.
List<ViewerUpdateMonitor> requests = fRequestsInProgress.get(update.getSchedulingPath());
@@ -679,10 +679,10 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
}
}
-
+
if (found) {
- // Trigger may initiate new updates, so wait to remove requests array from
- // fRequestsInProgress map. This way updateStarted() will not send a
+ // Trigger may initiate new updates, so wait to remove requests array from
+ // fRequestsInProgress map. This way updateStarted() will not send a
// redundant "UPDATE SEQUENCE STARTED" notification.
trigger(update.getSchedulingPath());
} else {
@@ -703,12 +703,12 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
DebugUIPlugin.trace("MODEL SEQUENCE ENDS"); //$NON-NLS-1$
}
notifyUpdate(UPDATE_SEQUENCE_COMPLETE, null);
- }
+ }
}
});
-
+
}
-
+
/**
* @return Returns true if there are outstanding updates in the viewer.
*/
@@ -722,7 +722,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
ViewerStateTracker getStateTracker() {
return fStateTracker;
}
-
+
/**
* Notifies listeners about given update.
* @param type Type of update to call listeners with.
@@ -763,20 +763,20 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
/**
- * Cancels outstanding updates for the element at given path and its
+ * Cancels outstanding updates for the element at given path and its
* children.
* @param path Path of element.
*/
private void cancelSubtreeUpdates(TreePath path) {
- Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
+ Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
for (Entry<TreePath, List<ViewerUpdateMonitor>> entry : fRequestsInProgress.entrySet()) {
TreePath entryPath = entry.getKey();
if (entryPath.startsWith(path, null)) {
List<ViewerUpdateMonitor> requests = entry.getValue();
Iterator<ViewerUpdateMonitor> reqIter = requests.iterator();
while (reqIter.hasNext()) {
- // Cancel update and remove from requests list. Removing from
- // fRequestsInProgress ensures that isRequestBlocked() won't be triggered
+ // Cancel update and remove from requests list. Removing from
+ // fRequestsInProgress ensures that isRequestBlocked() won't be triggered
// by a canceled update.
reqIter.next().cancel();
reqIter.remove();
@@ -792,19 +792,19 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
for (TreePath tp : purge) {
fWaitingRequests.remove(tp);
}
-
+
fStateTracker.cancelStateSubtreeUpdates(path);
}
/**
* Returns whether this given request should be run, or should wait for
* parent update to complete.
- *
+ *
* @param update the update the schedule
*/
private void schedule(final ViewerUpdateMonitor update) {
Assert.isTrue(getViewer().getDisplay().getThread() == Thread.currentThread());
-
+
TreePath schedulingPath = update.getSchedulingPath();
List<ViewerUpdateMonitor> requests = fWaitingRequests.get(schedulingPath);
if (requests == null) {
@@ -816,15 +816,15 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (inProgressList != null) {
int staleUpdateIndex = inProgressList.indexOf(update);
if (staleUpdateIndex >= 0) {
- // Cancel update and remove from requests list. Removing from
- // fRequestsInProgress ensures that isRequestBlocked() won't be triggered
+ // Cancel update and remove from requests list. Removing from
+ // fRequestsInProgress ensures that isRequestBlocked() won't be triggered
// by a canceled update.
ViewerUpdateMonitor staleUpdate = inProgressList.remove(staleUpdateIndex);
staleUpdate.cancel();
- // Note: Do not reset the inProgressList to null. This would cause the
- // updateStarted() method to think that a new update sequence is
- // being started. Since there are waiting requests for this scheduling
- // path, the list will be cleaned up later.
+ // Note: Do not reset the inProgressList to null. This would cause the
+ // updateStarted() method to think that a new update sequence is
+ // being started. Since there are waiting requests for this scheduling
+ // path, the list will be cleaned up later.
}
}
if (inProgressList == null || inProgressList.isEmpty()) {
@@ -835,7 +835,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
return;
}
trigger(update.getSchedulingPath());
- }
+ }
});
}
} else {
@@ -843,15 +843,15 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
requests.add(coalesce(requests, update));
}
}
-
+
/**
- * Tries to coalesce the given request with any request in the list. If a match is found,
+ * Tries to coalesce the given request with any request in the list. If a match is found,
* the resulting request is then coalesced again with candidates in list.
- * @param requests List of waiting requests to coalesce with
+ * @param requests List of waiting requests to coalesce with
* @param toCoalesce request to coalesce
- * @return Returns either the coalesced request. If no match was found it returns the
- * toCoalesce parameter request. Either way the returned request needs to be added to the
- * waiting requests list.
+ * @return Returns either the coalesced request. If no match was found it returns the
+ * toCoalesce parameter request. Either way the returned request needs to be added to the
+ * waiting requests list.
*/
private ViewerUpdateMonitor coalesce(List<ViewerUpdateMonitor> requests, ViewerUpdateMonitor toCoalesce) {
for (ViewerUpdateMonitor waiting : requests) {
@@ -867,13 +867,13 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
/**
* Returns whether there are outstanding ChildrenUpdate updates for the given path.
- * This method is expected to be called during processing of a ChildrenRequest,
+ * This method is expected to be called during processing of a ChildrenRequest,
* therefore one running children request is ignored.
* @param path Path of element to check.
* @return True if there are outstanding children updates for given element.
*/
boolean areChildrenUpdatesPending(TreePath path) {
- Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
+ Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
List<ViewerUpdateMonitor> requests = fWaitingRequests.get(path);
if (requests != null) {
for (int i = 0; i < requests.size(); i++) {
@@ -897,20 +897,20 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
/**
- * Triggers waiting requests based on the given request that just
- * completed.
+ * Triggers waiting requests based on the given request that just
+ * completed.
* <p>
- * Requests are processed in order such that updates to
+ * Requests are processed in order such that updates to
* children are delayed until updates for parent elements are completed.
- * This allows the expansion/selection state of the elements to be
- * properly restored as new elements are retrieved from model.
+ * This allows the expansion/selection state of the elements to be
+ * properly restored as new elements are retrieved from model.
* </p>
- * @param schedulingPath schedulingPath path or requests to start processing. May
+ * @param schedulingPath schedulingPath path or requests to start processing. May
* be <code>null</code> to start the shortest path request.
*/
private void trigger(TreePath schedulingPath) {
Assert.isTrue(getViewer().getDisplay().getThread() == Thread.currentThread());
-
+
if (fWaitingRequests.isEmpty()) {
return;
}
@@ -936,8 +936,8 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
/**
- * Returns true if there are running requests for any parent element of
- * the given tree path.
+ * Returns true if there are running requests for any parent element of
+ * the given tree path.
* @param requestPath Path of element to check.
* @return Returns true if requests are running.
*/
@@ -954,7 +954,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
return true;
}
-
+
/**
* @param key the {@link TreePath}
* @param waiting the list of waiting requests
@@ -979,7 +979,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
/**
* Returns the element corresponding to the given tree path.
- *
+ *
* @param path
* tree path
* @return model element
@@ -995,15 +995,15 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
* Reschedule any children updates in progress for the given parent that
* have a start index greater than the given index. An element has been
* removed at this index, invalidating updates in progress.
- *
+ *
* @param parentPath
* view tree path to parent element
* @param modelIndex
* index at which an element was removed
*/
private void rescheduleUpdates(TreePath parentPath, int modelIndex) {
- Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
+
List<ViewerUpdateMonitor> requests = fRequestsInProgress.get(parentPath);
List<IChildrenUpdate> reCreate = null;
if (requests != null) {
@@ -1013,8 +1013,8 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (update instanceof IChildrenUpdate) {
IChildrenUpdate childrenUpdate = (IChildrenUpdate) update;
if (childrenUpdate.getOffset() > modelIndex) {
- // Cancel update and remove from requests list. Removing from
- // fRequestsInProgress ensures that isRequestBlocked() won't be triggered
+ // Cancel update and remove from requests list. Removing from
+ // fRequestsInProgress ensures that isRequestBlocked() won't be triggered
// by a canceled update.
childrenUpdate.cancel();
iterator.remove();
@@ -1056,49 +1056,49 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
}
}
-
+
private void doUpdateChildCount(TreePath path) {
- Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
+
Object element = getElement(path);
IElementContentProvider contentAdapter = ViewerAdapterService.getContentProvider(element);
if (contentAdapter != null) {
ChildrenCountUpdate request = new ChildrenCountUpdate(this, getViewer().getInput(), path, element, contentAdapter);
schedule(request);
}
- }
-
+ }
+
void doUpdateElement(TreePath parentPath, int modelIndex) {
- Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
+
Object parent = getElement(parentPath);
IElementContentProvider contentAdapter = ViewerAdapterService.getContentProvider(parent);
if (contentAdapter != null) {
ChildrenUpdate request = new ChildrenUpdate(this, getViewer().getInput(), parentPath, parent, modelIndex, contentAdapter);
schedule(request);
- }
- }
-
+ }
+ }
+
private void doUpdateHasChildren(TreePath path) {
- Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
+
Object element = getElement(path);
IElementContentProvider contentAdapter = ViewerAdapterService.getContentProvider(element);
if (contentAdapter != null) {
HasChildrenUpdate request = new HasChildrenUpdate(this, getViewer().getInput(), path, element, contentAdapter);
schedule(request);
}
- }
-
+ }
+
/**
- * Checks if there are outstanding updates that may replace the element
- * at given path.
+ * Checks if there are outstanding updates that may replace the element
+ * at given path.
* @param path Path of element to check.
* @return Returns true if there are outstanding updates.
*/
boolean areElementUpdatesPending(TreePath path) {
- Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
+
TreePath parentPath = path.getParentPath();
List<ViewerUpdateMonitor> requests = fWaitingRequests.get(path);
if (requests != null) {
@@ -1138,23 +1138,23 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
return false;
}
-
+
/**
* Returns the presentation context for this content provider.
- *
+ *
* @return presentation context
*/
protected IPresentationContext getPresentationContext() {
ITreeModelViewer viewer = getViewer();
if (viewer != null) {
return viewer.getPresentationContext();
- }
+ }
return null;
}
-
+
/**
* Updates the viewer with the following deltas.
- *
+ *
* @param nodes Model deltas to be processed.
* @param mask the model delta mask
* @see IModelDelta for a list of masks
@@ -1210,8 +1210,8 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
protected void handleUninstall(IModelDelta delta) {
disposeModelProxy(getFullTreePath(delta));
- }
-
+ }
+
protected void handleAdd(IModelDelta delta) {
IModelDelta parentDelta = delta.getParentDelta();
if (parentDelta == null) {
@@ -1250,7 +1250,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
TreePath childPath = parentPath.createChildPath(element);
updateHasChildren(childPath);
fStateTracker.restorePendingStateOnUpdate(childPath, modelIndex, false, false, false);
- }
+ }
} else {
if (DebugUIPlugin.DEBUG_CONTENT_PROVIDER && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
DebugUIPlugin.trace("handleAdd(" + delta.getElement() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -1273,7 +1273,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
cancelSubtreeUpdates(treePath);
getViewer().refresh(getElement(treePath));
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.ModelContentProvider#handleCollapse(org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta)
*/
@@ -1302,11 +1302,11 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (DebugUIPlugin.DEBUG_CONTENT_PROVIDER && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
DebugUIPlugin.trace("[expand] setChildCount(" + delta.getElement() + ", (model) " + childCount + " (view) " + viewCount); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
- getViewer().setChildCount(elementPath, viewCount);
+ getViewer().setChildCount(elementPath, viewCount);
}
}
}
-
+
/**
* Expands the element pointed to by given delta.
* @param delta Delta that points to the element to expand.
@@ -1348,12 +1348,12 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
}
}
-
+
/**
* Inserts the given child element of the specified parent into the tree if the element
* should *no* longer be filtered. Returns the view index of the newly inserted element
* or -1 if not inserted.
- *
+ *
* @param parentPath viewer tree path to parent element
* @param element element to insert
* @param modelIndex index of the element in the model
@@ -1394,7 +1394,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
TreePath parentPath = getViewerTreePath(delta.getParentDelta());
Object element = delta.getElement();
int modelIndex = delta.getIndex();
- int viewIndex = modelIndex >= 0 ? modelToViewIndex(parentPath, modelIndex) : -1;
+ int viewIndex = modelIndex >= 0 ? modelToViewIndex(parentPath, modelIndex) : -1;
int viewCount = getViewer().getChildCount(parentPath);
if (viewIndex >= 0 && viewIndex <= viewCount) {
// Index in range, insert.
@@ -1503,7 +1503,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (index >= 0) {
boolean filtered = isFiltered(parentPath, index);
boolean shouldFilter = shouldFilter(parentPath, delta.getReplacementElement());
-
+
// Update the filter transform
if (filtered) {
clearFilteredChild(parentPath, index);
@@ -1511,12 +1511,12 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (shouldFilter) {
addFilteredIndex(parentPath, index, delta.getElement());
}
-
+
// Update the viewer
if (filtered) {
if (!shouldFilter) {
getViewer().insert(parentPath, delta.getReplacementElement(), modelToViewIndex(parentPath, index));
- }
+ }
//else do nothing
} else {
if (shouldFilter) {
@@ -1533,8 +1533,8 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
IInternalTreeModelViewer treeViewer = getViewer();
// check if selection is allowed
IStructuredSelection candidate = new TreeSelection(getViewerTreePath(delta));
- if ((delta.getFlags() & IModelDelta.FORCE) == 0 &&
- !treeViewer.overrideSelection(treeViewer.getSelection(), candidate))
+ if ((delta.getFlags() & IModelDelta.FORCE) == 0 &&
+ !treeViewer.overrideSelection(treeViewer.getSelection(), candidate))
{
return;
}
@@ -1584,7 +1584,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
reveal(delta);
cancelRestore(getViewerTreePath(delta), IModelDelta.REVEAL);
}
-
+
/**
* Reveals the element pointed to by given delta.
* @param delta Delta pointing to the element to reveal.
@@ -1615,7 +1615,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
// only move tree based on force flag and selection policy
if ((delta.getFlags() & IModelDelta.FORCE) != 0 ||
- treeViewer.overrideSelection(treeViewer.getSelection(), new TreeSelection(elementPath)))
+ treeViewer.overrideSelection(treeViewer.getSelection(), new TreeSelection(elementPath)))
{
/*
* Bug 438724 - Save reveal parameters and redo reveal on
@@ -1627,8 +1627,8 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
treeViewer.reveal(parentPath, viewIndex);
}
}
- }
-
+ }
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ILazyTreePathContentProvider#getParents(java.lang.Object)
@@ -1643,8 +1643,8 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
*/
@Override
public void updateChildCount(TreePath treePath, int currentChildCount) {
- Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
+
if (DebugUIPlugin.DEBUG_CONTENT_PROVIDER && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
DebugUIPlugin.trace("updateChildCount(" + getElement(treePath) + ", " + currentChildCount + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
@@ -1657,12 +1657,12 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
@Override
public void updateElement(TreePath parentPath, int viewIndex) {
Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+
int modelIndex = viewToModelIndex(parentPath, viewIndex);
if (DebugUIPlugin.DEBUG_CONTENT_PROVIDER && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
DebugUIPlugin.trace("updateElement("+ getElement(parentPath) + ", " + viewIndex + ") > modelIndex = " + modelIndex); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
- doUpdateElement(parentPath, modelIndex);
+ doUpdateElement(parentPath, modelIndex);
}
/* (non-Javadoc)
@@ -1671,7 +1671,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
@Override
public void updateHasChildren(TreePath path) {
Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+
if (DebugUIPlugin.DEBUG_CONTENT_PROVIDER && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
DebugUIPlugin.trace("updateHasChildren(" + getElement(path)); //$NON-NLS-1$
}
@@ -1680,7 +1680,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
/**
* Schedules given update to be performed on the viewer.
- * Updates are queued up if they are completed in the same
+ * Updates are queued up if they are completed in the same
* UI cycle.
* @param update Update to perform.
*/
@@ -1705,7 +1705,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
updateJob = fCompletedUpdatesRunnable;
}
}
-
+
if (updateJob != null) {
if (Thread.currentThread() == display.getThread()) {
performUpdates();
@@ -1720,7 +1720,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
*/
private void performUpdates() {
Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+
List<ViewerUpdateMonitor> jobCompletedUpdates;
synchronized(this) {
if (isDisposed()) {
@@ -1739,10 +1739,10 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (status == null || status.isOK()) {
completedUpdate.performUpdate();
}
- }
+ }
}
} finally {
updatesComplete(jobCompletedUpdates);
- }
+ }
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java
index cce0f4947..705b10734 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java
@@ -45,17 +45,17 @@ import org.eclipse.swt.widgets.Display;
/**
* @since 3.3
*/
-public class TreeModelLabelProvider extends ColumnLabelProvider
- implements ITreeModelLabelProvider, IModelChangedListener
+public class TreeModelLabelProvider extends ColumnLabelProvider
+ implements ITreeModelLabelProvider, IModelChangedListener
{
-
+
private IInternalTreeModelViewer fViewer;
/**
* Note: access this variable should be synchronized with <code>this</code>.
*/
private List<ILabelUpdate> fComplete;
-
+
/**
* Cache of images used for elements in this label provider. Label updates
* use the method <code>getImage(...)</code> to cache images for
@@ -76,32 +76,32 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
* RGB values. The colors are disposed with this label provider.
*/
private Map<RGB, Color> fColorCache = new HashMap<RGB, Color>();
-
+
/**
* Label listeners
*/
private ListenerList<ILabelUpdateListener> fLabelListeners = new ListenerList<>();
-
+
/**
* Updates waiting to be sent to the label provider. The map contains
- * lists of updates, keyed using the provider.
+ * lists of updates, keyed using the provider.
*/
private Map<IElementLabelProvider, List<ILabelUpdate>> fPendingUpdates = new HashMap<IElementLabelProvider, List<ILabelUpdate>>();
-
+
/**
* A runnable that will send the label update requests.
- * This variable allows the job to be canceled and re-scheduled if
- * new updates are requested.
+ * This variable allows the job to be canceled and re-scheduled if
+ * new updates are requested.
*/
private Runnable fPendingUpdatesRunnable;
-
+
/**
* List of updates in progress
*/
private List<ILabelUpdate> fUpdatesInProgress = new ArrayList<ILabelUpdate>();
-
+
/**
- * Delta visitor actively cancels the outstanding label updates for
+ * Delta visitor actively cancels the outstanding label updates for
* elements that are changed and are about to be updated.
*/
class CancelPendingUpdatesVisitor implements IModelDeltaVisitor {
@@ -116,7 +116,7 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
} else if ((delta.getFlags() & IModelDelta.STATE) > 0) {
cancelElementUpdates(delta.getElement(), false);
return true;
- }
+ }
return true;
}
}
@@ -125,7 +125,7 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
* Delta visitor
*/
private CancelPendingUpdatesVisitor fCancelPendingUpdatesVisitor = new CancelPendingUpdatesVisitor();
-
+
/**
* Constructs a new label provider on the given display
* @param viewer Viewer that this label provider is used with.
@@ -134,11 +134,11 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
fViewer = viewer;
fViewer.addModelChangedListener(this);
}
-
+
/**
* Returns an image for the given image descriptor or <code>null</code>. Adds the image
* to a cache of images if it does not already exist.
- *
+ *
* @param descriptor image descriptor or <code>null</code>
* @return image or <code>null</code>
*/
@@ -157,17 +157,17 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
/**
* Returns the display to use for resource allocation.
- *
+ *
* @return display
*/
private Display getDisplay() {
return fViewer.getDisplay();
}
-
+
/**
- * Returns a font for the given font data or <code>null</code>. Adds the font to the font
+ * Returns a font for the given font data or <code>null</code>. Adds the font to the font
* cache if not yet created.
- *
+ *
* @param fontData font data or <code>null</code>
* @return font font or <code>null</code>
*/
@@ -182,12 +182,12 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
fFontCache.put(fontData, font);
}
return font;
- }
-
+ }
+
/**
- * Returns a color for the given RGB or <code>null</code>. Adds the color to the color
+ * Returns a color for the given RGB or <code>null</code>. Adds the color to the color
* cache if not yet created.
- *
+ *
* @param rgb RGB or <code>null</code>
* @return color or <code>null</code>
*/
@@ -210,10 +210,10 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
@Override
public void dispose() {
Assert.isTrue(fViewer.getDisplay().getThread() == Thread.currentThread());
-
+
fViewer.removeModelChangedListener(this);
fViewer = null;
-
+
List<ILabelUpdate> complete = null;
synchronized(this) {
complete = fComplete;
@@ -225,7 +225,7 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
}
}
for (ILabelUpdate currentUpdate : fUpdatesInProgress) {
- currentUpdate.cancel();
+ currentUpdate.cancel();
}
if (fPendingUpdatesRunnable != null) {
@@ -255,18 +255,18 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
private boolean isDisposed() {
return fViewer == null;
}
-
+
@Override
public void update(ViewerCell cell) {
- // NOT USED - the viewer updates each row instead
- }
-
+ // NOT USED - the viewer updates each row instead
+ }
+
@Override
public boolean update(TreePath elementPath) {
Assert.isTrue(fViewer.getDisplay().getThread() == Thread.currentThread());
-
+
cancelPathUpdates(elementPath);
-
+
String[] visibleColumns = fViewer.getVisibleColumns();
Object element = elementPath.getLastSegment();
IElementLabelProvider presentation = ViewerAdapterService.getLabelProvider(element);
@@ -292,9 +292,9 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
return false;
}
}
-
+
/**
- * Cancel any outstanding updates that are running for this element.
+ * Cancel any outstanding updates that are running for this element.
* @param elementPath Element to cancel updates for.
*/
private void cancelPathUpdates(TreePath elementPath) {
@@ -308,28 +308,28 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
/**
* Sets the element's display information in the viewer.
- *
- * @param path Element path.
+ *
+ * @param path Element path.
* @param numColumns Number of columns in the data.
- * @param labels Array of labels. The array cannot to be
+ * @param labels Array of labels. The array cannot to be
* <code>null</code>, but values within the array may be.
* @param images Array of image descriptors, may be <code>null</code>.
* @param fontDatas Array of fond data objects, may be <code>null</code>.
- * @param foregrounds Array of RGB values for foreground colors, may be
+ * @param foregrounds Array of RGB values for foreground colors, may be
* <code>null</code>.
- * @param backgrounds Array of RGB values for background colors, may be
+ * @param backgrounds Array of RGB values for background colors, may be
* <code>null</code>.
* @param checked Whether given item should be checked.
* @param grayed Whether given item's checkbox should be grayed.
*/
void setElementData(TreePath path, int numColumns, String[] labels, ImageDescriptor[] images,
- FontData[] fontDatas, RGB[] foregrounds, RGB[] backgrounds, boolean checked, boolean grayed)
+ FontData[] fontDatas, RGB[] foregrounds, RGB[] backgrounds, boolean checked, boolean grayed)
{
fViewer.setElementData(path, numColumns, labels, images, fontDatas, foregrounds, backgrounds);
fViewer.setElementChecked(path, checked, grayed);
}
-
+
private void startRequests(Runnable runnable) {
if (runnable != fPendingUpdatesRunnable) {
return;
@@ -347,11 +347,11 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
fPendingUpdates.clear();
fPendingUpdatesRunnable = null;
}
-
+
/**
* Cancels all running updates for the given element. If seachFullPath is true,
- * all updates will be canceled which have the given element anywhere in their
- * patch.
+ * all updates will be canceled which have the given element anywhere in their
+ * patch.
* @param element element to search for.
* @param searchFullPath flag whether to look for the element in the full path
* of the update
@@ -367,7 +367,7 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
if (element.equals(updatePath.getSegment(i))) {
currentUpdate.cancel();
break; // Exit the for loop, stay in the while loop
- }
+ }
}
}
} else {
@@ -380,7 +380,7 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
/**
* Returns the presentation context for this label provider.
- *
+ *
* @return presentation context
*/
private IPresentationContext getPresentationContext() {
@@ -389,14 +389,14 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
/**
* A label update is complete.
- *
+ *
* @param update Update that is to be completed.
*/
synchronized void complete(ILabelUpdate update) {
if (fViewer == null) {
return;
}
-
+
if (fComplete == null) {
fComplete = new LinkedList<ILabelUpdate>();
fViewer.getDisplay().asyncExec(new Runnable() {
@@ -422,28 +422,28 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
}
fComplete.add(update);
}
-
+
@Override
public void addLabelUpdateListener(ILabelUpdateListener listener) {
fLabelListeners.add(listener);
}
-
+
@Override
public void removeLabelUpdateListener(ILabelUpdateListener listener) {
fLabelListeners.remove(listener);
}
-
+
/**
* Notification an update request has started
- *
+ *
* @param update Update that was started
*/
void updateStarted(ILabelUpdate update) {
Assert.isTrue(fViewer.getDisplay().getThread() == Thread.currentThread());
-
+
boolean begin = fUpdatesInProgress.isEmpty();
fUpdatesInProgress.add(update);
-
+
if (begin) {
if (DebugUIPlugin.DEBUG_UPDATE_SEQUENCE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
DebugUIPlugin.trace("LABEL SEQUENCE BEGINS"); //$NON-NLS-1$
@@ -455,15 +455,15 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
}
notifyUpdate(TreeModelContentProvider.UPDATE_BEGINS, update);
}
-
+
/**
* Notification an update request has completed
- *
+ *
* @param update Update that completed.
*/
void updateComplete(ILabelUpdate update) {
fUpdatesInProgress.remove(update);
-
+
if (DebugUIPlugin.DEBUG_UPDATE_SEQUENCE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
DebugUIPlugin.trace("\tEND - " + update); //$NON-NLS-1$
}
@@ -475,7 +475,7 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
notifyUpdate(TreeModelContentProvider.UPDATE_SEQUENCE_COMPLETE, null);
}
}
-
+
private void notifyUpdate(final int type, final ILabelUpdate update) {
if (!fLabelListeners.isEmpty()) {
for (ILabelUpdateListener iLabelUpdateListener : fLabelListeners) {
@@ -513,5 +513,5 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
public void modelChanged(IModelDelta delta, IModelProxy proxy) {
delta.accept(fCancelPendingUpdatesVisitor);
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerAdapterService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerAdapterService.java
index 9ec884a25..175aa6df6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerAdapterService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerAdapterService.java
@@ -29,96 +29,96 @@ import org.eclipse.jface.viewers.IStructuredSelection;
/**
* Helper class to retrieve adapters associated with viewers.
- *
+ *
* @since 3.4
*/
public class ViewerAdapterService {
-
+
/**
* Returns the content provider for the given element or
* <code>null</code> if none.
- *
+ *
* @param element element to retrieve adapter for
* @return content provider or <code>null</code>
*/
- public static IElementContentProvider getContentProvider(Object element) {
+ public static IElementContentProvider getContentProvider(Object element) {
return (IElementContentProvider)getAdapter(element, IElementContentProvider.class);
}
-
+
/**
* Returns the label provider for the given element or
* <code>null</code> if none.
- *
+ *
* @param element element to retrieve adapter for
* @return label provider or <code>null</code>
*/
- public static IElementLabelProvider getLabelProvider(Object element) {
+ public static IElementLabelProvider getLabelProvider(Object element) {
IElementLabelProvider lp = (IElementLabelProvider)getAdapter(element, IElementLabelProvider.class);
if (lp == null && element instanceof String) {
// there are no adapters registered for Strings
return new DebugElementAdapterFactory().getAdapter(element, IElementLabelProvider.class);
}
return lp;
- }
-
+ }
+
/**
* Returns the column presentation factory for the given element or <code>null</code>.
- *
+ *
* @param element element to retrieve adapter for
* @return column presentation factory of <code>null</code>
*/
public static IColumnPresentationFactory getColumnPresentationFactory(Object element) {
return (IColumnPresentationFactory)getAdapter(element, IColumnPresentationFactory.class);
- }
-
+ }
+
/**
* Returns the model proxy factory for the given element or
* <code>null</code> if none.
- *
+ *
* @param element element to retrieve adapter for
* @return model proxy factory or <code>null</code>
*/
public static IModelProxyFactory getModelProxyFactory(Object element) {
return (IModelProxyFactory)getAdapter(element, IModelProxyFactory.class);
- }
+ }
/**
* Returns the model proxy factory v.2 for the given element or
* <code>null</code> if none.
- *
+ *
* @param element element to retrieve adapter for
* @return model proxy factory or <code>null</code>
*/
public static IModelProxyFactory2 getModelProxyFactory2(Object element) {
return (IModelProxyFactory2)getAdapter(element, IModelProxyFactory2.class);
- }
-
+ }
+
/**
* Returns the memento provider for the given element or
* <code>null</code> if none.
- *
+ *
* @param element element to retrieve adapter for
* @return memento provider or <code>null</code>
*/
public static IElementMementoProvider getMementoProvider(Object element) {
return (IElementMementoProvider)getAdapter(element, IElementMementoProvider.class);
- }
-
+ }
+
/**
* Returns the element editor for the given element or <code>null</code>.
- *
+ *
* @param element element to retrieve adapter for
* @return element editor or <code>null</code>
*/
public static IElementEditor getElementEditor(Object element) {
return (IElementEditor)getAdapter(element, IElementEditor.class);
- }
-
+ }
+
/**
* Creates and returns the selection policy associated with the given selection
* or <code>null</code> if none.
- *
+ *
* @param selection or <code>null</code>
* @param context presentation context
* @return selection policy or <code>null</code>
@@ -133,28 +133,28 @@ public class ViewerAdapterService {
}
}
return null;
- }
-
+ }
+
/**
* Returns the viewer input provider for the given element or
* <code>null</code> if none.
- *
+ *
* @param element element to retrieve adapter for
* @return viewer input provider or <code>null</code>
*/
- public static IViewerInputProvider getInputProvider(Object element) {
+ public static IViewerInputProvider getInputProvider(Object element) {
return (IViewerInputProvider)getAdapter(element, IViewerInputProvider.class);
- }
-
+ }
+
/**
* Returns an adapter of the specified type for the given object or <code>null</code>
* if none.
- *
+ *
* @param element element to retrieve adapter for
* @param type adapter type
* @return adapter or <code>null</code>
*/
private static Object getAdapter(Object element, Class<?> type) {
- return DebugPlugin.getAdapter(element, type);
+ return DebugPlugin.getAdapter(element, type);
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerInputUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerInputUpdate.java
index 3c46cf1b9..4953b6e68 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerInputUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerInputUpdate.java
@@ -24,7 +24,7 @@ import org.eclipse.ui.progress.WorkbenchJob;
* Internal implementation of the {@link IViewerInputUpdate} interface. Allows
* implementors to translate the active debug context into an appropriate viewer
* input.
- *
+ *
* @since 3.4
* @see IViewerInputUpdate
*/
@@ -34,32 +34,32 @@ public class ViewerInputUpdate extends Request implements IViewerInputUpdate {
* Presentation context
*/
private IPresentationContext fContext;
-
+
/**
* New viewer input
*/
private Object fSource;
-
+
/**
* Whether this update is done
*/
private boolean fDone;
-
+
/**
* Viewer input to use
*/
private Object fInputElement;
-
+
/**
* Viewer input at the time the request was made
*/
private Object fViewerInput;
-
+
/**
* Client making request
*/
private IViewerInputRequestor fRequestor;
-
+
/**
* When <code>done()</code> is called, the viewer must be informed that the update is complete in the UI thread.
*/
@@ -73,10 +73,10 @@ public class ViewerInputUpdate extends Request implements IViewerInputUpdate {
return Status.OK_STATUS;
}
};
-
+
/**
* Constructs a viewer input update request.
- *
+ *
* @param context presentation context
* @param viewerInput viewer input at the time the request was made
* @param requestor client making the request
@@ -97,7 +97,7 @@ public class ViewerInputUpdate extends Request implements IViewerInputUpdate {
public IPresentationContext getPresentationContext() {
return fContext;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitor#done()
*/
@@ -111,10 +111,10 @@ public class ViewerInputUpdate extends Request implements IViewerInputUpdate {
}
fViewerInputUpdateJob.schedule();
}
-
+
/**
* Returns whether this request is done yet.
- *
+ *
* @return whether this request is done yet
*/
protected synchronized boolean isDone() {
@@ -144,7 +144,7 @@ public class ViewerInputUpdate extends Request implements IViewerInputUpdate {
public void setInputElement(Object element) {
fInputElement = element;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputUpdate#getViewerInput()
*/
@@ -160,7 +160,7 @@ public class ViewerInputUpdate extends Request implements IViewerInputUpdate {
public Object getViewerInput() {
return fViewerInput;
}
-
-
+
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java
index e951d65a4..6368a43df 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -46,28 +46,28 @@ import org.eclipse.ui.IMemento;
import org.eclipse.ui.XMLMemento;
/**
- * Class containing logic to save and restore expanded state of the tree model
- * viewer.
+ * Class containing logic to save and restore expanded state of the tree model
+ * viewer.
* <p>
- * When the input to the viewer is changes, the tree model viewer attempts to
- * save the expansion state of elements as well as currently selected element and
+ * When the input to the viewer is changes, the tree model viewer attempts to
+ * save the expansion state of elements as well as currently selected element and
* scroll position. Each expanded element is queried for its memento and all the
* collected mementos are saved into a delta tree then serialized by the viewer.<br>
- * When a new input is set to the viewer, the viewer compares the input's memento
- * with the stored mementos and if a match is found, it attempts to restore the
+ * When a new input is set to the viewer, the viewer compares the input's memento
+ * with the stored mementos and if a match is found, it attempts to restore the
* previous expansion state to the viewer. As elements are revealed and realized
- * in the viewer, the element's memento is compared against the memento stored in
- * the saved state delta. If matching elements are found in the delta, the expansion
- * and selection state is then restored to those elements.
+ * in the viewer, the element's memento is compared against the memento stored in
+ * the saved state delta. If matching elements are found in the delta, the expansion
+ * and selection state is then restored to those elements.
* </p><p>
- * Additionally to saving restoring state on input change, the viewer also
+ * Additionally to saving restoring state on input change, the viewer also
* saves/restores elements' state when the model requests viewer to refresh model
* structure. Since the viewer items are matched to the model elements using items'
- * indexes, inserting or removing elements in model can cause the expansion state
+ * indexes, inserting or removing elements in model can cause the expansion state
* of elements to shift after a refresh. To compensate for this, the viewer saves
- * the elements before a refresh is performed into a delta, but without encoding
+ * the elements before a refresh is performed into a delta, but without encoding
* elements using mementos. As the refresh of the tree progresses, the save state
- * is restored to the tree and elements are expanded or collapsed as needed to
+ * is restored to the tree and elements are expanded or collapsed as needed to
* compensate for changes in model structure.
* </p>
* @see TreeModelContentProvider
@@ -79,14 +79,14 @@ class ViewerStateTracker {
static final int STATE_SAVE_SEQUENCE_COMPLETE = 5;
static final int STATE_RESTORE_SEQUENCE_BEGINS = 6;
static final int STATE_RESTORE_SEQUENCE_COMPLETE = 7;
-
+
/**
* Dummy marker element used in the state delta. The marker indicates that a
* given element in the pending state delta has been removed. It replaces
* the original element so that it may optionally be garbage collected.
*/
private final static String ELEMENT_REMOVED = "ELEMENT_REMOVED"; //$NON-NLS-1$
-
+
/**
* Collector of memento encoding requests.
*/
@@ -94,18 +94,18 @@ class ViewerStateTracker {
/**
* Adds the request to this manager.
- *
+ *
* @param request to add
*/
public void addRequest(ElementMementoRequest request);
-
+
/**
* Notification the request is complete.
- *
+ *
* @param request that was completed
*/
public void requestComplete(ElementMementoRequest request);
-
+
/**
* Process the queued requests. Accepts no more new requests.
*/
@@ -116,7 +116,7 @@ class ViewerStateTracker {
*/
public void cancel();
}
-
+
/**
* LRU cache for viewer states
*/
@@ -140,11 +140,11 @@ class ViewerStateTracker {
* Content provider that is using this state tracker.
*/
private TreeModelContentProvider fContentProvider;
-
+
ViewerStateTracker(TreeModelContentProvider contentProvider) {
fContentProvider = contentProvider;
}
-
+
/**
* Map of viewer states keyed by viewer input mementos
*/
@@ -157,21 +157,21 @@ class ViewerStateTracker {
/**
* Flag indicating that the content provider is performing
- * state restore operations.
+ * state restore operations.
*/
- private boolean fInStateRestore = false;
-
+ private boolean fInStateRestore = false;
+
/**
* State update listeners
*/
private ListenerList<IStateUpdateListener> fStateUpdateListeners = new ListenerList<>();
-
+
/**
* Postpone restoring REVEAL element until the current updates are complete.
* See bug 324100
*/
protected PendingRevealDelta fPendingSetTopItem = null;
-
+
/**
* Set of IMementoManager's that are currently saving state
*/
@@ -186,7 +186,7 @@ class ViewerStateTracker {
* Object used to key compare requests in map.
*/
private static class CompareRequestKey {
-
+
CompareRequestKey(TreePath path, IModelDelta delta) {
fPath = path;
fDelta = delta;
@@ -214,13 +214,13 @@ class ViewerStateTracker {
* Compare requests that are currently running.
*/
private Map<CompareRequestKey, ElementCompareRequest> fCompareRequestsInProgress = new LinkedHashMap<CompareRequestKey, ElementCompareRequest>();
-
-
+
+
/**
* Cancels pending updates.
*/
void dispose() {
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
for (IElementMementoCollector emc : fPendingStateSaves) {
emc.cancel();
}
@@ -229,21 +229,21 @@ class ViewerStateTracker {
ecr.cancel();
}
fCompareRequestsInProgress.clear();
-
+
if (fPendingSetTopItem != null) {
fPendingSetTopItem.dispose();
}
}
-
+
/**
* Restores viewer state for the given input
- *
+ *
* @param input
* viewer input
*/
private void startRestoreViewerState(final Object input) {
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+
fPendingState = null;
final IElementMementoProvider defaultProvider = ViewerAdapterService.getMementoProvider(input);
if (defaultProvider != null) {
@@ -256,7 +256,7 @@ class ViewerStateTracker {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.debug.internal.ui.viewers.model.provisional.viewers
* .
@@ -283,7 +283,7 @@ class ViewerStateTracker {
DebugUIPlugin.trace("STATE RESTORE INPUT COMARE ENDED : " + fRequest + " - MATCHING STATE FOUND"); //$NON-NLS-1$ //$NON-NLS-2$
}
- // Process start of restore in an async cycle because we may still be inside inputChanged()
+ // Process start of restore in an async cycle because we may still be inside inputChanged()
// call. I.e. the "input.equals(fContentProvider.getViewer().getInput())" test may fail.
fContentProvider.getViewer().getDisplay().asyncExec(new Runnable() {
@Override
@@ -322,7 +322,7 @@ class ViewerStateTracker {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.debug.internal.ui.viewers.model.provisional.viewers
* .IMementoManager#processReqeusts()
@@ -339,7 +339,7 @@ class ViewerStateTracker {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.debug.internal.ui.viewers.model.provisional.viewers
* .
@@ -350,7 +350,7 @@ class ViewerStateTracker {
public void addRequest(ElementMementoRequest req) {
fRequest = req;
}
-
+
@Override
public void cancel() {
// not used
@@ -364,7 +364,7 @@ class ViewerStateTracker {
} else {
if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
DebugUIPlugin.trace("STATE RESTORE: No input memento provider"); //$NON-NLS-1$
- }
+ }
}
}
@@ -377,7 +377,7 @@ class ViewerStateTracker {
{
return; // Not initialized yet.
}
-
+
if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
DebugUIPlugin.trace("STATE APPEND BEGIN: " + path.getLastSegment()); //$NON-NLS-1$
}
@@ -390,7 +390,7 @@ class ViewerStateTracker {
}
if (!fContentProvider.getViewer().saveElementState(path, delta, IModelDelta.COLLAPSE | IModelDelta.EXPAND | IModelDelta.SELECT)) {
- // Path to save the state was not found or there was no
+ // Path to save the state was not found or there was no
// (expansion) state to save! Abort.
if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
DebugUIPlugin.trace("STATE APPEND CANCEL: Element " + path.getLastSegment() + " not found."); //$NON-NLS-1$ //$NON-NLS-2$
@@ -424,14 +424,14 @@ class ViewerStateTracker {
DebugUIPlugin.trace("\tAPPEND OUTSTANDING RESTORE: " + fPendingState); //$NON-NLS-1$
}
- // If the append delta is generated for a sub-tree, copy the pending delta
+ // If the append delta is generated for a sub-tree, copy the pending delta
// attributes into the pending delta.
if (path.getSegmentCount() > 0) {
fPendingState.accept( new IModelDeltaVisitor() {
@Override
public boolean visit(IModelDelta pendingDeltaNode, int depth) {
TreePath pendingDeltaPath = fContentProvider.getViewerTreePath(pendingDeltaNode);
- if (path.startsWith(pendingDeltaPath, null))
+ if (path.startsWith(pendingDeltaPath, null))
{
ModelDelta appendDelta = findDeltaForPath(appendDeltaRoot, pendingDeltaPath);
appendDelta.setFlags(pendingDeltaNode.getFlags());
@@ -463,9 +463,9 @@ class ViewerStateTracker {
// If the pending state node does not contain any flags,
// we can also skip it.
ModelDelta saveDeltaNode = findSubDeltaParent(appendDeltaRoot, pendingDeltaNode);
- if (saveDeltaNode != null &&
+ if (saveDeltaNode != null &&
!isDeltaInParent(pendingDeltaNode, saveDeltaNode) &&
- pendingDeltaNode.getFlags() != IModelDelta.NO_CHANGE)
+ pendingDeltaNode.getFlags() != IModelDelta.NO_CHANGE)
{
saveDeltaNode.setChildCount(pendingDeltaNode.getParentDelta().getChildCount());
copyIntoDelta(pendingDeltaNode, saveDeltaNode);
@@ -485,7 +485,7 @@ class ViewerStateTracker {
return pendingDeltaNode.getChildCount() > 0;
}
}
-
+
});
}
@@ -533,9 +533,9 @@ class ViewerStateTracker {
// set back the pending reveal flag
ModelDelta revealDelta = fPendingSetTopItem.getDelta();
revealDelta.setFlags(revealDelta.getFlags() | IModelDelta.REVEAL);
-
+
fPendingSetTopItem.dispose();
-
+
ModelDelta saveDeltaNode = findSubDeltaParent(saveDeltaRoot, revealDelta);
if (saveDeltaNode != null) {
clearRevealFlag(saveDeltaRoot);
@@ -553,7 +553,7 @@ class ViewerStateTracker {
}
}
}
-
+
if (fPendingState != null) {
// If the restore for the current input was never completed,
// preserve
@@ -688,7 +688,7 @@ class ViewerStateTracker {
* Encodes delta elements into mementos using the given provider.
* @param rootDelta the {@link ModelDelta} to encode
* @param defaultProvider the default provider to use when processing the given delta
- *
+ *
*/
protected void encodeDelta(final ModelDelta rootDelta, final IElementMementoProvider defaultProvider) {
final Object input = rootDelta.getElement();
@@ -708,7 +708,7 @@ class ViewerStateTracker {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.debug.internal.ui.viewers.model.provisional.viewers
* .IMementoManager
@@ -717,7 +717,7 @@ class ViewerStateTracker {
*/
@Override
public void requestComplete(ElementMementoRequest request) {
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
notifyStateUpdate(input, TreeModelContentProvider.UPDATE_COMPLETE, request);
if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
@@ -725,8 +725,8 @@ class ViewerStateTracker {
}
if (!request.isCanceled() && (request.getStatus() == null || request.getStatus().isOK())) {
- boolean requestsComplted = false;
- if (!fCanceled) {
+ boolean requestsComplted = false;
+ if (!fCanceled) {
fRequests.remove(request);
requestsComplted = fRequests.isEmpty();
}
@@ -751,12 +751,12 @@ class ViewerStateTracker {
@Override
public void cancel() {
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
if (fCanceled) {
return;
}
-
+
fCanceled = true;
for (IElementMementoRequest req : fRequests) {
req.cancel();
@@ -767,18 +767,18 @@ class ViewerStateTracker {
}
stateSaveComplete(input, this);
}
-
+
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.debug.internal.ui.viewers.model.provisional.viewers
* .IMementoManager#processReqeusts()
*/
@Override
public void processReqeusts() {
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+
Map<IElementMementoProvider, List<IElementMementoRequest>> providers = new HashMap<IElementMementoProvider, List<IElementMementoRequest>>();
for (IElementMementoRequest request : fRequests) {
notifyStateUpdate(input, TreeModelContentProvider.UPDATE_BEGINS, request);
@@ -802,7 +802,7 @@ class ViewerStateTracker {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.debug.internal.ui.viewers.model.provisional.viewers
* .IMementoManager
@@ -811,8 +811,8 @@ class ViewerStateTracker {
*/
@Override
public void addRequest(ElementMementoRequest request) {
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+
fRequests.add(request);
}
@@ -820,14 +820,14 @@ class ViewerStateTracker {
IModelDeltaVisitor visitor = new IModelDeltaVisitor() {
@Override
public boolean visit(IModelDelta delta, int depth) {
- // Add the CONTENT flag to all nodes with an EXPAND flag.
- // During restoring, this flag is used as a marker indicating
- // whether all the content of a given element has been
+ // Add the CONTENT flag to all nodes with an EXPAND flag.
+ // During restoring, this flag is used as a marker indicating
+ // whether all the content of a given element has been
// retrieved.
if ((delta.getFlags() | IModelDelta.EXPAND) != 0) {
((ModelDelta)delta).setFlags(delta.getFlags() | IModelDelta.CONTENT);
}
-
+
// This is the root element, save the root element memento in 'inputMemento'.
if (delta.getParentDelta() == null) {
manager.addRequest(new ElementMementoRequest(fContentProvider, input, manager,
@@ -855,8 +855,8 @@ class ViewerStateTracker {
* @param manager the manager to notify
*/
private void stateSaveStarted(Object input, IElementMementoCollector manager) {
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+
notifyStateUpdate(input, STATE_SAVE_SEQUENCE_BEGINS, null);
fPendingStateSaves.add(manager);
}
@@ -867,8 +867,8 @@ class ViewerStateTracker {
* @param manager the manager to notify
*/
private void stateSaveComplete(Object input, IElementMementoCollector manager) {
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+
notifyStateUpdate(input, STATE_SAVE_SEQUENCE_COMPLETE, null);
fPendingStateSaves.remove(manager);
if (fQueuedRestore != null) {
@@ -880,11 +880,11 @@ class ViewerStateTracker {
/**
* Returns whether any state saving is in progress.
- *
+ *
* @return whether any state saving is in progress
*/
private boolean isSavingState() {
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
return !fPendingStateSaves.isEmpty();
}
@@ -892,13 +892,13 @@ class ViewerStateTracker {
/**
* Restores the viewer state unless a save is taking place. If a save is
* taking place, the restore is queued.
- *
+ *
* @param input
* viewer input
*/
protected void restoreViewerState(final Object input) {
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+
fPendingState = null;
if (isSavingState()) {
fQueuedRestore = input;
@@ -910,7 +910,7 @@ class ViewerStateTracker {
public void cancelRestore(final TreePath path, final int flags) {
if (fInStateRestore) {
- // If we are currently processing pending state already, ignore
+ // If we are currently processing pending state already, ignore
// cancelRestore requests. These requests may be triggered in the viewer
// by changes to the tree state (Bug 295585).
return;
@@ -921,15 +921,15 @@ class ViewerStateTracker {
return;
}
- // Nothing else to do
+ // Nothing else to do
if (fPendingState == null) {
return;
}
-
+
if ((flags & (IModelDelta.SELECT | IModelDelta.REVEAL)) != 0) {
// If we're canceling reveal and this is waiting for updates to complete
// then just cancel it and return
-
+
// If we're canceling select or reveal, cancel it for all of pending deltas
final int mask = flags & (IModelDelta.SELECT | IModelDelta.REVEAL);
fPendingState.accept(new IModelDeltaVisitor() {
@@ -977,12 +977,12 @@ class ViewerStateTracker {
// Descend delta to clear the EXPAND flags of a canceled expand
return true;
}
- }
+ }
return false;
} else {
// We're clearing out flags of a matching sub-tree
// assert (flags & IModelDelta.EXPAND) != 0;
-
+
if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
if (delta.getFlags() != IModelDelta.NO_CHANGE) {
DebugUIPlugin.trace("\tCANCEL: " + delta.getElement() + "(" + Integer.toHexString(delta.getFlags()) + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -995,14 +995,14 @@ class ViewerStateTracker {
});
}
}
-
+
/**
* Perform any restoration required for the given tree path.
* <p>
- * This method is called after every viewer update completion to continue
- * restoring the expansion state that was previously saved.
- *
+ * This method is called after every viewer update completion to continue
+ * restoring the expansion state that was previously saved.
+ *
* @param path the tree path to update
* @param modelIndex the index in the current model
* @param knowsHasChildren if the content provider knows it has children already
@@ -1010,10 +1010,10 @@ class ViewerStateTracker {
* @param checkChildrenRealized if any realized children should be checked or not
*/
void restorePendingStateOnUpdate(final TreePath path, final int modelIndex, final boolean knowsHasChildren,
- final boolean knowsChildCount, final boolean checkChildrenRealized)
+ final boolean knowsChildCount, final boolean checkChildrenRealized)
{
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+
if (fPendingState == null) {
return;
}
@@ -1072,7 +1072,7 @@ class ViewerStateTracker {
try {
fInStateRestore = true;
fPendingState.accept(visitor);
- }
+ }
finally {
fInStateRestore = false;
}
@@ -1080,15 +1080,15 @@ class ViewerStateTracker {
}
/**
- * Checks whether restoring pending state is already complete.
+ * Checks whether restoring pending state is already complete.
*/
void checkIfRestoreComplete() {
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+
if (fPendingState == null) {
return;
}
-
+
/**
* Used to determine when restoration delta has been processed
*/
@@ -1097,7 +1097,7 @@ class ViewerStateTracker {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.debug.internal.ui.viewers.provisional.IModelDeltaVisitor
* #visit(org.eclipse.debug.internal.ui.viewers.provisional.IModelDelta,
@@ -1107,20 +1107,20 @@ class ViewerStateTracker {
public boolean visit(IModelDelta delta, int depth) {
// Filter out the CONTENT flags from the delta flags, the content
// flag is only used as a marker indicating that all the sub-elements
- // of a given delta have been retrieved.
+ // of a given delta have been retrieved.
int flags = (delta.getFlags() & ~IModelDelta.CONTENT);
-
+
if (flags != IModelDelta.NO_CHANGE) {
IModelDelta parentDelta = delta.getParentDelta();
// Remove the delta if :
- // - The parent delta has no more flags on it (the content flag is removed as well),
+ // - The parent delta has no more flags on it (the content flag is removed as well),
// which means that parent element's children have been completely exposed.
// - There are no more pending updates for the element.
// - If element is a memento, there are no state requests pending.
if (parentDelta != null && parentDelta.getFlags() == IModelDelta.NO_CHANGE) {
TreePath deltaPath = fContentProvider.getViewerTreePath(delta);
if ( !fContentProvider.areElementUpdatesPending(deltaPath) &&
- (!(delta.getElement() instanceof IMemento) || !areMementoUpdatesPending(delta)) )
+ (!(delta.getElement() instanceof IMemento) || !areMementoUpdatesPending(delta)) )
{
removeDelta(delta);
return false;
@@ -1170,7 +1170,7 @@ class ViewerStateTracker {
fPendingState.accept(state);
if (state.isComplete()) {
// notify restore complete if REVEAL was restored also, otherwise
- // postpone until then.
+ // postpone until then.
if (fPendingSetTopItem == null) {
if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
DebugUIPlugin.trace("STATE RESTORE COMPELTE: " + fPendingState); //$NON-NLS-1$
@@ -1178,14 +1178,14 @@ class ViewerStateTracker {
notifyStateUpdate(fPendingState.getElement(), STATE_RESTORE_SEQUENCE_COMPLETE, null);
}
-
- fPendingState = null;
+
+ fPendingState = null;
}
}
/**
* Restores the pending state in the given delta node. This method is called
- * once the state tracker has found the element which matches the element in
+ * once the state tracker has found the element which matches the element in
* the given delta node.
* @param delta the {@link ModelDelta} to restore from
* @param knowsHasChildren if the content provider has computed its children
@@ -1217,7 +1217,7 @@ class ViewerStateTracker {
delta.setFlags(delta.getFlags() & ~IModelDelta.COLLAPSE);
}
}
-
+
if ((delta.getFlags() & IModelDelta.SELECT) != 0) {
delta.setFlags(delta.getFlags() & ~IModelDelta.SELECT);
if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
@@ -1235,9 +1235,9 @@ class ViewerStateTracker {
break;
}
}
- // Only set the selection if the element is not yet in
- // selection. Otherwise the setSelection() call will
- // update selection listeners needlessly.
+ // Only set the selection if the element is not yet in
+ // selection. Otherwise the setSelection() call will
+ // update selection listeners needlessly.
if (!pathInSelection) {
TreePath[] newPaths = new TreePath[currentPaths.length + 1];
System.arraycopy(currentPaths, 0, newPaths, 0, currentPaths.length);
@@ -1246,11 +1246,11 @@ class ViewerStateTracker {
}
}
}
-
+
if ((delta.getFlags() & IModelDelta.REVEAL) != 0) {
delta.setFlags(delta.getFlags() & ~IModelDelta.REVEAL);
- // Look for the reveal flag in the child deltas. If
- // A child delta has the reveal flag, do not set the
+ // Look for the reveal flag in the child deltas. If
+ // A child delta has the reveal flag, do not set the
// top element yet.
boolean setTopItem = true;
IModelDelta[] childDeltas = delta.getChildDeltas();
@@ -1261,18 +1261,18 @@ class ViewerStateTracker {
setTopItem = false;
}
}
-
- if (setTopItem) {
+
+ if (setTopItem) {
Assert.isTrue(fPendingSetTopItem == null);
-
+
fPendingSetTopItem = new PendingRevealDelta(treePath, delta);
viewer.addViewerUpdateListener(fPendingSetTopItem);
- }
+ }
}
- // If we know the child count of the element, look for the reveal
- // flag in the child deltas. For the children with reveal flag start
- // a new update.
+ // If we know the child count of the element, look for the reveal
+ // flag in the child deltas. For the children with reveal flag start
+ // a new update.
// If the child delta's index is out of range, strip the reveal flag
// since it is no longer applicable.
if (knowsChildCount) {
@@ -1287,81 +1287,81 @@ class ViewerStateTracker {
fContentProvider.doUpdateElement(treePath, modelIndex);
} else {
childDelta.setFlags(childDelta.getFlags() & ~IModelDelta.REVEAL);
- }
+ }
}
}
}
}
-
- // Some children of this element were just updated. If all its
- // children are now realized, clear out any elements that still
+
+ // Some children of this element were just updated. If all its
+ // children are now realized, clear out any elements that still
// have flags, because they represent elements that were removed.
- if ((checkChildrenRealized &&
- !fContentProvider.areChildrenUpdatesPending(treePath) &&
+ if ((checkChildrenRealized &&
+ !fContentProvider.areChildrenUpdatesPending(treePath) &&
fContentProvider.getViewer().getElementChildrenRealized(treePath)) ||
- (knowsHasChildren && !viewer.getHasChildren(treePath)) )
+ (knowsHasChildren && !viewer.getHasChildren(treePath)) )
{
if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
DebugUIPlugin.trace("\tRESTORE CONTENT: " + treePath.getLastSegment()); //$NON-NLS-1$
}
- delta.setFlags(delta.getFlags() & ~IModelDelta.CONTENT);
+ delta.setFlags(delta.getFlags() & ~IModelDelta.CONTENT);
}
}
/**
- * Utility that reveals the saved top item in the viewer. It listens for
+ * Utility that reveals the saved top item in the viewer. It listens for
* all content updates to complete in order to avoid having the desired top item
* scroll out as view content is filled in.
- * <br>
+ * <br>
* Revealing some elements can trigger expanding some of elements
- * that have been just revealed. Therefore, we have to check one
+ * that have been just revealed. Therefore, we have to check one
* more time after the new triggered updates are completed if we
* have to set again the top index
*/
private class PendingRevealDelta implements IViewerUpdateListener {
-
+
private final TreePath fPathToReveal;
private final ModelDelta fRevealDelta;
-
+
PendingRevealDelta(TreePath pathToReveal, ModelDelta revealDelta) {
fPathToReveal = pathToReveal;
fRevealDelta = revealDelta;
}
-
+
/**
* Counter that tracks how many time the viewer updates were completed.
*/
private int fCounter = 0;
private Object fModelInput = fPendingState.getElement();
-
+
@Override
public void viewerUpdatesComplete() {
- Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
-
+ Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
+
IInternalTreeModelViewer viewer = fContentProvider.getViewer();
if (viewer == null || fPendingSetTopItem != this) {
return;
}
-
+
TreePath topPath = viewer.getTopElementPath();
if (!fPathToReveal.equals(topPath)) {
TreePath parentPath = fPathToReveal.getParentPath();
int index = viewer.findElementIndex(parentPath, fPathToReveal.getLastSegment());
- if (index >= 0) {
+ if (index >= 0) {
if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
DebugUIPlugin.trace("\tRESTORE REVEAL: " + fPathToReveal.getLastSegment()); //$NON-NLS-1$
}
viewer.reveal(parentPath, index);
-
+
}
}
-
+
fCounter++;
// in case the pending state was already set to null, we assume that
// all others elements are restored, so we don't expect that REVEAL will
// trigger other updates
if (fCounter > 1 || fPendingState == null) {
- dispose();
+ dispose();
}
}
@@ -1371,7 +1371,7 @@ class ViewerStateTracker {
public void updateStarted(IViewerUpdate update) {}
@Override
public void updateComplete(IViewerUpdate update) {}
-
+
/**
* Returns delta that is used to reveal the item.
* @return delta to be revealed.
@@ -1381,20 +1381,20 @@ class ViewerStateTracker {
}
/**
- * Resets the item
+ * Resets the item
*/
public void dispose() {
// top item is set
fPendingSetTopItem = null;
-
+
IInternalTreeModelViewer viewer = fContentProvider.getViewer();
if (viewer == null) {
return;
}
-
+
// remove myself as viewer update listener
viewer.removeViewerUpdateListener(this);
-
+
if (fPendingState == null) {
if (DebugUIPlugin.DEBUG_STATE_SAVE_RESTORE && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(fContentProvider.getPresentationContext())) {
DebugUIPlugin.trace("STATE RESTORE COMPELTE: " + fPendingState); //$NON-NLS-1$
@@ -1404,20 +1404,20 @@ class ViewerStateTracker {
checkIfRestoreComplete();
}
}
-
+
}
-
+
/**
* Restore selection/expansion based on items already in the viewer
* @param delta the {@link ModelDelta} to restore from
*/
protected void doInitialRestore(ModelDelta delta) {
- // Find the reveal delta and mark nodes on its path
+ // Find the reveal delta and mark nodes on its path
// to reveal as elements are updated.
markRevealDelta(delta);
-
- // Restore visible items.
- // Note (Pawel Piech): the initial list of items is normally
+
+ // Restore visible items.
+ // Note (Pawel Piech): the initial list of items is normally
// empty, so in most cases the code below does not do anything.
// Instead doRestore() is called when various updates complete.
int count = fContentProvider.getViewer().getChildCount(TreePath.EMPTY);
@@ -1427,11 +1427,11 @@ class ViewerStateTracker {
restorePendingStateOnUpdate(new TreePath(new Object[]{data}), i, false, false, false);
}
}
-
+
}
/**
- * Finds the delta with the reveal flag, then it walks up this
+ * Finds the delta with the reveal flag, then it walks up this
* delta and marks all the parents of it with the reveal flag.
* These flags are then used by the restore logic to restore
* and reveal all the nodes leading up to the element that should
@@ -1452,10 +1452,10 @@ class ViewerStateTracker {
return revealDelta[0] == null;
}
};
-
+
rootDelta.accept(visitor);
if (revealDelta[0] != null) {
- ModelDelta parentDelta = (ModelDelta)revealDelta[0].getParentDelta();
+ ModelDelta parentDelta = (ModelDelta)revealDelta[0].getParentDelta();
while(parentDelta.getParentDelta() != null) {
revealDelta[0] = parentDelta;
revealDelta[0].setFlags(revealDelta[0].getFlags() | IModelDelta.REVEAL);
@@ -1467,14 +1467,14 @@ class ViewerStateTracker {
/**
* Builds a delta with the given root delta for expansion/selection state.
- *
+ *
* @param delta
* root delta
*/
private void buildViewerState(ModelDelta delta) {
IInternalTreeModelViewer viewer = fContentProvider.getViewer();
viewer.saveElementState(TreeModelContentProvider.EMPTY_TREE_PATH, delta, IModelDelta.SELECT | IModelDelta.EXPAND);
-
+
// Add memento for top item if it is mapped to an element. The reveal memento
// is in its own path to avoid requesting unnecessary data when restoring it.
TreePath topElementPath = viewer.getTopElementPath();
@@ -1495,7 +1495,7 @@ class ViewerStateTracker {
parentDelta.setFlags(parentDelta.getFlags() | IModelDelta.REVEAL);
}
}
-
+
/**
* Cancels any outstanding compare requests for given element and its children.
* @param path Path of element to cancel updates for.
@@ -1524,9 +1524,9 @@ class ViewerStateTracker {
restorePendingStateNode(delta, request.knowsHasChildren(), request.knowChildCount(), request.checkChildrenRealized());
} else if (request.getModelIndex() != -1) {
// Comparison failed.
- // Check if the delta has a reveal flag, and if its index
- // matches the index of the element that it was compared
- // against. If this is the case, strip the reveal flag from
+ // Check if the delta has a reveal flag, and if its index
+ // matches the index of the element that it was compared
+ // against. If this is the case, strip the reveal flag from
// the delta as it is most likely not applicable anymore.
if ((delta.getFlags() & IModelDelta.REVEAL) != 0 && delta.getIndex() == request.getModelIndex()) {
delta.setFlags(delta.getFlags() & ~IModelDelta.REVEAL);
@@ -1583,5 +1583,5 @@ class ViewerStateTracker {
});
}
}
- }
+ }
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerUpdateMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerUpdateMonitor.java
index 5058d4a48..26674906b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerUpdateMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerUpdateMonitor.java
@@ -28,43 +28,43 @@ import org.eclipse.swt.widgets.Display;
public abstract class ViewerUpdateMonitor extends Request implements IViewerUpdate {
private TreeModelContentProvider fContentProvider;
-
+
/**
* Element's tree path
*/
private TreePath fElementPath;
-
+
/**
* Element
*/
private Object fElement;
-
+
/**
* Element content provider
*/
private IElementContentProvider fElementContentProvider;
-
+
/**
* Whether this request's 'done' method has been called.
*/
private boolean fDone = false;
-
+
/**
* Whether this request has been started
*/
private boolean fStarted = false;
-
+
/**
* Viewer input at the time the request was made
*/
private Object fViewerInput = null;
-
+
/**
* Whether this update has been delegated to another content provider
* @since 3.4
*/
private boolean fIsDelegated = false;
-
+
/**
* Presentation context
*/
@@ -72,7 +72,7 @@ public abstract class ViewerUpdateMonitor extends Request implements IViewerUpda
/**
* Constructs an update for the given content provider
- *
+ *
* @param contentProvider content provider
* @param viewerInput Viewer input for update
* @param elementPath path to associated model element - empty for root element
@@ -82,7 +82,7 @@ public abstract class ViewerUpdateMonitor extends Request implements IViewerUpda
*/
public ViewerUpdateMonitor(TreeModelContentProvider contentProvider, Object viewerInput, TreePath elementPath, Object element, IElementContentProvider elementContentProvider, IPresentationContext context) {
fContext = context;
- // Bug 380288: Catch and log a race condition where the viewer input is null.
+ // Bug 380288: Catch and log a race condition where the viewer input is null.
if (viewerInput == null) {
DebugUIPlugin.log(new NullPointerException("Input to viewer update should not be null")); //$NON-NLS-1$
}
@@ -92,34 +92,34 @@ public abstract class ViewerUpdateMonitor extends Request implements IViewerUpda
fElement = element;
fElementPath = elementPath;
}
-
+
/**
* Returns the scheduling rule for viewer update job.
- *
+ *
* @return rule or <code>null</code>
*/
protected ISchedulingRule getUpdateSchedulingRule() {
return AsynchronousSchedulingRuleFactory.getDefault().newSerialPerObjectRule(getContentProvider());
}
-
+
/**
* Returns the model content provider this update is being performed for.
- *
+ *
* @return the model content provider this update is being performed for
*/
protected TreeModelContentProvider getContentProvider() {
return fContentProvider;
- }
-
+ }
+
/**
* Returns the element content provider to use for this request
- *
+ *
* @return element content provider
*/
protected IElementContentProvider getElementContentProvider() {
return fElementContentProvider;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IProgressMonitor#done()
*/
@@ -133,10 +133,10 @@ public abstract class ViewerUpdateMonitor extends Request implements IViewerUpda
}
scheduleViewerUpdate();
}
-
+
/**
* Returns whether this request is done yet.
- *
+ *
* @return True if this update is done.
*/
protected synchronized boolean isDone() {
@@ -146,13 +146,13 @@ public abstract class ViewerUpdateMonitor extends Request implements IViewerUpda
protected void scheduleViewerUpdate() {
getContentProvider().scheduleViewerUpdate(this);
}
-
+
/**
* Notification this update has been completed and should now be applied to
* this update's viewer. This method is called in the UI thread.
*/
protected abstract void performUpdate();
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate#getPresentationContext()
*/
@@ -168,7 +168,7 @@ public abstract class ViewerUpdateMonitor extends Request implements IViewerUpda
public Object getElement() {
return fElement;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate#getElementPath()
*/
@@ -176,26 +176,26 @@ public abstract class ViewerUpdateMonitor extends Request implements IViewerUpda
public TreePath getElementPath() {
return fElementPath;
}
-
+
/**
* Returns whether this request can coalesce the given request, and performs the
* coalesce if it can.
- *
+ *
* @param update request to coalesce with this request
* @return whether it worked
*/
abstract boolean coalesce(ViewerUpdateMonitor update);
/**
- * Returns whether this update or any coalesced updates is for an
+ * Returns whether this update or any coalesced updates is for an
* element at the given path.
* @param path Element path to check.
* @return True if this update contains the given update path.
- *
+ *
* @since 3.6
*/
abstract boolean containsUpdate(TreePath path);
-
+
/**
* Starts this request. Subclasses must override startRequest().
*/
@@ -212,8 +212,8 @@ public abstract class ViewerUpdateMonitor extends Request implements IViewerUpda
} else {
done();
}
- }
-
+ }
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate#getViewerInput()
*/
@@ -226,21 +226,21 @@ public abstract class ViewerUpdateMonitor extends Request implements IViewerUpda
* Subclasses must override to initiate specific request types.
*/
abstract void startRequest();
-
+
/**
* Returns the priority of this request. Subclasses must override. The
* highest priority is 1. Priorities indicate the order that waiting
- * requests should be started in (for example, 'hasChildren' before 'update child count').
- *
+ * requests should be started in (for example, 'hasChildren' before 'update child count').
+ *
* @return priority
*/
abstract int getPriority();
-
+
/**
* Returns a path used to schedule this request - i.e. based on this path, this
* request will be scheduled to run when no requests are running against the
* same element or a parent of the element denoted by the path.
- *
+ *
* @return path used to schedule request
*/
abstract TreePath getSchedulingPath();
@@ -261,7 +261,7 @@ public abstract class ViewerUpdateMonitor extends Request implements IViewerUpda
public boolean isDelegated() {
return fIsDelegated;
}
-
+
@Override
public boolean equals(Object obj) {
if (obj instanceof ViewerUpdateMonitor) {
@@ -274,27 +274,27 @@ public abstract class ViewerUpdateMonitor extends Request implements IViewerUpda
public int hashCode() {
return doHashCode();
}
-
+
/**
- * Checks whether the given update is equal as this. The update is equal if it's
+ * Checks whether the given update is equal as this. The update is equal if it's
* the same type of update and its updating the same elements.
* @param update Update to compare to.
* @return True if the given update is equals
* @since 3.8
*/
abstract protected boolean doEquals(ViewerUpdateMonitor update);
-
+
/**
* Calculates the hash code of the given update using the same parameters as doEquals().
* @return Update's hash code.
* @since 3.8
*/
abstract protected int doHashCode();
-
+
/**
- * Executes the given runnable in the UI thread. If method is called in
+ * Executes the given runnable in the UI thread. If method is called in
* UI thread, then runnable is executed immediately, otherwise it's executed
- * using <code>Display.asyncExec()</code>. Runnable is not executed if update is
+ * using <code>Display.asyncExec()</code>. Runnable is not executed if update is
* canceled or content provider is disposed.
* @since 3.8
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
index e8cac9cf6..3510c9dd6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
@@ -4,14 +4,14 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Wind River Systems - refactored on top of VirtualTreeModelViewer
*******************************************************************************/
package org.eclipse.debug.internal.ui.viewers.model;
-
+
import java.lang.reflect.InvocationTargetException;
import java.util.Collections;
import java.util.HashSet;
@@ -50,29 +50,29 @@ import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDelegate {
-
+
private TreeModelViewer fClientViewer;
private static final String TAB = "\t"; //$NON-NLS-1$
private static final String SEPARATOR = "line.separator"; //$NON-NLS-1$
-
+
/**
* Virtual viewer listener. It tracks progress of copy and increments
* the progress monitor.
*/
private class VirtualViewerListener implements ILabelUpdateListener, IVirtualItemListener {
-
+
VirtualTreeModelViewer fVirtualViewer;
IProgressMonitor fProgressMonitor;
int fSelectionRootDepth;
Set<VirtualItem> fItemsToUpdate;
-
+
@Override
public void labelUpdateStarted(ILabelUpdate update) {}
@Override
public void labelUpdateComplete(ILabelUpdate update) {
VirtualItem updatedItem = fVirtualViewer.findItem(update.getElementPath());
if (fItemsToUpdate.remove(updatedItem)) {
- incrementProgress(1);
+ incrementProgress(1);
}
}
@Override
@@ -81,18 +81,18 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
@Override
public void labelUpdatesComplete() {
}
-
+
@Override
public void revealed(VirtualItem item) {
}
-
+
@Override
public void disposed(VirtualItem item) {
if (fItemsToUpdate.remove(item)) {
incrementProgress(1);
}
}
-
+
private void incrementProgress(int count) {
IProgressMonitor pm;
synchronized (VirtualCopyToClipboardActionDelegate.this) {
@@ -102,7 +102,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
pm.worked(count);
if (fItemsToUpdate.isEmpty()) {
pm.done();
- }
+ }
}
}
}
@@ -121,7 +121,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
adapter.setAction(getActionId(), action);
}
return super.initialize(action, selection);
- }
+ }
return false;
}
@@ -129,7 +129,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
return IDebugView.COPY_ACTION;
}
- /**
+ /**
* Appends the representation of the specified element (using the label provider and indent)
* to the buffer. For elements down to stack frames, children representations
* are append to the buffer as well.
@@ -154,19 +154,19 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
}
private class ItemsToCopyVirtualItemValidator implements IVirtualItemValidator {
-
+
Set<VirtualItem> fItemsToCopy = Collections.EMPTY_SET;
Set<VirtualItem> fItemsToValidate = Collections.EMPTY_SET;
-
+
@Override
public boolean isItemVisible(VirtualItem item) {
return fItemsToValidate.contains(item);
}
-
+
@Override
public void showItem(VirtualItem item) {
}
-
+
void setItemsToCopy(Set<VirtualItem> itemsToCopy) {
fItemsToCopy = itemsToCopy;
fItemsToValidate = new HashSet<VirtualItem>();
@@ -175,19 +175,19 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
fItemsToValidate.add(itemToCopy);
itemToCopy = itemToCopy.getParent();
}
- }
+ }
}
}
-
+
private VirtualTreeModelViewer initVirtualViewer(TreeModelViewer clientViewer, VirtualViewerListener listener, ItemsToCopyVirtualItemValidator validator) {
Object input = clientViewer.getInput();
ModelDelta stateDelta = new ModelDelta(input, IModelDelta.NO_CHANGE);
clientViewer.saveElementState(TreePath.EMPTY, stateDelta, IModelDelta.EXPAND);
VirtualTreeModelViewer virtualViewer = new VirtualTreeModelViewer(
- clientViewer.getDisplay(),
- SWT.VIRTUAL,
- clientViewer.getPresentationContext(),
- validator);
+ clientViewer.getDisplay(),
+ SWT.VIRTUAL,
+ clientViewer.getPresentationContext(),
+ validator);
virtualViewer.setFilters(clientViewer.getFilters());
virtualViewer.addLabelUpdateListener(listener);
virtualViewer.getTree().addItemListener(listener);
@@ -198,7 +198,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
virtualViewer.setVisibleColumns(columns);
}
virtualViewer.updateViewer(stateDelta);
-
+
// Parse selected items from client viewer and add them to the virtual viewer selection.
listener.fSelectionRootDepth = Integer.MAX_VALUE;
TreeItem[] selection = getSelectedItems(clientViewer);
@@ -225,11 +225,11 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
virtualViewer.getTree().validate();
return virtualViewer;
}
-
+
protected TreeItem[] getSelectedItems(TreeModelViewer clientViewer) {
return clientViewer.getTree().getSelection();
}
-
+
/**
* Do the specific action using the current selection.
* @param action Action that is running.
@@ -239,16 +239,16 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
if (fClientViewer.getSelection().isEmpty()) {
return;
}
-
+
final VirtualViewerListener listener = new VirtualViewerListener();
ItemsToCopyVirtualItemValidator validator = new ItemsToCopyVirtualItemValidator();
VirtualTreeModelViewer virtualViewer = initVirtualViewer(fClientViewer, listener, validator);
listener.fVirtualViewer = virtualViewer;
-
+
ProgressMonitorDialog dialog = new TimeTriggeredProgressMonitorDialog(fClientViewer.getControl().getShell(), 500);
final IProgressMonitor monitor = dialog.getProgressMonitor();
dialog.setCancelable(true);
-
+
IRunnableWithProgress runnable = new IRunnableWithProgress() {
@Override
public void run(final IProgressMonitor m) throws InvocationTargetException, InterruptedException {
@@ -256,10 +256,10 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
listener.fProgressMonitor = m;
listener.fProgressMonitor.beginTask(DebugUIPlugin.removeAccelerators(getAction().getText()), listener.fItemsToUpdate.size());
}
-
+
while (!listener.fItemsToUpdate.isEmpty() && !listener.fProgressMonitor.isCanceled()) {
Thread.sleep(1);
- }
+ }
synchronized(listener) {
listener.fProgressMonitor = null;
}
@@ -277,7 +277,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
if (!monitor.isCanceled()) {
copySelectionToClipboard(virtualViewer, validator.fItemsToCopy, listener.fSelectionRootDepth);
}
-
+
virtualViewer.removeLabelUpdateListener(listener);
virtualViewer.getTree().removeItemListener(listener);
virtualViewer.dispose();
@@ -288,7 +288,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
writeItemToBuffer (virtualViewer.getTree(), itemsToCopy, buffer, -selectionRootDepth);
writeBufferToClipboard(buffer);
}
-
+
protected void writeItemToBuffer(VirtualItem item, Set<VirtualItem> itemsToCopy, StringBuffer buffer, int indent) {
if (itemsToCopy.contains(item)) {
append(item, buffer, indent);
@@ -305,25 +305,25 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
if (buffer.length() == 0) {
return;
}
-
+
TextTransfer plainTextTransfer = TextTransfer.getInstance();
- Clipboard clipboard= new Clipboard(fClientViewer.getControl().getDisplay());
+ Clipboard clipboard= new Clipboard(fClientViewer.getControl().getDisplay());
try {
clipboard.setContents(
- new String[]{buffer.toString()},
+ new String[]{buffer.toString()},
new Transfer[]{plainTextTransfer});
} catch (SWTError e){
if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD) {
throw e;
}
- if (MessageDialog.openQuestion(fClientViewer.getControl().getShell(), ActionMessages.CopyToClipboardActionDelegate_Problem_Copying_to_Clipboard_1, ActionMessages.CopyToClipboardActionDelegate_There_was_a_problem_when_accessing_the_system_clipboard__Retry__2)) { //
+ if (MessageDialog.openQuestion(fClientViewer.getControl().getShell(), ActionMessages.CopyToClipboardActionDelegate_Problem_Copying_to_Clipboard_1, ActionMessages.CopyToClipboardActionDelegate_There_was_a_problem_when_accessing_the_system_clipboard__Retry__2)) { //
writeBufferToClipboard(buffer);
}
} finally {
clipboard.dispose();
}
}
-
+
protected TreeModelViewer getViewer() {
return fClientViewer;
}
@@ -338,7 +338,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
protected void doAction(Object element) {
//not used
}
-
+
@Override
protected boolean getEnableStateForSelection(IStructuredSelection selection) {
if (selection.isEmpty()) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
index 0c6208b47..1835c308f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
@@ -54,36 +54,36 @@ import com.ibm.icu.text.MessageFormat;
/**
* Action which prompts user with a filtered list selection dialog to find an element in tree.
- *
+ *
* @since 3.3
*/
public class VirtualFindAction extends Action implements IUpdate {
-
+
private TreeModelViewer fClientViewer;
-
+
private class VirtualViewerListener implements IViewerUpdateListener, ILabelUpdateListener {
-
+
private boolean fViewerUpdatesComplete = false;
private boolean fLabelUpdatesComplete = false;
private IProgressMonitor fProgressMonitor;
- private int fRemainingUpdatesCount = 0;
-
+ private int fRemainingUpdatesCount = 0;
+
@Override
public void labelUpdateStarted(ILabelUpdate update) {}
@Override
public void labelUpdateComplete(ILabelUpdate update) {
- incrementProgress(1);
+ incrementProgress(1);
}
@Override
public void labelUpdatesBegin() {
- fLabelUpdatesComplete = false;
+ fLabelUpdatesComplete = false;
}
@Override
public void labelUpdatesComplete() {
fLabelUpdatesComplete = true;
completeProgress();
}
-
+
@Override
public void updateStarted(IViewerUpdate update) {}
@Override
@@ -94,14 +94,14 @@ public class VirtualFindAction extends Action implements IUpdate {
}
@Override
public void viewerUpdatesBegin() {
- fViewerUpdatesComplete = false;
+ fViewerUpdatesComplete = false;
}
@Override
public void viewerUpdatesComplete() {
fViewerUpdatesComplete = true;
completeProgress();
}
-
+
private void completeProgress() {
IProgressMonitor pm;
synchronized (this) {
@@ -109,9 +109,9 @@ public class VirtualFindAction extends Action implements IUpdate {
}
if (pm != null && fLabelUpdatesComplete && fViewerUpdatesComplete) {
pm.done();
- }
+ }
}
-
+
private void incrementProgress(int count) {
IProgressMonitor pm;
synchronized (this) {
@@ -120,11 +120,11 @@ public class VirtualFindAction extends Action implements IUpdate {
}
if (pm != null && fLabelUpdatesComplete && fViewerUpdatesComplete) {
pm.worked(count);
- }
+ }
}
}
-
+
private static class FindLabelProvider extends LabelProvider {
private VirtualTreeModelViewer fVirtualViewer;
private Map<VirtualItem, String> fTextCache = new HashMap<VirtualItem, String>();
@@ -136,7 +136,7 @@ public class VirtualFindAction extends Action implements IUpdate {
fTextCache.put(item, fVirtualViewer.getText(item, 0));
}
}
-
+
@Override
public Image getImage(Object element) {
return fVirtualViewer.getImage((VirtualItem) element, 0);
@@ -150,7 +150,7 @@ public class VirtualFindAction extends Action implements IUpdate {
public VirtualFindAction(TreeModelViewer viewer) {
fClientViewer = viewer;
-
+
setText(ActionMessages.FindAction_0);
setId(DebugUIPlugin.getUniqueIdentifier() + ".FindElementAction"); //$NON-NLS-1$
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.FIND_ELEMENT_ACTION);
@@ -164,8 +164,8 @@ public class VirtualFindAction extends Action implements IUpdate {
clientViewer.saveElementState(TreePath.EMPTY, stateDelta, IModelDelta.EXPAND);
listener.fRemainingUpdatesCount = calcUpdatesCount(stateDelta);
VirtualTreeModelViewer fVirtualViewer = new VirtualTreeModelViewer(
- clientViewer.getDisplay(),
- SWT.NONE,
+ clientViewer.getDisplay(),
+ SWT.NONE,
clientViewer.getPresentationContext());
fVirtualViewer.setFilters(clientViewer.getFilters());
fVirtualViewer.addViewerUpdateListener(listener);
@@ -179,19 +179,19 @@ public class VirtualFindAction extends Action implements IUpdate {
fVirtualViewer.updateViewer(stateDelta);
return fVirtualViewer;
}
-
+
@Override
public void run() {
final VirtualViewerListener listener = new VirtualViewerListener();
VirtualTreeModelViewer virtualViewer = initVirtualViewer(fClientViewer, listener);
-
+
ProgressMonitorDialog dialog = new TimeTriggeredProgressMonitorDialog(fClientViewer.getControl().getShell(), 500);
final IProgressMonitor monitor = dialog.getProgressMonitor();
dialog.setCancelable(true);
-
+
try {
dialog.run(
- true, true,
+ true, true,
new IRunnableWithProgress() {
@Override
public void run(final IProgressMonitor m) throws InvocationTargetException, InterruptedException {
@@ -199,10 +199,10 @@ public class VirtualFindAction extends Action implements IUpdate {
listener.fProgressMonitor = m;
listener.fProgressMonitor.beginTask(DebugUIPlugin.removeAccelerators(getText()), listener.fRemainingUpdatesCount);
}
-
+
while ((!listener.fLabelUpdatesComplete || !listener.fViewerUpdatesComplete) && !listener.fProgressMonitor.isCanceled()) {
Thread.sleep(1);
- }
+ }
synchronized(listener) {
listener.fProgressMonitor = null;
}
@@ -214,7 +214,7 @@ public class VirtualFindAction extends Action implements IUpdate {
} catch (InterruptedException e) {
return;
}
-
+
VirtualItem root = virtualViewer.getTree();
if (!monitor.isCanceled()) {
List<VirtualItem> list = new ArrayList<VirtualItem>();
@@ -230,7 +230,7 @@ public class VirtualFindAction extends Action implements IUpdate {
virtualViewer.removeViewerUpdateListener(listener);
virtualViewer.dispose();
}
-
+
private int calcUpdatesCount(IModelDelta stateDelta) {
final int[] count = new int[] {0};
stateDelta.accept( new IModelDeltaVisitor() {
@@ -243,11 +243,11 @@ public class VirtualFindAction extends Action implements IUpdate {
return false;
}
});
-
+
// Double it to account for separate element and label update ticks.
return count[0] * 2;
}
-
+
private void collectAllChildren(VirtualItem element, List<VirtualItem> collect) {
VirtualItem[] children = element.getItems();
if (children != null) {
@@ -259,11 +259,11 @@ public class VirtualFindAction extends Action implements IUpdate {
}
}
}
-
+
protected VirtualItem performFind(List<VirtualItem> items, FindLabelProvider labelProvider) {
FindElementDialog dialog = new FindElementDialog(
- fClientViewer.getControl().getShell(),
- labelProvider,
+ fClientViewer.getControl().getShell(),
+ labelProvider,
items.toArray());
dialog.setTitle(ActionMessages.FindDialog_3);
dialog.setMessage(ActionMessages.FindDialog_1);
@@ -275,7 +275,7 @@ public class VirtualFindAction extends Action implements IUpdate {
}
return null;
}
-
+
protected void setSelectionToClient(VirtualTreeModelViewer virtualViewer, ILabelProvider labelProvider, VirtualItem findItem) {
virtualViewer.getTree().setSelection(new VirtualItem[] { findItem } );
ModelDelta stateDelta = new ModelDelta(virtualViewer.getInput(), IModelDelta.NO_CHANGE);
@@ -291,23 +291,23 @@ public class VirtualFindAction extends Action implements IUpdate {
}
});
fClientViewer.updateViewer(stateDelta);
-
+
ISelection selection = fClientViewer.getSelection();
if (!selection.isEmpty() &&
- selection instanceof IStructuredSelection &&
+ selection instanceof IStructuredSelection &&
((IStructuredSelection)selection).getFirstElement().equals(findItem.getData()) ) {
} else {
DebugUIPlugin.errorDialog(
- fClientViewer.getControl().getShell(),
+ fClientViewer.getControl().getShell(),
ActionMessages.VirtualFindAction_0,
MessageFormat.format(ActionMessages.VirtualFindAction_1, new Object[] { labelProvider.getText(findItem) }),
new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), ActionMessages.VirtualFindAction_1));
- }
+ }
}
-
+
@Override
public void update() {
setEnabled( fClientViewer.getInput() != null && fClientViewer.getChildCount(TreePath.EMPTY) > 0 );
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckUpdate.java
index 7e31d3589..c2d1f79e8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckUpdate.java
@@ -12,25 +12,25 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
* Label update which allows the label provider to set the checked element state.
- * The label provider can use the presentation context to determine whether the
- * viewer is showing item check boxes.
- *
+ * The label provider can use the presentation context to determine whether the
+ * viewer is showing item check boxes.
+ *
* @since 3.6
*/
public interface ICheckUpdate extends ILabelUpdate {
/**
- * Property of the presentation context which indicates that the viewer
+ * Property of the presentation context which indicates that the viewer
* has the check box style.
*/
public static final String PROP_CHECK = "org.eclipse.debug.ui.check"; //$NON-NLS-1$
-
+
/**
* Sets the check state of the tree node.
- *
+ *
* @param checked Whether element should be checked.
* @param grayed Whether element should be grayed out.
*/
public void setChecked(boolean checked, boolean grayed);
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckboxModelProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckboxModelProxy.java
index 3513b2adf..3c3346ff3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckboxModelProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckboxModelProxy.java
@@ -16,22 +16,22 @@ import org.eclipse.jface.viewers.TreePath;
/**
* Optional extension to a model proxy for models that use a check box tree viewer. Provides
- * notification for check state changes in the tree.
- *
+ * notification for check state changes in the tree.
+ *
* @since 3.6
* @see IModelProxy
*/
public interface ICheckboxModelProxy {
/**
- * Notifies the receiver that the given element has had its
+ * Notifies the receiver that the given element has had its
* checked state modified in the viewer.
* <p>
* This method is called in the UI thread. Clients that execute long running operations or
* communicate with a potentially unreliable or blocking model should run those operations
* asynchronously.
* </p>
- *
+ *
* @param context Presentation context in which the element was updated.
* @param viewerInput The root element of the viewer where the check
* selection took place.
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IChildrenCountUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IChildrenCountUpdate.java
index 55818113c..2cc395bd3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IChildrenCountUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IChildrenCountUpdate.java
@@ -14,7 +14,7 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
* Request monitor used to collect the number of children for an element in a viewer.
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
* @since 3.3
*/
@@ -22,7 +22,7 @@ public interface IChildrenCountUpdate extends IViewerUpdate {
/**
* Sets the number of children for this update.
- *
+ *
* @param numChildren number of children
*/
public void setChildCount(int numChildren);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IChildrenUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IChildrenUpdate.java
index 9ee12df28..188dad545 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IChildrenUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IChildrenUpdate.java
@@ -14,7 +14,7 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
* Context sensitive children update request for a parent and subrange of its
* children.
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
* @since 3.3
*/
@@ -23,23 +23,23 @@ public interface IChildrenUpdate extends IViewerUpdate {
/**
* Returns the offset at which children have been requested for. This is
* the index of the first child being requested.
- *
+ *
* @return offset at which children have been requested for
*/
public int getOffset();
-
+
/**
* Returns the number of children requested.
- *
+ *
* @return number of children requested
*/
public int getLength();
-
+
/**
* Sets the child for this request's parent at the given offset.
- *
+ *
* @param child child
* @param offset child offset
*/
- public void setChild(Object child, int offset);
+ public void setChild(Object child, int offset);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentation.java
index 991765351..b20f6f400 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentation.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentation.java
@@ -16,71 +16,71 @@ import org.eclipse.jface.resource.ImageDescriptor;
* Defines the possible set of columns presented in a view for a model.
* A column presentation is customizable per presentation context (view) and
* view input, and is created by an <code>IColumnPresentationFactory</code>.
- *
+ *
* @since 3.2
*/
public interface IColumnPresentation {
-
+
/**
* Initializes this column presentation to be used in the
* given context.
- *
+ *
* @param context Presentation context.
*/
public void init(IPresentationContext context);
-
+
/**
* Disposes this column presentation
*/
public void dispose();
-
+
/**
* Returns an array of all columns supported by this adapter as
* column identifiers.
- *
+ *
* @return column identifiers
*/
public String[] getAvailableColumns();
-
+
/**
* Returns an ordered array of columns that should be displayed initially for
* this presentation as column IDs.
- *
+ *
* @return initial columns to display
*/
public String[] getInitialColumns();
-
+
/**
* Returns the column header for the column with the given identifier.
- *
+ *
* @param id a column identifier included in <code>getColumns()</code>
* @return column header
*/
public String getHeader(String id);
-
+
/**
* Returns the image for the column with the given identifier, or <code>null</code>
- *
+ *
* @param id column id
* @return image descriptor or <code>null</code>
*/
public ImageDescriptor getImageDescriptor(String id);
-
+
/**
* Returns an identifier for this columns presentation.
- * The identifier should be unique per kind of column presentation
+ * The identifier should be unique per kind of column presentation
* (for example, the column presentation for Java stack frames
* in the variables view). Allows visible column information to be
* persisted by the platform.
- *
+ *
* @return identifier
*/
public String getId();
-
+
/**
* Returns whether this column presentation is optional. When a column presentation
* is optional, the user may toggle columns on/off.
- *
+ *
* @return whether this column presentation is optional
*/
public boolean isOptional();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentation2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentation2.java
index d7b59f7ea..2f96073ea 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentation2.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentation2.java
@@ -11,21 +11,21 @@
package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
- * Extension to allow column presentation to specify initial column sizes in a
+ * Extension to allow column presentation to specify initial column sizes in a
* TreeModelViewer.
- *
+ *
* @since 3.7
- *
+ *
* @see TreeModelViewer
*/
public interface IColumnPresentation2 extends IColumnPresentation {
-
+
/**
* Returns the initial column width for the column with the given identifier.
- *
+ *
* @param id a column identifier included in <code>getAvailableColumns()</code>
* @param treeWidgetWidth tree widget width
- * @param visibleColumnIds identifiers of visible columns
+ * @param visibleColumnIds identifiers of visible columns
* @return initial column width. Return -1 if this implementation does not decide the width
* and let the caller to decide the width. The caller may make the initial width
* be treeWidgetWidth / visibleColumnIds.length
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentationFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentationFactory.java
index 49795c6cf..d32a2e371 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentationFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentationFactory.java
@@ -12,7 +12,7 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
* An adapter used to create column presentations.
- *
+ *
* @see IColumnPresentation
* @since 3.2
*/
@@ -21,18 +21,18 @@ public interface IColumnPresentationFactory {
/**
* Constructs and returns the column presentation for the given presentation
* context (view) and input element, or <code>null</code> of none.
- *
+ *
* @param context presentation context
* @param element the input element
* @return column presentation or <code>null</code>
*/
public IColumnPresentation createColumnPresentation(IPresentationContext context, Object element);
-
+
/**
* Returns the type of column presentation to be used for the given context and object
* or <code>null</code> if none. Allows a previous column presentation to be re-used if
* it has not changed type.
- *
+ *
* @param context presentation context
* @param element input element
* @return column presentation id or <code>null</code>
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementCompareRequest.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementCompareRequest.java
index d6258f468..64a7549b7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementCompareRequest.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementCompareRequest.java
@@ -13,16 +13,16 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
* Request to compare an element to a previously created memento.
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
* @since 3.3
*/
public interface IElementCompareRequest extends IElementMementoRequest {
-
+
/**
* Sets whether this request's memento represents this requests's element.
- *
- * @param equal whether the memento represents the element
+ *
+ * @param equal whether the memento represents the element
*/
public void setEqual(boolean equal);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementContentProvider.java
index d3b682880..126850d2b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementContentProvider.java
@@ -16,10 +16,10 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
* Provides content for an element in a tree model viewer.
* <p>
* Note: provider methods are called in the Display thread of the viewer.
- * To avoid blocking the UI, long running operations should be performed
+ * To avoid blocking the UI, long running operations should be performed
* asynchronously.
* </p>
- *
+ *
* @since 3.3
*/
public interface IElementContentProvider {
@@ -27,29 +27,29 @@ public interface IElementContentProvider {
/**
* Updates the number of children for the given parent elements in the
* specified requests.
- *
+ *
* @param updates Each update specifies an element to update and provides
- * a store for the result. The update array is guaranteed to have at least
+ * a store for the result. The update array is guaranteed to have at least
* one element, and for all updates to have the same presentation context.
*/
public void update(IChildrenCountUpdate[] updates);
-
+
/**
* Updates children as requested by the given updates.
- *
+ *
* @param updates Each update specifies children to update and stores results.
- * The update array is guaranteed to have at least one element, and for
+ * The update array is guaranteed to have at least one element, and for
* all updates to have the same presentation context.
- */
+ */
public void update(IChildrenUpdate[] updates);
-
+
/**
* Updates whether elements have children.
- *
+ *
* @param updates Each update specifies an element to update and provides
- * a store for the result. The update array is guaranteed to have at least
+ * a store for the result. The update array is guaranteed to have at least
* one element, and for all updates to have the same presentation context.
*/
public void update(IHasChildrenUpdate[] updates);
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementEditor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementEditor.java
index e1890aa4f..df2183113 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementEditor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementEditor.java
@@ -16,15 +16,15 @@ import org.eclipse.swt.widgets.Composite;
/**
* Creates context specific cell modifiers and editors for elements.
- *
+ *
* @since 3.3
*/
public interface IElementEditor {
-
+
/**
* Returns a cell editor to use for the specified column and object or <code>null</code>
* if none.
- *
+ *
* @param context presentation context
* @param columnId column id
* @param element object to be edited
@@ -32,15 +32,15 @@ public interface IElementEditor {
* @return cell editor or <code>null</code>
*/
public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent);
-
+
/**
* Returns a cell modifier for the specified element in the given context
* or <code>null</code> if none.
* @param context Presentation context
* @param element Model element.
- *
+ *
* @return cell modifier or <code>null</code>
*/
- public ICellModifier getCellModifier(IPresentationContext context, Object element);
+ public ICellModifier getCellModifier(IPresentationContext context, Object element);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementLabelProvider.java
index 90551a572..c99a3f67c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementLabelProvider.java
@@ -16,20 +16,20 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
* or implemented directly.
* <p>
* Note: provider methods are called in the Display thread of the viewer.
- * To avoid blocking the UI, long running operations should be performed
+ * To avoid blocking the UI, long running operations should be performed
* asynchronously.
* </p>
- *
+ *
* @since 3.3
*/
public interface IElementLabelProvider {
-
+
/**
* Updates the specified labels.
- *
+ *
* @param updates Each update specifies the element and context for which a label is requested and
- * stores label attributes. The update array is guaranteed to have at least one element, and for
- * all updates to have the same presentation context.
+ * stores label attributes. The update array is guaranteed to have at least one element, and for
+ * all updates to have the same presentation context.
*/
public void update(ILabelUpdate[] updates);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementMementoProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementMementoProvider.java
index 416072148..112a0a2a5 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementMementoProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementMementoProvider.java
@@ -17,30 +17,30 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
* in order to support viewer state save/restore.
* <p>
* Note: provider methods are called in the Display thread of the viewer.
- * To avoid blocking the UI, long running operations should be performed
+ * To avoid blocking the UI, long running operations should be performed
* asynchronously.
* </p>
*
* @since 3.3
*/
public interface IElementMementoProvider {
-
+
/**
* Creates and stores a mementos for the elements specified in the requests.
* A request should be cancelled if a memento is not supported for the
* specified element or context.
- *
- * @param requests Specifies elements and provides memento stores.
- * The requests array is guaranteed to have at least one element, and for
+ *
+ * @param requests Specifies elements and provides memento stores.
+ * The requests array is guaranteed to have at least one element, and for
* all requests to have the same presentation context.
*/
public void encodeElements(IElementMementoRequest[] requests);
-
+
/**
* Determines whether mementos represent associated elements specified in the requests.
- *
- * @param requests Specifies each element and previously created memento.
- * The requests array is guaranteed to have at least one element, and for
+ *
+ * @param requests Specifies each element and previously created memento.
+ * The requests array is guaranteed to have at least one element, and for
* all requests to have the same presentation context.
*/
public void compareElements(IElementCompareRequest[] requests);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementMementoRequest.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementMementoRequest.java
index 9e664dff2..e7e2f4eb1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementMementoRequest.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementMementoRequest.java
@@ -20,10 +20,10 @@ import org.eclipse.ui.IMemento;
* @since 3.3
*/
public interface IElementMementoRequest extends IViewerUpdate {
-
+
/**
* Returns the memento used to persist the element.
- *
+ *
* @return memento
*/
public IMemento getMemento();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IHasChildrenUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IHasChildrenUpdate.java
index 85232d9ed..40716074c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IHasChildrenUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IHasChildrenUpdate.java
@@ -13,7 +13,7 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
* Context sensitive update request for whether an element has children.
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
* @since 3.3
*/
@@ -21,7 +21,7 @@ public interface IHasChildrenUpdate extends IViewerUpdate {
/**
* Sets whether there are children for this update.
- *
+ *
* @param hasChildren whether there are children
*/
public void setHasChilren(boolean hasChildren);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ILabelUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ILabelUpdate.java
index 451fd2a6d..8dc771bcd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ILabelUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ILabelUpdate.java
@@ -16,57 +16,57 @@ import org.eclipse.swt.graphics.RGB;
/**
* Context sensitive label update request for an element.
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
* @since 3.3
*/
public interface ILabelUpdate extends IViewerUpdate {
-
+
/**
* Returns the id's of the columns which are to be updated
* or <code>null</code> if none. Note, these columns may be different
- * than the visible columns in the view which are returned by
+ * than the visible columns in the view which are returned by
* {@link IPresentationContext#getColumns()}.
- *
+ *
* @return column id's or <code>null</code>
*/
public String[] getColumnIds();
/**
* Sets the text of the label of the specified column. Cannot be <code>null</code>.
- *
+ *
* @param text to set to viewer
* @param columnIndex column index (0 when no columns)
*/
public void setLabel(String text, int columnIndex);
-
+
/**
* Sets the font of the label.
- *
+ *
* @param fontData to set to viewer
* @param columnIndex column index (0 when no columns)
*/
public void setFontData(FontData fontData, int columnIndex);
-
+
/**
* Sets the image of the label.
- *
+ *
* @param image to set to viewer
* @param columnIndex column index (0 when no columns)
*/
public void setImageDescriptor(ImageDescriptor image, int columnIndex);
-
+
/**
* Sets the foreground color of the label.
- *
+ *
* @param foreground to set to viewer
* @param columnIndex column index (0 when no columns)
*/
public void setForeground(RGB foreground, int columnIndex);
-
+
/**
* Sets the background color of the label.
- *
+ *
* @param background to set to viewer
* @param columnIndex column index (0 when no columns)
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelChangedListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelChangedListener.java
index 98470bc83..8bae97f27 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelChangedListener.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelChangedListener.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -19,10 +19,10 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
* @see IModelDelta
*/
public interface IModelChangedListener {
-
+
/**
* Notification a model has changed as described by the given delta.
- *
+ *
* @param delta model delta
* @param proxy proxy that created the delta
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDelta.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDelta.java
index 3fb1dd65c..37f9f4c2a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDelta.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDelta.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -16,14 +16,14 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
* Describes a change within a model. A delta is a hierarchical description of changes
* within a model. It consists of a tree of nodes. Each node references an element
* from a model describing how that element changed. A model proxy fires model deltas
- * as its model changes in order to update views displaying that model.
+ * as its model changes in order to update views displaying that model.
* <p>
* Each node in a model delta describes the following:
* <ul>
* <li>the type of change - for example, whether an element was added, removed,
* or whether its content or state changed</li>
* <li>action to consider - for example, select or reveal the element</li>
- * </ul>
+ * </ul>
* </p>
* <p>
* @noimplement Clients are not intended to implement this interface directly. Instead, clients
@@ -32,9 +32,9 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
* @since 3.2
*/
public interface IModelDelta {
-
+
// types of changes
-
+
/**
* Indicates an element has not changed, but has children that have
* changed in some way.
@@ -54,16 +54,16 @@ public interface IModelDelta {
* Indicates an element has been replaced in the model, as described by
* its path. In this case a replacement element is also specified in the
* model delta node.
- */
+ */
public static int REPLACED = 1 << 3;
/**
* Indicates an element has been inserted into the model, as described
* by its path and index.
*/
public static int INSERTED = 1 << 4;
-
+
// how an element changed
-
+
/**
* Indicates an elements content has changed (i.e. its children).
*/
@@ -72,9 +72,9 @@ public interface IModelDelta {
* Indicates an elements state has changed (i.e. label)
*/
public static int STATE = 1 << 11;
-
+
// Suggested actions
-
+
/**
* Suggests that the element should be expanded, as described by its path.
*/
@@ -83,79 +83,79 @@ public interface IModelDelta {
* Suggests that the element should be selected, as described by its path.
*/
public static int SELECT = 1 << 21;
-
+
/**
* Suggests that the element should be revealed, as described by its path.
* @since 3.3
*/
- public static int REVEAL = 1 << 24;
-
+ public static int REVEAL = 1 << 24;
+
/**
* Indicates a model proxy should be installed for the given element
* @since 3.3
*/
public static int INSTALL = 1 << 22;
-
+
/**
* Indicates a model proxy should be uninstalled for the given element
* @since 3.3
*/
public static int UNINSTALL = 1 << 23;
-
+
/**
* Suggests that the element should be collapsed, as described by its path.
* @since 3.3
*/
- public static int COLLAPSE = 1 << 25;
-
+ public static int COLLAPSE = 1 << 25;
+
/**
- * Flag indicating that the view layout deltas should override the
+ * Flag indicating that the view layout deltas should override the
* model selection policy. This flag can be used in conjunction with
- * SELECT and REVEAL flags.
- *
+ * SELECT and REVEAL flags.
+ *
* @see IModelSelectionPolicy
= * @since 3.5
*/
public static int FORCE = 1 << 26;
-
+
/**
* Returns the parent of this node, or <code>null</code> if this is
* a root node.
- *
+ *
* @return parent node or <code>null</code> if this is a root node
*/
public IModelDelta getParentDelta();
-
+
/**
* Returns the model element this node describes.
- *
+ *
* @return associated model element
*/
public Object getElement();
-
+
/**
* Returns flags describing how this element changed. A bit mask of the
* change type constants described in {@link IModelDelta}.
- *
+ *
* @return change flags
*/
public int getFlags();
-
+
/**
* Returns nodes describing changed children, possibly an empty collection.
- *
+ *
* @return changed children, possibly empty
*/
public IModelDelta[] getChildDeltas();
-
+
/**
* When a node indicates the <code>IModelDelta.REPLACED</code> flag, this method
* returns the replacement element, otherwise <code>null</code>.
- *
+ *
* @return replacement element or <code>null</code>
*/
public Object getReplacementElement();
-
+
/**
* Returns this node's index in its parents child collection or -1 if unknown.
* This attribute is required when expanding or selecting an element.
@@ -167,7 +167,7 @@ public interface IModelDelta {
* @return insertion index or -1
*/
public int getIndex();
-
+
/**
* Returns the total number of children this element has, or -1 if unknown. Note
* that this number may be greater than the number of child delta nodes for this
@@ -175,17 +175,17 @@ public interface IModelDelta {
* <p>
* This attribute is required when expanding or selecting an element.
* </p>
- *
+ *
* @return total number of child elements this element has
*/
public int getChildCount();
-
+
/**
* Accepts the given visitor.
- *
+ *
* @param visitor delta visitor to accept
* @since 3.3
*/
public void accept(IModelDeltaVisitor visitor);
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDeltaVisitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDeltaVisitor.java
index 1d4154651..252ba7148 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDeltaVisitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDeltaVisitor.java
@@ -13,14 +13,14 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
* An objects that visits model deltas.
- *
+ *
* @since 3.3
*/
public interface IModelDeltaVisitor {
-
- /**
+
+ /**
* Visits the given model delta.
- *
+ *
* @param delta the delta to visit
* @param depth depth in the delta where 0 == root node
* @return <code>true</code> if the model delta's children should
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy.java
index adabf4e78..fd2fabc27 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy.java
@@ -23,14 +23,14 @@ import org.eclipse.jface.viewers.Viewer;
* is then installed into the viewer and the viewer listens to model deltas
* in order to update that element. Generally, a model proxy factory creates
* model proxies for root elements in a model, and then represents all elements
- * within that model for a specific presentation context.
+ * within that model for a specific presentation context.
* </p>
* <p>
* Note: provider methods are called in the Display thread of the viewer.
- * To avoid blocking the UI, long running operations should be performed
+ * To avoid blocking the UI, long running operations should be performed
* asynchronously.
* </p>
- *
+ *
* @noimplement Clients are not intended to implement this interface directly. Instead, clients
* creating and firing model deltas should create instances of {@link AbstractModelProxy}.
* @see IModelDelta
@@ -41,7 +41,7 @@ import org.eclipse.jface.viewers.Viewer;
* @since 3.2
*/
public interface IModelProxy {
-
+
/**
* Notification this model proxy has been created and is about to be installed
* in the following context. This is the first method called after a model proxy
@@ -54,13 +54,13 @@ public interface IModelProxy {
* @see IModelProxy2#initialize(ITreeModelViewer)
*/
public void init(IPresentationContext context);
-
- /**
- * Notification this model proxy has been installed in the specified
+
+ /**
+ * Notification this model proxy has been installed in the specified
* viewer. This indicates that the model proxy has been created and registered
- * model change listeners are ready to process deltas. This method is called
- * by the {@link AbstractModelProxy} base class using a job and NOT in viewers
- * display thread. It allows the client to initialize the proxy without
+ * model change listeners are ready to process deltas. This method is called
+ * by the {@link AbstractModelProxy} base class using a job and NOT in viewers
+ * display thread. It allows the client to initialize the proxy without
* blocking the UI. The default implementaiton is a no-op.
* <p>
* This method is called by the asynchronous viewer framework and should not
@@ -71,7 +71,7 @@ public interface IModelProxy {
* @since 3.3
*/
public void installed(Viewer viewer);
-
+
/**
* Disposes this model proxy.
* <p>
@@ -80,27 +80,27 @@ public interface IModelProxy {
* </p>
*/
public void dispose();
-
+
/**
* Registers the given listener for model delta notification.
- *
+ *
* @param listener model delta listener
*/
public void addModelChangedListener(IModelChangedListener listener);
-
+
/**
* Unregisters the given listener from model delta notification.
- *
+ *
* @param listener model delta listener
*/
public void removeModelChangedListener(IModelChangedListener listener);
-
+
/**
* Returns whether this proxy has been disposed.
- *
+ *
* @return whether this proxy has been disposed
* @since 3.3
*/
public boolean isDisposed();
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy2.java
index 7187edc48..dc779cb56 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy2.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy2.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,26 +16,26 @@ import org.eclipse.jface.viewers.Viewer;
/**
* Extension to the model proxy interface which allows the proxy to be initialized
* on the viewer's Display thread
- *
+ *
* @noimplement Clients are not intended to implement this interface directly. Instead, clients
* creating and firing model deltas should create instances of {@link AbstractModelProxy}.
* @since 3.8
*/
public interface IModelProxy2 extends IModelProxy {
-
+
/**
- * Initialize model proxy with given tree model viewer. This method is
- * called on the viewer's Display thread and is guaranteed to be called
- * before the dispose() method is called on the same proxy. The default
- * implementation of this method calls {@link #init(IPresentationContext)}
- * and {@link #installed(Viewer)} asynchornously and not in the Display
+ * Initialize model proxy with given tree model viewer. This method is
+ * called on the viewer's Display thread and is guaranteed to be called
+ * before the dispose() method is called on the same proxy. The default
+ * implementation of this method calls {@link #init(IPresentationContext)}
+ * and {@link #installed(Viewer)} asynchornously and not in the Display
* thread.
* <p>
- * This method is called by the asynchronous viewer framework and should
+ * This method is called by the asynchronous viewer framework and should
* not be called by clients.
* </p>
* @param viewer Viewer that is installing this model proxy.
- *
+ *
*/
public void initialize(ITreeModelViewer viewer);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory.java
index e46847fdd..e971580e9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory.java
@@ -11,7 +11,7 @@
package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
- * A model proxy factory creates model proxies for elements based on
+ * A model proxy factory creates model proxies for elements based on
* specific presentation contexts. A model proxy factory is provided for
* a model element by registering a model proxy factory adapter for
* an element.
@@ -26,7 +26,7 @@ public interface IModelProxyFactory {
/**
* Creates and returns a model proxy for the given element in the specified
* context or <code>null</code> if none.
- *
+ *
* @param element model element to create a model proxy for
* @param context presentation context
* @return model proxy or <code>null</code>
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory2.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory2.java
index 2bbd8114e..177fcd963 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory2.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory2.java
@@ -13,32 +13,32 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
import org.eclipse.jface.viewers.TreePath;
/**
- * A model proxy factory creates model proxies for elements based on
+ * A model proxy factory creates model proxies for elements based on
* specific presentation contexts. A model proxy factory is provided for
* a model element by registering a model proxy factory adapter for
* an element.
* <p>
- * This interface is an alternative to the {@link IModelProxyFactory}
- * interface. Unlike its predecessor <code>IModelProxyFactory2</code> allows
- * the full path to the tree element to be specified when creating an
- * <code>IModelProxy<code> instance. Using the full patch allows models to
- * provide proper model deltas even if the root element of this proxy is at
+ * This interface is an alternative to the {@link IModelProxyFactory}
+ * interface. Unlike its predecessor <code>IModelProxyFactory2</code> allows
+ * the full path to the tree element to be specified when creating an
+ * <code>IModelProxy<code> instance. Using the full patch allows models to
+ * provide proper model deltas even if the root element of this proxy is at
* variable or unknown location in the viewer.
- * </p>
+ * </p>
* <p>
* Clients may implement this interface.
* </p>
* @see IModelProxyFactory
* @see IModelProxy
* @see IModelDelta
- *
+ *
* @since 3.6
*/
public interface IModelProxyFactory2 {
/**
* Creates and returns a model proxy for the given element in the specified
* context or <code>null</code> if none.
- *
+ *
* @param input viewer input context
* @param path to model element to create a model proxy for
* @param context presentation context
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelSelectionPolicy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelSelectionPolicy.java
index f672adef1..0174054a0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelSelectionPolicy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelSelectionPolicy.java
@@ -27,27 +27,27 @@ import org.eclipse.jface.viewers.ISelection;
* will then be asked to create a model selection policy adapter.
* The adapter represents selections from an instance of a model.
* </p>
- *
+ *
* @see IModelSelectionPolicyFactory
* @since 3.2
*/
public interface IModelSelectionPolicy {
-
+
/**
* Returns whether the given selection is contained in this model.
- *
+ *
* @param selection Selection to check
* @param context Presentation context of the viewer.
* @return true if selection is contained in model.
*/
public boolean contains(ISelection selection, IPresentationContext context);
-
+
/**
* Returns whether the candidate selection overrides the
* existing selection. The policy is only asked about selections
* that it contains.
- *
- * @param existing Existing selection to check.
+ *
+ * @param existing Existing selection to check.
* @param candidate New proposed selection.
* @param context Presentation context of viewer.
* @return true if candidate selection should be set to viewer
@@ -57,13 +57,13 @@ public interface IModelSelectionPolicy {
/**
* Returns whether the given selection should be maintained in the
* face of a selection attempt from a different model.
- *
+ *
* @param selection selection to test
* @param context Presentation context of viewer.
* @return true if selection is sticky
*/
public boolean isSticky(ISelection selection, IPresentationContext context);
-
+
/**
* Replaces an invalid selection.
* <p>
@@ -75,7 +75,7 @@ public interface IModelSelectionPolicy {
* elements removed). Model selection policies may implement a different strategy
* for picking a new selection when the old selection becomes invalid.
* </p>
- *
+ *
* @param invalidSelection
* the selection before the viewer was updated
* @param newSelection
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelSelectionPolicyFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelSelectionPolicyFactory.java
index d318f8e07..34b4e75ba 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelSelectionPolicyFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelSelectionPolicyFactory.java
@@ -12,7 +12,7 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
- * A model selection policy factory creates a model selection policy for an element based on
+ * A model selection policy factory creates a model selection policy for an element based on
* a specific presentation context. A model selection policy factory is provided for
* a model element by registering a model selection policy factory adapter for
* an element.
@@ -26,7 +26,7 @@ public interface IModelSelectionPolicyFactory {
/**
* Creates and returns a model selection policy for the given element in the specified
* context or <code>null</code> if none.
- *
+ *
* @param element model element to create a selection policy for
* @param context presentation context
* @return model selection policy or <code>null</code>
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java
index 12d0b1b2d..7e542cf02 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java
@@ -33,99 +33,99 @@ public interface IPresentationContext {
/**
* Property indicating whether the presentation context is disposed.
- * It is set to <code>Boolean.TRUE</code> after the presentation context
- * is disposed. This property may be <code>null</code>, which indicates
+ * It is set to <code>Boolean.TRUE</code> after the presentation context
+ * is disposed. This property may be <code>null</code>, which indicates
* that context is not yet disposed.
- *
+ *
* @since 3.6
*/
public static final String PROPERTY_DISPOSED = "PROPERTY_DISPOSED"; //$NON-NLS-1$
-
+
/**
* Returns identifiers of the visible columns in the order
* labels should be provided, or <code>null</code> if columns
* are not being displayed. Label providers use this
- * information.
- *
+ * information.
+ *
* @return visible column identifiers or <code>null</code>
* @see IColumnPresentation
*/
public String[] getColumns();
-
+
/**
* Registers the given listener for property change notification.
- *
+ *
* @param listener property listener
*/
public void addPropertyChangeListener(IPropertyChangeListener listener);
-
+
/**
* Unregisters the given listener from property change notification.
- *
+ *
* @param listener property listener.
*/
public void removePropertyChangeListener(IPropertyChangeListener listener);
-
+
/**
* Returns the id of this presentation context. Usually this is the id of
* the associated part. However, when no part is associated with this context,
* the id may exist on its own. Allows for a context that is not tied to a part.
- *
+ *
* @return id
* @since 3.3
*/
public String getId();
-
+
/**
* Sets the specified property and notifies listeners of changes.
- *
+ *
* @param property property name
* @param value property value
*/
public void setProperty(String property, Object value);
-
+
/**
* Returns the property with the specified name or <code>null</code>
* if none.
- *
+ *
* @param property property name
* @return property value or <code>null</code>
*/
public Object getProperty(String property);
-
+
/**
* Disposes this presentation context. Called by the framework
* when the associated viewer is disposed.
*/
public void dispose();
-
+
/**
* Returns all keys of properties currently set in this context,
* possibly an empty collection
- *
+ *
* @return keys of all current properties
* @since 3.4
*/
public String[] getProperties();
-
+
/**
* Returns the part that this presentation context is associated with.
- * May return <code>null</code> if the presentation is not associated
+ * May return <code>null</code> if the presentation is not associated
* with a part.
- *
- * @return IWorkbenchPart or <code>null</code>
+ *
+ * @return IWorkbenchPart or <code>null</code>
* @since 3.6
*/
public IWorkbenchPart getPart();
-
+
/**
* Returns the window that this presentation context is associated with.
- * May return <code>null</code> if the presentation is not associated
+ * May return <code>null</code> if the presentation is not associated
* with a window.
- *
- * @return IWorkbenchWindow or <code>null</code>
+ *
+ * @return IWorkbenchWindow or <code>null</code>
* @since 3.6
*/
public IWorkbenchWindow getWindow();
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStateUpdateListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStateUpdateListener.java
index 49830e0af..fa328c449 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStateUpdateListener.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStateUpdateListener.java
@@ -13,37 +13,37 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
* Listener for viewer state updates.
- *
+ *
* @since 3.6
*/
public interface IStateUpdateListener {
/**
* Notification that a sequence of state saving updates are starting.
- *
+ *
* @param input Input object for the state operation.
*/
public void stateSaveUpdatesBegin(Object input);
-
+
/**
* Notification that viewer updates are complete. Corresponds to
* a <code>viewerUpdatesBegin()</code> notification.
- *
+ *
* @param input Input object for the state operation.
*/
public void stateSaveUpdatesComplete(Object input);
/**
* Notification that a sequence of viewer updates are starting.
- *
+ *
* @param input Input object for the state operation.
*/
public void stateRestoreUpdatesBegin(Object input);
-
+
/**
* Notification that viewer updates are complete. Corresponds to
* a <code>viewerUpdatesBegin()</code> notification.
- *
+ *
* @param input Input object for the state operation.
*/
public void stateRestoreUpdatesComplete(Object input);
@@ -51,16 +51,16 @@ public interface IStateUpdateListener {
/**
* Notification that a specific update has started within
* a sequence of updates.
- *
+ *
* @param input Input object for the state operation.
* @param update update
*/
public void stateUpdateStarted(Object input, IViewerUpdate update);
-
+
/**
* Notification that a specific update has completed within a
* sequence of updates.
- *
+ *
* @param input Input object for the state operation.
* @param update update
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStatusMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStatusMonitor.java
index 0ba8af669..4703e1e1a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStatusMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStatusMonitor.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -16,7 +16,7 @@ import org.eclipse.core.runtime.IStatus;
/**
* A progress monitor that accepts a status. This common base interface is used
* to make non-blocking requests on models that may reply asynchronously. A request
- * may be cancelled by the caller or by the client fulfilling the request (by
+ * may be cancelled by the caller or by the client fulfilling the request (by
* calling <code>setCancelled(true)</code> on the request). Failure and error
* states are reported by setting a status on a monitor. When a request
* is complete, the client fulfilling the request must call <code>done()</code> on the
@@ -43,14 +43,14 @@ public interface IStatusMonitor extends IProgressMonitor {
* Sets the status for a request, possibly <code>null</code>.
* When a request fails, the status indicates why the request failed.
* A <code>null</code> status is considered to be successful.
- *
+ *
* @param status request status
*/
public void setStatus(IStatus status);
-
+
/**
* Returns the status of this request, or <code>null</code>.
- *
+ *
* @return request status - <code>null</code> is equivalent
* to an OK status
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ITreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ITreeModelViewer.java
index 1b1f38a48..39b1db200 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ITreeModelViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ITreeModelViewer.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - ongoing bug fixes and enhancements
@@ -21,7 +21,7 @@ import org.eclipse.swt.widgets.Display;
/**
* Interface of an tree model viewer. It declares the common methods for the
- * JFace-based {@link TreeModelViewer} and the UI-less
+ * JFace-based {@link TreeModelViewer} and the UI-less
* {@link VirtualTreeModelViewer}.
*
* @since 3.8
@@ -41,14 +41,14 @@ public interface ITreeModelViewer extends ISelectionProvider {
* Returns the Display object that this viewer is in. The
* display object can be used by clients to access the display thread
* to call the viewer methods.
- *
+ *
* @return The display.
*/
public Display getDisplay();
/**
* Returns this viewer's presentation context.
- *
+ *
* @return presentation context
*/
public IPresentationContext getPresentationContext();
@@ -57,23 +57,23 @@ public interface ITreeModelViewer extends ISelectionProvider {
* Returns the current input of this viewer, or <code>null</code>
* if none. The viewer's input provides the "model" for the viewer's
* content.
- *
+ *
* @return Input object
*/
public Object getInput();
/**
- * Sets the input of this viewer. Setting the input resets the
+ * Sets the input of this viewer. Setting the input resets the
* viewer's contents and triggers an update starting at the input
* element.
- *
+ *
* @param object Input element, or <code>null</code> if none.
*/
public void setInput(Object object);
-
+
/**
* Returns the current selection in viewer.
- *
+ *
* @return selection object
*/
@Override
@@ -83,20 +83,20 @@ public interface ITreeModelViewer extends ISelectionProvider {
* Sets a new selection for this viewer and optionally makes it visible.
* The selection is not set if the model selection policy overrides the
* attempt to set the selection.
- *
+ *
* @param selection the new selection
* @param reveal <code>true</code> if the selection is to be made
* visible, and <code>false</code> otherwise
- * @param force <code>true</code> if the selection should override the
+ * @param force <code>true</code> if the selection should override the
* model selection policy
*/
public void setSelection(ISelection selection, boolean reveal, boolean force);
-
+
/**
* Attempts to set the selection for this viewer and optionally makes it visible.
* The selection is not set if the model selection policy overrides the
* attempt to set the selection.
- *
+ *
* @param selection the new selection
* @param reveal whether to make the selection visible after successfully setting
* the selection
@@ -112,7 +112,7 @@ public interface ITreeModelViewer extends ISelectionProvider {
* @return non-negative level, or <code>ALL_LEVELS</code> if all levels of
* the tree are expanded automatically
* @see #setAutoExpandLevel
- */
+ */
public int getAutoExpandLevel();
/**
@@ -128,115 +128,115 @@ public interface ITreeModelViewer extends ISelectionProvider {
* The value <code>ALL_LEVELS</code> means that all subtrees should be
* expanded.
* </p>
- *
+ *
* @param level
* non-negative level, or <code>ALL_LEVELS</code> to expand all
* levels of the tree
*/
public void setAutoExpandLevel(int level);
-
+
/**
- * Returns the label data for the given element and for the given column,
- * Returns <code>null</code> if the given element is not found or is not
- * materialized in the virtual viewer. Clients may listen to label update
+ * Returns the label data for the given element and for the given column,
+ * Returns <code>null</code> if the given element is not found or is not
+ * materialized in the virtual viewer. Clients may listen to label update
* events to be notified when element labels are updated.
- *
+ *
* @param path Path of the element.
* @param columnId ID of the column for which to return the label data.
- * @return Label object containing the label information. Can be
- * <code>null</code> if the given element is not found or is not
+ * @return Label object containing the label information. Can be
+ * <code>null</code> if the given element is not found or is not
* materialized in the virtual viewer.
*/
public ViewerLabel getElementLabel(TreePath path, String columnId);
-
+
/**
* Registers the specified listener for view update notifications.
- *
+ *
* @param listener Listener to add
*/
public void addViewerUpdateListener(IViewerUpdateListener listener);
-
+
/**
* Removes the specified listener from update notifications.
- *
+ *
* @param listener Listener to remove
*/
public void removeViewerUpdateListener(IViewerUpdateListener listener);
-
+
/**
* Registers the specified listener for state update notifications.
- *
+ *
* @param listener Listener to add
*/
public void addStateUpdateListener(IStateUpdateListener listener);
-
+
/**
* Removes the specified listener from state update notifications.
- *
+ *
* @param listener Listener to remove
*/
public void removeStateUpdateListener(IStateUpdateListener listener);
-
+
/**
* Registers the specified listener for view label update notifications.
- *
+ *
* @param listener Listener to add
*/
public void addLabelUpdateListener(ILabelUpdateListener listener);
-
+
/**
* Removes the specified listener from view label update notifications.
- *
+ *
* @param listener Listener to remove
*/
public void removeLabelUpdateListener(ILabelUpdateListener listener);
-
+
/**
* Registers the given listener for model delta notification.
* This listener is called immediately after the viewer processes
* the delta.
- *
+ *
* @param listener Listener to add
*/
public void addModelChangedListener(IModelChangedListener listener);
-
+
/**
* Removes the given listener from model delta notification.
- *
+ *
* @param listener Listener to remove
*/
public void removeModelChangedListener(IModelChangedListener listener);
-
+
/**
* Writes state information into a delta for the sub-tree at the given
- * path. It adds delta nodes and IModelDelta.EXPAND and IModelDelta.SELECT
+ * path. It adds delta nodes and IModelDelta.EXPAND and IModelDelta.SELECT
* as it parses the sub-tree.
- *
+ *
* @param path Path where to start saving the state.
* @param delta The delta where the state is to be saved.
- * @param flagsToSave The flags to preserve during the state save. The
- * supported flags are <code>IModelDelta.SELECT</code>,
+ * @param flagsToSave The flags to preserve during the state save. The
+ * supported flags are <code>IModelDelta.SELECT</code>,
* <code>IModelDelta.EXPAND</code>, <code>IModelDelta.COLLAPSE</code>.
- * @return Returns whether the state was saved for the given path. Will
- * return <code>false</code> if an element at the given path cannot
+ * @return Returns whether the state was saved for the given path. Will
+ * return <code>false</code> if an element at the given path cannot
* be found.
*/
public boolean saveElementState(TreePath path, ModelDelta delta, int flagsToSave);
-
+
/**
* Causes the viewer to process the given delta as if it came from a
* model proxy. This method is intended to be used to restore state
* saved using {@link #saveElementState(TreePath, ModelDelta, int)}.
- *
+ *
* @param delta Delta to process.
*/
public void updateViewer(IModelDelta delta);
-
+
/**
- * Triggers an update of the given element and its children. If
- * multiple instances of the given element are found in the tree,
+ * Triggers an update of the given element and its children. If
+ * multiple instances of the given element are found in the tree,
* they will all be updated.
- *
+ *
* @param element Element to update.
*/
public void refresh(Object element);
@@ -249,7 +249,7 @@ public interface ITreeModelViewer extends ISelectionProvider {
/**
* Returns the paths at which the given element is found realized in viewer
* or an empty array if not found.
- *
+ *
* @param element Element to find.
* @return Array of paths for given element.
*/
@@ -257,21 +257,21 @@ public interface ITreeModelViewer extends ISelectionProvider {
/**
* Returns filters currently configured in viewer.
- *
+ *
* @return filter array in viewer.
*/
public ViewerFilter[] getFilters();
-
+
/**
* Add a new filter to use in viewer.
- *
+ *
* @param filter Filter to add.
*/
public void addFilter(ViewerFilter filter);
-
+
/**
* Sets viewer filters to the filters in array.
- *
+ *
* @param filters New filter array to use.
*/
public void setFilters(ViewerFilter... filters);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewActionProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewActionProvider.java
index b493d2ac8..0c87ff80d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewActionProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewActionProvider.java
@@ -14,21 +14,21 @@ import org.eclipse.jface.action.IAction;
/**
- * Action provider allows a debug model to override the standard actions in the
- * variables view. The client should return this provider as an adapter to the
+ * Action provider allows a debug model to override the standard actions in the
+ * variables view. The client should return this provider as an adapter to the
* input element of the variables view.
- *
+ *
* @since 3.8
*/
public interface IViewActionProvider {
/**
* Get action for a given presentation context and action id. Implementation
* should return an action implementation appropriate for given view and action ID.
- * The implementation may register itself as listener to presentation context
+ * The implementation may register itself as listener to presentation context
* to determine when to dispose the returned action.
* @param presentationContext presentation context
* @param actionID action id
- * @return action or null
+ * @return action or null
*/
public IAction getAction(IPresentationContext presentationContext, String actionID);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputProvider.java
index dca273093..f691d2841 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputProvider.java
@@ -24,15 +24,15 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
* @see ViewerInputService
*/
public interface IViewerInputProvider {
-
+
/**
* Asynchronously determine the viewer input to the based on the active
* debug context and presentation context.
- *
- * @param update provides details about the request and stores the newly
+ *
+ * @param update provides details about the request and stores the newly
* computed viewer input
*/
public void update(IViewerInputUpdate update);
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputRequestor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputRequestor.java
index 1ac26036e..9ac314eb3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputRequestor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputRequestor.java
@@ -11,20 +11,20 @@
package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
- * Clients using a {@link ViewerInputService} implement this interface to be notified of
+ * Clients using a {@link ViewerInputService} implement this interface to be notified of
* the computed viewer input.
* <p>
* Clients may implement this interface.
* </p>
* @see ViewerInputService
- * @since 3.4
+ * @since 3.4
*/
public interface IViewerInputRequestor {
/**
* Notification that a viewer input update request is complete. The given update
* contains the result of the request, which may have been canceled.
- *
+ *
* @param update viewer input update request
*/
public void viewerInputComplete(IViewerInputUpdate update);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputUpdate.java
index d56225ef3..3443b28f3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputUpdate.java
@@ -27,15 +27,15 @@ public interface IViewerInputUpdate extends IViewerUpdate {
* Sets the input to use for this request's presentation context, or <code>null</code>
* if none (empty viewer). The source used to derive the viewer input is available
* from this request's <code>getElement()</code> method.
- *
+ *
* @param element viewer input for this request's presentation context, possibly <code>null</code>
*/
public void setInputElement(Object element);
-
+
/**
* Returns the computed viewer input or <code>null</code> if none. The return value of this method
* only contains valid data if this request is complete (i.e. <code>done()</code> has been called).
- *
+ *
* @return viewer input or <code>null</code>
*/
public Object getInputElement();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdate.java
index baa6971ce..0df2ce637 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdate.java
@@ -15,7 +15,7 @@ import org.eclipse.jface.viewers.TreePath;
/**
* A context sensitive viewer update request.
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
* @since 3.3
*/
@@ -23,30 +23,30 @@ public interface IViewerUpdate extends IRequest {
/**
* Returns the context this update was requested in.
- *
+ *
* @return context this update was requested in
*/
public IPresentationContext getPresentationContext();
-
+
/**
* Returns the model element associated with this request.
- *
+ *
* @return associated model element
*/
public Object getElement();
-
+
/**
* Returns the viewer tree path to the model element associated with this
* request. An empty path indicates a root element.
- *
+ *
* @return tree path, possibly empty
*/
public TreePath getElementPath();
-
+
/**
* Returns the element that was the viewer input at the time the
* request was made, possibly <code>null</code>.
- *
+ *
* @return viewer input element, possibly <code>null</code>
* @since 3.4
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdateListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdateListener.java
index c8b9d923e..647f2ea3f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdateListener.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdateListener.java
@@ -13,7 +13,7 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
* Notified of viewer updates.
- *
+ *
* @since 3.3
*/
public interface IViewerUpdateListener {
@@ -22,25 +22,25 @@ public interface IViewerUpdateListener {
* Notification that a sequence of viewer updates are starting.
*/
public void viewerUpdatesBegin();
-
+
/**
* Notification that viewer updates are complete. Corresponds to
* a <code>viewerUpdatesBegin()</code> notification.
*/
public void viewerUpdatesComplete();
-
+
/**
* Notification that a specific update has started within
* a sequence of updates.
- *
+ *
* @param update update
*/
public void updateStarted(IViewerUpdate update);
-
+
/**
* Notification that a specific update has completed within a
* sequence of updates.
- *
+ *
* @param update update
*/
public void updateComplete(IViewerUpdate update);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IVirtualItemListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IVirtualItemListener.java
index f2f52d0a6..67ffdb815 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IVirtualItemListener.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IVirtualItemListener.java
@@ -11,27 +11,27 @@
package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
- * Interface for listeners that need to be notified when items
+ * Interface for listeners that need to be notified when items
* are disposed or revealed. It should be implemented by the viewer.
- *
+ *
* @see VirtualTreeModelViewer
* @since 3.8
*/
public interface IVirtualItemListener {
-
+
/**
- * Called when the item has been shown in the virtual viewer's
+ * Called when the item has been shown in the virtual viewer's
* view-port. This indicates to the viewer that it should check
* the item's status and request needed data.
- *
+ *
* @param item The item that was revealed.
*/
public void revealed(VirtualItem item);
-
+
/**
* Called when an item is disposed. It tells the viewer to
* clean up any remaining mappings and cached data of this item.
- *
+ *
* @param item The itam that was disposed.
*/
public void disposed(VirtualItem item);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IVirtualItemValidator.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IVirtualItemValidator.java
index b460c486c..2ed6682e7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IVirtualItemValidator.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IVirtualItemValidator.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -13,25 +13,25 @@ package org.eclipse.debug.internal.ui.viewers.model.provisional;
/**
* A validator to be used with a VirtualTreeModelViewer to determine which viewer
- * items should be updated by the viewer.
- *
+ * items should be updated by the viewer.
+ *
* @see VirtualTreeModelViewer
* @since 3.8
*/
public interface IVirtualItemValidator {
-
+
/**
- * Allows the validator to determine whether the given item is to be deemed
+ * Allows the validator to determine whether the given item is to be deemed
* visible in the virtual tree.
- *
+ *
* @param item Item to be tested.
* @return returns true if the item should be considered visible.
*/
public boolean isItemVisible(VirtualItem item);
-
+
/**
* Indicates that the viewer requested to reveal the given item in viewer.
- *
+ *
* @param item Item to show.
*/
public void showItem(VirtualItem item);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
index f40307d4c..219b1e1b9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
@@ -4,10 +4,10 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
- * Wind River Systems - Fix for viewer state save/restore [188704]
+ * Wind River Systems - Fix for viewer state save/restore [188704]
*******************************************************************************/
package org.eclipse.debug.internal.ui.viewers.model.provisional;
@@ -40,7 +40,7 @@ public class ModelDelta implements IModelDelta {
/**
* Constructs a new delta for the given element.
- *
+ *
* @param element model element
* @param flags change flags
*/
@@ -52,7 +52,7 @@ public class ModelDelta implements IModelDelta {
/**
* Constructs a new delta for the given element to be replaced
* with the specified replacement element.
- *
+ *
* @param element model element
* @param replacement replacement element
* @param flags change flags
@@ -66,7 +66,7 @@ public class ModelDelta implements IModelDelta {
/**
* Constructs a new delta for the given element to be inserted at
* the specified index.
- *
+ *
* @param element model element
* @param index insertion position
* @param flags change flags
@@ -76,11 +76,11 @@ public class ModelDelta implements IModelDelta {
fIndex = index;
fFlags = flags;
}
-
+
/**
* Constructs a new delta for the given element at the specified index
* relative to its parent with the given number of children.
- *
+ *
* @param element model element
* @param index insertion position
* @param flags change flags
@@ -112,7 +112,7 @@ public class ModelDelta implements IModelDelta {
/**
* Adds a child node to this delta with the given element and change flags,
* and returns the child delta.
- *
+ *
* @param element child element to add
* @param flags change flags for child
* @return newly created child delta
@@ -123,10 +123,10 @@ public class ModelDelta implements IModelDelta {
addDelta(node);
return node;
}
-
+
/**
* Returns the child delta for the given element, or <code>null</code> if none.
- *
+ *
* @param element child element
* @return corresponding delta node, or <code>null</code>
*/
@@ -145,11 +145,11 @@ public class ModelDelta implements IModelDelta {
/**
* Returns the child delta for the given element and index, or <code>null</code> if none.
- *
+ *
* @param element Element of the child delta to find
* @param index Index of the child delta to find.
* @return corresponding delta node, or <code>null</code>
- *
+ *
* @since 3.8
*/
public ModelDelta getChildDelta(Object element, int index) {
@@ -184,7 +184,7 @@ public class ModelDelta implements IModelDelta {
mapNode( fNodesList.get(i) );
}
}
-
+
private void mapNode(ModelDelta node) {
Object oldValue = fNodesMap.put(node.getElement(), node);
if (oldValue instanceof ModelDelta) {
@@ -200,13 +200,13 @@ public class ModelDelta implements IModelDelta {
fNodesMap.put(node.getElement(), newNodes);
}
}
-
+
/**
* Adds a child node to this delta to replace the given element with the
- * specified replacement element and change flags, and returns the
+ * specified replacement element and change flags, and returns the
* newly created child delta.
- *
+ *
* @param element child element to add to this delta
* @param replacement replacement element for the child element
* @param flags change flags
@@ -222,7 +222,7 @@ public class ModelDelta implements IModelDelta {
/**
* Adds a child delta to this delta to insert the specified element at
* the given index, and returns the newly created child delta.
- *
+ *
* @param element child element in insert
* @param index index of insertion
* @param flags change flags
@@ -234,11 +234,11 @@ public class ModelDelta implements IModelDelta {
addDelta(node);
return node;
}
-
+
/**
* Adds a child delta to this delta at the specified index with the
* given number of children, and returns the newly created child delta.
- *
+ *
* @param element child element in insert
* @param index index of the element relative to parent
* @param flags change flags
@@ -251,16 +251,16 @@ public class ModelDelta implements IModelDelta {
addDelta(node);
return node;
}
-
+
/**
* Sets the parent delta of this delta
- *
+ *
* @param node parent delta
*/
void setParent(ModelDelta node) {
fParent = node;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.IModelDelta#getParent()
*/
@@ -284,7 +284,7 @@ public class ModelDelta implements IModelDelta {
public int getIndex() {
return fIndex;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.IModelDelta#getNodes()
*/
@@ -295,7 +295,7 @@ public class ModelDelta implements IModelDelta {
}
return fNodes;
}
-
+
private void addDelta(ModelDelta delta) {
if (fNodesList == null) {
fNodesList = new ArrayList<ModelDelta>(4);
@@ -306,7 +306,7 @@ public class ModelDelta implements IModelDelta {
mapNode(delta);
}
}
-
+
@Override
public String toString() {
StringBuffer buf = new StringBuffer();
@@ -315,7 +315,7 @@ public class ModelDelta implements IModelDelta {
buf.append("Model Delta End\n"); //$NON-NLS-1$
return buf.toString();
}
-
+
private void appendDetail(String indent, StringBuffer buf, IModelDelta delta) {
buf.append(indent);
buf.append("Element: "); //$NON-NLS-1$
@@ -396,7 +396,7 @@ public class ModelDelta implements IModelDelta {
public void accept(IModelDeltaVisitor visitor) {
doAccept(visitor, 0);
}
-
+
protected void doAccept(IModelDeltaVisitor visitor, int depth) {
if (visitor.visit(this, depth)) {
IModelDelta[] childDeltas = getChildDeltas();
@@ -405,19 +405,19 @@ public class ModelDelta implements IModelDelta {
}
}
}
-
+
/**
* Sets this delta's element
- *
+ *
* @param element element to set
*/
public void setElement(Object element) {
fElement = element;
}
-
+
/**
* Sets this delta's flags.
- *
+ *
* @param flagsnew flags to set
*/
public void setFlags(int flags) {
@@ -426,17 +426,17 @@ public class ModelDelta implements IModelDelta {
/**
* Sets this delta's index
- *
+ *
* @param index new index to set
* @since 3.6
*/
public void setIndex(int index) {
fIndex = index;
}
-
+
/**
* Sets this delta's child count.
- *
+ *
* @param count new child count to set
*/
public void setChildCount(int count) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java
index 805187af3..0a73045fd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java
@@ -36,13 +36,13 @@ import org.eclipse.ui.PlatformUI;
* @since 3.2
*/
public class PresentationContext implements IPresentationContext {
-
+
private static final String PRESENTATION_CONTEXT_PROPERTIES = "PRESENTATION_CONTEXT_PROPERTIES"; //$NON-NLS-1$
private static final String BOOLEAN = "BOOLEAN"; //$NON-NLS-1$
private static final String STRING = "STRING"; //$NON-NLS-1$
private static final String INTEGER = "INTEGER"; //$NON-NLS-1$
private static final String PERSISTABLE = "PERSISTABLE"; //$NON-NLS-1$
-
+
final private String fId;
final private ListenerList<IPropertyChangeListener> fListeners = new ListenerList<>();
final private Map<String, Object> fProperties = new HashMap<String, Object>();
@@ -51,7 +51,7 @@ public class PresentationContext implements IPresentationContext {
/**
* Constructs a presentation context for the given id.
- *
+ *
* @param id presentation context id
*/
public PresentationContext(String id) {
@@ -60,7 +60,7 @@ public class PresentationContext implements IPresentationContext {
/**
* Constructs a presentation context for the given id and window.
- *
+ *
* @param id presentation context id
* @param window presentation context window, may be <code>null</code>
*/
@@ -71,7 +71,7 @@ public class PresentationContext implements IPresentationContext {
/**
* Constructs a presentation context for the given id and part.
* The presentation context window is derived from the part.
- *
+ *
* @param id presentation context id
* @param part presentation context part, may be <code>null</code>
*/
@@ -82,7 +82,7 @@ public class PresentationContext implements IPresentationContext {
/**
* Constructs a presentation context for the given id and part.
* The presentation context id and window are derived from the part.
- *
+ *
* @param part presentation context part, can NOT be <code>null</code>
*/
public PresentationContext(IWorkbenchPart part) {
@@ -102,10 +102,10 @@ public class PresentationContext implements IPresentationContext {
public String[] getColumns() {
return (String[]) getProperty(IPresentationContext.PROPERTY_COLUMNS);
}
-
+
/**
* Fires a property change event to all registered listeners
- *
+ *
* @param property property name
* @param oldValue old value or <code>null</code>
* @param newValue new value or <code>null</code>
@@ -124,16 +124,16 @@ public class PresentationContext implements IPresentationContext {
}
}
}
-
+
/**
* Sets the visible column ids.
- *
+ *
* @param ids column identifiers
*/
public void setColumns(String[] ids) {
setProperty(IPresentationContext.PROPERTY_COLUMNS, ids);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext#dispose()
@@ -196,19 +196,19 @@ public class PresentationContext implements IPresentationContext {
fProperties.put(property, value);
}
}
-
+
if (propertySet) {
firePropertyChange(property, oldValue, value);
}
}
-
+
/**
* Restores the presentation context properties from the given memento.
* @param memento Memento to restore from.
*/
public void initProperties(IMemento memento) {
IMemento presentationMemento = null;
-
+
IMemento[] mementos = memento.getChildren(PRESENTATION_CONTEXT_PROPERTIES);
for (int i = 0; i < mementos.length; i++) {
if (getId().equals(mementos[i].getID())) {
@@ -222,24 +222,24 @@ public class PresentationContext implements IPresentationContext {
for (int i = 0; i < stringProperties.length; i++) {
fProperties.put(stringProperties[i].getID(), stringProperties[i].getString(STRING));
}
-
+
IMemento[] integerMementos = presentationMemento.getChildren(INTEGER);
for (int i = 0; i < integerMementos.length; i++) {
fProperties.put(integerMementos[i].getID(), integerMementos[i].getInteger(INTEGER));
}
-
+
IMemento[] booleanMementos = presentationMemento.getChildren(BOOLEAN);
for (int i = 0; i < booleanMementos.length; i++) {
fProperties.put(booleanMementos[i].getID(), booleanMementos[i].getBoolean(BOOLEAN));
}
-
+
IMemento[] persistableMementos = presentationMemento.getChildren(PERSISTABLE);
for (int i = 0; i < persistableMementos.length; i++) {
String factoryID = persistableMementos[i].getString(PERSISTABLE);
if (factoryID != null) {
IElementFactory factory = PlatformUI.getWorkbench().getElementFactory(factoryID);
if (factory != null) {
- Object element = factory.createElement(persistableMementos[i]);
+ Object element = factory.createElement(persistableMementos[i]);
if (element != null) {
fProperties.put(persistableMementos[i].getID(), element);
}
@@ -248,9 +248,9 @@ public class PresentationContext implements IPresentationContext {
}
}
}
-
+
/**
- * Saves the current presentation context properties to the given memento.
+ * Saves the current presentation context properties to the given memento.
* @param memento Memento to save to.
*/
public void saveProperites(IMemento memento) {
@@ -276,7 +276,7 @@ public class PresentationContext implements IPresentationContext {
}
}
}
-
+
private boolean isEqual(Object a, Object b) {
if (a == null) {
return b == null;
@@ -304,6 +304,6 @@ public class PresentationContext implements IPresentationContext {
public IWorkbenchWindow getWindow() {
return fWindow;
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewer.java
index 5e3d35722..15bdacacf 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewer.java
@@ -20,17 +20,17 @@ import org.eclipse.ui.IMemento;
/**
* A tree viewer for a model.
* <p>
- * Style flags supported by this viewer are the same as for {@link org.eclipse.jface.viewers.TreeViewer},
+ * Style flags supported by this viewer are the same as for {@link org.eclipse.jface.viewers.TreeViewer},
* except:
* <ul>
- * <li>SWT.VIRTUAL - Indicates that the viewer should be in lazy mode. This
+ * <li>SWT.VIRTUAL - Indicates that the viewer should be in lazy mode. This
* flag is required when creating this viewer.
* <li>SWT.POP_UP - Indicates that the viewer is used in a popup window, and it
- * should ignore requests from the model to select, expand, or collapse tree
+ * should ignore requests from the model to select, expand, or collapse tree
* elements.</li>
* </ul>
* </p>
- * @since 3.3
+ * @since 3.3
* @noextend Clients may instantiate this class. Clients may not subclass this class.
*/
public class TreeModelViewer extends InternalTreeModelViewer {
@@ -38,152 +38,152 @@ public class TreeModelViewer extends InternalTreeModelViewer {
public TreeModelViewer(Composite parent, int style, IPresentationContext context) {
super(parent, style, context);
}
-
+
/**
* Returns this viewer's presentation context.
- *
+ *
* @return presentation context
*/
@Override
public IPresentationContext getPresentationContext() {
return super.getPresentationContext();
- }
+ }
/**
* Registers the given listener for model delta notification.
- *
+ *
* @param listener model delta listener
*/
@Override
public void addModelChangedListener(IModelChangedListener listener) {
- super.addModelChangedListener(listener);
+ super.addModelChangedListener(listener);
}
-
+
/**
* Unregisters the given listener from model delta notification.
- *
+ *
* @param listener model delta listener
*/
@Override
public void removeModelChangedListener(IModelChangedListener listener) {
super.removeModelChangedListener(listener);
- }
-
+ }
+
/**
* Registers the specified listener for view update notifications.
- *
+ *
* @param listener listener
*/
@Override
public void addViewerUpdateListener(IViewerUpdateListener listener) {
super.addViewerUpdateListener(listener);
}
-
+
/**
* Removes the specified listener from update notifications.
- *
+ *
* @param listener listener
*/
@Override
public void removeViewerUpdateListener(IViewerUpdateListener listener) {
super.removeViewerUpdateListener(listener);
}
-
+
/**
* Returns whether columns can be toggled on/off for this viewer's current
* input element.
- *
+ *
* @return whether columns can be toggled on/off
*/
@Override
public boolean canToggleColumns() {
return super.canToggleColumns();
- }
-
+ }
+
/**
* Returns the current column presentation for this viewer, or <code>null</code>
* if none.
- *
+ *
* @return column presentation or <code>null</code>
*/
@Override
public IColumnPresentation getColumnPresentation() {
return super.getColumnPresentation();
- }
-
+ }
+
/**
* Returns identifiers of the visible columns in this viewer, or <code>null</code>
* if there are currently no columns.
- *
+ *
* @return visible columns identifiers or <code>null</code>
*/
@Override
public String[] getVisibleColumns() {
return super.getVisibleColumns();
- }
-
+ }
+
/**
* Initializes viewer state from the memento
- *
+ *
* @param memento the {@link IMemento} to read from
*/
@Override
public void initState(IMemento memento) {
super.initState(memento);
}
-
+
/**
* Save viewer state into the given memento.
- *
+ *
* @param memento the {@link IMemento} to save to
*/
@Override
public void saveState(IMemento memento) {
super.saveState(memento);
}
-
+
/**
- * @return Returns true if columns are being displayed currently.
+ * @return Returns true if columns are being displayed currently.
*/
@Override
public boolean isShowColumns() {
return super.isShowColumns();
- }
-
+ }
+
/**
* Resets any persisted column size for the given columns
- *
+ *
* @param columnIds array of column identifiers
*/
@Override
public void resetColumnSizes(String[] columnIds) {
super.resetColumnSizes(columnIds);
}
-
+
/**
* Toggles columns on/off for the current column presentation, if any.
- *
+ *
* @param show whether to show columns if the current input supports
* columns
*/
@Override
public void setShowColumns(boolean show) {
super.setShowColumns(show);
- }
-
+ }
+
/**
- * Sets the visible columns for this viewer. Id's correspond to
+ * Sets the visible columns for this viewer. Id's correspond to
* column identifiers from a column presentation. Use <code>null</code>
* or an empty collection to display default columns for the current
* column presentation. Only affects the current column presentation.
- *
+ *
* @param ids column identifiers or <code>null</code>
*/
@Override
public void setVisibleColumns(String[] ids) {
super.setVisibleColumns(ids);
- }
-
+ }
+
@Override
public ViewerLabel getElementLabel(TreePath path, String columnId) {
return super.getElementLabel(path, columnId);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewerFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewerFilter.java
index 57cdc7fda..b0f417e74 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewerFilter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewerFilter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,22 +16,22 @@ import org.eclipse.jface.viewers.ViewerFilter;
* Viewer filter for the Tree Model Viewer which allows more efficient filtering
* in the lazy viewer.
* <p>
- * The standard {@link ViewerFilter} class must be applied to all elements in the
+ * The standard {@link ViewerFilter} class must be applied to all elements in the
* tree, thus forcing the lazy viewer to retrieve all children of all elements and
* defeating the lazy loading behavior. This class adds an {@link #isApplicable(ITreeModelViewer, Object)}
- * method, which can be used by the filter to discern which parent elements the
- * filter should apply to.
- * </p>
- *
+ * method, which can be used by the filter to discern which parent elements the
+ * filter should apply to.
+ * </p>
+ *
* @since 3.8
*/
abstract public class TreeModelViewerFilter extends ViewerFilter {
/**
* Determines whether the filter applies to the given parent element.
- * @return Returns true if the viewer should use the given filter on the
+ * @return Returns true if the viewer should use the given filter on the
* given element.
- * @param viewer The viewer that is using this filter to select elements.
+ * @param viewer The viewer that is using this filter to select elements.
* @param parentElement Parent element to check filter for.
*/
abstract public boolean isApplicable(ITreeModelViewer viewer, Object parentElement);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ViewerInputService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ViewerInputService.java
index d2c0815fe..5b10f6986 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ViewerInputService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ViewerInputService.java
@@ -24,10 +24,10 @@ import org.eclipse.debug.internal.ui.viewers.model.ViewerInputUpdate;
* @noextend This class is not intended to be subclassed by clients.
*/
public class ViewerInputService {
-
+
/**
- * An input object which will yield a null input element.
- *
+ * An input object which will yield a null input element.
+ *
* @since 3.6
*/
public final static Object NULL_INPUT = new IViewerInputProvider() {
@@ -37,14 +37,14 @@ public class ViewerInputService {
update.done();
}
};
-
+
// previous update request, cancelled when a new request comes in
private IViewerInputUpdate fPendingUpdate = null;
-
+
private IViewerInputRequestor fRequestor = null;
-
+
private ITreeModelViewer fViewer;
-
+
private IViewerInputRequestor fProxyRequest = new IViewerInputRequestor() {
@Override
public void viewerInputComplete(final IViewerInputUpdate update) {
@@ -56,24 +56,24 @@ public class ViewerInputService {
fRequestor.viewerInputComplete(update);
}
};
-
+
/**
* Constructs a viewer input service for the given requester and presentation context.
- *
+ *
* @param viewer for which inputs are required
- * @param requestor client requesting viewer inputs
+ * @param requestor client requesting viewer inputs
*/
public ViewerInputService(ITreeModelViewer viewer, IViewerInputRequestor requestor) {
fRequestor = requestor;
fViewer = viewer;
}
-
+
/**
* Resolves a viewer input derived from the given source object.
* Reports the result to the given this service's requester. A requester may be called back
* in the same or thread, or asynchronously in a different thread. Cancels any previous
* incomplete request from this service's requester.
- *
+ *
* @param source source from which to derive a viewer input
*/
public void resolveViewerInput(Object source) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java
index 34ebb6ead..7f6c66fcb 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -21,8 +21,8 @@ import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
/**
* Virtual item, which is analogous to the SWT's tree item. This class is used
- * by the {@link VirtualTreeModelViewer}.
- *
+ * by the {@link VirtualTreeModelViewer}.
+ *
* @see VirtualTreeModelViewer
* @since 3.8
*/
@@ -34,34 +34,34 @@ public class VirtualItem {
public static String FONT_KEY = "FONT_KEY"; //$NON-NLS-1$
public static String FOREGROUND_KEY = "FOREGROUND_KEY"; //$NON-NLS-1$
public static String BACKGROUND_KEY = "BACKGROUND_KEY"; //$NON-NLS-1$
-
+
public static String ELEMENT_DATA_KEY = "element"; //$NON-NLS-1$
-
+
/**
* Index object of a tree item. It allows the indexes to be modified
* as items are inserted and removed.
*/
public static class Index implements Comparable<Object> {
private Integer fIndexValue;
-
+
public Index(int index) {
fIndexValue = Integer.valueOf(index);
}
-
+
@Override
public boolean equals(Object obj) {
return obj instanceof Index && ((Index)obj).fIndexValue.equals(fIndexValue);
}
-
+
@Override
public int hashCode() {
return fIndexValue.hashCode();
}
-
+
public void increment() {
fIndexValue = Integer.valueOf(fIndexValue.intValue() + 1);
}
-
+
public void decrement() {
fIndexValue = Integer.valueOf(fIndexValue.intValue() - 1);
}
@@ -69,36 +69,36 @@ public class VirtualItem {
public int intValue() {
return fIndexValue.intValue();
}
-
+
@Override
public int compareTo(Object obj) {
- return obj instanceof Index ? fIndexValue.compareTo(((Index)obj).fIndexValue) : 0;
+ return obj instanceof Index ? fIndexValue.compareTo(((Index)obj).fIndexValue) : 0;
}
-
+
@Override
public String toString() {
return fIndexValue.toString();
}
}
-
+
/**
* Parent items of this item.
*/
final private VirtualItem fParent;
/**
- * The index of this item.
+ * The index of this item.
*/
final private Index fIndex;
-
+
/**
- * Map of child items. The key to the map is the item's index, which
+ * Map of child items. The key to the map is the item's index, which
* must be the same object instance as the index in the item. The tree map
- * keeps the items sorted while allowing indexes (keys) to be modified as
- * child items are inserted and removed.
+ * keeps the items sorted while allowing indexes (keys) to be modified as
+ * child items are inserted and removed.
*/
private Map<Index, VirtualItem> fItems = new TreeMap<Index, VirtualItem>();
-
+
/**
* Flag indicating whether this item has child items.
*/
@@ -111,14 +111,14 @@ public class VirtualItem {
private boolean fExpanded = false;
/**
- * The count of child items. <code>-1</code> indicates that the count
+ * The count of child items. <code>-1</code> indicates that the count
* is not known.
*/
private int fItemCount = -1;
-
+
/**
* The data held by this item. It includes the element as well as the item
- * display attributes.
+ * display attributes.
*/
private Map<String, Object> fData = new HashMap<String, Object>(1);
@@ -126,22 +126,22 @@ public class VirtualItem {
* Flag indicating that the item needs to have it's label updated.
*/
private boolean fNeedsLabelUpdate = true;
-
+
/**
* Flag indicating that the item's count needs to be updated.
*/
private boolean fNeedsCountUpdate = true;
-
+
/**
* Flag indicating that the item's element needs to be updated.
*/
private boolean fNeedsDataUpdate = true;
-
+
/**
* Indicates that this item has been disposed.
*/
private boolean fDisposed = false;
-
+
/**
* Virtual item constructor.
@@ -154,7 +154,7 @@ public class VirtualItem {
}
/**
- * Clears the child item at the given index.
+ * Clears the child item at the given index.
* @param index index of item to clear.
*/
public void clear(Index index) {
@@ -163,10 +163,10 @@ public class VirtualItem {
item.dispose();
}
}
-
+
/**
* Clears all child items.
- *
+ *
* @since 3.9
*/
public void clearAll() {
@@ -183,14 +183,14 @@ public class VirtualItem {
public VirtualItem getParent() {
return fParent;
}
-
+
/**
* @return Returns the index of this item.
*/
public Index getIndex() {
return fIndex;
}
-
+
/**
* Finds the given item in the child items of this element.
* @param element Data object of the item to be found.
@@ -205,7 +205,7 @@ public class VirtualItem {
}
return null;
}
-
+
/**
* @return Returns whether the data element of this item is stale.
*/
@@ -219,7 +219,7 @@ public class VirtualItem {
public void setNeedsDataUpdate() {
fNeedsDataUpdate = true;
}
-
+
/**
* Clears the stale status of the item's data element.
*/
@@ -233,9 +233,9 @@ public class VirtualItem {
public boolean needsCountUpdate() {
return fNeedsCountUpdate;
}
-
+
/**
- * Marks the item as having a stale child count.
+ * Marks the item as having a stale child count.
*/
public void setNeedsCountUpdate() {
fNeedsCountUpdate = true;
@@ -255,9 +255,9 @@ public class VirtualItem {
public boolean needsLabelUpdate() {
return fNeedsLabelUpdate;
}
-
+
/**
- * Marks the item as having a stale label data.
+ * Marks the item as having a stale label data.
*/
public void setNeedsLabelUpdate() {
fNeedsLabelUpdate = true;
@@ -269,32 +269,32 @@ public class VirtualItem {
public void clearNeedsLabelUpdate() {
fNeedsLabelUpdate = false;
}
-
+
/**
* @return Returns whether the item has been disposed.
*/
public boolean isDisposed() {
return fDisposed;
}
-
+
/**
* Disposes the item.
*/
public void dispose() {
clearAll();
-
+
fDisposed = true;
findTree().fireItemDisposed(this);
}
/**
* @param key Key to retrieve data for.
- * @return Returns item data corresponding to given key.
+ * @return Returns item data corresponding to given key.
*/
public Object getData (String key) {
return fData.get(key);
}
-
+
/**
* Sets given data element for given key.
* @param key Key for data.
@@ -305,13 +305,13 @@ public class VirtualItem {
}
/**
- * Sets the item's data element.
+ * Sets the item's data element.
* @param data Item's new element.
*/
public void setData(Object data) {
fData.put(ELEMENT_DATA_KEY, data);
}
-
+
/**
* @return Returns item's data element.
*/
@@ -333,8 +333,8 @@ public class VirtualItem {
setNeedsCountUpdate();
}
-
- Assert.isTrue(!fExpanded || hasItems());
+
+ Assert.isTrue(!fExpanded || hasItems());
// If collapsed, make sure that all the children are collapsed as well.
if (!fExpanded) {
@@ -343,7 +343,7 @@ public class VirtualItem {
}
}
}
-
+
/**
* @return Returns item's expanded state.
*/
@@ -365,14 +365,14 @@ public class VirtualItem {
setItemCount(-1);
}
}
-
+
/**
* @return Returns true if item has child items.
*/
public boolean hasItems() {
return fHasItems;
}
-
+
/**
* Sets the item's child count.
* @param count Child count.
@@ -383,7 +383,7 @@ public class VirtualItem {
Entry<Index, VirtualItem> entry = itr.next();
int index = entry.getKey().intValue();
if (index >= count) {
- VirtualItem item = entry.getValue();
+ VirtualItem item = entry.getValue();
item.dispose();
itr.remove();
}
@@ -401,31 +401,31 @@ public class VirtualItem {
}
}
}
-
+
/**
* @return Returns item's child count.
*/
public int getItemCount() {
return fItemCount;
}
-
+
/**
- * Returns the child item at given index. Child item is created if needed.
- *
+ * Returns the child item at given index. Child item is created if needed.
+ *
* @param index Index of the child item.
* @return Child item.
*/
public VirtualItem getItem(Index index) {
ensureItems();
-
- VirtualItem item = fItems.get(index);
+
+ VirtualItem item = fItems.get(index);
if (item == null) {
item = new VirtualItem(this, index);
fItems.put(index, item);
}
return item;
}
-
+
/**
* @return Returns true if any of the child items need a data update.
*/
@@ -443,18 +443,18 @@ public class VirtualItem {
}
return false;
}
-
+
/**
- * Returns an array of current child items. The returned array contains
- * only the items that have been created. It may not contain as many items as the
- * item count.
- *
+ * Returns an array of current child items. The returned array contains
+ * only the items that have been created. It may not contain as many items as the
+ * item count.
+ *
* @return Child items array.
*/
public VirtualItem[] getItems() {
return fItems.values().toArray(new VirtualItem[fItems.size()]);
}
-
+
/**
* Adds a child item at the given index position.
* @param position The index position to inser the new item at.
@@ -467,7 +467,7 @@ public class VirtualItem {
if (fItemCount < 0) {
fItemCount = 0;
}
-
+
// Increment all items with an index higher than the given position.
fItemCount++;
ensureItems();
@@ -476,15 +476,15 @@ public class VirtualItem {
childIndex.increment();
}
}
-
- // Note: the same index object used to create the item has to
- // be used as the key into the map.
+
+ // Note: the same index object used to create the item has to
+ // be used as the key into the map.
Index childIndex = new Index(position);
VirtualItem newChild = new VirtualItem(this, childIndex);
fItems.put(childIndex, newChild);
return newChild;
}
-
+
/**
* Removes the item at the given index.
* @param position Index of the item to remove.
@@ -494,7 +494,7 @@ public class VirtualItem {
if (fItemCount < 0) {
fHasItems = false;
}
-
+
ensureItems();
VirtualItem removedItem = null;
@@ -510,13 +510,13 @@ public class VirtualItem {
}
}
}
-
+
private void ensureItems() {
if (fItems == null) {
fItems = new HashMap<Index, VirtualItem>(Math.max(1, Math.min(fItemCount, 16)));
}
}
-
+
private VirtualTree findTree() {
VirtualItem item = this;
while (!(item instanceof VirtualTree)) {
@@ -524,14 +524,14 @@ public class VirtualItem {
}
return (VirtualTree)item;
}
-
+
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
toStringItem(buffer, IInternalDebugCoreConstants.EMPTY_STRING);
return buffer.toString();
}
-
+
void toStringItem(StringBuffer buffer, String indent) {
buffer.append(indent);
buffer.append(toStringElement());
@@ -546,12 +546,12 @@ public class VirtualItem {
}
}
}
-
+
private String toStringElement() {
String[] label = (String[])fData.get(LABEL_KEY);
if (label != null && label.length != 0) {
return label[0];
- }
+ }
Object data = fData.get(ELEMENT_DATA_KEY);
if (data != null) {
return data.toString();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTree.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTree.java
index 41194464d..d6442c9c6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTree.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTree.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -19,8 +19,8 @@ import org.eclipse.swt.SWT;
/**
* Tree of virtual items that is analogous to SWT's tree control. The tree is used
- * by the {@link VirtualTreeModelViewer}.
- *
+ * by the {@link VirtualTreeModelViewer}.
+ *
* @see VirtualTreeModelViewer
* @since 3.8
*/
@@ -31,15 +31,15 @@ public class VirtualTree extends VirtualItem {
* except for the selected elements.
*/
private boolean fLazy;
-
+
private IVirtualItemValidator fValidator;
-
+
private class SelectedItemValidator implements IVirtualItemValidator {
@Override
public boolean isItemVisible(VirtualItem item) {
// visible items. For now only mark the selected items as visible.
for (int i = 0; i < fSelection.length; i++) {
- VirtualItem selectionItem = fSelection[i];
+ VirtualItem selectionItem = fSelection[i];
while (selectionItem != null) {
if (item.equals(selectionItem)) {
return true;
@@ -49,12 +49,12 @@ public class VirtualTree extends VirtualItem {
}
return false;
}
-
+
@Override
public void showItem(VirtualItem item) {
}
}
-
+
/**
* Set of listeners of the virtual tree.
*/
@@ -65,10 +65,10 @@ public class VirtualTree extends VirtualItem {
* the leaf items which are selected.
*/
private VirtualItem[] fSelection = new VirtualItem[0];
-
+
/**
* Constructs the virtual tree with the given style and validator.
- *
+ *
* @param style The style flag. Only SWT.VIRTUAL flag is used.
* @param validator Item validator used to determine item visibility.
*/
@@ -77,13 +77,13 @@ public class VirtualTree extends VirtualItem {
fLazy = (style & SWT.VIRTUAL) != 0;
if (fLazy && validator == null) {
fValidator = new SelectedItemValidator();
- } else {
+ } else {
fValidator = validator;
}
clearNeedsLabelUpdate();
clearNeedsDataUpdate();
}
-
+
/**
* Disposes the virtual tree.
*/
@@ -99,7 +99,7 @@ public class VirtualTree extends VirtualItem {
clearNeedsLabelUpdate();
clearNeedsDataUpdate();
}
-
+
@Override
public void setNeedsLabelUpdate() {
// no-op
@@ -112,9 +112,9 @@ public class VirtualTree extends VirtualItem {
clearNeedsDataUpdate();
}
}
-
+
/**
- * Adds a listener for when virtual items are revealed in the view.
+ * Adds a listener for when virtual items are revealed in the view.
* @param listener Listener to add to list of listeners.
*/
public void addItemListener(IVirtualItemListener listener) {
@@ -128,33 +128,33 @@ public class VirtualTree extends VirtualItem {
public VirtualItem[] getSelection() {
return fSelection;
}
-
+
public void setSelection(VirtualItem[] items) {
fSelection = items;
}
-
+
public void showItem(VirtualItem item) {
if (fValidator != null) {
fValidator.showItem(item);
}
}
-
+
public void fireItemDisposed(VirtualItem item) {
for (IVirtualItemListener listener : fVirtualItemListeners) {
listener.disposed(item);
}
}
-
+
public void fireItemRevealed(VirtualItem item) {
for (IVirtualItemListener listener : fVirtualItemListeners) {
listener.revealed(item);
- }
+ }
}
@Override
public void setData(Object data) {
super.setData(data);
- // The root item always has children as long as the input is non-null,
+ // The root item always has children as long as the input is non-null,
// so that it should be expanded.
setHasItems(data != null);
}
@@ -162,16 +162,16 @@ public class VirtualTree extends VirtualItem {
@Override
public void setHasItems(boolean hasChildren) {
super.setHasItems(hasChildren);
- // The root item is always expanded as long as it has children.
+ // The root item is always expanded as long as it has children.
if (hasChildren) {
setExpanded(true);
}
}
-
+
/**
- * Returns whether the given item is considered visible by the tree as
+ * Returns whether the given item is considered visible by the tree as
* determined by its virtual item validator.
- *
+ *
* @param item Item to check.
* @return true if items is vislble.
* @see IVirtualItemValidator
@@ -189,11 +189,11 @@ public class VirtualTree extends VirtualItem {
public void validate() {
validate(VirtualTree.this);
}
-
+
/**
- * Validates the item and its children, identifying children which were
+ * Validates the item and its children, identifying children which were
* revealed and need to be updated.
- *
+ *
* @param item The item which to validate.
*/
public void validate(VirtualItem item) {
@@ -207,7 +207,7 @@ public class VirtualTree extends VirtualItem {
fireItemRevealed(item);
}
}
-
+
if (item.getData() != null && item.getItemCount() > 0 && item.getExpanded()) {
for (int i = 0; i < item.getItemCount(); i++) {
validate(item.getItem(new Index(i)));
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTreeModelViewer.java
index e376ec92c..8e95ba664 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTreeModelViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTreeModelViewer.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - initial API and implementation
@@ -18,15 +18,15 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IMemento;
/**
- * A virtual tree model viewer. This viewer does not have a user
+ * A virtual tree model viewer. This viewer does not have a user
* interface. Instead, clients configure and access the viewer's data through
* its public methods.
* <p>
* Style flags supported by this viewer are:
* <ul>
- * <li>SWT.VIRTUAL - Indicates that the viewer should be in lazy mode:
+ * <li>SWT.VIRTUAL - Indicates that the viewer should be in lazy mode:
* retrieving only elements that are requested.</li>
- * <li>SWT.POP_UP - Indicates that the viewer should ignore requests from the
+ * <li>SWT.POP_UP - Indicates that the viewer should ignore requests from the
* model to select, expand, or collapse tree elements.</li>
* </ul>
* </p>
@@ -34,7 +34,7 @@ import org.eclipse.ui.IMemento;
* @noextend This class is not intended to be sub-classed by clients.
*/
public class VirtualTreeModelViewer extends InternalVirtualTreeModelViewer {
-
+
/**
* Creates a virtual tree model viewer.
@@ -46,17 +46,17 @@ public class VirtualTreeModelViewer extends InternalVirtualTreeModelViewer {
public VirtualTreeModelViewer(Display display, int style, IPresentationContext context) {
super(display, style, context, null);
}
-
+
/**
* Creates a virtual tree model viewer.
* @param display Display used by the viewer to call the data providers
* on the UI thread.
* @param style style flags.
* @param context Viewer's presentation context.
- * @param validator Optional validator that is used to determine which items should be
- * considered visible when SWT.VIRTUAL style is used. If <code>null</code> then the
+ * @param validator Optional validator that is used to determine which items should be
+ * considered visible when SWT.VIRTUAL style is used. If <code>null</code> then the
* standard validator is used that updates only the selected items.
- *
+ *
* @since 3.8
*/
public VirtualTreeModelViewer(Display display, int style, IPresentationContext context, IVirtualItemValidator validator) {
@@ -65,37 +65,37 @@ public class VirtualTreeModelViewer extends InternalVirtualTreeModelViewer {
/**
* Returns this viewer's presentation context.
- *
+ *
* @return presentation context
*/
@Override
public IPresentationContext getPresentationContext() {
return super.getPresentationContext();
- }
+ }
/**
* Registers the given listener for model delta notification.
- *
+ *
* @param listener model delta listener
*/
@Override
public void addModelChangedListener(IModelChangedListener listener) {
- super.addModelChangedListener(listener);
+ super.addModelChangedListener(listener);
}
-
+
/**
* Unregisters the given listener from model delta notification.
- *
+ *
* @param listener model delta listener
*/
@Override
public void removeModelChangedListener(IModelChangedListener listener) {
super.removeModelChangedListener(listener);
- }
-
+ }
+
/**
* Registers the specified listener for view update notifications.
- *
+ *
* @param listener listener
*/
@Override
@@ -105,119 +105,119 @@ public class VirtualTreeModelViewer extends InternalVirtualTreeModelViewer {
/**
* Removes the specified listener from update notifications.
- *
+ *
* @param listener listener
*/
@Override
public void removeViewerUpdateListener(IViewerUpdateListener listener) {
super.removeViewerUpdateListener(listener);
}
-
+
/**
* Returns whether columns can be toggled on/off for this viewer's current
* input element.
- *
+ *
* @return whether columns can be toggled on/off
*/
@Override
public boolean canToggleColumns() {
return super.canToggleColumns();
- }
-
+ }
+
/**
* Returns the current column presentation for this viewer, or <code>null</code>
* if none.
- *
+ *
* @return column presentation or <code>null</code>
*/
@Override
public IColumnPresentation getColumnPresentation() {
return super.getColumnPresentation();
- }
-
+ }
+
/**
* Returns identifiers of the visible columns in this viewer, or <code>null</code>
* if there are currently no columns.
- *
+ *
* @return visible columns identifiers or <code>null</code>
*/
@Override
public String[] getVisibleColumns() {
return super.getVisibleColumns();
- }
-
+ }
+
/**
* Initializes viewer state from the memento
- *
+ *
* @param memento the {@link IMemento} to read from
*/
@Override
public void initState(IMemento memento) {
super.initState(memento);
}
-
+
/**
* Save viewer state into the given memento.
- *
+ *
* @param memento the {@link IMemento} to save to
*/
@Override
public void saveState(IMemento memento) {
super.saveState(memento);
}
-
+
/**
- * @return Returns true if columns are being displayed currently.
- */
+ * @return Returns true if columns are being displayed currently.
+ */
@Override
public boolean isShowColumns() {
return super.isShowColumns();
- }
-
+ }
+
/**
* Toggles columns on/off for the current column presentation, if any.
- *
+ *
* @param show whether to show columns if the current input supports
* columns
*/
@Override
public void setShowColumns(boolean show) {
super.setShowColumns(show);
- }
-
+ }
+
/**
- * Sets the visible columns for this viewer. Id's correspond to
+ * Sets the visible columns for this viewer. Id's correspond to
* column identifiers from a column presentation. Use <code>null</code>
* or an empty collection to display default columns for the current
* column presentation. Only affects the current column presentation.
- *
+ *
* @param ids column identifiers or <code>null</code>
*/
@Override
public void setVisibleColumns(String[] ids) {
super.setVisibleColumns(ids);
- }
+ }
@Override
public void updateViewer(IModelDelta delta) {
super.updateViewer(delta);
}
-
+
@Override
public ViewerLabel getElementLabel(TreePath path, String columnId) {
return super.getElementLabel(path, columnId);
}
-
+
@Override
public VirtualItem[] findItems(Object elementOrTreePath) {
return super.findItems(elementOrTreePath);
}
-
+
@Override
public VirtualItem findItem(TreePath path) {
return super.findItem(path);
}
-
-
+
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractColumnPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractColumnPresentation.java
index 4abe81e6b..87ffbd592 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractColumnPresentation.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractColumnPresentation.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -22,9 +22,9 @@ import org.eclipse.jface.resource.ImageDescriptor;
* @since 3.2
*/
public abstract class AbstractColumnPresentation implements IColumnPresentation2 {
-
+
private IPresentationContext fContext;
-
+
/**
* Empty array of strings
*/
@@ -45,7 +45,7 @@ public abstract class AbstractColumnPresentation implements IColumnPresentation2
public void dispose() {
fContext = null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getImageDescriptor(java.lang.String)
*/
@@ -56,13 +56,13 @@ public abstract class AbstractColumnPresentation implements IColumnPresentation2
/**
* Returns the context this column presentation is installed in.
- *
+ *
* @return presentation context
*/
protected IPresentationContext getPresentationContext() {
return fContext;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation2#getInitialColumnWidth(java.lang.String, int, java.lang.String[])
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractModelProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractModelProxy.java
index 6c1e961c9..e70f23d9c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractModelProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractModelProxy.java
@@ -33,16 +33,16 @@ import org.eclipse.jface.viewers.Viewer;
* @since 3.2
*/
public abstract class AbstractModelProxy implements IModelProxy2 {
-
+
private IPresentationContext fContext;
private boolean fInstalled = false;
private ITreeModelViewer fViewer;
private boolean fDisposed = false;
private Job fInstallJob;
-
-
+
+
private ListenerList<IModelChangedListener> fListeners = new ListenerList<>();
-
+
protected ListenerList<IModelChangedListener> getListeners() {
synchronized (fListeners) {
return fListeners;
@@ -71,14 +71,14 @@ public abstract class AbstractModelProxy implements IModelProxy2 {
/**
* Notifies registered listeners of the given delta.
- *
+ *
* @param delta model delta to broadcast
*/
public void fireModelChanged(IModelDelta delta) {
synchronized(this) {
if (!fInstalled || fDisposed) return;
}
-
+
final IModelDelta root = getRootDelta(delta);
for (IModelChangedListener iModelChangedListener : getListeners()) {
final IModelChangedListener listener = iModelChangedListener;
@@ -97,10 +97,10 @@ public abstract class AbstractModelProxy implements IModelProxy2 {
SafeRunner.run(safeRunnable);
}
}
-
+
/**
* Returns the root node of the given delta.
- *
+ *
* @param delta delta node
* @return returns the root of the given delta
*/
@@ -130,19 +130,19 @@ public abstract class AbstractModelProxy implements IModelProxy2 {
protected synchronized void setInstalled(boolean installed) {
fInstalled = installed;
}
-
+
protected synchronized boolean isInstalled() {
return fInstalled;
}
-
+
protected synchronized void setDisposed(boolean disposed) {
fDisposed = disposed;
}
-
+
@Override
public void initialize(ITreeModelViewer viewer) {
setDisposed(false);
-
+
synchronized(this) {
fViewer = viewer;
fContext = viewer.getPresentationContext();
@@ -159,10 +159,10 @@ public abstract class AbstractModelProxy implements IModelProxy2 {
}
return Status.OK_STATUS;
}
-
+
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.core.runtime.jobs.Job#shouldRun()
*/
@Override
@@ -174,10 +174,10 @@ public abstract class AbstractModelProxy implements IModelProxy2 {
}
fInstallJob.schedule();
}
-
+
/**
* Returns the context this model proxy is installed in.
- *
+ *
* @return presentation context, or <code>null</code> if this
* model proxy has been disposed
*/
@@ -193,18 +193,18 @@ public abstract class AbstractModelProxy implements IModelProxy2 {
}
/* (non-Javadoc)
- *
+ *
* Subclasses should override as required.
- *
+ *
* @see org.eclipse.debug.internal.ui.viewers.provisional.IModelProxy#installed(org.eclipse.jface.viewers.Viewer)
*/
@Override
- public void installed(Viewer viewer) {
+ public void installed(Viewer viewer) {
}
-
+
/**
* Returns the viewer this proxy is installed in.
- *
+ *
* @return viewer or <code>null</code> if not installed
*/
protected Viewer getViewer() {
@@ -213,19 +213,19 @@ public abstract class AbstractModelProxy implements IModelProxy2 {
/**
* Returns the viewer this proxy is installed in.
- *
+ *
* @return viewer or <code>null</code> if not installed
*/
protected ITreeModelViewer getTreeModelViewer() {
return fViewer;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy#isDisposed()
*/
@Override
public synchronized boolean isDisposed() {
return fDisposed;
- }
+ }
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AsynchronousContentAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AsynchronousContentAdapter.java
index 16124acde..bc9b9810c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AsynchronousContentAdapter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AsynchronousContentAdapter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,9 +28,9 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
* @since 3.2
*/
public abstract class AsynchronousContentAdapter implements IAsynchronousContentAdapter {
-
+
protected static final Object[] EMPTY = new Object[0];
-
+
/*
* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.provisional.IAsynchronousContentAdapter#retrieveChildren(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.provisional.IChildrenRequestMonitor)
@@ -50,10 +50,10 @@ public abstract class AsynchronousContentAdapter implements IAsynchronousContent
job.setRule(getRetrieveChildrenRule(parent, context));
job.schedule();
}
-
+
/**
* Returns the scheduling rule for jobs retrieving children.
- *
+ *
* @param parent the parent
* @param context the presentation context
* @return scheduling rule or <code>null</code>
@@ -61,7 +61,7 @@ public abstract class AsynchronousContentAdapter implements IAsynchronousContent
protected ISchedulingRule getRetrieveChildrenRule(Object parent, IPresentationContext context) {
return AsynchronousSchedulingRuleFactory.getDefault().newSerialPerObjectRule(context);
}
-
+
/*
* (non-Javadoc)
@@ -82,10 +82,10 @@ public abstract class AsynchronousContentAdapter implements IAsynchronousContent
job.setRule(getIsContainerRule(element, context));
job.schedule();
}
-
+
/**
* Returns the scheduling rule for jobs determining if an element is a container.
- *
+ *
* @param parent the parent
* @param context the presentation context
* @return scheduling rule or <code>null</code>
@@ -93,10 +93,10 @@ public abstract class AsynchronousContentAdapter implements IAsynchronousContent
protected ISchedulingRule getIsContainerRule(Object parent, IPresentationContext context) {
return AsynchronousSchedulingRuleFactory.getDefault().newSerialPerObjectRule(context);
}
-
+
/**
* Computes the children for the given parent in the specified context.
- *
+ *
* @param parent parent to retrieve children for
* @param context presentation context
* @param monitor result to report to
@@ -113,12 +113,12 @@ public abstract class AsynchronousContentAdapter implements IAsynchronousContent
}
monitor.setStatus(status);
monitor.done();
- }
+ }
}
-
+
/**
* Computes whether the given element is a container.
- *
+ *
* @param parent potential parent
* @param context presentation context
* @param monitor result to report to
@@ -133,43 +133,43 @@ public abstract class AsynchronousContentAdapter implements IAsynchronousContent
}
monitor.setStatus(status);
monitor.done();
- }
- }
-
+ }
+ }
+
/**
* Returns the children for the given parent in the specified context.
- *
+ *
* @param parent element to retrieve children for
* @param context context children will be presented in
* @return children
* @throws CoreException if an exception occurs retrieving children
*/
protected abstract Object[] getChildren(Object parent, IPresentationContext context) throws CoreException;
-
+
/**
* Returns whether the given element has children in the specified context.
- *
+ *
* @param element element that may have children
* @param context context element will be presented in
* @return whether the given element has children in the specified context
* @throws CoreException if an exception occurs determining whether the
* element has children
*/
- protected abstract boolean hasChildren(Object element, IPresentationContext context) throws CoreException;
+ protected abstract boolean hasChildren(Object element, IPresentationContext context) throws CoreException;
/**
* Returns whether this adapter supports the given context.
- *
+ *
* @param context the presentation context
* @return whether this adapter supports the given context
*/
protected boolean supportsContext(IPresentationContext context) {
return supportsPartId(context.getId());
}
-
+
/**
* Returns whether this adapter provides content in the specified part.
- *
+ *
* @param id part id
* @return whether this adapter provides content in the specified part
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AsynchronousLabelAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AsynchronousLabelAdapter.java
index dae6eb4eb..99cf6a033 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AsynchronousLabelAdapter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AsynchronousLabelAdapter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -33,7 +33,7 @@ import org.eclipse.ui.progress.UIJob;
* @since 3.2
*/
public abstract class AsynchronousLabelAdapter implements IAsynchronousLabelAdapter {
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.viewers.IAsynchronousLabelAdapter#retrieveLabel(java.lang.Object, org.eclipse.debug.ui.viewers.IPresentationContext, org.eclipse.debug.ui.viewers.ILabelRequestMonitor)
*/
@@ -61,10 +61,10 @@ public abstract class AsynchronousLabelAdapter implements IAsynchronousLabelAdap
job.setRule(getLabelRule(element, context));
job.schedule();
}
-
+
/**
* Returns the scheduling rule for label jobs.
- *
+ *
* @param element the element context
* @param context the presentation context
* @return scheduling rule or <code>null</code>
@@ -72,22 +72,22 @@ public abstract class AsynchronousLabelAdapter implements IAsynchronousLabelAdap
protected ISchedulingRule getLabelRule(Object element, IPresentationContext context) {
return AsynchronousSchedulingRuleFactory.getDefault().newSerialPerObjectRule(context);
}
-
+
/**
* Returns whether this label adapter requires to be run in the UI thread.
* By default, label jobs are not run in the UI thread. Subclasses should
* override if required.
* @param object the object context
- *
+ *
* @return whether this label adapter requires to be run in the UI thread.
*/
protected boolean requiresUIJob(Object object) {
return !DebugElementHelper.requiresUIThread(object);
}
-
+
/**
* Computes label attributes for the given element in the specified context.
- *
+ *
* @param element element to compute label for
* @param context presentation context
* @param monitor monitor to report results to
@@ -117,55 +117,55 @@ public abstract class AsynchronousLabelAdapter implements IAsynchronousLabelAdap
monitor.done();
}
}
- }
-
+ }
+
/**
* Returns a label for the give element in the specified context.
- *
+ *
* @param element element to compute label for
* @param context presentation context
* @return label
* @exception CoreException if an exception occurs computing label
*/
protected abstract String[] getLabels(Object element, IPresentationContext context) throws CoreException;
-
+
/**
* Returns an image descriptor for the given element in the specified context
* or <code>null</code>.
- *
+ *
* @param element element to compute image descriptor for
* @param context presentation context
* @return image descriptor or <code>null</code>
* @throws CoreException if an exception occurs computing image descriptor
*/
protected abstract ImageDescriptor[] getImageDescriptors(Object element, IPresentationContext context) throws CoreException;
-
+
/**
* Returns font data for the given element in the specified context or <code>null</code>
* to use the default font.
- *
+ *
* @param element element to compute font data for
* @param context presentation context
* @return font data or <code>null</code>
* @throws CoreException if an exception occurs computing font data
*/
protected abstract FontData[] getFontDatas(Object element, IPresentationContext context) throws CoreException;
-
+
/**
* Returns a foreground color for the given element in the specified context or <code>null</code>
* to use the default color.
- *
+ *
* @param element element to compute color for
* @param context presentation context
* @return color or <code>null</code>
* @throws CoreException if an exception occurs computing color
*/
protected abstract RGB[] getForegrounds(Object element, IPresentationContext context) throws CoreException;
-
+
/**
* Returns a background color for the given element in the specified context or <code>null</code>
* to use the default color.
- *
+ *
* @param element element to compute color for
* @param context presentation context
* @return color or <code>null</code>
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IAsynchronousContentAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IAsynchronousContentAdapter.java
index faf3f89b9..68d47a7d2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IAsynchronousContentAdapter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IAsynchronousContentAdapter.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -14,7 +14,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
/**
* Provides content for elements in an asynchronous viewer. Note that implementations
- * must provide content asynchronously.
+ * must provide content asynchronously.
* <p>
* Clients may implement this interface.
* </p>
@@ -26,20 +26,20 @@ public interface IAsynchronousContentAdapter {
* Asynchronously retrieves the children of the given parent reporting to the
* given monitor. If unable to retrieve children, an exception should be reported
* to the monitor with an appropriate status.
- *
+ *
* @param parent the element to retrieve children for
* @param context the context in which children have been requested
* @param monitor request monitor to report children to
*/
public void retrieveChildren(Object parent, IPresentationContext context, IChildrenRequestMonitor result);
-
+
/**
* Asynchronously determines whether the given element contains children in the specified
* context reporting the result to the given monitor. If unable to determine
* whether the element has children, an exception should be reported to the monitor
* with an appropriate status.
- *
- * @param element the element on which children may exist
+ *
+ * @param element the element on which children may exist
* @param context the context in which children may exist
* @param monitor request monitor to report the result to
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IAsynchronousLabelAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IAsynchronousLabelAdapter.java
index d17025d38..518be81dc 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IAsynchronousLabelAdapter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IAsynchronousLabelAdapter.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -14,24 +14,24 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
/**
* Provides labels for elements. Note that implementations
- * are must provide labels asynchronously.
+ * are must provide labels asynchronously.
* <p>
* Clients may implement this interface.
* </p>
* @since 3.2
*/
public interface IAsynchronousLabelAdapter {
-
+
/**
* Asynchronously retrieves the label of the given object reporting to
* the given monitor. If unable to retrieve label information, an exception should be
* reported to the monitor with an appropriate status.
- *
+ *
* @param object the element for which a label is requested
* @param context the context in which the label has been requested
* @param monitor request monitor to report the result to
*/
public void retrieveLabel(Object object, IPresentationContext context, ILabelRequestMonitor result);
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IChildrenRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IChildrenRequestMonitor.java
index 7b41a6ca4..3f5646c0e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IChildrenRequestMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IChildrenRequestMonitor.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,14 +23,14 @@ public interface IChildrenRequestMonitor extends IStatusMonitor {
/**
* Adds the given child to this request.
- *
+ *
* @param child child to add
*/
public void addChild(Object child);
-
+
/**
* Adds the given children to this request.
- *
+ *
* @param children children to add
*/
public void addChildren(Object[] children);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IContainerRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IContainerRequestMonitor.java
index a73b6bfa2..be1f3b36c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IContainerRequestMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IContainerRequestMonitor.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,9 +24,9 @@ public interface IContainerRequestMonitor extends IStatusMonitor {
/**
* Sets whether an element contains children.
- *
+ *
* @param container whether an element contains children
*/
public void setIsContainer(boolean container);
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/ILabelRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/ILabelRequestMonitor.java
index eb8a93f51..967d5ac5f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/ILabelRequestMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/ILabelRequestMonitor.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -27,35 +27,35 @@ public interface ILabelRequestMonitor extends IStatusMonitor {
/**
* Sets the text of the label. Cannot be <code>null</code>.
- *
+ *
* @param text
*/
public void setLabels(String[] text);
-
+
/**
* Sets the font of the label.
- *
+ *
* @param fontData
*/
public void setFontDatas(FontData[] fontData);
-
+
/**
* Sets the image of the label.
- *
+ *
* @param image
*/
public void setImageDescriptors(ImageDescriptor[] image);
-
+
/**
* Sets the foreground color of the label.
- *
+ *
* @param foreground
*/
public void setForegrounds(RGB[] foreground);
-
+
/**
* Sets the background color of the label.
- *
+ *
* @param background
*/
public void setBackgrounds(RGB[] background);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointContainerProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointContainerProxy.java
index cb7432468..05233ac26 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointContainerProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointContainerProxy.java
@@ -20,25 +20,25 @@ import org.eclipse.jface.viewers.TreePath;
/**
* Breakpoint container model proxy.
- *
+ *
* @since 3.6
*/
public class BreakpointContainerProxy extends AbstractModelProxy implements ICheckboxModelProxy {
-
+
/**
* The breakpoint container
*/
private IBreakpointContainer fContainer;
-
+
/**
* Constructor.
- *
+ *
* @param container the breakpoint container.
*/
public BreakpointContainerProxy(IBreakpointContainer container) {
fContainer = container;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckboxModelProxy#setChecked(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object, org.eclipse.jface.viewers.TreePath, boolean)
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java
index 4cdf6b506..9e80c07a0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java
@@ -33,7 +33,7 @@ import org.eclipse.ui.progress.WorkbenchJob;
/**
* Breakpoint manager model proxy.
- *
+ *
* @since 3.6
*/
public class BreakpointManagerProxy extends AbstractModelProxy {
@@ -41,17 +41,17 @@ public class BreakpointManagerProxy extends AbstractModelProxy {
* The breakpoint manager content provider for this model proxy
*/
final private BreakpointManagerContentProvider fProvider;
-
+
/**
* The breakpoint manager input for this model proxy
*/
final private DefaultBreakpointsViewInput fInput;
-
+
/**
* Job to fire posted deltas.
*/
private Job fFireModelChangedJob;
-
+
/**
* Object used for describing a posted delta.
*/
@@ -64,27 +64,27 @@ public class BreakpointManagerProxy extends AbstractModelProxy {
fDelta = delta;
}
}
-
+
/**
* List of posted deltas ready to be fired.
*/
private List<DeltaInfo> fPendingDeltas = new LinkedList<DeltaInfo>();
-
+
/**
* Constructor.
- *
+ *
* @param input the breakpoint manager input
* @param context the presentation context for this model proxy
*/
public BreakpointManagerProxy(Object input, IPresentationContext context) {
super();
-
+
DefaultBreakpointsViewInput bpmInput = null;
BreakpointManagerContentProvider bpmProvider = null;
if (input instanceof DefaultBreakpointsViewInput) {
bpmInput = (DefaultBreakpointsViewInput) input;
-
+
// cache the required data and pass to the provider when this model is installed
IElementContentProvider provider = ViewerAdapterService.getContentProvider(input);
if (provider instanceof BreakpointManagerContentProvider) {
@@ -94,7 +94,7 @@ public class BreakpointManagerProxy extends AbstractModelProxy {
fInput = bpmInput;
fProvider = bpmProvider;
}
-
+
/*
* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#installed(org.eclipse.jface.viewers.Viewer)
@@ -106,7 +106,7 @@ public class BreakpointManagerProxy extends AbstractModelProxy {
fProvider.registerModelProxy(fInput, this);
}
}
-
+
/*
* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#dispose()
@@ -121,19 +121,19 @@ public class BreakpointManagerProxy extends AbstractModelProxy {
}
fPendingDeltas.clear();
}
-
- super.dispose();
+
+ super.dispose();
}
-
+
/**
- * Posts a given delta to be fired by the proxy. Posting a delta places it
+ * Posts a given delta to be fired by the proxy. Posting a delta places it
* in a queue which is later emptied by a job that fires the deltas.
* <p>
* If the delta is used only to select a breakpiont and does not change the
- * viewer content, the caller should set the <code>select</code> parameter
- * to <code>true</code>. When a select delta is added to the delta queue,
- * any previous select deltas are removed.
- *
+ * viewer content, the caller should set the <code>select</code> parameter
+ * to <code>true</code>. When a select delta is added to the delta queue,
+ * any previous select deltas are removed.
+ *
* @param delta Delta to be posted to the viewer.
* @param select Flag indicating that the delta is only to change the
* viewer selection.
@@ -148,7 +148,7 @@ public class BreakpointManagerProxy extends AbstractModelProxy {
if (viewerControl == null) {
return;
}
-
+
// If we are processing a select delta, remove the previous select delta.
if (select) {
for (Iterator<DeltaInfo> itr = fPendingDeltas.iterator(); itr.hasNext();) {
@@ -158,16 +158,16 @@ public class BreakpointManagerProxy extends AbstractModelProxy {
}
}
fPendingDeltas.add(new DeltaInfo(select, delta));
-
+
if (fFireModelChangedJob == null) {
fFireModelChangedJob = new WorkbenchJob(viewerControl.getDisplay(), "Select Breakpoint Job") { //$NON-NLS-1$
{
setSystem(true);
}
-
+
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
- Object[] deltas;
+ Object[] deltas;
synchronized(BreakpointManagerProxy.this) {
deltas = fPendingDeltas.toArray();
fPendingDeltas.clear();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointProxy.java
index f27d14e02..746976a77 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointProxy.java
@@ -19,7 +19,7 @@ import org.eclipse.jface.viewers.TreePath;
/**
* Breakpoint model proxy.
- *
+ *
* @since 3.6
*/
public class BreakpointProxy extends AbstractModelProxy implements ICheckboxModelProxy {
@@ -28,16 +28,16 @@ public class BreakpointProxy extends AbstractModelProxy implements ICheckboxMode
* Breakpoint object
*/
protected IBreakpoint fBreakpoint;
-
+
/**
* Constructor.
- *
+ *
* @param breakpoint the breakpoint for this model proxy
*/
public BreakpointProxy(IBreakpoint breakpoint) {
fBreakpoint = breakpoint;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckboxModelProxy#setChecked(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object, org.eclipse.jface.viewers.TreePath, boolean)
*/
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugEventHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugEventHandler.java
index 198083355..8a5b036a6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugEventHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugEventHandler.java
@@ -18,33 +18,33 @@ import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
/**
* Handles debug events for an event update policy in a viewer.
- *
+ *
* @since 3.2
*/
public abstract class DebugEventHandler {
-
- private AbstractModelProxy fModelProxy;
+
+ private AbstractModelProxy fModelProxy;
/**
* Constructs an event handler for the given model proxy.
- *
+ *
* @param proxy the backing proxy
*/
public DebugEventHandler(AbstractModelProxy proxy) {
fModelProxy = proxy;
}
-
+
/**
* Disposes this event handler
*/
public synchronized void dispose() {
fModelProxy = null;
}
-
+
/**
* Returns the model proxy this event handler working for,
* or <code>null</code> if disposed.
- *
+ *
* @return the backing model proxy
*/
protected synchronized AbstractModelProxy getModelProxy() {
@@ -53,89 +53,89 @@ public abstract class DebugEventHandler {
/**
* Returns whether this event handler handles the given event
- *
+ *
* @param event event to handle
* @return whether this event handler handles the given event
*/
protected abstract boolean handlesEvent(DebugEvent event);
-
+
/**
- * Handles a create event.
- *
+ * Handles a create event.
+ *
* @param event the event to handle
*/
protected void handleCreate(DebugEvent event) {
refreshRoot(event);
}
-
+
/**
* Handles a terminate event.
- *
+ *
* @param event the event to handle
*/
protected void handleTerminate(DebugEvent event) {
refreshRoot(event);
}
-
+
/**
* Handles a suspend event.
- *
+ *
* @param event the event to handle
- */
+ */
protected void handleSuspend(DebugEvent event) {
refreshRoot(event);
}
-
+
/**
* Handles a resume event for which a suspend is expected shortly (<500ms).
- *
+ *
* @param event the event to handle
*/
protected void handleResumeExpectingSuspend(DebugEvent event) {
// do nothing unless the suspend times out
}
-
+
/**
* Handles a resume event that is not expecting an immediate suspend event
- *
+ *
* @param event the event to handle
*/
protected void handleResume(DebugEvent event) {
refreshRoot(event);
}
-
+
/**
- * Handles a change event.
- *
+ * Handles a change event.
+ *
* @param event the event to handle
*/
protected void handleChange(DebugEvent event) {
refreshRoot(event);
- }
+ }
/**
* Handles an unknown event.
- *
+ *
* @param event the event to handle
*/
protected void handleOther(DebugEvent event) {
refreshRoot(event);
}
-
+
/**
* Notification that a pending suspend event was not received for the given
* resume event within the timeout period.
- *
+ *
* @param event the event to handle
*/
protected void handleSuspendTimeout(DebugEvent event) {
refreshRoot(event);
}
-
+
/**
* Handles the given suspend event which caused a timeout. It is
* paired with its original resume event.
- *
+ *
* @param suspend suspend event
* @param resume resume event
*/
@@ -147,17 +147,17 @@ public abstract class DebugEventHandler {
* Fires a model delta to indicate that the launch manager should be refreshed.
* Subclasses should override individual handle events to provide deltas that
* better reflect the actual change in the model.
- *
- * @param event the event that triggered the root refresh
+ *
+ * @param event the event that triggered the root refresh
*/
protected void refreshRoot(DebugEvent event) {
ModelDelta delta = new ModelDelta(DebugPlugin.getDefault().getLaunchManager(), IModelDelta.CONTENT);
fireDelta(delta);
}
-
+
/**
* Fires the given delta, unless this handler has been disposed.
- *
+ *
* @param delta the delta to fire in the backing model proxy
*/
protected void fireDelta(IModelDelta delta) {
@@ -166,16 +166,16 @@ public abstract class DebugEventHandler {
modelProxy.fireModelChanged(delta);
}
}
-
+
/**
* Returns whether this handler has been disposed.
- *
+ *
* @return whether this handler has been disposed
*/
protected synchronized boolean isDisposed() {
return fModelProxy == null;
}
-
+
protected int indexOf(Object[] list, Object element) {
for (int i = 0; i < list.length; i++) {
if (element.equals(list[i])) {
@@ -184,5 +184,5 @@ public abstract class DebugEventHandler {
}
return -1;
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetEventHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetEventHandler.java
index 4af6b9ddd..ffbe1b5bd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetEventHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetEventHandler.java
@@ -25,7 +25,7 @@ public class DebugTargetEventHandler extends DebugEventHandler {
/**
* Constructs an event handler for a debug target on the given viewer.
- *
+ *
* @param viewer
*/
public DebugTargetEventHandler(AbstractModelProxy proxy) {
@@ -75,5 +75,5 @@ public class DebugTargetEventHandler extends DebugEventHandler {
delta.addNode(target, flags);
fireDelta(root);
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetProxy.java
index ba61da8bc..262266537 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetProxy.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@ import org.eclipse.jface.viewers.Viewer;
/**
* Default model proxy for a debug target.
- *
+ *
* @since 3.2
*/
public class DebugTargetProxy extends EventHandlerModelProxy {
@@ -93,13 +93,13 @@ public class DebugTargetProxy extends EventHandlerModelProxy {
} catch (DebugException e) {
// In case of exception do not fire delta
return;
- }
+ }
}
// expand the target if no suspended thread
fireModelChanged(delta);
}
}
-
+
protected ModelDelta getNextSuspendedThreadDelta(IThread currentThread, boolean reverse) {
IDebugTarget target = fDebugTarget;
if (target != null) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultExpressionModelProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultExpressionModelProxy.java
index f0fb0f91c..970e8282e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultExpressionModelProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultExpressionModelProxy.java
@@ -19,9 +19,9 @@ import org.eclipse.debug.core.model.IVariable;
*
*/
public class DefaultExpressionModelProxy extends EventHandlerModelProxy {
-
+
private IExpression fExpression;
-
+
public DefaultExpressionModelProxy(IExpression expression) {
fExpression = expression;
}
@@ -34,7 +34,7 @@ public class DefaultExpressionModelProxy extends EventHandlerModelProxy {
super.dispose();
fExpression = null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy#createEventHandlers()
*/
@@ -58,11 +58,11 @@ public class DefaultExpressionModelProxy extends EventHandlerModelProxy {
/**
* Returns this model's expression, or <code>null</code> if disposed.
- *
+ *
* @return expression or <code>null</code>
*/
protected IExpression getExpression() {
return fExpression;
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelProxyFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelProxyFactory.java
index 0856e4663..c64d95cdf 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelProxyFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelProxyFactory.java
@@ -58,7 +58,7 @@ public class DefaultModelProxyFactory implements IModelProxyFactory {
if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(id)) {
if (element instanceof IExpressionManager) {
return new ExpressionManagerModelProxy();
- }
+ }
if (element instanceof IWatchExpression) {
return new DefaultWatchExpressionModelProxy((IWatchExpression)element);
}
@@ -84,7 +84,7 @@ public class DefaultModelProxyFactory implements IModelProxyFactory {
return new BreakpointContainerProxy((IBreakpointContainer)element);
}
}
-
+
if (context instanceof MemoryViewPresentationContext)
{
if (((MemoryViewPresentationContext)context).getRendering() instanceof AbstractAsyncTableRendering)
@@ -93,7 +93,7 @@ public class DefaultModelProxyFactory implements IModelProxyFactory {
return new MemoryBlockProxy((IMemoryBlock)element);
}
}
-
+
return null;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelSelectionPolicyFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelSelectionPolicyFactory.java
index bc98f89d6..a5f2c16b6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelSelectionPolicyFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelSelectionPolicyFactory.java
@@ -19,7 +19,7 @@ import org.eclipse.debug.ui.IDebugUIConstants;
/**
* Default factory for selection policies.
- *
+ *
* @since 3.2
*/
public class DefaultModelSelectionPolicyFactory implements IModelSelectionPolicyFactory {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultSelectionPolicy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultSelectionPolicy.java
index fcefebce4..554992cd6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultSelectionPolicy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultSelectionPolicy.java
@@ -24,17 +24,17 @@ import org.eclipse.jface.viewers.TreeSelection;
/**
* Default selection policy for the debug view.
- *
+ *
* @since 3.2
*/
public class DefaultSelectionPolicy implements IModelSelectionPolicy {
-
+
private IDebugElement fDebugElement;
-
+
/**
* Constructs a new selection policy for the given debug
* element.
- *
+ *
* @param element the backing debug element
*/
public DefaultSelectionPolicy(IDebugElement element) {
@@ -54,7 +54,7 @@ public class DefaultSelectionPolicy implements IModelSelectionPolicy {
IDebugElement debugElement = (IDebugElement) element;
return fDebugElement.getDebugTarget().equals(debugElement.getDebugTarget());
}
- }
+ }
}
return false;
}
@@ -64,7 +64,7 @@ public class DefaultSelectionPolicy implements IModelSelectionPolicy {
*/
@Override
public boolean overrides(ISelection existing, ISelection candidate, IPresentationContext context) {
- if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
+ if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
if (existing instanceof IStructuredSelection && candidate instanceof IStructuredSelection) {
IStructuredSelection ssExisting = (IStructuredSelection) existing;
IStructuredSelection ssCandidate = (IStructuredSelection) candidate;
@@ -73,7 +73,7 @@ public class DefaultSelectionPolicy implements IModelSelectionPolicy {
}
return true;
}
-
+
protected boolean overrides(Object existing, Object candidate) {
if (existing == null) {
return true;
@@ -94,14 +94,14 @@ public class DefaultSelectionPolicy implements IModelSelectionPolicy {
*/
@Override
public boolean isSticky(ISelection selection, IPresentationContext context) {
- if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
+ if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
if (selection instanceof IStructuredSelection) {
return isSticky(((IStructuredSelection)selection).getFirstElement());
}
}
return false;
}
-
+
/**
* Returns if the selection should remain on the given selection
* @param element the element to check
@@ -116,14 +116,14 @@ public class DefaultSelectionPolicy implements IModelSelectionPolicy {
}
/**
- * If an attempt is made to select an invalid element, it usually indicates that the
- * currently selected element was removed from the model. Instead of leaving the
+ * If an attempt is made to select an invalid element, it usually indicates that the
+ * currently selected element was removed from the model. Instead of leaving the
* selection empty, attempt to select the parent element instead.
- *
+ *
* @param selection the selection to replace
* @param newSelection the selection to use if the given selection is not an {@link ITreeSelection}
* @return the replaced selection or <code>newSelection</code> if the given selection is not an {@link ITreeSelection}
- *
+ *
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy#replaceInvalidSelection(ISelection, ISelection)
*/
@Override
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultVariableViewModelProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultVariableViewModelProxy.java
index e66723808..df1b0f20e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultVariableViewModelProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultVariableViewModelProxy.java
@@ -17,7 +17,7 @@ import org.eclipse.debug.core.model.IStackFrame;
/**
* Default update for variables view.
- *
+ *
* @since 3.2
*/
public class DefaultVariableViewModelProxy extends EventHandlerModelProxy {
@@ -29,7 +29,7 @@ public class DefaultVariableViewModelProxy extends EventHandlerModelProxy {
/**
* Constructs an update policy on the given target.
- *
+ *
* @param target
*/
public DefaultVariableViewModelProxy(IStackFrame frame) {
@@ -47,7 +47,7 @@ public class DefaultVariableViewModelProxy extends EventHandlerModelProxy {
protected DebugEventHandler[] createEventHandlers() {
return new DebugEventHandler[] { new VariablesViewEventHandler(this, fFrame) };
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy#containsEvent(org.eclipse.debug.core.DebugEvent)
*/
@@ -65,5 +65,5 @@ public class DefaultVariableViewModelProxy extends EventHandlerModelProxy {
}
return false;
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultWatchExpressionModelProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultWatchExpressionModelProxy.java
index d2beb35d8..451a242f8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultWatchExpressionModelProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultWatchExpressionModelProxy.java
@@ -32,21 +32,21 @@ import org.eclipse.ui.progress.UIJob;
/**
* Model proxy for the expressions view
- *
+ *
* @see org.eclipse.debug.internal.ui.views.expression.ExpressionView
* @see org.eclipse.debug.internal.ui.model.elements.ExpressionContentProvider
* @see org.eclipse.debug.internal.ui.model.elements.ExpressionsViewMementoProvider
- *
+ *
* @since 3.2
*/
public class DefaultWatchExpressionModelProxy extends DefaultExpressionModelProxy implements IDebugContextListener {
-
+
private IWorkbenchWindow fWindow;
-
+
public DefaultWatchExpressionModelProxy(IWatchExpression expression) {
super(expression);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#installed(org.eclipse.jface.viewers.Viewer)
*/
@@ -61,7 +61,7 @@ public class DefaultWatchExpressionModelProxy extends DefaultExpressionModelProx
for (int i = 0; i < workbenchWindows.length; i++) {
IWorkbenchWindow window = workbenchWindows[i];
// Virtual viewer may have a null control.
- Control control = viewer.getControl();
+ Control control = viewer.getControl();
if (control != null && control.getShell().equals(window.getShell())) {
fWindow = window;
break;
@@ -79,7 +79,7 @@ public class DefaultWatchExpressionModelProxy extends DefaultExpressionModelProx
}
return Status.OK_STATUS;
}
-
+
};
job.setSystem(true);
job.schedule();
@@ -139,5 +139,5 @@ public class DefaultWatchExpressionModelProxy extends DefaultExpressionModelProx
contextActivated(event.getContext());
}
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java
index 4e418ec0c..00c770bf9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java
@@ -59,7 +59,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
/**
* Resume event for which there is a pending suspend.
- *
+ *
* @param resume
* event
*/
@@ -70,7 +70,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
/*
* (non-Javadoc)
- *
+ *
* @see java.util.TimerTask#run()
*/
@Override
@@ -85,7 +85,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
/**
* Adds the given handler to this event update policy.
- *
+ *
* @param handler
*/
protected abstract DebugEventHandler[] createEventHandlers();
@@ -111,7 +111,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[])
*/
@Override
@@ -156,7 +156,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
/**
* Returns whether this event handler should process the event.
- *
+ *
* @param event debug event
* @return whether this event handler should process the event
*/
@@ -166,7 +166,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
/**
* Dispatches a create event.
- *
+ *
* @param event
*/
protected void dispatchCreate(DebugEventHandler handler, DebugEvent event) {
@@ -175,7 +175,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
/**
* Dispatches a terminate event.
- *
+ *
* @param event
*/
protected void dispatchTerminate(DebugEventHandler handler, DebugEvent event) {
@@ -184,7 +184,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
/**
* Dispatches a suspend event. Subclasses may override.
- *
+ *
* @param event
*/
protected void dispatchSuspend(DebugEventHandler handler, DebugEvent event) {
@@ -211,7 +211,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
* or a step, a timer is started to update the event source if the step or
* evaluation takes more than 500ms. Otherwise the source is refreshed.
* Subclasses may override.
- *
+ *
* @param event
*/
protected void dispatchResume(DebugEventHandler handler, DebugEvent event) {
@@ -235,7 +235,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
/**
* Dispatches a change event.
- *
+ *
* @param event
*/
protected void dispatchChange(DebugEventHandler handler, DebugEvent event) {
@@ -244,7 +244,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
/**
* Dispatches an unknown event.
- *
+ *
* @param event
*/
protected void dispatchOther(DebugEventHandler handler, DebugEvent event) {
@@ -254,18 +254,18 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
/**
* Notification that a pending suspend event was not received for the given
* resume event and handler within the timeout period.
- *
+ *
* @param resume
* resume event with missing suspend event
*/
protected void dispatchSuspendTimeout(DebugEventHandler handler, DebugEvent resume) {
handler.handleSuspendTimeout(resume);
}
-
+
/**
* Returns the index of the given element in the list or -1 if
* not present.
- *
+ *
* @param list
* @param element
* @return index or -1 if not present
@@ -277,6 +277,6 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
}
}
return -1;
- }
+ }
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionEventHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionEventHandler.java
index 0c926de3d..df90ac609 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionEventHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionEventHandler.java
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Samrat Dhillon samrat.dhillon@gmail.com - Bug 369012 - [expr] Modifying a variable value using cell editor is not reflected in view.
+ * Samrat Dhillon samrat.dhillon@gmail.com - Bug 369012 - [expr] Modifying a variable value using cell editor is not reflected in view.
*******************************************************************************/
package org.eclipse.debug.internal.ui.viewers.update;
@@ -22,7 +22,7 @@ import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
/**
* Event handler for an expression.
- *
+ *
* @since 3.2
*
*/
@@ -49,7 +49,7 @@ public class ExpressionEventHandler extends DebugEventHandler {
}
if ((event.getDetail() & DebugEvent.CONTENT) != 0) {
flags = flags | IModelDelta.CONTENT;
- }
+ }
delta.addNode(expression, flags);
fireDelta(delta);
}
@@ -58,7 +58,7 @@ public class ExpressionEventHandler extends DebugEventHandler {
int flags = IModelDelta.NO_CHANGE;
if (event.getDetail()==DebugEvent.CONTENT) {
flags = flags | IModelDelta.CONTENT;
- }
+ }
delta.addNode(variable, flags);
fireDelta(delta);
}
@@ -69,5 +69,5 @@ public class ExpressionEventHandler extends DebugEventHandler {
ModelDelta delta = new ModelDelta(DebugPlugin.getDefault().getExpressionManager(), IModelDelta.CONTENT);
fireDelta(delta);
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionManagerModelProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionManagerModelProxy.java
index 0b780533d..e96ed7413 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionManagerModelProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionManagerModelProxy.java
@@ -27,11 +27,11 @@ import org.eclipse.jface.viewers.Viewer;
/**
* Model proxy that fires model delta updates for the ExpressionManager.
- *
+ *
* @see org.eclipse.debug.internal.core.ExpressionManager
*/
public class ExpressionManagerModelProxy extends AbstractModelProxy implements IExpressionsListener2, IPropertyChangeListener {
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy#init(org.eclipse.debug.internal.ui.viewers.IPresentationContext)
*/
@@ -41,7 +41,7 @@ public class ExpressionManagerModelProxy extends AbstractModelProxy implements I
getExpressionManager().addExpressionListener(this);
context.addPropertyChangeListener(this);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#installed(org.eclipse.jface.viewers.Viewer)
*/
@@ -56,7 +56,7 @@ public class ExpressionManagerModelProxy extends AbstractModelProxy implements I
protected IExpressionManager getExpressionManager() {
return DebugPlugin.getDefault().getExpressionManager();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy#dispose()
*/
@@ -84,7 +84,7 @@ public class ExpressionManagerModelProxy extends AbstractModelProxy implements I
}
fireModelChanged(delta);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.core.IExpressionsListener2#expressionsInserted(org.eclipse.debug.core.model.IExpression[], int)
*/
@@ -98,7 +98,7 @@ public class ExpressionManagerModelProxy extends AbstractModelProxy implements I
}
fireModelChanged(delta);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.core.IExpressionsListener#expressionsAdded(org.eclipse.debug.core.model.IExpression[])
*/
@@ -127,9 +127,9 @@ public class ExpressionManagerModelProxy extends AbstractModelProxy implements I
*/
@Override
public void expressionsChanged(IExpression[] expressions) {
- updateExpressions(expressions, IModelDelta.CONTENT | IModelDelta.STATE);
+ updateExpressions(expressions, IModelDelta.CONTENT | IModelDelta.STATE);
}
-
+
private void updateExpressions(IExpression[] expressions, int flags) {
ModelDelta delta = new ModelDelta(getExpressionManager(), IModelDelta.NO_CHANGE);
for (int i = 0; i < expressions.length; i++) {
@@ -140,20 +140,20 @@ public class ExpressionManagerModelProxy extends AbstractModelProxy implements I
}
private int getElementsCount() {
- // Account for the "Add new expression" element only if columns are
+ // Account for the "Add new expression" element only if columns are
// displayed.
return getExpressionManager().getExpressions().length +
(getPresentationContext().getColumns() != null ? 1 : 0);
}
-
+
@Override
public void propertyChange(PropertyChangeEvent event) {
- // If columns are turned on/off, refresh the view to account for the
+ // If columns are turned on/off, refresh the view to account for the
// "Add new expression" element.
if (IPresentationContext.PROPERTY_COLUMNS.equals(event.getProperty())) {
fireModelChanged(new ModelDelta(getExpressionManager(), IModelDelta.CONTENT));
}
}
-
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
index e041ab6b8..35ca57419 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
@@ -36,7 +36,7 @@ public class LaunchManagerProxy extends AbstractModelProxy implements ILaunchesL
fLaunchManager = DebugPlugin.getDefault().getLaunchManager();
fLaunchManager.addLaunchListener(this);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#installed(org.eclipse.jface.viewers.Viewer)
*/
@@ -53,7 +53,7 @@ public class LaunchManagerProxy extends AbstractModelProxy implements ILaunchesL
* @see org.eclipse.debug.internal.ui.viewers.AbstractModelProxy#dispose()
*/
@Override
- public synchronized void dispose() {
+ public synchronized void dispose() {
super.dispose();
if (fLaunchManager != null) {
fLaunchManager.removeLaunchListener(this);
@@ -88,20 +88,20 @@ public class LaunchManagerProxy extends AbstractModelProxy implements ILaunchesL
* @see org.eclipse.debug.core.ILaunchesListener#launchesChanged(org.eclipse.debug.core.ILaunch[])
*/
@Override
- public void launchesChanged(ILaunch[] launches) {
+ public void launchesChanged(ILaunch[] launches) {
}
-
+
/**
- * Convenience method for firing a delta
+ * Convenience method for firing a delta
* @param launches the launches to set in the delta
* @param launchFlags the flags for the delta
*/
protected void fireDelta(ILaunch[] launches, int launchFlags) {
ModelDelta delta = new ModelDelta(fLaunchManager, IModelDelta.NO_CHANGE);
for (int i = 0; i < launches.length; i++) {
- delta.addNode(launches[i], launchFlags);
+ delta.addNode(launches[i], launchFlags);
}
- fireModelChanged(delta);
+ fireModelChanged(delta);
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java
index 97ce3f571..b3b90db6a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,13 +28,13 @@ import org.eclipse.jface.viewers.Viewer;
/**
* Model proxy for launch object.
- *
+ *
* @since 3.3
*/
public class LaunchProxy extends AbstractModelProxy implements ILaunchesListener2 {
private ILaunch fLaunch;
-
+
/**
* Set of launch's previous children. When a child is added,
* its model proxy is installed.
@@ -43,13 +43,13 @@ public class LaunchProxy extends AbstractModelProxy implements ILaunchesListener
/**
* Constructs a new model proxy for the given launch.
- *
+ *
* @param launch
*/
public LaunchProxy(ILaunch launch) {
fLaunch = launch;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.AbstractModelProxy#init(org.eclipse.debug.internal.ui.viewers.IPresentationContext)
*/
@@ -58,7 +58,7 @@ public class LaunchProxy extends AbstractModelProxy implements ILaunchesListener
super.init(context);
DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#installed(org.eclipse.jface.viewers.Viewer)
*/
@@ -72,7 +72,7 @@ public class LaunchProxy extends AbstractModelProxy implements ILaunchesListener
* @see org.eclipse.debug.internal.ui.viewers.AbstractModelProxy#dispose()
*/
@Override
- public void dispose() {
+ public void dispose() {
super.dispose();
DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
fPrevChildren.clear();
@@ -89,7 +89,7 @@ public class LaunchProxy extends AbstractModelProxy implements ILaunchesListener
fireDelta(IModelDelta.STATE | IModelDelta.CONTENT | IModelDelta.UNINSTALL);
break;
}
- }
+ }
}
/* (non-Javadoc)
@@ -125,10 +125,10 @@ public class LaunchProxy extends AbstractModelProxy implements ILaunchesListener
}
}
}
-
+
/**
* Installs model proxies for any new children in the given launch.
- *
+ *
* @param launch
*/
protected void installModelProxies() {
@@ -160,7 +160,7 @@ public class LaunchProxy extends AbstractModelProxy implements ILaunchesListener
fireModelChanged(root);
}
}
-
+
/**
* Finds the index of the selected element in the given list
* @param element the element to get the index for
@@ -175,15 +175,15 @@ public class LaunchProxy extends AbstractModelProxy implements ILaunchesListener
}
return -1;
}
-
+
/**
* Convenience method to fire a delta
* @param flags the flags to set on the delta
*/
protected void fireDelta(int flags) {
ModelDelta delta = new ModelDelta(DebugPlugin.getDefault().getLaunchManager(), IModelDelta.NO_CHANGE);
- delta.addNode(fLaunch, flags);
- fireModelChanged(delta);
+ delta.addNode(fLaunch, flags);
+ fireModelChanged(delta);
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/MemoryBlockProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/MemoryBlockProxy.java
index 4945f6f32..cd8932780 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/MemoryBlockProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/MemoryBlockProxy.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Mikhail Khodjaiants - Bug 383687 - Memory view is not updated when using Platform renderings
@@ -20,7 +20,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
import org.eclipse.jface.viewers.Viewer;
public class MemoryBlockProxy extends EventHandlerModelProxy {
-
+
private IMemoryBlock fMemoryBlock;
private DebugEventHandler fDebugEventHandler = new DebugEventHandler(this) {
@@ -28,7 +28,7 @@ public class MemoryBlockProxy extends EventHandlerModelProxy {
protected boolean handlesEvent(DebugEvent event) {
if (event.getKind() == DebugEvent.CHANGE && event.getSource() == fMemoryBlock)
return true;
-
+
Object src = event.getSource();
if (src instanceof IDebugElement)
{
@@ -41,7 +41,7 @@ public class MemoryBlockProxy extends EventHandlerModelProxy {
@Override
protected void handleChange(DebugEvent event) {
if (event.getDetail() == DebugEvent.STATE)
- {
+ {
ModelDelta delta = new ModelDelta(fMemoryBlock, IModelDelta.STATE);
fireModelChanged(delta);
}
@@ -62,7 +62,7 @@ public class MemoryBlockProxy extends EventHandlerModelProxy {
public synchronized void dispose() {
super.dispose();
}};
-
+
public MemoryBlockProxy(IMemoryBlock mb)
{
fMemoryBlock = mb;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/MemoryRetrievalProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/MemoryRetrievalProxy.java
index 8cdfebb6a..94b0e912f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/MemoryRetrievalProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/MemoryRetrievalProxy.java
@@ -7,9 +7,9 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * WindRiver - Bug 192028 [Memory View] Memory view does not
+ * WindRiver - Bug 192028 [Memory View] Memory view does not
* display memory blocks that do not reference IDebugTarget
- *
+ *
*******************************************************************************/
package org.eclipse.debug.internal.ui.viewers.update;
@@ -119,7 +119,7 @@ public class MemoryRetrievalProxy extends AbstractModelProxy implements IMemoryB
* Set the initial memory block selection when the proxy is installed. This
* is done to ensure that when the memory view is opened, there is an
* initial selection. Otherwise, the Rendering Pane will show up as blank.
- *
+ *
* @since 3.4
*/
protected void setInitialSelection() {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ProcessProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ProcessProxy.java
index 7ad095245..36d188f44 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ProcessProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ProcessProxy.java
@@ -31,7 +31,7 @@ public class ProcessProxy extends EventHandlerModelProxy {
@Override
protected void handleChange(DebugEvent event) {
- fireProcessDelta(IModelDelta.STATE);
+ fireProcessDelta(IModelDelta.STATE);
}
@Override
@@ -43,8 +43,8 @@ public class ProcessProxy extends EventHandlerModelProxy {
protected void handleTerminate(DebugEvent event) {
fireProcessDelta(IModelDelta.STATE | IModelDelta.UNINSTALL);
}
-
-
+
+
};
private void fireProcessDelta(int flags) {
@@ -54,12 +54,12 @@ public class ProcessProxy extends EventHandlerModelProxy {
delta = new ModelDelta(DebugPlugin.getDefault().getLaunchManager(), IModelDelta.NO_CHANGE);
ModelDelta node = delta;
node = node.addNode(fProcess.getLaunch(), IModelDelta.NO_CHANGE);
- node.addNode(fProcess, flags);
+ node.addNode(fProcess, flags);
}
}
if (delta != null && !isDisposed()) {
fireModelChanged(delta);
- }
+ }
}
/* (non-Javadoc)
@@ -103,7 +103,7 @@ public class ProcessProxy extends EventHandlerModelProxy {
ModelDelta delta = new ModelDelta(DebugPlugin.getDefault().getLaunchManager(), IModelDelta.NO_CHANGE);
ModelDelta node = delta.addNode(process.getLaunch(), IModelDelta.NO_CHANGE);
node = node.addNode(process, IModelDelta.SELECT);
- fireModelChanged(delta);
+ fireModelChanged(delta);
}
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/StackFrameEventHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/StackFrameEventHandler.java
index 427a5c459..f4f339c6a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/StackFrameEventHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/StackFrameEventHandler.java
@@ -18,11 +18,11 @@ import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
/**
* Default stack frame event handler for the debug view.
- *
+ *
* @since 3.3
*/
public class StackFrameEventHandler extends DebugEventHandler {
-
+
ThreadEventHandler fThreadHandler = null;
/**
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ThreadEventHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ThreadEventHandler.java
index 4f8591004..7936998e1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ThreadEventHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ThreadEventHandler.java
@@ -31,21 +31,21 @@ import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
* @since 3.2
*/
public class ThreadEventHandler extends DebugEventHandler {
-
+
/**
* Queue of suspended threads to choose from when needing
* to select a thread when another is resumed. Threads
* are added in the order they suspend.
*/
private Set<IThread> fThreadQueue = new LinkedHashSet<IThread>();
-
- /**
+
+ /**
* Map of previous TOS per thread
*/
private Map<IThread, IStackFrame> fLastTopFrame = new HashMap<IThread, IStackFrame>();
/**
* Constructs and event handler for a threads in the given viewer.
- *
+ *
* @param viewer
*/
public ThreadEventHandler(AbstractModelProxy proxy) {
@@ -102,7 +102,7 @@ public class ThreadEventHandler extends DebugEventHandler {
fireDeltaUpdatingSelectedFrame(thread, IModelDelta.NO_CHANGE | extras, event);
}
}
-
+
private boolean isEqual(Object o1, Object o2) {
if (o1 == o2) {
return true;
@@ -163,7 +163,7 @@ public class ThreadEventHandler extends DebugEventHandler {
}
} catch (DebugException e) {
}
- } else {
+ } else {
fireDeltaUpdatingSelectedFrame(thread, IModelDelta.STATE | IModelDelta.EXPAND, suspend);
}
}
@@ -174,23 +174,23 @@ public class ThreadEventHandler extends DebugEventHandler {
// don't collapse thread when waiting for long step or evaluation to complete
fireDeltaUpdatingThread(thread, IModelDelta.STATE);
}
-
+
protected ModelDelta buildRootDelta() {
return new ModelDelta(getLaunchManager(), IModelDelta.NO_CHANGE);
}
/**
* Returns the launch manager.
- *
+ *
* @return the launch manager
*/
protected ILaunchManager getLaunchManager() {
return DebugPlugin.getDefault().getLaunchManager();
}
-
+
/**
* Adds nodes into the delta up to but not including the given thread.
- *
+ *
* @param delta root delta for the view (includes viewer input)
* @param thread thread for which path is requested
* @return
@@ -217,7 +217,7 @@ public class ThreadEventHandler extends DebugEventHandler {
}
fireDelta(delta);
}
-
+
private void fireDeltaUpdatingSelectedFrame(IThread thread, int flags, DebugEvent event) {
ModelDelta delta = buildRootDelta();
ModelDelta node = addPathToThread(delta, thread);
@@ -268,10 +268,10 @@ public class ThreadEventHandler extends DebugEventHandler {
}
fireDelta(delta);
}
-
+
/**
* Returns the index of the given thread, relative to its parent in the view.
- *
+ *
* @param thread thread
* @return index of the thread, relative to its parent
*/
@@ -282,10 +282,10 @@ public class ThreadEventHandler extends DebugEventHandler {
}
return -1;
}
-
+
/**
* Returns the index of the given frame, relative to its parent in the view.
- *
+ *
* @param frame stack frame
* @return index of the frame, relative to its thread
*/
@@ -296,10 +296,10 @@ public class ThreadEventHandler extends DebugEventHandler {
return -1;
}
}
-
+
/**
* Returns the number of children the given thread has in the view.
- *
+ *
* @param thread thread
* @return number of children
*/
@@ -310,29 +310,29 @@ public class ThreadEventHandler extends DebugEventHandler {
}
return -1;
}
-
+
/**
* Returns the number of children the given frame has in the view.
- *
+ *
* @param frame frame
* @return child count
*/
protected int childCount(IStackFrame frame) {
return 0;
}
-
+
private void fireDeltaUpdatingThread(IThread thread, int flags) {
ModelDelta delta = buildRootDelta();
ModelDelta node = addPathToThread(delta, thread);
node = node.addNode(thread, flags);
fireDelta(delta);
- }
-
+ }
+
@Override
protected boolean handlesEvent(DebugEvent event) {
return event.getSource() instanceof IThread;
}
-
+
protected synchronized IThread queueSuspendedThread(DebugEvent event) {
IThread thread = (IThread) event.getSource();
if (!isDisposed()) {
@@ -340,24 +340,24 @@ public class ThreadEventHandler extends DebugEventHandler {
}
return thread;
}
-
+
protected synchronized IThread removeSuspendedThread(DebugEvent event) {
IThread thread = (IThread)event.getSource();
fThreadQueue.remove(thread);
return thread;
}
-
+
protected synchronized IThread queueSuspendedThread(IThread thread) {
if (!isDisposed()) {
fThreadQueue.add(thread);
}
return thread;
- }
-
+ }
+
protected synchronized void removeQueuedThread(IThread thread) {
fThreadQueue.remove(thread);
}
-
+
protected synchronized IThread getNextSuspendedThread() {
if (!fThreadQueue.isEmpty()) {
return fThreadQueue.iterator().next();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/VariablesViewEventHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/VariablesViewEventHandler.java
index 6a7823fa5..3a1a676b7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/VariablesViewEventHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/VariablesViewEventHandler.java
@@ -45,7 +45,7 @@ public class VariablesViewEventHandler extends DebugEventHandler {
return;
}
}
-
+
ModelDelta delta = new ModelDelta(fFrame, IModelDelta.CONTENT);
fireDelta(delta);
}

Back to the top