RESOLVED - bug 104485: [context] broaden composite contexts to suppor persistent composite contexts
https://bugs.eclipse.org/bugs/show_bug.cgi?id=104485
diff --git a/org.eclipse.mylyn.examples.monitor.study/src/org/eclipse/mylyn/examples/monitor/study/SelectionMonitor.java b/org.eclipse.mylyn.examples.monitor.study/src/org/eclipse/mylyn/examples/monitor/study/SelectionMonitor.java
index cf2a740..a412adf 100644
--- a/org.eclipse.mylyn.examples.monitor.study/src/org/eclipse/mylyn/examples/monitor/study/SelectionMonitor.java
+++ b/org.eclipse.mylyn.examples.monitor.study/src/org/eclipse/mylyn/examples/monitor/study/SelectionMonitor.java
@@ -24,8 +24,8 @@
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.mylar.context.core.ContextCorePlugin;
-import org.eclipse.mylar.context.core.IMylarElement;
-import org.eclipse.mylar.internal.context.core.ContextManager;
+import org.eclipse.mylar.context.core.IInteractionElement;
+import org.eclipse.mylar.internal.context.core.InteractionContextManager;
import org.eclipse.mylar.monitor.core.InteractionEvent;
import org.eclipse.mylar.monitor.ui.AbstractUserInteractionMonitor;
import org.eclipse.mylar.monitor.ui.MonitorUiPlugin;
@@ -124,9 +124,9 @@
}
}
}
- IMylarElement node = ContextCorePlugin.getContextManager().getElement(elementHandle);
+ IInteractionElement node = ContextCorePlugin.getContextManager().getElement(elementHandle);
String delta = "";
- float selectionFactor = ContextManager.getScalingFactors().get(InteractionEvent.Kind.SELECTION).getValue();
+ float selectionFactor = InteractionContextManager.getScalingFactors().get(InteractionEvent.Kind.SELECTION).getValue();
if (node != null) {
if (node.getInterest().getEncodedValue() <= selectionFactor
diff --git a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/InteractionEventLogger.java b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/InteractionEventLogger.java
index 453ceb3..e098ff2 100644
--- a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/InteractionEventLogger.java
+++ b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/InteractionEventLogger.java
@@ -31,7 +31,7 @@
import org.eclipse.mylar.core.MylarStatusHandler;
import org.eclipse.mylar.core.net.HtmlStreamTokenizer;
import org.eclipse.mylar.core.net.HtmlStreamTokenizer.Token;
-import org.eclipse.mylar.internal.context.core.MylarContextExternalizer;
+import org.eclipse.mylar.internal.context.core.InteractionContextExternalizer;
import org.eclipse.mylar.internal.core.util.XmlStringConverter;
import org.eclipse.mylar.monitor.core.AbstractMonitorLog;
import org.eclipse.mylar.monitor.core.IInteractionEventListener;
@@ -155,7 +155,7 @@
String xml;
int index;
String buf = "";
- String tag = "</" + MylarContextExternalizer.ELMNT_INTERACTION_HISTORY_OLD + ">";
+ String tag = "</" + InteractionContextExternalizer.ELMNT_INTERACTION_HISTORY_OLD + ">";
String endl = "\r\n";
byte[] buffer = new byte[1000];
int bytesRead = 0;
diff --git a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/MylarUsageMonitorPlugin.java b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/MylarUsageMonitorPlugin.java
index 030fca2..e6db280 100644
--- a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/MylarUsageMonitorPlugin.java
+++ b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/MylarUsageMonitorPlugin.java
@@ -38,7 +38,7 @@
import org.eclipse.mylar.context.core.IContextStoreListener;
import org.eclipse.mylar.core.MylarStatusHandler;
import org.eclipse.mylar.core.net.WebClientUtil;
-import org.eclipse.mylar.internal.context.core.ContextManager;
+import org.eclipse.mylar.internal.context.core.InteractionContextManager;
import org.eclipse.mylar.internal.monitor.usage.wizards.NewUsageSummaryEditorWizard;
import org.eclipse.mylar.monitor.core.IInteractionEventListener;
import org.eclipse.mylar.monitor.ui.AbstractCommandMonitor;
@@ -465,7 +465,7 @@
rootDir = new File(getStateLocation().toString());
}
- File file = new File(rootDir, MONITOR_LOG_NAME + ContextManager.CONTEXT_FILE_EXTENSION_OLD);
+ File file = new File(rootDir, MONITOR_LOG_NAME + InteractionContextManager.CONTEXT_FILE_EXTENSION_OLD);
// File oldFile = new
// File(ContextCorePlugin.getDefault().getContextStore().getRootDirectory(),
diff --git a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/SharedTaskFolderTest.java b/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/SharedTaskFolderTest.java
index f37a30a..b2b4e2b 100644
--- a/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/SharedTaskFolderTest.java
+++ b/org.eclipse.mylyn.sandbox.tests/src/org/eclipse/mylyn/sandbox/tests/SharedTaskFolderTest.java
@@ -10,7 +10,7 @@
import junit.framework.TestCase;
import org.eclipse.mylar.context.core.ContextCorePlugin;
-import org.eclipse.mylar.internal.context.core.MylarContext;
+import org.eclipse.mylar.internal.context.core.InteractionContext;
import org.eclipse.mylar.internal.sandbox.MylarSandboxPlugin;
import org.eclipse.mylar.internal.sandbox.share.SwitchTaskDataFolderAction;
import org.eclipse.mylar.monitor.core.InteractionEvent;
@@ -147,7 +147,7 @@
//Create the task and add it to the root of the task list
ITask newTask = new Task(TasksUiPlugin.getTaskListManager().genUniqueTaskHandle(), taskName, true);
manager.getTaskList().moveToRoot(newTask);
- MylarContext mockContext = ContextCorePlugin.getContextManager().loadContext(newTask.getHandleIdentifier());//, newTask.getContextPath());
+ InteractionContext mockContext = ContextCorePlugin.getContextManager().loadContext(newTask.getHandleIdentifier());//, newTask.getContextPath());
InteractionEvent event = new InteractionEvent(InteractionEvent.Kind.EDIT,"structureKind","handle","originId");
mockContext.parseEvent(event);
ContextCorePlugin.getContextManager().activateContext(mockContext);
diff --git a/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/bridge/bugs/BugzillaContextLabelProvider.java b/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/bridge/bugs/BugzillaContextLabelProvider.java
index 3aee9d4..fb21164 100644
--- a/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/bridge/bugs/BugzillaContextLabelProvider.java
+++ b/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/bridge/bugs/BugzillaContextLabelProvider.java
@@ -11,8 +11,8 @@
package org.eclipse.mylar.internal.sandbox.bridge.bugs;
-import org.eclipse.mylar.context.core.IMylarElement;
-import org.eclipse.mylar.context.core.IMylarRelation;
+import org.eclipse.mylar.context.core.IInteractionElement;
+import org.eclipse.mylar.context.core.IInteractionRelation;
import org.eclipse.mylar.context.core.AbstractContextStructureBridge;
import org.eclipse.mylar.context.core.ContextCorePlugin;
import org.eclipse.mylar.internal.context.ui.AbstractContextLabelProvider;
@@ -26,12 +26,12 @@
public class BugzillaContextLabelProvider extends AbstractContextLabelProvider {
@Override
- protected Image getImage(IMylarElement node) {
+ protected Image getImage(IInteractionElement node) {
return TasksUiImages.getImage(TasksUiImages.TASK_REMOTE);
}
@Override
- protected Image getImage(IMylarRelation edge) {
+ protected Image getImage(IInteractionRelation edge) {
return ContextUiImages.getImage(MylarBugsManager.EDGE_REF_BUGZILLA);
}
@@ -49,7 +49,7 @@
* TODO: slow?
*/
@Override
- protected String getText(IMylarElement node) {
+ protected String getText(IInteractionElement node) {
// try to get from the cache before downloading
Object report;
BugzillaReportInfo reportNode = MylarBugsManager.getReferenceProvider().getCached(node.getHandleIdentifier());
@@ -66,7 +66,7 @@
}
@Override
- protected String getText(IMylarRelation edge) {
+ protected String getText(IInteractionRelation edge) {
return BugzillaReferencesProvider.NAME;
}
}
diff --git a/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/bridge/bugs/BugzillaReferencesProvider.java b/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/bridge/bugs/BugzillaReferencesProvider.java
index 6ef8f37..c41f117 100644
--- a/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/bridge/bugs/BugzillaReferencesProvider.java
+++ b/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/bridge/bugs/BugzillaReferencesProvider.java
@@ -28,7 +28,7 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.mylar.context.core.AbstractRelationProvider;
import org.eclipse.mylar.context.core.IDegreeOfSeparation;
-import org.eclipse.mylar.context.core.IMylarElement;
+import org.eclipse.mylar.context.core.IInteractionElement;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaCorePlugin;
import org.eclipse.mylar.internal.context.core.DegreeOfSeparation;
import org.eclipse.mylar.internal.context.core.IActiveSearchListener;
@@ -73,7 +73,7 @@
* HACK: checking kind as string - don't want the dependancy to mylar.java
*/
@Override
- protected void findRelated(final IMylarElement node, int degreeOfSeparation) {
+ protected void findRelated(final IInteractionElement node, int degreeOfSeparation) {
if (!node.getContentType().equals("java"))
return;
IJavaElement javaElement = JavaCore.create(node.getHandleIdentifier());
@@ -84,7 +84,7 @@
}
@Override
- public IMylarSearchOperation getSearchOperation(IMylarElement node, int limitTo, int degreeOfSepatation) {
+ public IMylarSearchOperation getSearchOperation(IInteractionElement node, int limitTo, int degreeOfSepatation) {
IJavaElement javaElement = JavaCore.create(node.getHandleIdentifier());
TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepositoryForActiveTask(
@@ -92,7 +92,7 @@
return new BugzillaMylarSearch(degreeOfSepatation, javaElement, repository.getUrl());
}
- private void runJob(final IMylarElement node, final int degreeOfSeparation) {
+ private void runJob(final IInteractionElement node, final int degreeOfSeparation) {
BugzillaMylarSearch search = (BugzillaMylarSearch) getSearchOperation(node, 0, degreeOfSeparation);
search.addListener(new IActiveSearchListener() {
diff --git a/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/bridge/bugs/BugzillaUiBridge.java b/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/bridge/bugs/BugzillaUiBridge.java
index 46e1b32..e4576dd 100644
--- a/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/bridge/bugs/BugzillaUiBridge.java
+++ b/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/bridge/bugs/BugzillaUiBridge.java
@@ -19,7 +19,7 @@
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.mylar.context.core.IMylarElement;
+import org.eclipse.mylar.context.core.IInteractionElement;
import org.eclipse.mylar.context.ui.AbstractContextUiBridge;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaClient;
import org.eclipse.mylar.internal.tasks.ui.editors.RepositoryTaskOutlinePage;
@@ -42,7 +42,7 @@
protected BugzillaContextLabelProvider labelProvider = new BugzillaContextLabelProvider();
- public void open(IMylarElement node) {
+ public void open(IInteractionElement node) {
String handle = node.getHandleIdentifier();
String bugHandle = handle;
String server = handle.substring(0, handle.indexOf(";"));
@@ -71,7 +71,7 @@
return labelProvider;
}
- public void close(IMylarElement node) {
+ public void close(IInteractionElement node) {
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
if (page != null) {
IEditorReference[] references = page.getEditorReferences();
@@ -114,11 +114,11 @@
return null;
}
- public void restoreEditor(IMylarElement document) {
+ public void restoreEditor(IInteractionElement document) {
// ignore
}
- public IMylarElement getElement(IEditorInput input) {
+ public IInteractionElement getElement(IEditorInput input) {
return null;
}
diff --git a/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/devtools/InterestDebuggingDecorator.java b/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/devtools/InterestDebuggingDecorator.java
index 4a93232..2277767 100644
--- a/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/devtools/InterestDebuggingDecorator.java
+++ b/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/devtools/InterestDebuggingDecorator.java
@@ -17,10 +17,10 @@
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ILightweightLabelDecorator;
import org.eclipse.mylar.context.core.ContextCorePlugin;
-import org.eclipse.mylar.context.core.IMylarElement;
+import org.eclipse.mylar.context.core.IInteractionElement;
import org.eclipse.mylar.context.core.AbstractContextStructureBridge;
import org.eclipse.mylar.core.MylarStatusHandler;
-import org.eclipse.mylar.internal.context.core.MylarContextRelation;
+import org.eclipse.mylar.internal.context.core.InteractionContextRelation;
import org.eclipse.mylar.internal.context.ui.ColorMap;
/**
@@ -42,11 +42,11 @@
// ignored, because we can add structure bridges during decoration
}
try {
- IMylarElement node = null;
- if (element instanceof MylarContextRelation) {
+ IInteractionElement node = null;
+ if (element instanceof InteractionContextRelation) {
decoration.setForegroundColor(ColorMap.RELATIONSHIP);
- } else if (element instanceof IMylarElement) {
- node = (IMylarElement) element;
+ } else if (element instanceof IInteractionElement) {
+ node = (IInteractionElement) element;
} else {
if (bridge != null && bridge.getContentType() != null) {
node = ContextCorePlugin.getContextManager().getElement(bridge.getHandleIdentifier(element));
diff --git a/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/devtools/IntrospectObjectAction.java b/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/devtools/IntrospectObjectAction.java
index cc43059..e30fdc4 100644
--- a/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/devtools/IntrospectObjectAction.java
+++ b/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/devtools/IntrospectObjectAction.java
@@ -19,7 +19,7 @@
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.mylar.context.core.AbstractContextStructureBridge;
import org.eclipse.mylar.context.core.ContextCorePlugin;
-import org.eclipse.mylar.context.core.IMylarElement;
+import org.eclipse.mylar.context.core.IInteractionElement;
import org.eclipse.mylar.tasks.core.AbstractQueryHit;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
import org.eclipse.mylar.tasks.core.ITask;
@@ -48,7 +48,7 @@
try {
AbstractContextStructureBridge bridge = ContextCorePlugin.getDefault().getStructureBridge(object);
- IMylarElement node = ContextCorePlugin.getContextManager().getElement(bridge.getHandleIdentifier(object));
+ IInteractionElement node = ContextCorePlugin.getContextManager().getElement(bridge.getHandleIdentifier(object));
if (node != null) {
text += "Interest value: " + node.getInterest().getValue() + "\n";
text += node.getInterest().toString();