Author: scabanovich
Date: 2011-11-17 17:35:42 -0500 (Thu, 17 Nov 2011)
New Revision: 36424
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/JBossPerspectiveTest.java
Log:
JBIDE-10193
https://issues.jboss.org/browse/JBIDE-10193
Perspective test should not open new window.
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/JBossPerspectiveTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/JBossPerspectiveTest.java 2011-11-17
21:46:03 UTC (rev 36423)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/JBossPerspectiveTest.java 2011-11-17
22:35:42 UTC (rev 36424)
@@ -15,10 +15,12 @@
import junit.framework.TestCase;
+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;
/**
* @author Alexey Kazakov
@@ -31,7 +33,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);
String[] shortcuts = page.getNewWizardShortcuts();
Set<String> shortcutSet = new HashSet<String>();