Skip to content

Commit

Permalink
Move away of deprecated ViewerSorter
Browse files Browse the repository at this point in the history
Use ViewerComparator methods.
  • Loading branch information
akurtakov committed Jan 19, 2025
1 parent ad9c4cf commit 2177bdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2006 IBM Corporation and others.
* Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -62,8 +62,8 @@ public void createArea(Composite parent) {
createWrappingLabel(composite, description, 1);

viewer = new CommonViewer(TEAM_NAVIGATOR_CONTENT, composite, SWT.BORDER);
viewer.setSorter(new CommonViewerSorter());
viewer.setSorter(new TeamViewerSorter((CommonViewerSorter)viewer.getSorter()));
viewer.setComparator(new CommonViewerSorter());
viewer.setComparator(new TeamViewerSorter((CommonViewerSorter) viewer.getSorter()));
viewer.getNavigatorContentService().bindExtensions(TeamUI.getTeamContentProviderManager().getContentProviderIds(scope), true);
viewer.getNavigatorContentService().getActivationService().activateExtensions(TeamUI.getTeamContentProviderManager().getContentProviderIds(scope), true);
GridData data = new GridData(GridData.FILL_BOTH);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2017 IBM Corporation and others.
* Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -268,8 +268,8 @@ public void updateActionBars() {
*/
private static CommonViewer createViewer(Composite parent, final ISynchronizePageConfiguration configuration, IEmptyTreeListener listener) {
final CommonViewer v = new NavigableCommonViewer(configuration.getViewerId(), parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL, listener);
v.setSorter(new CommonViewerSorter());
v.setSorter(new TeamViewerSorter((CommonViewerSorter)v.getSorter()));
v.setComparator(new CommonViewerSorter());
v.setComparator(new TeamViewerSorter((CommonViewerSorter) v.getSorter()));
ISynchronizationScope scope = getScope(configuration);
bindTeamContentProviders(v);
scope.addScopeChangeListener((scope1, newMappings, newTraversals) -> {
Expand Down

0 comments on commit 2177bdf

Please sign in to comment.