aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Rolka2014-11-26 09:58:47 -0500
committerDaniel Rolka2014-11-26 10:00:57 -0500
commitbe55890e582c88abea7e13fd2221bc51ed9b9088 (patch)
tree4391d05b2d95796bd143836e0e8ae13798457f3e
parent2c4747fad7e34001fbffb394eb4458c0d630c052 (diff)
downloadeclipse.platform.ui-be55890e582c88abea7e13fd2221bc51ed9b9088.zip
eclipse.platform.ui-be55890e582c88abea7e13fd2221bc51ed9b9088.tar.gz
eclipse.platform.ui-be55890e582c88abea7e13fd2221bc51ed9b9088.tar.xz
Bug 432498 - [Trim] Fast views get created on start-up
Adjustments to review comments Change-Id: Ib76ced0d0489ba17bacd7695a90838ac0fd1bc34 Signed-off-by: Daniel Rolka <daniel.rolka@pl.ibm.com>
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java16
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java3
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/CSSConstants.java6
3 files changed, 19 insertions, 6 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java b/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java
index 63d9064..729e684 100644
--- a/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java
+++ b/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java
@@ -923,6 +923,20 @@ public class TrimStack {
minimizedElement.setVisible(true);
minimizedElement.getTags().remove(IPresentationEngine.MINIMIZED);
+
+ // Activate the part that is being brought up...
+ if (minimizedElement instanceof MPartStack) {
+ MPartStack theStack = (MPartStack) minimizedElement;
+ MStackElement curSel = theStack.getSelectedElement();
+ Control ctrl = (Control) minimizedElement.getWidget();
+
+ // Hack for elems that are lazy initialized
+ if (ctrl instanceof CTabFolder && ((CTabFolder) ctrl).getSelection() == null) {
+ theStack.setSelectedElement(null);
+ theStack.setSelectedElement(curSel);
+ }
+ }
+
toolControl.setToBeRendered(false);
if (hostPane != null && !hostPane.isDisposed())
@@ -952,7 +966,7 @@ public class TrimStack {
// Hack ! Force a resize of the CTF to make sure the hosted
// view is the correct size...see bug 434062 for details
- if (ctrl != null) {
+ if (ctf != null) {
Rectangle bb = ctf.getBounds();
bb.width--;
ctf.setBounds(bb);
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
index 76dc39a..f4b4e97 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
@@ -146,9 +146,6 @@ public class StackRenderer extends LazyStackRenderer {
@Inject
IPresentationEngine renderer;
- @Inject
- EModelService modelService;
-
private EventHandler itemUpdater;
private EventHandler dirtyUpdater;
diff --git a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/CSSConstants.java b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/CSSConstants.java
index 75c6ce5..b170581 100644
--- a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/CSSConstants.java
+++ b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/CSSConstants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013 IBM Corporation and others.
+ * Copyright (c) 2013, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,10 +11,12 @@
package org.eclipse.e4.ui.internal.workbench.swt;
+import org.eclipse.e4.ui.workbench.IPresentationEngine;
+
public class CSSConstants {
public static final String CSS_BUSY_CLASS = "busy";
- public static final String CSS_ACTIVE_CLASS = "active";
+ public static final String CSS_ACTIVE_CLASS = IPresentationEngine.ACTIVE;
public static final String CSS_NO_FOCUS_CLASS = "noFocus";