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 178105 Details for
Bug 282436
[performance][context] remove From Context hangs eclipse
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]
patch
clipboard.txt (text/plain), 6.38 KB, created by
Shawn Minto
on 2010-09-02 17:17:29 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Shawn Minto
Created:
2010-09-02 17:17:29 EDT
Size:
6.38 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.context.core >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.85 >diff -u -r1.85 InteractionContextManager.java >--- src/org/eclipse/mylyn/internal/context/core/InteractionContextManager.java 8 Jun 2010 23:06:18 -0000 1.85 >+++ src/org/eclipse/mylyn/internal/context/core/InteractionContextManager.java 2 Sep 2010 21:13:41 -0000 >@@ -39,12 +39,12 @@ > import org.eclipse.mylyn.context.core.AbstractContextListener; > import org.eclipse.mylyn.context.core.AbstractContextStructureBridge; > import org.eclipse.mylyn.context.core.ContextChangeEvent; >+import org.eclipse.mylyn.context.core.ContextChangeEvent.ContextChangeKind; > import org.eclipse.mylyn.context.core.ContextCore; > import org.eclipse.mylyn.context.core.IInteractionContext; > import org.eclipse.mylyn.context.core.IInteractionContextManager; > import org.eclipse.mylyn.context.core.IInteractionElement; > import org.eclipse.mylyn.context.core.IInteractionRelation; >-import org.eclipse.mylyn.context.core.ContextChangeEvent.ContextChangeKind; > import org.eclipse.mylyn.monitor.core.InteractionEvent; > import org.eclipse.mylyn.monitor.core.InteractionEvent.Kind; > >@@ -804,8 +804,9 @@ > > if (activityMetaContext == null) { > resetActivityMetaContext(); >- } else if (!ContextCorePlugin.getDefault().getPluginPreferences().getBoolean( >- PREFERENCE_ATTENTION_MIGRATED)) { >+ } else if (!ContextCorePlugin.getDefault() >+ .getPluginPreferences() >+ .getBoolean(PREFERENCE_ATTENTION_MIGRATED)) { > activityMetaContext = migrateLegacyActivity(activityMetaContext); > saveActivityMetaContext(); > ContextCorePlugin.getDefault().getPluginPreferences().setValue(PREFERENCE_ATTENTION_MIGRATED, true); >@@ -919,6 +920,29 @@ > /** > * @return true if interest was manipulated successfully > */ >+ public boolean manipulateInterestForElements(List<IInteractionElement> elements, boolean increment, >+ boolean forceLandmark, boolean preserveUninteresting, String sourceId, IInteractionContext context, >+ boolean isExplicitManipulation) { >+ Set<IInteractionElement> changedElements = new HashSet<IInteractionElement>(); >+ boolean manipulated = false; >+ for (IInteractionElement element : elements) { >+ manipulated |= manipulateInterestForElementHelper(element, increment, forceLandmark, preserveUninteresting, >+ sourceId, context, changedElements, null, isExplicitManipulation); >+ } >+ if (manipulated) { >+ if (preserveUninteresting || increment) { >+ notifyInterestDelta(new ArrayList<IInteractionElement>(changedElements)); >+ } else { >+ notifyElementsDeleted(context, new ArrayList<IInteractionElement>(changedElements), >+ isExplicitManipulation); >+ } >+ } >+ return manipulated; >+ } >+ >+ /** >+ * @return true if interest was manipulated successfully >+ */ > public boolean manipulateInterestForElement(IInteractionElement element, boolean increment, boolean forceLandmark, > boolean preserveUninteresting, String sourceId, IInteractionContext context, boolean isExplicitManipulation) { > Set<IInteractionElement> changedElements = new HashSet<IInteractionElement>(); >@@ -1491,4 +1515,5 @@ > } > } > } >+ > } >#P org.eclipse.mylyn.context.ui >Index: src/org/eclipse/mylyn/internal/context/ui/actions/AbstractInterestManipulationAction.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal/context/ui/actions/AbstractInterestManipulationAction.java,v >retrieving revision 1.28 >diff -u -r1.28 AbstractInterestManipulationAction.java >--- src/org/eclipse/mylyn/internal/context/ui/actions/AbstractInterestManipulationAction.java 8 Jun 2010 23:04:49 -0000 1.28 >+++ src/org/eclipse/mylyn/internal/context/ui/actions/AbstractInterestManipulationAction.java 2 Sep 2010 21:13:41 -0000 >@@ -11,6 +11,9 @@ > > package org.eclipse.mylyn.internal.context.ui.actions; > >+import java.util.ArrayList; >+import java.util.List; >+ > import org.eclipse.jface.action.IAction; > import org.eclipse.jface.dialogs.MessageDialog; > import org.eclipse.jface.viewers.ISelection; >@@ -77,30 +80,33 @@ > > if (selection instanceof StructuredSelection) { > StructuredSelection structuredSelection = (StructuredSelection) selection; >+ List<IInteractionElement> nodes = new ArrayList<IInteractionElement>(); > for (Object object : structuredSelection.toList()) { > IInteractionElement node = convertSelectionToInteractionElement(object); >- if (node != null) { >- if (!increment) { >- try { >- // NOTE: need to set the selection null so the >- // automatic reselection does not induce interest >- PlatformUI.getWorkbench() >- .getActiveWorkbenchWindow() >- .getActivePage() >- .getActivePart() >- .getSite() >- .getSelectionProvider() >- .setSelection(null); >- } catch (Exception e) { >- // ignore >- } >- } >- boolean manipulated = ContextCorePlugin.getContextManager().manipulateInterestForElement(node, >- increment, false, preserveUninteresting, SOURCE_ID, getContext(), true); >- if (!manipulated) { >- AbstractInterestManipulationAction.displayInterestManipulationFailure(); >+ nodes.add(node); >+ } >+ >+ if (nodes != null && nodes.size() > 0) { >+ if (!increment) { >+ try { >+ // NOTE: need to set the selection null so the >+ // automatic reselection does not induce interest >+ PlatformUI.getWorkbench() >+ .getActiveWorkbenchWindow() >+ .getActivePage() >+ .getActivePart() >+ .getSite() >+ .getSelectionProvider() >+ .setSelection(null); >+ } catch (Exception e) { >+ // ignore > } > } >+ boolean manipulated = ContextCorePlugin.getContextManager().manipulateInterestForElements(nodes, >+ increment, false, preserveUninteresting, SOURCE_ID, getContext(), true); >+ if (!manipulated) { >+ AbstractInterestManipulationAction.displayInterestManipulationFailure(); >+ } > } > } else { > IInteractionElement node = ContextCore.getContextManager().getActiveElement();
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 282436
:
174112
| 178105 |
178106
|
178461
|
178462