[jbosstools-commits] JBoss Tools SVN: r43995 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Sep 25 10:03:04 EDT 2012


Author: snjeza
Date: 2012-09-25 10:03:04 -0400 (Tue, 25 Sep 2012)
New Revision: 43995

Modified:
   trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
Log:
JBIDE-12598 - Central does not open when the Welcome page is active

Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java	2012-09-25 13:51:52 UTC (rev 43994)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java	2012-09-25 14:03:04 UTC (rev 43995)
@@ -284,37 +284,37 @@
 		final WorkbenchWindow window = (WorkbenchWindow) PlatformUI
 				.getWorkbench().getActiveWorkbenchWindow();
 		final IWorkbenchPage page = window.getActivePage();
-		if (page.findView(ORG_ECLIPSE_UI_INTERNAL_INTROVIEW) != null
-				&& !window.getCoolBarVisible()
-				&& !window.getPerspectiveBarVisible()) {
-			IViewReference viewRef = page
-					.findViewReference(ORG_ECLIPSE_UI_INTERNAL_INTROVIEW);
-			if (page.getPartState(viewRef) == IWorkbenchPage.STATE_MAXIMIZED) {
-				window.addPropertyChangeListener(new IPropertyChangeListener() {
-
-					@Override
-					public void propertyChange(PropertyChangeEvent event) {
-						String property = event.getProperty();
-						if (WorkbenchWindow.PROP_COOLBAR_VISIBLE
-								.equals(property)
-								|| WorkbenchWindow.PROP_COOLBAR_VISIBLE
-										.equals(property)) {
-							Object newValue = event.getNewValue();
-							if (newValue instanceof Boolean
-									&& ((Boolean) newValue).booleanValue()) {
-								openJBossCentralEditor(page);
-								window.removePropertyChangeListener(this);
-							}
-						}
-					}
-				});
-			} else {
-				return openJBossCentralEditor(page);
-			}
-		} else {
-			return openJBossCentralEditor(page);
-		}
-		return null;
+//		if (page.findView(ORG_ECLIPSE_UI_INTERNAL_INTROVIEW) != null
+//				&& !window.getCoolBarVisible()
+//				&& !window.getPerspectiveBarVisible()) {
+//			IViewReference viewRef = page
+//					.findViewReference(ORG_ECLIPSE_UI_INTERNAL_INTROVIEW);
+//			if (page.getPartState(viewRef) == IWorkbenchPage.STATE_MAXIMIZED) {
+//				window.addPropertyChangeListener(new IPropertyChangeListener() {
+//
+//					@Override
+//					public void propertyChange(PropertyChangeEvent event) {
+//						String property = event.getProperty();
+//						if (WorkbenchWindow.PROP_COOLBAR_VISIBLE
+//								.equals(property)
+//								|| WorkbenchWindow.PROP_COOLBAR_VISIBLE
+//										.equals(property)) {
+//							Object newValue = event.getNewValue();
+//							if (newValue instanceof Boolean
+//									&& ((Boolean) newValue).booleanValue()) {
+//								openJBossCentralEditor(page);
+//								window.removePropertyChangeListener(this);
+//							}
+//						}
+//					}
+//				});
+//			} else {
+//				return openJBossCentralEditor(page);
+//			}
+//		} else {
+//			return openJBossCentralEditor(page);
+//		}
+		return openJBossCentralEditor(page);
 	}
 
 	protected static JBossCentralEditor openJBossCentralEditor(



More information about the jbosstools-commits mailing list