Skip to content

Commit 4fa0cba

Browse files
committed
Stop using deprecated APIs in o.e.ui.tests
1 parent de18285 commit 4fa0cba

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/DragTest.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2004, 2011 IBM Corporation and others.
2+
* Copyright (c) 2004, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -164,10 +164,6 @@ public void doSetUp() throws Exception {
164164
file1 = FileUtil.createFile("DragTest1.txt", project); //$NON-NLS-1$
165165
file2 = FileUtil.createFile("DragTest2.txt", project); //$NON-NLS-1$
166166
file3 = FileUtil.createFile("DragTest3.txt", project); //$NON-NLS-1$
167-
168-
// Disable animations since they occur concurrently and can interferre
169-
// with locating drop targets
170-
setPreference(PrefUtil.getAPIPreferenceStore(), IWorkbenchPreferenceConstants.ENABLE_ANIMATIONS, false);
171167
}
172168

173169
page.resetPerspective();

tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dnd/DragTestSuite.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2004, 2021 IBM Corporation and others.
2+
* Copyright (c) 2004, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -13,8 +13,8 @@
1313
*******************************************************************************/
1414
package org.eclipse.ui.tests.dnd;
1515

16+
import org.eclipse.core.runtime.FileLocator;
1617
import org.eclipse.core.runtime.IPath;
17-
import org.eclipse.core.runtime.Platform;
1818
import org.eclipse.swt.SWT;
1919
import org.eclipse.swt.widgets.Composite;
2020
import org.eclipse.swt.widgets.Shell;
@@ -58,7 +58,7 @@ public static Test suite() {
5858
}
5959

6060
public DragTestSuite() {
61-
super(Platform.find(TestPlugin.getDefault().getBundle(), IPath.fromOSString("data/dragtests.xml")));
61+
super(FileLocator.find(TestPlugin.getDefault().getBundle(), IPath.fromOSString("data/dragtests.xml")));
6262

6363
String resNav = IPageLayout.ID_PROJECT_EXPLORER;
6464
String probView = IPageLayout.ID_PROBLEM_VIEW;

tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/DynamicUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2004, 2006 IBM Corporation and others.
2+
* Copyright (c) 2004, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -16,7 +16,7 @@
1616
import java.io.IOException;
1717
import java.net.URL;
1818

19-
import org.eclipse.core.runtime.Platform;
19+
import org.eclipse.core.runtime.FileLocator;
2020
import org.eclipse.ui.tests.TestPlugin;
2121
import org.osgi.framework.Bundle;
2222
import org.osgi.framework.BundleException;
@@ -32,7 +32,7 @@ public static final Bundle installPlugin(String pluginName)
3232
"TestPlugin default reference is null");
3333
}
3434
String pluginLocation = null;
35-
URL dataURL = Platform.resolve(plugin.getBundle().getEntry(pluginName));
35+
URL dataURL = FileLocator.resolve(plugin.getBundle().getEntry(pluginName));
3636
pluginLocation = "reference:" + dataURL.toExternalForm();
3737
return TestInstallUtil.installBundle(pluginLocation);
3838
}

0 commit comments

Comments
 (0)