Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2019-02-12 16:05:54 -0500
committerKarsten Thoms2019-02-12 16:05:54 -0500
commite35d0420e6ef849db5db0aec1c84f30ad5fa107b (patch)
tree5840598123de26b8368109d0a54f43fa9c14c405 /org.eclipse.debug.ui/ui
parent519101cc5434bb0e60c6aab46466dd29bb1cadb9 (diff)
downloadeclipse.platform.debug-e35d0420e6ef849db5db0aec1c84f30ad5fa107b.tar.gz
eclipse.platform.debug-e35d0420e6ef849db5db0aec1c84f30ad5fa107b.tar.xz
eclipse.platform.debug-e35d0420e6ef849db5db0aec1c84f30ad5fa107b.zip
Bug 544400 - Replace usage of StructuredViewer#getSorter()Y20190213-2200Y20190213-0305I20190213-1800
Replace by StructuredViewer#getComparator Change-Id: I926b8c2329519b1add153906b772f60535dd79a3 Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
Diffstat (limited to 'org.eclipse.debug.ui/ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java10
2 files changed, 9 insertions, 9 deletions
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 86954df46..19bc7c32c 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
@@ -37,8 +37,8 @@ import org.eclipse.debug.internal.ui.viewers.provisional.IAsynchronousContentAda
import org.eclipse.debug.internal.ui.viewers.provisional.IAsynchronousLabelAdapter;
import org.eclipse.debug.internal.ui.viewers.provisional.IChildrenRequestMonitor;
import org.eclipse.debug.internal.ui.viewers.provisional.ILabelRequestMonitor;
+import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.viewers.ViewerSorter;
/**
* Model for an asynchronous viewer
@@ -549,9 +549,9 @@ public abstract class AsynchronousModel {
protected void setChildren(final ModelNode parentNode, List<Object> kids) {
final Object[] children = filter(parentNode.getElement(), kids.toArray());
final AsynchronousViewer viewer = getViewer();
- ViewerSorter sorter = viewer.getSorter();
- if (sorter != null) {
- sorter.sort(viewer, children);
+ ViewerComparator comparator = viewer.getComparator();
+ if (comparator != null) {
+ comparator.sort(viewer, children);
}
ModelNode[] prevKids = null;
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 97f6a0156..0f146565b 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
@@ -30,7 +30,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.TableEditor;
import org.eclipse.swt.events.MouseAdapter;
@@ -389,8 +389,8 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
}
protected int indexForElement(Object element) {
- ViewerSorter sorter = getSorter();
- if (sorter == null) {
+ ViewerComparator comparator = getComparator();
+ if (comparator == null) {
return fTable.getItemCount();
}
int count = fTable.getItemCount();
@@ -398,7 +398,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
while (min <= max) {
int mid = (min + max) / 2;
Object data = fTable.getItem(mid).getData();
- int compare = sorter.compare(this, data, element);
+ int compare = comparator.compare(this, data, element);
if (compare == 0) {
// find first item > element
while (compare == 0) {
@@ -407,7 +407,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
break;
}
data = fTable.getItem(mid).getData();
- compare = sorter.compare(this, data, element);
+ compare = comparator.compare(this, data, element);
}
return mid;
}

Back to the top