Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSergey Prigogin2016-08-24 07:53:18 -0400
committerSergey Prigogin2016-08-24 07:53:18 -0400
commit610d92f8ebc9c90b9edbd289596a1681a92f1913 (patch)
treed672742994b2a3b2dd6fbfc38ac287f01a3fe442 /tests
parent197e7f029ecc8b5217ce226bac3b4379df49c115 (diff)
downloadeclipse.platform.team-610d92f8ebc9c90b9edbd289596a1681a92f1913.tar.gz
eclipse.platform.team-610d92f8ebc9c90b9edbd289596a1681a92f1913.tar.xz
eclipse.platform.team-610d92f8ebc9c90b9edbd289596a1681a92f1913.zip
Bug 491036 - Eliminate Utils.getAdapter(Object, Class) in favor of
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EditorTests.java11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ParticipantSyncInfoSource.java4
2 files changed, 8 insertions, 7 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EditorTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EditorTests.java
index 18f511c45..277d308f1 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EditorTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EditorTests.java
@@ -16,6 +16,7 @@ import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Adapters;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.team.core.history.IFileRevision;
@@ -56,11 +57,11 @@ public class EditorTests extends EclipseTest {
ICVSRemoteFile remoteFile = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("file.cvsTest"));
IEditorPart part = CVSUIPlugin.getPlugin().openEditor(remoteFile, new NullProgressMonitor());
assertTrue("The proper remote editor was not opened", !(part instanceof TestEditor) && (part instanceof ITextEditor));
- assertNotNull(Utils.getAdapter(part.getEditorInput(), IFileRevision.class));
- assertNotNull(Utils.getAdapter(part.getEditorInput(), ICVSFile.class));
- assertNotNull(Utils.getAdapter(part.getEditorInput(), IResourceVariant.class));
- assertNotNull(Utils.getAdapter(part.getEditorInput(), IHistoryPageSource.class));
- assertNotNull(Utils.getAdapter(part.getEditorInput(), IWorkbenchAdapter.class));
+ assertNotNull(Adapters.adapt(part.getEditorInput(), IFileRevision.class));
+ assertNotNull(Adapters.adapt(part.getEditorInput(), ICVSFile.class));
+ assertNotNull(Adapters.adapt(part.getEditorInput(), IResourceVariant.class));
+ assertNotNull(Adapters.adapt(part.getEditorInput(), IHistoryPageSource.class));
+ assertNotNull(Adapters.adapt(part.getEditorInput(), IWorkbenchAdapter.class));
}
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ParticipantSyncInfoSource.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ParticipantSyncInfoSource.java
index 07d066702..2928d5fe3 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ParticipantSyncInfoSource.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ParticipantSyncInfoSource.java
@@ -13,13 +13,13 @@ package org.eclipse.team.tests.ccvs.ui;
import junit.framework.AssertionFailedError;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.Adapters;
import org.eclipse.swt.widgets.Display;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.Subscriber;
import org.eclipse.team.internal.ccvs.core.CVSMergeSubscriber;
import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.internal.ui.synchronize.SynchronizeView;
import org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource;
import org.eclipse.team.ui.TeamUI;
@@ -47,7 +47,7 @@ public class ParticipantSyncInfoSource extends SyncInfoSource {
}
protected SyncInfoToDiffConverter getConverter(Subscriber subscriber) {
- SyncInfoToDiffConverter converter = (SyncInfoToDiffConverter)Utils.getAdapter(subscriber, SyncInfoToDiffConverter.class);
+ SyncInfoToDiffConverter converter = (SyncInfoToDiffConverter)Adapters.adapt(subscriber, SyncInfoToDiffConverter.class);
if (converter == null)
converter = SyncInfoToDiffConverter.getDefault();
return converter;

Back to the top