Author: scabanovich
Date: 2011-11-17 17:38:39 -0500 (Thu, 17 Nov 2011)
New Revision: 36425
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java
Log:
JBIDE-10193
https://issues.jboss.org/browse/JBIDE-10193
Perspective test should not open new window.
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java 2011-11-17
22:35:42 UTC (rev 36424)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java 2011-11-17
22:38:39 UTC (rev 36425)
@@ -17,7 +17,10 @@
import org.eclipse.gef.ui.views.palette.PaletteView;
import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
import org.jboss.tools.common.ui.JBossPerspectiveFactory;
import org.jboss.tools.test.util.WorkbenchUtils;
@@ -33,7 +36,9 @@
* @throws WorkbenchException
*/
public void testJBossPerspective() throws WorkbenchException {
- IWorkbenchPage page =
WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow().openPage(JBossPerspectiveFactory.PERSPECTIVE_ID,
null);
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbench.showPerspective(JBossPerspectiveFactory.PERSPECTIVE_ID,
window);
assertNotNull(page);
IViewReference[] viewReferences = page.getViewReferences();
Set<String> viewIds = new HashSet<String>();