Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 124833 Details for
Bug 263814
[api][context] allow extensions to hook into 'Context->Copy To...' action
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
candidate API
patch.txt (text/plain), 8.27 KB, created by
David Green
on 2009-02-05 12:29:03 EST
(
hide
)
Description:
candidate API
Filename:
MIME Type:
Creator:
David Green
Created:
2009-02-05 12:29:03 EST
Size:
8.27 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.context.core >Index: src/org/eclipse/mylyn/internal/context/core/LocalContextStore.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.context.core/src/org/eclipse/mylyn/internal/context/core/LocalContextStore.java,v >retrieving revision 1.13 >diff -u -r1.13 LocalContextStore.java >--- src/org/eclipse/mylyn/internal/context/core/LocalContextStore.java 5 Jan 2009 00:15:48 -0000 1.13 >+++ src/org/eclipse/mylyn/internal/context/core/LocalContextStore.java 5 Feb 2009 17:27:40 -0000 >@@ -27,6 +27,7 @@ > import org.eclipse.core.runtime.Status; > import org.eclipse.mylyn.commons.core.StatusHandler; > import org.eclipse.mylyn.context.core.ContextCore; >+import org.eclipse.mylyn.context.core.ICloneContextParticipant; > import org.eclipse.mylyn.context.core.IContextStore; > import org.eclipse.mylyn.context.core.IInteractionContext; > import org.eclipse.mylyn.context.core.IInteractionContextScaling; >@@ -172,6 +173,14 @@ > > public IInteractionContext cloneContext(String sourceContextHandle, String destinationContextHandle) { > >+ ICloneContextParticipant[] participants = getCloneParticipants(); >+ >+ if (participants != null) { >+ for (ICloneContextParticipant participant : participants) { >+ participant.contextAboutToBeCloned(sourceContextHandle, destinationContextHandle); >+ } >+ } >+ > InteractionContext readContext = (InteractionContext) externalizer.readContextFromXml(sourceContextHandle, > getFileForContext(sourceContextHandle), commonContextScaling); > >@@ -189,9 +198,21 @@ > // StatusHandler.log(new Status(IStatus.WARNING, ContextCorePlugin.ID_PLUGIN, "Could not copy context from: " > // + sourceContextHandle)); > // } >+ >+ if (participants != null) { >+ for (ICloneContextParticipant participant : participants) { >+ participant.contextCloned(sourceContextHandle, destinationContextHandle); >+ } >+ } >+ > return readContext; > } > >+ private ICloneContextParticipant[] getCloneParticipants() { >+ // TODO: implement bug 263814 >+ return null; >+ } >+ > public boolean hasContext(String handleIdentifier) { > Assert.isNotNull(handleIdentifier); > File file = getFileForContext(handleIdentifier); >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.context.core/plugin.xml,v >retrieving revision 1.12 >diff -u -r1.12 plugin.xml >--- plugin.xml 5 Sep 2008 02:38:08 -0000 1.12 >+++ plugin.xml 5 Feb 2009 17:27:40 -0000 >@@ -4,4 +4,5 @@ > <extension-point id="bridges" name="bridges" schema="schema/bridges.exsd"/> > <extension-point id="internalBridges" name="Internal Bridges" schema="schema/internalBridges.exsd"/> > <extension-point id="relationProviders" name="relationProviders" schema="schema/relationProviders.exsd"/> >+ <extension-point id="cloneContextParticipant" name="Clone Context Participant" schema="schema/cloneContextParticipant.exsd"/> > </plugin> >Index: schema/cloneContextParticipant.exsd >=================================================================== >RCS file: schema/cloneContextParticipant.exsd >diff -N schema/cloneContextParticipant.exsd >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ schema/cloneContextParticipant.exsd 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,114 @@ >+<?xml version='1.0' encoding='UTF-8'?> >+<!-- Schema file written by PDE --> >+<schema targetNamespace="org.eclipse.mylyn.context.core" xmlns="http://www.w3.org/2001/XMLSchema"> >+<annotation> >+ <appinfo> >+ <meta.schema plugin="org.eclipse.mylyn.context.core" id="cloneContextParticipant" name="Clone Context Participant"/> >+ </appinfo> >+ <documentation> >+ Provides a mechanism to participate in task context cloning. >+ </documentation> >+ </annotation> >+ >+ <element name="extension"> >+ <annotation> >+ <appinfo> >+ <meta.element /> >+ </appinfo> >+ </annotation> >+ <complexType> >+ <sequence> >+ <element ref="cloneContextParticipant" minOccurs="1" maxOccurs="unbounded"/> >+ </sequence> >+ <attribute name="point" type="string" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="id" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="name" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ <appinfo> >+ <meta.attribute translatable="true"/> >+ </appinfo> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <element name="cloneContextParticipant"> >+ <complexType> >+ <attribute name="class" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ <appinfo> >+ <meta.attribute kind="java" basedOn=":org.eclipse.mylyn.context.core.ICloneContextParticipant"/> >+ </appinfo> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="since"/> >+ </appinfo> >+ <documentation> >+ [Enter the first release in which this extension point appears.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="examples"/> >+ </appinfo> >+ <documentation> >+ [Enter extension point usage example here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="apiinfo"/> >+ </appinfo> >+ <documentation> >+ [Enter API information here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="implementation"/> >+ </appinfo> >+ <documentation> >+ [Enter information about supplied implementation of this extension point.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="copyright"/> >+ </appinfo> >+ <documentation> >+ Copyright (c) 2009 David Green 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 >+ </documentation> >+ </annotation> >+ >+</schema> >Index: src/org/eclipse/mylyn/context/core/ICloneContextParticipant.java >=================================================================== >RCS file: src/org/eclipse/mylyn/context/core/ICloneContextParticipant.java >diff -N src/org/eclipse/mylyn/context/core/ICloneContextParticipant.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/context/core/ICloneContextParticipant.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,38 @@ >+/******************************************************************************* >+ * Copyright (c) 2009 David Green 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: >+ * David Green - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.context.core; >+ >+import org.eclipse.core.runtime.CoreException; >+ >+/** >+ * implementors can participate in context cloning >+ * >+ * @author David Green >+ * >+ * @see IContextStore#cloneContext(String, String) >+ */ >+public interface ICloneContextParticipant { >+ >+ /** >+ * Called when a context is about to be cloned. >+ * >+ * @return true if cloning should proceed, otherwise false. >+ */ >+ public boolean contextAboutToBeCloned(String sourceContextHandle, String destinationContextHandle) >+ throws CoreException; >+ >+ /** >+ * Called when a context has been cloned >+ */ >+ public void contextCloned(String sourceContextHandle, String destinationContextHandle) throws CoreException; >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 263814
:
124828
| 124833 |
124834