Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2011-07-15 21:58:32 +0000
committerSteffen Pingel2011-07-22 15:01:06 +0000
commitd02ba239c8c77469ff137cbf4d939a834ff39c97 (patch)
treef30768db8e457635c881dbabc7f5880ed8ad989b /org.eclipse.mylyn.tasks.core
parentd870fb4251d55f32cccb6c7ba23bb815570136a2 (diff)
downloadorg.eclipse.mylyn.tasks-d02ba239c8c77469ff137cbf4d939a834ff39c97.tar.gz
org.eclipse.mylyn.tasks-d02ba239c8c77469ff137cbf4d939a834ff39c97.tar.xz
org.eclipse.mylyn.tasks-d02ba239c8c77469ff137cbf4d939a834ff39c97.zip
NEW - bug 336430: separate Context framework from Tasks
https://bugs.eclipse.org/bugs/show_bug.cgi?id=336430
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.mylyn.tasks.core/plugin.xml29
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/context/AbstractTaskContextStore.java61
3 files changed, 64 insertions, 27 deletions
diff --git a/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF
index 3d293d712..24f80728d 100644
--- a/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF
@@ -17,6 +17,7 @@ Export-Package: org.eclipse.mylyn.internal.provisional.tasks.core;x-internal:=tr
org.eclipse.mylyn.internal.tasks.core.notifications;x-friends:="org.eclipse.mylyn.tasks.ui,org.eclipse.mylyn.tasks.bugs",
org.eclipse.mylyn.internal.tasks.core.sync;x-friends:="org.eclipse.mylyn.tasks.ui,org.eclipse.mylyn.tasks.bugs",
org.eclipse.mylyn.tasks.core,
+ org.eclipse.mylyn.tasks.core.context,
org.eclipse.mylyn.tasks.core.data,
org.eclipse.mylyn.tasks.core.sync
Import-Package: com.sun.syndication.feed;version="0.9.0";resolution:=optional,
diff --git a/org.eclipse.mylyn.tasks.core/plugin.xml b/org.eclipse.mylyn.tasks.core/plugin.xml
index 8d2161501..2e643afcc 100644
--- a/org.eclipse.mylyn.tasks.core/plugin.xml
+++ b/org.eclipse.mylyn.tasks.core/plugin.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?><!--
+<?eclipse version="3.0"?>
+<!--
Copyright (c) 2009 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
@@ -9,33 +10,7 @@
Contributors:
Tasktop Technologies - initial API and implementation
-->
-
<plugin>
<extension-point id="templates" name="templates" schema="schema/templates.exsd"/>
<extension-point id="synchronizationParticipants" name="Synchronization Participants" schema="schema/synchronizationParticipants.exsd"/>
-
- <!--
- <extension
- point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
- <hyperlinkDetector class="org.eclipse.mylyn.internal.bugs.java.BugzillaHyperLinkDetector"/>
- </extension>
- -->
-
-<!--
- <extension
- point="org.eclipse.mylyn.core.context">
- <structureBridge
- activeSearchIcon="icons/elcl16/edge-ref-bug.gif"
- activeSearchLabel="Bugzilla References"
- class="org.eclipse.mylyn.bugs.BugzillaStructureBridge"
- name="Bugzilla Structure Bridge"/>
- </extension>
-
- <extension
- point="org.eclipse.mylyn.ui.context">
- <uiBridge
- class="org.eclipse.mylyn.bugs.BugzillaUiBridge"
- contentType="bugzilla"/>
- </extension>
--->
</plugin>
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/context/AbstractTaskContextStore.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/context/AbstractTaskContextStore.java
new file mode 100644
index 000000000..0187ba72c
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/context/AbstractTaskContextStore.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.tasks.core.context;
+
+import java.io.File;
+import java.io.InputStream;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.mylyn.tasks.core.ITask;
+import org.eclipse.mylyn.tasks.core.TaskRepository;
+
+/**
+ * A store for persisting task context.
+ *
+ * @author Steffen Pingel
+ * @since 3.7
+ */
+public abstract class AbstractTaskContextStore {
+
+ /**
+ * @since 3.7
+ */
+ public abstract boolean hasContext(ITask task);
+
+ /**
+ * @throws CoreException
+ * thrown when the import fails
+ * @since 3.7
+ */
+ public abstract void importContext(ITask task, InputStream source) throws CoreException;
+
+ /**
+ * Copies the context from <code>sourceTask</code> to <code>destinationTask</code>. Creates a new context if a
+ * <code>sourceTask</code> does not have a context.
+ *
+ * @since 3.7
+ */
+ public abstract void cloneContext(ITask sourceTask, ITask destinationTask);
+
+ /**
+ * Return the location of the context for <code>task</code>.
+ *
+ * @return null, if context for <code>task</code> does not exist
+ * @since 3.7
+ */
+ public abstract File getFileForContext(TaskRepository repository, ITask task);
+
+ public abstract void deleteContext(ITask oldTask);
+
+ public abstract void saveActiveContext();
+
+}

Back to the top