Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[371060] [hotbug] "Create a new local server" checkbox disappears

  • Loading branch information...
commit c985fd8bf7310c4411529e6639f590828231cf0e 1 parent f99e7c0
eyuen authored
17 .../org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/RuntimeTypeComposite.java
View
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2012 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,6 +11,7 @@
package org.eclipse.wst.server.ui.internal.viewers;
import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.SWTException;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
@@ -18,6 +19,7 @@
import org.eclipse.wst.server.discovery.Discovery;
import org.eclipse.wst.server.ui.internal.Messages;
import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
+import org.eclipse.wst.server.ui.internal.Trace;
/**
*
*/
@@ -85,8 +87,17 @@ public void setVisible(boolean visible) {
super.setVisible(visible);
if (visible && initialSelection) {
initialSelection = false;
- if (contentProvider.getInitialSelection() != null)
- treeViewer.setSelection(new StructuredSelection(contentProvider.getInitialSelection()), true);
+ if (contentProvider.getInitialSelection() != null) {
+ try {
+ getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ treeViewer.setSelection(new StructuredSelection(contentProvider.getInitialSelection()), true);
+ }
+ });
+ } catch (SWTException e) {
+ Trace.trace(Trace.STRING_INFO, "Failed to set the default selection on the runtime type tree.", e);
+ }
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.