Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2013-02-08 22:10:18 +0000
committerSteffen Pingel2013-04-12 21:42:46 +0000
commitdf08d9f31a149377edb6b7d96e8d034e8972e98a (patch)
treee568d8a9120ca954458678039d17009969dca742 /org.eclipse.mylyn.tests.util
parent9272712034cda71f10525c6fb0dec3a3be321adb (diff)
downloadorg.eclipse.mylyn.tasks-df08d9f31a149377edb6b7d96e8d034e8972e98a.tar.gz
org.eclipse.mylyn.tasks-df08d9f31a149377edb6b7d96e8d034e8972e98a.tar.xz
org.eclipse.mylyn.tasks-df08d9f31a149377edb6b7d96e8d034e8972e98a.zip
400370: ensure UI extensions are initialized when running UI tests
Change-Id: I390caf2f39d0806829b2678165921f34ec53a028 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=400370
Diffstat (limited to 'org.eclipse.mylyn.tests.util')
-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