Author: rob.stryker(a)jboss.com
Date: 2007-09-26 17:27:42 -0400 (Wed, 26 Sep 2007)
New Revision: 3828
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/ViewUtilityMethods.java
Log:
error caused in UI when trying to activate parts when other part is in the middle of being
activated
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java 2007-09-26
20:37:00 UTC (rev 3827)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java 2007-09-26
21:27:42 UTC (rev 3828)
@@ -121,7 +121,12 @@
if( element != null //)&& element != provider.getActiveCategory()
&& element instanceof XPathCategory) {
// show loading
- book.showPage(loading);
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ book.showPage(loading);
+ }
+ });
+
final XPathCategory cat = (XPathCategory)element;
new Thread() {
public void run() {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/ViewUtilityMethods.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/ViewUtilityMethods.java 2007-09-26
20:37:00 UTC (rev 3827)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/ViewUtilityMethods.java 2007-09-26
21:27:42 UTC (rev 3828)
@@ -1,5 +1,6 @@
package org.jboss.ide.eclipse.as.ui.views.server.util;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
@@ -13,20 +14,23 @@
public class ViewUtilityMethods {
- public static void activatePropertiesView(IPropertySheetPage propertyPage) {
+ public static void activatePropertiesView(final IPropertySheetPage propertyPage) {
// show properties view
- String propsId = "org.eclipse.ui.views.PropertySheet";
- try {
- IWorkbench work = PlatformUI.getWorkbench();
- IWorkbenchWindow window = work.getActiveWorkbenchWindow();
- if( !isPropertiesOnTop()) {
- window.getActivePage().showView(propsId);
- if( propertyPage != null ) {
- propertyPage.selectionChanged(JBossServerView.getDefault().getViewSite().getPart(),
JBossServerView.getDefault().getExtensionFrame().getViewer().getSelection());
+ Runnable run = new Runnable() { public void run() {
+ String propsId = "org.eclipse.ui.views.PropertySheet";
+ try {
+ IWorkbench work = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = work.getActiveWorkbenchWindow();
+ if( !isPropertiesOnTop()) {
+ window.getActivePage().showView(propsId);
+ if( propertyPage != null ) {
+ propertyPage.selectionChanged(JBossServerView.getDefault().getViewSite().getPart(),
JBossServerView.getDefault().getExtensionFrame().getViewer().getSelection());
+ }
}
+ } catch( PartInitException pie ) {
}
- } catch( PartInitException pie ) {
- }
+ }};
+ Display.getDefault().asyncExec(run);
}
protected static boolean isPropertiesOnTop() {
Show replies by date