Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-10-10 19:20:44 +0000
committerAlexander Kurtakov2019-10-10 19:20:44 +0000
commit8ba5a7191f2522a599c2b74044054451263fbd0d (patch)
tree6e56597bb2c7027b1b01c6fb1ed55f44786122ff /debug
parentb7e1fb466de2b4d9a7de24ba4617eb40663cde76 (diff)
downloadorg.eclipse.cdt-8ba5a7191f2522a599c2b74044054451263fbd0d.tar.gz
org.eclipse.cdt-8ba5a7191f2522a599c2b74044054451263fbd0d.tar.xz
org.eclipse.cdt-8ba5a7191f2522a599c2b74044054451263fbd0d.zip
Migrate to ViewerComparator.
Change-Id: I5b70806ca7376797e387164158a0c41d52b59cb5 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogfields/ListDialogField.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogfields/ListDialogField.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogfields/ListDialogField.java
index 7c82b89a51e..af950d427ce 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogfields/ListDialogField.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogfields/ListDialogField.java
@@ -29,7 +29,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
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.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
@@ -54,7 +54,7 @@ public class ListDialogField extends DialogField {
protected ILabelProvider fLabelProvider;
protected ListViewerAdapter fListViewerAdapter;
protected List fElements;
- protected ViewerSorter fViewerSorter;
+ protected ViewerComparator fViewerComparator;
protected String[] fButtonLabels;
private Button[] fButtonControls;
@@ -141,11 +141,11 @@ public class ListDialogField extends DialogField {
}
/**
- * Sets the viewerSorter.
- * @param viewerSorter The viewerSorter to set
+ * Sets the viewerComparator.
+ * @param viewerComparator The viewerComparator to set
*/
- public void setViewerSorter(ViewerSorter viewerSorter) {
- fViewerSorter = viewerSorter;
+ public void setViewerComparator(ViewerComparator viewerComparator) {
+ fViewerComparator = viewerComparator;
}
// ------ adapter communication
@@ -250,8 +250,8 @@ public class ListDialogField extends DialogField {
fTable.setInput(fParentElement);
- if (fViewerSorter != null) {
- fTable.setSorter(fViewerSorter);
+ if (fViewerComparator != null) {
+ fTable.setComparator(fViewerComparator);
}
fTableControl.setEnabled(isEnabled());
@@ -598,9 +598,9 @@ public class ListDialogField extends DialogField {
public void selectFirstElement() {
Object element = null;
- if (fViewerSorter != null) {
+ if (fViewerComparator != null) {
Object[] arr = fElements.toArray();
- fViewerSorter.sort(fTable, arr);
+ fViewerComparator.sort(fTable, arr);
if (arr.length > 0) {
element = arr[0];
}

Back to the top