Author: akazakov
Date: 2011-11-10 20:32:12 -0500 (Thu, 10 Nov 2011)
New Revision: 36294
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/JBossPerspectiveTest.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
Log:
https://issues.jboss.org/browse/JBIDE-10142 Seam 2 Tools: Extend JBoss Perspective
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2011-11-11 01:18:51 UTC (rev
36293)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2011-11-11 01:32:12 UTC (rev
36294)
@@ -172,6 +172,16 @@
</perspectiveExtension>
</extension>
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.jboss.tools.common.ui.JBossPerspective">
+ <newWizardShortcut
+ id="org.jboss.tools.seam.ui.wizards.SeamProjectWizard">
+ </newWizardShortcut>
+ </perspectiveExtension>
+ </extension>
+
<extension point="org.eclipse.ui.navigator.viewer">
<viewerContentBinding
viewerId="org.jboss.tools.seam.ui.views.SeamComponentsNavigator">
<includes>
Added:
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
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/JBossPerspectiveTest.java 2011-11-11
01:32:12 UTC (rev 36294)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.ui.test;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.WorkbenchException;
+import org.jboss.tools.common.ui.JBossPerspectiveFactory;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class JBossPerspectiveTest extends TestCase {
+
+ /**
+ * Tests JBoss perspective has Seam stuff
+ * See
https://issues.jboss.org/browse/JBIDE-10142
+ * @throws WorkbenchException
+ */
+ public void testJBossPerspective() throws WorkbenchException {
+ IWorkbenchPage page =
WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow().openPage(JBossPerspectiveFactory.PERSPECTIVE_ID,
null);
+ assertNotNull(page);
+ String[] shortcuts = page.getNewWizardShortcuts();
+ Set<String> shortcutSet = new HashSet<String>();
+ for (String shortcut : shortcuts) {
+ shortcutSet.add(shortcut);
+ }
+ assertTrue("Have not found org.jboss.tools.seam.ui.wizards.SeamProjectWizard in
" + JBossPerspectiveFactory.PERSPECTIVE_ID,
shortcutSet.contains("org.jboss.tools.seam.ui.wizards.SeamProjectWizard"));
+ }
+}
\ No newline at end of file
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/JBossPerspectiveTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2011-11-11
01:18:51 UTC (rev 36293)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2011-11-11
01:32:12 UTC (rev 36294)
@@ -32,7 +32,6 @@
import org.jboss.tools.seam.ui.test.jbide.JBide3989Test;
import org.jboss.tools.seam.ui.test.marker.SeamMarkerResolutionTest;
import org.jboss.tools.seam.ui.test.preferences.SeamPreferencesPageTest;
-import org.jboss.tools.seam.ui.test.preferences.SeamSettingsPreferencesPageTest;
import org.jboss.tools.seam.ui.test.view.SeamComponentsViewAllTests;
import org.jboss.tools.seam.ui.test.wizard.OpenSeamComponentDialogTest;
import org.jboss.tools.seam.ui.test.wizard.PackageNamesTest;
@@ -54,7 +53,8 @@
public static Test suite() {
TestSuite suite = new TestSuite("Seam UI tests");
-
+
+ suite.addTestSuite(JBossPerspectiveTest.class);
suite.addTestSuite(ELExprPartitionerTest.class);
//suite.addTestSuite(ELReferencesQueryParticipantTest.class);
suite.addTest(new ProjectImportTestSetup(new
TestSuite(ELReferencesQueryParticipantTest.class),
"org.jboss.tools.seam.ui.test", new String[]{"projects/numberguess"},
new String[]{"numberguess"}));