Bug 47100 - TitleAreaDialog image has been disposed
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
index eb6720c..f1ced49 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
@@ -43,6 +43,7 @@
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -236,18 +237,7 @@
 		gd.horizontalSpan = 2;
 		fTabComposite.setLayoutData(gd);
 
-		TabFolder tabFolder = new TabFolder(fTabComposite, SWT.NONE);
-		setTabFolder(tabFolder);
-		gd = new GridData(GridData.FILL_BOTH);
-		tabFolder.setLayoutData(gd);
-		tabFolder.setFont(font);
-		getTabFolder().addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent event) {
-				if (!isInitializingTabs()) {
-					handleTabSelected();
-				}
-			}
-		});
+		createTabFolder(fTabComposite);
 
 		Composite buttonComp = new Composite(container, SWT.NONE);
 		GridLayout buttonCompLayout = new GridLayout();
@@ -283,6 +273,28 @@
 
 	}
 	
+	private void createTabFolder(Composite parent) {
+		Point size = null;
+		if (fTabFolder != null) {
+			size = fTabFolder.getSize();
+			fTabFolder.dispose();
+		}
+		fTabFolder = new TabFolder(parent, SWT.NONE);
+		GridData gd = new GridData(GridData.FILL_BOTH);
+		fTabFolder.setLayoutData(gd);
+		fTabFolder.setFont(parent.getFont());
+		if (size != null) {
+			fTabFolder.setSize(size);
+		}
+		getTabFolder().addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent event) {
+				if (!isInitializingTabs()) {
+					handleTabSelected();
+				}
+			}
+		});		
+	}
+	
 	/**
 	 * Sets the apply button
 	 */
@@ -314,13 +326,6 @@
 	/**
 	 * Sets the tab folder
 	 */
-	private void setTabFolder(TabFolder tabFolder) {
-		fTabFolder = tabFolder;
-	}
-	
-	/**
-	 * Sets the tab folder
-	 */
 	protected TabFolder getTabFolder() {
 		return fTabFolder;
 	}
@@ -1046,6 +1051,7 @@
 		for (int i = 0; i < oldTabs.length; i++) {
 			oldTabs[i].dispose();
 		}
+		createTabFolder(fTabComposite);
 		disposeTabGroup();
 		setDisposingTabs(false);
 	}