Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TasksCoreExtensionReader.java')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TasksCoreExtensionReader.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TasksCoreExtensionReader.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TasksCoreExtensionReader.java
new file mode 100644
index 000000000..164109059
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TasksCoreExtensionReader.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.internal.tasks.core.util;
+
+import org.eclipse.mylyn.commons.core.ExtensionPointReader;
+import org.eclipse.mylyn.internal.tasks.core.ITasksCoreConstants;
+import org.eclipse.mylyn.internal.tasks.core.context.DefaultTaskContextStore;
+import org.eclipse.mylyn.tasks.core.context.AbstractTaskContextStore;
+
+public class TasksCoreExtensionReader {
+
+ public static AbstractTaskContextStore loadTaskContextStore() {
+ ExtensionPointReader<AbstractTaskContextStore> reader = new ExtensionPointReader<AbstractTaskContextStore>(
+ ITasksCoreConstants.ID_PLUGIN, "contextStore", "contextStore", AbstractTaskContextStore.class); //$NON-NLS-1$ //$NON-NLS-2$
+ reader.read();
+ AbstractTaskContextStore contextStore = reader.getItem();
+ if (contextStore != null) {
+ return contextStore;
+ }
+ return new DefaultTaskContextStore();
+ }
+
+}

Back to the top