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 114572 Details for
Bug 249995
[Contexts] ContextAction's leak when hiding actions sets
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]
Context Activations v01
contexts-v01.txt (text/plain), 4.12 KB, created by
Paul Webster
on 2008-10-08 13:17:21 EDT
(
hide
)
Description:
Context Activations v01
Filename:
MIME Type:
Creator:
Paul Webster
Created:
2008-10-08 13:17:21 EDT
Size:
4.12 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/contexts/ContextService.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ContextService.java,v >retrieving revision 1.18 >diff -u -r1.18 ContextService.java >--- Eclipse UI/org/eclipse/ui/internal/contexts/ContextService.java 8 May 2006 20:55:32 -0000 1.18 >+++ Eclipse UI/org/eclipse/ui/internal/contexts/ContextService.java 8 Oct 2008 17:16:08 -0000 >@@ -49,6 +49,10 @@ > */ > private final ContextPersistence contextPersistence; > >+ private ContextActivation SEND_ACTIVATION; >+ >+ private ContextActivation DEFER_ACTIVATION; >+ > /** > * Constructs a new instance of <code>ContextService</code> using a > * context manager. >@@ -64,6 +68,8 @@ > this.contextManager = contextManager; > this.contextAuthority = new ContextAuthority(contextManager, this); > this.contextPersistence = new ContextPersistence(contextManager); >+ SEND_ACTIVATION = new ContextActivation(ContextAuthority.SEND_EVENTS, null, this); >+ DEFER_ACTIVATION = new ContextActivation(ContextAuthority.DEFER_EVENTS, null, this); > } > > /* >@@ -83,8 +89,14 @@ > */ > public final IContextActivation activateContext(final String contextId, > final Expression expression) { >- final IContextActivation activation = new ContextActivation(contextId, >- expression, this); >+ final IContextActivation activation; >+ if (ContextAuthority.SEND_EVENTS.equals(contextId)) { >+ activation = SEND_ACTIVATION; >+ } else if (ContextAuthority.DEFER_EVENTS.equals(contextId)) { >+ activation = DEFER_ACTIVATION; >+ } else { >+ activation = new ContextActivation(contextId, expression, this); >+ } > contextAuthority.activateContext(activation); > return activation; > } >Index: Eclipse UI/org/eclipse/ui/internal/contexts/SlaveContextService.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/SlaveContextService.java,v >retrieving revision 1.8 >diff -u -r1.8 SlaveContextService.java >--- Eclipse UI/org/eclipse/ui/internal/contexts/SlaveContextService.java 15 Aug 2006 17:00:38 -0000 1.8 >+++ Eclipse UI/org/eclipse/ui/internal/contexts/SlaveContextService.java 8 Oct 2008 17:16:08 -0000 >@@ -86,6 +86,10 @@ > */ > private Collection fRegisteredShells; > >+ private ContextActivation SEND_ACTIVATION; >+ >+ private ContextActivation DEFER_ACTIVATION; >+ > /** > * Construct the new slave. > * >@@ -109,6 +113,8 @@ > fContextManagerListeners = new ArrayList(); > fSourceProviders = new ArrayList(); > fRegisteredShells = new ArrayList(); >+ SEND_ACTIVATION = new ContextActivation(ContextAuthority.SEND_EVENTS, null, this); >+ DEFER_ACTIVATION = new ContextActivation(ContextAuthority.DEFER_EVENTS, null, this); > } > > /* >@@ -117,8 +123,15 @@ > * @see org.eclipse.ui.contexts.IContextService#activateContext(java.lang.String) > */ > public IContextActivation activateContext(String contextId) { >- ContextActivation activation = new ContextActivation(contextId, >- fDefaultExpression, this); >+ final ContextActivation activation; >+ if (ContextAuthority.SEND_EVENTS.equals(contextId)) { >+ activation = SEND_ACTIVATION; >+ } else if (ContextAuthority.DEFER_EVENTS.equals(contextId)) { >+ activation = DEFER_ACTIVATION; >+ } else { >+ activation = new ContextActivation(contextId, fDefaultExpression, >+ this); >+ } > return doActivateContext(activation); > } > >@@ -156,11 +169,17 @@ > andExpression.add(expression); > } > } >- if (fDefaultExpression!=null) { >+ if (fDefaultExpression != null) { > andExpression.add(fDefaultExpression); > } >- ContextActivation activation = new ContextActivation(contextId, >- andExpression, this); >+ final ContextActivation activation; >+ if (ContextAuthority.SEND_EVENTS.equals(contextId)) { >+ activation = SEND_ACTIVATION; >+ } else if (ContextAuthority.DEFER_EVENTS.equals(contextId)) { >+ activation = DEFER_ACTIVATION; >+ } else { >+ activation = new ContextActivation(contextId, andExpression, this); >+ } > return doActivateContext(activation); > } >
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 249995
:
114572
|
115395