Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 242428
Collapse All | Expand All

(-)src/org/eclipse/mylyn/context/core/IInteractionContextManager.java (+11 lines)
Lines 8-13 Link Here
8
8
9
package org.eclipse.mylyn.context.core;
9
package org.eclipse.mylyn.context.core;
10
10
11
import java.util.Collection;
11
import java.util.Set;
12
import java.util.Set;
12
13
13
import org.eclipse.mylyn.monitor.core.InteractionEvent;
14
import org.eclipse.mylyn.monitor.core.InteractionEvent;
Lines 63-66 Link Here
63
	 * NOTE: If pausing ensure to restore to original state.
64
	 * NOTE: If pausing ensure to restore to original state.
64
	 */
65
	 */
65
	public void setContextCapturePaused(boolean paused);
66
	public void setContextCapturePaused(boolean paused);
67
68
	/**
69
	 * global context that works even if no task is activated
70
	 */
71
	public abstract void addGlobalContext(IInteractionContext context);
72
73
	public abstract Collection<IInteractionContext> getGlobalContexts();
74
75
	public abstract void removeGlobalContext(IInteractionContext context);
76
66
}
77
}
(-)src/org/eclipse/mylyn/internal/context/core/InteractionContextManager.java (-6 / +6 lines)
Lines 930-942 Link Here
930
			}
930
			}
931
		}
931
		}
932
		for (IInteractionContext globalContext : globalContexts) {
932
		for (IInteractionContext globalContext : globalContexts) {
933
			if (globalContext.getContentLimitedTo().equals(event.getStructureKind())) {
933
			//if (globalContext.getContentLimitedTo().equals(event.getStructureKind())) {
934
				List<IInteractionElement> interestDelta = internalProcessInteractionEvent(event, globalContext,
934
			List<IInteractionElement> interestDelta = internalProcessInteractionEvent(event, globalContext,
935
						propagateToParents);
935
					propagateToParents);
936
				if (notifyListeners && !alreadyNotified) {
936
			if (notifyListeners && !alreadyNotified) {
937
					notifyInterestDelta(interestDelta);
937
				notifyInterestDelta(interestDelta);
938
				}
939
			}
938
			}
939
			//}
940
		}
940
		}
941
941
942
		return activeContext.get(event.getStructureHandle());
942
		return activeContext.get(event.getStructureHandle());
(-)src/org/eclipse/mylyn/monitor/ui/AbstractUserInteractionMonitor.java (-1 / +3 lines)
Lines 63-69 Link Here
63
		if (selection == null || selection.isEmpty()) {
63
		if (selection == null || selection.isEmpty()) {
64
			return;
64
			return;
65
		}
65
		}
66
		if (!ContextCore.getContextManager().isContextActive()) {
66
		// no task is activated plus no global context is available, then stop contributing to context
67
		if (!ContextCore.getContextManager().isContextActive()
68
				&& ContextCore.getContextManager().getGlobalContexts().size() <= 0) {
67
			handleWorkbenchPartSelection(part, selection, false);
69
			handleWorkbenchPartSelection(part, selection, false);
68
		} else {
70
		} else {
69
			handleWorkbenchPartSelection(part, selection, true);
71
			handleWorkbenchPartSelection(part, selection, true);

Return to bug 242428