Bug 463245 - Debug toolbar items not visible until restart

Change-Id: I4a5040cb086100326088404f8a3681c949e59ba9
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
diff --git a/bundles/org.eclipse.e4.ui.widgets/src/org/eclipse/e4/ui/widgets/ImageBasedFrame.java b/bundles/org.eclipse.e4.ui.widgets/src/org/eclipse/e4/ui/widgets/ImageBasedFrame.java
index 753d0eb..bbe3516 100644
--- a/bundles/org.eclipse.e4.ui.widgets/src/org/eclipse/e4/ui/widgets/ImageBasedFrame.java
+++ b/bundles/org.eclipse.e4.ui.widgets/src/org/eclipse/e4/ui/widgets/ImageBasedFrame.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2014 IBM Corporation and others.
+ * Copyright (c) 2012, 2015 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
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Marc-Andre Laperle (Ericsson) - Bug 463245
  ******************************************************************************/
 package org.eclipse.e4.ui.widgets;
 
@@ -99,13 +100,11 @@
 			}
 
 			public void controlMoved(ControlEvent e) {
+				// Bug 463245 - The framed control should always stay at the same location
+				setFramedControlLocation();
 			}
 		});
-		if (vertical) {
-			toWrap.setLocation(w1, h1 + handleHeight);
-		} else {
-			toWrap.setLocation(w1 + handleWidth, h1);
-		}
+		setFramedControlLocation();
 		setSize(computeSize(-1, -1));
 
 		if (toWrap instanceof ToolBar) {
@@ -113,6 +112,14 @@
 		}
 	}
 
+	private void setFramedControlLocation() {
+		if (vertical) {
+			framedControl.setLocation(w1, h1 + handleHeight);
+		} else {
+			framedControl.setLocation(w1 + handleWidth, h1);
+		}
+	}
+
 	public Rectangle getHandleRect() {
 		Rectangle handleRect = new Rectangle(0, 0, 0, 0);
 		if (!draggable || handle.isDisposed())