Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.tests.util/src/org')
-rw-r--r--org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TasksUiTestUtil.java28
-rw-r--r--org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestUtil.java34
2 files changed, 28 insertions, 34 deletions
diff --git a/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TasksUiTestUtil.java b/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TasksUiTestUtil.java
new file mode 100644
index 000000000..286c037cd
--- /dev/null
+++ b/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TasksUiTestUtil.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.tests.util;
+
+import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiExtensionReader;
+
+/**
+ * @author Steffen Pingel
+ */
+public class TasksUiTestUtil {
+
+ /**
+ * Ensures that connector UI extensions are registered (see bug 400370).
+ */
+ public static void ensureTasksUiInitialization() {
+ TasksUiExtensionReader.initWorkbenchUiExtensions();
+ }
+
+}
diff --git a/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestUtil.java b/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestUtil.java
index 92862d7c7..7e0b8effa 100644
--- a/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestUtil.java
+++ b/org.eclipse.mylyn.tests.util/src/org/eclipse/mylyn/tests/util/TestUtil.java
@@ -144,38 +144,4 @@ public class TestUtil {
return !Boolean.parseBoolean(System.getProperty("org.eclipse.mylyn.tests.all"));
}
-// public static File getFile(String bundleId, Class<?> clazz, String filename) throws IOException {
-// Bundle bundle = Platform.getBundle(bundleId);
-// if (bundle != null) {
-// URL localURL = FileLocator.toFileURL(bundle.getEntry(filename));
-// filename = localURL.getFile();
-// } else {
-// URL localURL = clazz.getResource("");
-// String path = localURL.getFile();
-// int i = path.indexOf("!");
-// if (i != -1) {
-// int j = path.lastIndexOf(File.separatorChar, i);
-// if (j != -1) {
-// path = path.substring(0, j) + File.separator;
-// } else {
-// Assert.fail("Unable to determine location for '" + filename + "' at '" + path + "'");
-// }
-// // class file is nested in jar, use jar path as base
-// if (path.startsWith("file:")) {
-// path = path.substring(5);
-// }
-// } else {
-// // create relative path to base of class file location
-// String[] tokens = clazz.getName().split("\\.");
-// for (int j = 0; j < tokens.length - 1; j++) {
-// path += ".." + File.separator;
-// }
-// if (path.contains("bin" + File.separator)) {
-// path += ".." + File.separator;
-// }
-// }
-// filename = path + filename.replaceAll("/", File.separator);
-// }
-// return new File(filename).getCanonicalFile();
-// }
}

Back to the top