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 108677 Details for
Bug 242428
[api] provide a global context API
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]
my version of global context API
clipboard.txt (text/plain), 3.72 KB, created by
Jingwen 'Owen' Ou
on 2008-07-29 13:50:24 EDT
(
hide
)
Description:
my version of global context API
Filename:
MIME Type:
Creator:
Jingwen 'Owen' Ou
Created:
2008-07-29 13:50:24 EDT
Size:
3.72 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.context.core >Index: src/org/eclipse/mylyn/context/core/IInteractionContextManager.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.context.core/src/org/eclipse/mylyn/context/core/IInteractionContextManager.java,v >retrieving revision 1.11 >diff -u -r1.11 IInteractionContextManager.java >--- src/org/eclipse/mylyn/context/core/IInteractionContextManager.java 5 Jun 2008 04:59:33 -0000 1.11 >+++ src/org/eclipse/mylyn/context/core/IInteractionContextManager.java 29 Jul 2008 17:47:38 -0000 >@@ -8,6 +8,7 @@ > > package org.eclipse.mylyn.context.core; > >+import java.util.Collection; > import java.util.Set; > > import org.eclipse.mylyn.monitor.core.InteractionEvent; >@@ -63,4 +64,14 @@ > * NOTE: If pausing ensure to restore to original state. > */ > public void setContextCapturePaused(boolean paused); >+ >+ /** >+ * global context that works even if no task is activated >+ */ >+ public abstract void addGlobalContext(IInteractionContext context); >+ >+ public abstract Collection<IInteractionContext> getGlobalContexts(); >+ >+ public abstract void removeGlobalContext(IInteractionContext context); >+ > } >\ No newline at end of file >Index: src/org/eclipse/mylyn/internal/context/core/InteractionContextManager.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.context.core/src/org/eclipse/mylyn/internal/context/core/InteractionContextManager.java,v >retrieving revision 1.63 >diff -u -r1.63 InteractionContextManager.java >--- src/org/eclipse/mylyn/internal/context/core/InteractionContextManager.java 15 Jul 2008 20:20:54 -0000 1.63 >+++ src/org/eclipse/mylyn/internal/context/core/InteractionContextManager.java 29 Jul 2008 17:47:38 -0000 >@@ -930,13 +930,13 @@ > } > } > for (IInteractionContext globalContext : globalContexts) { >- if (globalContext.getContentLimitedTo().equals(event.getStructureKind())) { >- List<IInteractionElement> interestDelta = internalProcessInteractionEvent(event, globalContext, >- propagateToParents); >- if (notifyListeners && !alreadyNotified) { >- notifyInterestDelta(interestDelta); >- } >+ //if (globalContext.getContentLimitedTo().equals(event.getStructureKind())) { >+ List<IInteractionElement> interestDelta = internalProcessInteractionEvent(event, globalContext, >+ propagateToParents); >+ if (notifyListeners && !alreadyNotified) { >+ notifyInterestDelta(interestDelta); > } >+ //} > } > > return activeContext.get(event.getStructureHandle()); >#P org.eclipse.mylyn.monitor.ui >Index: src/org/eclipse/mylyn/monitor/ui/AbstractUserInteractionMonitor.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.monitor.ui/src/org/eclipse/mylyn/monitor/ui/AbstractUserInteractionMonitor.java,v >retrieving revision 1.19 >diff -u -r1.19 AbstractUserInteractionMonitor.java >--- src/org/eclipse/mylyn/monitor/ui/AbstractUserInteractionMonitor.java 29 Apr 2008 23:30:26 -0000 1.19 >+++ src/org/eclipse/mylyn/monitor/ui/AbstractUserInteractionMonitor.java 29 Jul 2008 17:47:39 -0000 >@@ -63,7 +63,9 @@ > if (selection == null || selection.isEmpty()) { > return; > } >- if (!ContextCore.getContextManager().isContextActive()) { >+ // no task is activated plus no global context is available, then stop contributing to context >+ if (!ContextCore.getContextManager().isContextActive() >+ && ContextCore.getContextManager().getGlobalContexts().size() <= 0) { > handleWorkbenchPartSelection(part, selection, false); > } else { > handleWorkbenchPartSelection(part, selection, true);
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 242428
: 108677