|
Lines 27-32
Link Here
|
| 27 |
import org.eclipse.core.runtime.Status; |
27 |
import org.eclipse.core.runtime.Status; |
| 28 |
import org.eclipse.mylyn.commons.core.StatusHandler; |
28 |
import org.eclipse.mylyn.commons.core.StatusHandler; |
| 29 |
import org.eclipse.mylyn.context.core.ContextCore; |
29 |
import org.eclipse.mylyn.context.core.ContextCore; |
|
|
30 |
import org.eclipse.mylyn.context.core.ICloneContextParticipant; |
| 30 |
import org.eclipse.mylyn.context.core.IContextStore; |
31 |
import org.eclipse.mylyn.context.core.IContextStore; |
| 31 |
import org.eclipse.mylyn.context.core.IInteractionContext; |
32 |
import org.eclipse.mylyn.context.core.IInteractionContext; |
| 32 |
import org.eclipse.mylyn.context.core.IInteractionContextScaling; |
33 |
import org.eclipse.mylyn.context.core.IInteractionContextScaling; |
|
Lines 172-177
Link Here
|
| 172 |
|
173 |
|
| 173 |
public IInteractionContext cloneContext(String sourceContextHandle, String destinationContextHandle) { |
174 |
public IInteractionContext cloneContext(String sourceContextHandle, String destinationContextHandle) { |
| 174 |
|
175 |
|
|
|
176 |
ICloneContextParticipant[] participants = getCloneParticipants(); |
| 177 |
|
| 178 |
if (participants != null) { |
| 179 |
for (ICloneContextParticipant participant : participants) { |
| 180 |
participant.contextAboutToBeCloned(sourceContextHandle, destinationContextHandle); |
| 181 |
} |
| 182 |
} |
| 183 |
|
| 175 |
InteractionContext readContext = (InteractionContext) externalizer.readContextFromXml(sourceContextHandle, |
184 |
InteractionContext readContext = (InteractionContext) externalizer.readContextFromXml(sourceContextHandle, |
| 176 |
getFileForContext(sourceContextHandle), commonContextScaling); |
185 |
getFileForContext(sourceContextHandle), commonContextScaling); |
| 177 |
|
186 |
|
|
Lines 189-197
Link Here
|
| 189 |
// StatusHandler.log(new Status(IStatus.WARNING, ContextCorePlugin.ID_PLUGIN, "Could not copy context from: " |
198 |
// StatusHandler.log(new Status(IStatus.WARNING, ContextCorePlugin.ID_PLUGIN, "Could not copy context from: " |
| 190 |
// + sourceContextHandle)); |
199 |
// + sourceContextHandle)); |
| 191 |
// } |
200 |
// } |
|
|
201 |
|
| 202 |
if (participants != null) { |
| 203 |
for (ICloneContextParticipant participant : participants) { |
| 204 |
participant.contextCloned(sourceContextHandle, destinationContextHandle); |
| 205 |
} |
| 206 |
} |
| 207 |
|
| 192 |
return readContext; |
208 |
return readContext; |
| 193 |
} |
209 |
} |
| 194 |
|
210 |
|
|
|
211 |
private ICloneContextParticipant[] getCloneParticipants() { |
| 212 |
// TODO: implement bug 263814 |
| 213 |
return null; |
| 214 |
} |
| 215 |
|
| 195 |
public boolean hasContext(String handleIdentifier) { |
216 |
public boolean hasContext(String handleIdentifier) { |
| 196 |
Assert.isNotNull(handleIdentifier); |
217 |
Assert.isNotNull(handleIdentifier); |
| 197 |
File file = getFileForContext(handleIdentifier); |
218 |
File file = getFileForContext(handleIdentifier); |