summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorOliver Puetter2013-12-03 11:30:17 (EST)
committer Gerrit Code Review @ Eclipse.org2013-12-17 04:56:18 (EST)
commit9d4f71484d3b007fe86e292d00c5ecb02b9de5ab (patch)
treebaea24c642dcbf7cc6b0a9aa90cb720d075f0b87
parent7100b5419eb9ccf20faab903bded57be07355a8e (diff)
downloadeclipse.platform.ui-9d4f71484d3b007fe86e292d00c5ecb02b9de5ab.zip
eclipse.platform.ui-9d4f71484d3b007fe86e292d00c5ecb02b9de5ab.tar.gz
eclipse.platform.ui-9d4f71484d3b007fe86e292d00c5ecb02b9de5ab.tar.bz2
Bug 423040 - activePart within SelectionAggregator is not set to NULLI20131217-0800refs/changes/03/19303/5
If all parts within the workbench are closed the method setPart of the SelectionAggregator is called with parameter part = null. In this case the active part has to be set to null. Otherwise there is an inconsistent state of the selection aggregator if one part is reopened. The selection of the newly opened part would not be tracked correctly. Change-Id: I4adc486f5ba1e78bffbcc4ae3a8a333c596e3733 Signed-off-by: Oliver Puetter <oliver.puetter@dew-stahl.com>
-rw-r--r--bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/SelectionAggregator.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/SelectionAggregator.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/SelectionAggregator.java
index 41352cc..0f6d36d 100644
--- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/SelectionAggregator.java
+++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/SelectionAggregator.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Oliver Puetter - activePart set to NULL when all parts are closed (http://bugs.eclipse.org/423040)
******************************************************************************/
package org.eclipse.e4.ui.internal.workbench;
@@ -97,7 +98,10 @@ public class SelectionAggregator {
@Inject
void setPart(@Optional @Named(IServiceConstants.ACTIVE_PART) final MPart part) {
- if ((part != null) && (activePart != part)) {
+ if (part == null) {
+ activePart = null;
+ context.set(IServiceConstants.ACTIVE_SELECTION, null);
+ } else if (activePart != part) {
activePart = part;
IEclipseContext partContext = part.getContext();
if (partContext.containsKey(OUT_POST_SELECTION)) {