Author: vpakan(a)redhat.com
Date: 2009-11-23 04:55:44 -0500 (Mon, 23 Nov 2009)
New Revision: 18774
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
Removed:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/Label.java
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingFileTest.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java
Log:
Rename org.jboss.tools.ui.bot.ext.types.Label to
org.jboss.tools.ui.bot.ext.types.IDELabel.
Added Method prepareTreeItemForContextMenu() to ContextMenuHelper class.
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingFileTest.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingFileTest.java 2009-11-21
15:31:28 UTC (rev 18773)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingFileTest.java 2009-11-23
09:55:44 UTC (rev 18774)
@@ -16,7 +16,7 @@
import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
import org.jboss.tools.hibernate.ui.bot.testsuite.Project;
import org.jboss.tools.ui.bot.ext.types.EntityType;
-import org.jboss.tools.ui.bot.ext.types.Label;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -54,16 +54,16 @@
*/
private void createFilesFromClasses() {
// Select Both classes
- SWTBot viewBot = bot.viewByTitle(Label.View.PACKAGE_EXPLORER).bot();
+ SWTBot viewBot = bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).bot();
SWTBotTreeItem item =
viewBot.tree().expandNode(Project.PROJECT_NAME).expandNode("src");
item = item.expandNode(Project.PACKAGE_NAME).select();
item.select(Project.CLASS1+".java",Project.CLASS2+".java");
// Create mapping files
eclipse.createNew(EntityType.HIBERNATE_MAPPING_FILE);
- eclipse.waitForShell(Label.Shell.NEW_HIBERNATE_MAPPING_FILE);
- bot.button(Label.Button.NEXT).click();
- bot.button(Label.Button.FINISH).click();
+ eclipse.waitForShell(IDELabel.Shell.NEW_HIBERNATE_MAPPING_FILE);
+ bot.button(IDELabel.Button.NEXT).click();
+ bot.button(IDELabel.Button.FINISH).click();
util.waitForNonIgnoredJobs();
// Check if new mapping files exists
@@ -76,14 +76,14 @@
*/
private void createFilesFromPackage() {
// Select Package file
- SWTBot viewBot = bot.viewByTitle(Label.View.PACKAGE_EXPLORER).bot();
+ SWTBot viewBot = bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).bot();
SWTBotTreeItem item =
viewBot.tree().expandNode(Project.PROJECT_NAME).expandNode("src");
item = item.expandNode(Project.PACKAGE_NAME).select();
// Create mapping files
eclipse.createNew(EntityType.HIBERNATE_MAPPING_FILE);
- eclipse.waitForShell(Label.Shell.NEW_HIBERNATE_MAPPING_FILE);
- bot.button(Label.Button.FINISH).click();
+ eclipse.waitForShell(IDELabel.Shell.NEW_HIBERNATE_MAPPING_FILE);
+ bot.button(IDELabel.Button.FINISH).click();
util.waitForNonIgnoredJobs();
// Check if new mapping files exists
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateTest.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateTest.java 2009-11-21
15:31:28 UTC (rev 18773)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateTest.java 2009-11-23
09:55:44 UTC (rev 18774)
@@ -14,7 +14,7 @@
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.entity.JavaClassEntity;
import org.jboss.tools.ui.bot.ext.entity.JavaProjectEntity;
-import org.jboss.tools.ui.bot.ext.types.Label;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.types.PerspectiveType;
public class HibernateTest extends SWTTestExt {
@@ -32,7 +32,7 @@
// loadProperties(Activator.PLUGIN_ID);
// Show perspective and view
- eclipse.closeView(Label.View.WELCOME);
+ eclipse.closeView(IDELabel.View.WELCOME);
eclipse.openPerspective(PerspectiveType.JAVA);
// Create needed project
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java 2009-11-21
15:31:28 UTC (rev 18773)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java 2009-11-23
09:55:44 UTC (rev 18774)
@@ -27,6 +27,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.WidgetVariables;
/**
@@ -39,22 +40,30 @@
private static final String WEB_PROJECT_JBT_JSF_POPUP_MENU = "JBoss Tools
JSF";
private static final String PACKAGE_EXPLORER_JBT_POPUP_MENU = "JBoss Tools";
- private static final String REMOVE_JSF_CAPABILITIES_POPUP_MENU = "Remove JSF
Capabilities";
private static final String ADD_JSF_CAPABILITIES_POPUP_MENU = "Add JSF
Capabilities...";
private static final String CLOSE_PROJECT_POPUP_MENU = "Clo&se Project";
private static final String OPEN_PROJECT_POPUP_MENU = "Op&en Project";
private static final String DELETE_PROJECT_POPUP_MENU = "Delete";
private static final String IMPORT_PROJECT_POPUP_MENU = "Import Existing JSF
Project...";
+ private static final String JBDS_REMOVE_JSF_CAPABILITIES_POPUP_MENU = "Remove Red
Hat Capabilities";
+ private static final String JBT_REMOVE_JSF_CAPABILITIES_POPUP_MENU = "Remove JSF
Capabilities";
private MenuItem miRunOnServer = null;
-
+
public void testAddRemoveJSFCapabilities() {
-
- removeJSFCapabilities();
+ boolean jbdsIsRunning = false;
+ // Check out if JBoss Developer Studio Is Running
+ try{
+ bot.menu(IDELabel.Menu.HELP).menu(IDELabel.Menu.ABOUT_JBOSS_DEVELOPER_STUDIO);
+ jbdsIsRunning = true;
+ }catch (WidgetNotFoundException wnfe){
+ // do nothing
+ }
+ removeJSFCapabilities(jbdsIsRunning);
addJSFCapabilities();
// Test add/remove JSF capabilities after project is closed and reopened
closeOpenJsfProject();
- removeJSFCapabilities();
+ removeJSFCapabilities(jbdsIsRunning);
addJSFCapabilities();
// Test import of deleted JSF project
deleteJsfProject();
@@ -72,8 +81,7 @@
SWTBot webProjects = bot.viewByTitle(WidgetVariables.WEB_PROJECTS).bot();
SWTBotTree tree = webProjects.tree();
- tree.setFocus();
- tree.select(0);
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree);
new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
IMPORT_PROJECT_POPUP_MENU, false)).click();
@@ -119,8 +127,9 @@
SWTBot servers = bot.viewByTitle(WidgetVariables.SERVERS)
.bot();
SWTBotTree serverTree = servers.tree();
- serverTree.setFocus();
- serverTree.select(0);
+
+ ContextMenuHelper.prepareTreeItemForContextMenu(serverTree);
+
new SWTBotMenu(ContextMenuHelper.getContextMenu(serverTree,
"Start", false)).click();
waitForBlockingJobsAcomplished(45*1000L,STARTING_JBOSS_EAP_43_RUNTIME);
@@ -187,8 +196,9 @@
editor.close();
// Stop Application Server and remove Application Server from Server View
openServerView();
- serverTree.setFocus();
- serverTree.select(0);
+
+ ContextMenuHelper.prepareTreeItemForContextMenu(serverTree);
+
new SWTBotMenu(ContextMenuHelper.getContextMenu(serverTree,
"Stop", false)).click();
@@ -211,14 +221,10 @@
SWTBot packageExplorer = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
.bot();
SWTBotTree tree = packageExplorer.tree();
-
- tree.setFocus();
-
- SWTBotTreeItem packageExplorerTreeItem = tree
- .getTreeItem(JBT_TEST_PROJECT_NAME);
- packageExplorerTreeItem.select();
- packageExplorerTreeItem.click();
-
+
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree,
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME));
+
new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
DELETE_PROJECT_POPUP_MENU, false)).click();
@@ -231,27 +237,36 @@
/**
* Remove JSF Capabilities from JSF Project
+ * @param jbdsIsRunning
*/
- private void removeJSFCapabilities() {
+ private void removeJSFCapabilities(boolean jbdsIsRunning) {
openWebProjects();
+
+ delay();
+
SWTBot webProjects = bot.viewByTitle(WidgetVariables.WEB_PROJECTS).bot();
SWTBotTree tree = webProjects.tree();
+
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree,
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME));
- tree.setFocus();
+ if (jbdsIsRunning){
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
+ JBDS_REMOVE_JSF_CAPABILITIES_POPUP_MENU, true)).click();
+ }
+ else{
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
+ WEB_PROJECT_JBT_JSF_POPUP_MENU, true)).menu(
+ JBT_REMOVE_JSF_CAPABILITIES_POPUP_MENU).click();
+
+ }
- SWTBotTreeItem webProjectsTreeItem = tree
- .getTreeItem(JBT_TEST_PROJECT_NAME);
- webProjectsTreeItem.select();
- webProjectsTreeItem.click();
-
- new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
- WEB_PROJECT_JBT_JSF_POPUP_MENU, true)).menu(
- REMOVE_JSF_CAPABILITIES_POPUP_MENU).click();
-
bot.shell("Confirmation").activate();
bot.button(WidgetVariables.OK_BUTTON).click();
+ delay();
+
assertTrue(
"Project "
+ JBT_TEST_PROJECT_NAME
@@ -279,13 +294,9 @@
.bot();
SWTBotTree tree = packageExplorer.tree();
- tree.setFocus();
-
- SWTBotTreeItem packageExplorerTreeItem = tree
- .getTreeItem(JBT_TEST_PROJECT_NAME);
- packageExplorerTreeItem.select();
- packageExplorerTreeItem.click();
-
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree,
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME));
+
new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
PACKAGE_EXPLORER_JBT_POPUP_MENU, false)).menu(
ADD_JSF_CAPABILITIES_POPUP_MENU).click();
@@ -337,13 +348,9 @@
.bot();
SWTBotTree tree = packageExplorer.tree();
- tree.setFocus();
-
- SWTBotTreeItem packageExplorerTreeItem = tree
- .getTreeItem(JBT_TEST_PROJECT_NAME);
- packageExplorerTreeItem.select();
- packageExplorerTreeItem.click();
-
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree,
+ tree.getTreeItem(JBT_TEST_PROJECT_NAME));
+
new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
CLOSE_PROJECT_POPUP_MENU, false)).click();
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2009-11-21
15:31:28 UTC (rev 18773)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2009-11-23
09:55:44 UTC (rev 18774)
@@ -26,7 +26,7 @@
import org.jboss.tools.ui.bot.ext.entity.JavaClassEntity;
import org.jboss.tools.ui.bot.ext.entity.JavaProjectEntity;
import org.jboss.tools.ui.bot.ext.types.EntityType;
-import org.jboss.tools.ui.bot.ext.types.Label;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.types.PerspectiveType;
import org.jboss.tools.ui.bot.ext.types.ViewType;
@@ -57,10 +57,10 @@
* @param type
*/
public void showView(ViewType type) {
- bot.menu(Label.Menu.WINDOW).menu(Label.Menu.SHOW_VIEW).menu(
- Label.Menu.OTHER).click();
+ bot.menu(IDELabel.Menu.WINDOW).menu(IDELabel.Menu.SHOW_VIEW).menu(
+ IDELabel.Menu.OTHER).click();
bot.tree().expandNode(type.getGroupLabel()).expandNode(type.getViewLabel()).select();
- bot.button(Label.Button.OK).click();
+ bot.button(IDELabel.Button.OK).click();
}
@@ -74,18 +74,18 @@
String perspectiveLabel = "";
if (type == PerspectiveType.JAVA) {
- perspectiveLabel = Label.SelectPerspectiveDialog.JAVA;
+ perspectiveLabel = IDELabel.SelectPerspectiveDialog.JAVA;
}
- bot.menu(Label.Menu.WINDOW).menu(Label.Menu.OPEN_PERSPECTIVE).menu(
- Label.Menu.OTHER).click();
+ bot.menu(IDELabel.Menu.WINDOW).menu(IDELabel.Menu.OPEN_PERSPECTIVE).menu(
+ IDELabel.Menu.OTHER).click();
bot.table().select(perspectiveLabel);
// Another approach
// SWTBotShell openPerpectiveShell = bot.shell("Open Perspective");
// openPerpectiveShell.activate();
- bot.button(Label.Button.OK).click();
+ bot.button(IDELabel.Button.OK).click();
}
/**
@@ -95,15 +95,15 @@
public void createJavaProject(JavaProjectEntity entity) {
// NewWizard
createNew(EntityType.JAVA_PROJECT);
- waitForShell(Label.Shell.NEW_JAVA_PROJECT);
+ waitForShell(IDELabel.Shell.NEW_JAVA_PROJECT);
// JavaProjectWizard
- bot.textWithLabel(Label.JavaProjectWizard.PROJECT_NAME).setText(
+ bot.textWithLabel(IDELabel.JavaProjectWizard.PROJECT_NAME).setText(
entity.getProjectName());
- bot.button(Label.Button.FINISH).click();
+ bot.button(IDELabel.Button.FINISH).click();
// Wait for shell closing JavaProjectWizard
- waitForClosedShell(Label.Shell.NEW_JAVA_PROJECT);
+ waitForClosedShell(IDELabel.Shell.NEW_JAVA_PROJECT);
util.waitForNonIgnoredJobs();
}
@@ -113,13 +113,13 @@
*/
public void createJavaClass(JavaClassEntity entity) {
createNew(EntityType.JAVA_CLASS);
- waitForShell(Label.Shell.NEW_JAVA_CLASS);
+ waitForShell(IDELabel.Shell.NEW_JAVA_CLASS);
- bot.textWithLabel(Label.NewClassCreationWizard.PACKAGE_NAME).setText(entity.getPackageName());
- bot.textWithLabel(Label.NewClassCreationWizard.CLASS_NAME).setText(entity.getClassName());
- bot.button(Label.Button.FINISH).click();
+ bot.textWithLabel(IDELabel.NewClassCreationWizard.PACKAGE_NAME).setText(entity.getPackageName());
+ bot.textWithLabel(IDELabel.NewClassCreationWizard.CLASS_NAME).setText(entity.getClassName());
+ bot.button(IDELabel.Button.FINISH).click();
- waitForClosedShell(Label.Shell.NEW_JAVA_CLASS);
+ waitForClosedShell(IDELabel.Shell.NEW_JAVA_CLASS);
util.waitForNonIgnoredJobs();
}
@@ -130,7 +130,7 @@
*/
public void removeFile(String projectName, String... path) {
// Open Package Explorer and aim the Project
- SWTBot viewBot = bot.viewByTitle(Label.View.PACKAGE_EXPLORER).bot();
+ SWTBot viewBot = bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).bot();
SWTBotTreeItem item = viewBot.tree().expandNode(projectName);
// Go through path
@@ -140,7 +140,7 @@
// Delete File
item.select().contextMenu("Delete").click();
- bot.button(Label.Button.OK).click();
+ bot.button(IDELabel.Button.OK).click();
}
@@ -150,7 +150,7 @@
* @param path
*/
public void openFile(String projectName, String... path) {
- SWTBot viewBot = bot.viewByTitle(Label.View.PACKAGE_EXPLORER).bot();
+ SWTBot viewBot = bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).bot();
SWTBotTreeItem item = viewBot.tree().expandNode(projectName);
StringBuilder builder = new StringBuilder(projectName);
@@ -177,11 +177,11 @@
String groupLabel = entityType.getGroupLabel();
String entityLabel = entityType.getEntityLabel();
- bot.menu(Label.Menu.FILE).menu(Label.Menu.NEW).menu(Label.Menu.OTHER).click();
- waitForShell(Label.Shell.NEW);
+ bot.menu(IDELabel.Menu.FILE).menu(IDELabel.Menu.NEW).menu(IDELabel.Menu.OTHER).click();
+ waitForShell(IDELabel.Shell.NEW);
bot.tree().expandNode(groupLabel).select(entityLabel);
- bot.button(Label.Button.NEXT).click();
+ bot.button(IDELabel.Button.NEXT).click();
}
/**
@@ -225,7 +225,7 @@
* @param path
*/
public void openAsText(String projectName, String... path) {
- SWTBot viewBot = bot.viewByTitle(Label.View.PACKAGE_EXPLORER).bot();
+ SWTBot viewBot = bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).bot();
SWTBotTreeItem item = viewBot.tree().expandNode(projectName);
// Go through path
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2009-11-21
15:31:28 UTC (rev 18773)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2009-11-23
09:55:44 UTC (rev 18774)
@@ -26,6 +26,8 @@
import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.swtbot.swt.finder.results.WidgetResult;
import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.hamcrest.Matcher;
/**
@@ -128,4 +130,22 @@
return result;
}
+ /**
+ * Executes proper steps to be able call getContextMenu on input treeItem
+ * @param tree
+ * @param treeItem
+ */
+ public static void prepareTreeItemForContextMenu(SWTBotTree tree , SWTBotTreeItem
treeItem){
+ tree.setFocus();
+ treeItem.select();
+ treeItem.click();
+ }
+ /**
+ * Executes proper steps to be able call getContextMenu on first Tree Item within tree
+ * @param tree
+ */
+ public static void prepareTreeItemForContextMenu(SWTBotTree tree){
+ tree.setFocus();
+ tree.select(0);
+ }
}
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java 2009-11-21
15:31:28 UTC (rev 18773)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java 2009-11-23
09:55:44 UTC (rev 18774)
@@ -24,9 +24,9 @@
switch (this) {
- case HIBERNATE_MAPPING_FILE: groupLabel = Label.EntityGroup.HIBERNATE; break;
- case JAVA_PROJECT: groupLabel = Label.EntityGroup.JAVA; break;
- case JAVA_CLASS: groupLabel = Label.EntityGroup.JAVA; break;
+ case HIBERNATE_MAPPING_FILE: groupLabel = IDELabel.EntityGroup.HIBERNATE; break;
+ case JAVA_PROJECT: groupLabel = IDELabel.EntityGroup.JAVA; break;
+ case JAVA_CLASS: groupLabel = IDELabel.EntityGroup.JAVA; break;
default: fail("Unknown Entity Type");
}
@@ -41,9 +41,9 @@
String entityLabel = "";
switch (this) {
- case HIBERNATE_MAPPING_FILE: entityLabel = Label.EntityLabel.HIBERNATE_MAPPING_FILE;
break;
- case JAVA_PROJECT: entityLabel = Label.EntityLabel.JAVA_PROJECT; break;
- case JAVA_CLASS: entityLabel = Label.EntityLabel.JAVA_CLASS; break;
+ case HIBERNATE_MAPPING_FILE: entityLabel = IDELabel.EntityLabel.HIBERNATE_MAPPING_FILE;
break;
+ case JAVA_PROJECT: entityLabel = IDELabel.EntityLabel.JAVA_PROJECT; break;
+ case JAVA_CLASS: entityLabel = IDELabel.EntityLabel.JAVA_CLASS; break;
default: fail("Unknown Entity Type");
}
Copied:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
(from rev 18732,
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/Label.java)
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2009-11-23
09:55:44 UTC (rev 18774)
@@ -0,0 +1,141 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ui.bot.ext.types;
+
+/**
+ * Base label constants for all widgets. Naming convention is (except buttons
+ * and menus) based on Eclipse platform class names of each part (e.g.
+ * NewJavaProjectWizardPageOne)
+ *
+ * @author jpeterka
+ */
+public class IDELabel {
+ public class Menu {
+ public static final String FILE = "File";
+ public static final String NEW = "New";
+ public static final String PROJECT = "Project";
+ public static final String OTHER = "Other...";
+ public static final String WINDOW = "Window";
+ public static final String SHOW_VIEW = "Show View";
+ public static final String OPEN_PERSPECTIVE = "Open Perspective";
+ public static final String OPEN_WITH = "Open With";
+ public static final String TEXT_EDITOR = "Text Editor";
+ public static final String EDIT = "Edit";
+ public static final String SELECT_ALL = "Select All";
+ public static final String JSP_FILE = "JSP File";
+ public static final String XHTML_FILE = "XHTML File";
+ public static final String CLOSE = "Close";
+ public static final String OPEN = "Open";
+ public static final String RENAME = "Rename";
+ public static final String PROPERTIES = "Properties";
+ public static final String HELP = "Help";
+ public static final String ABOUT_JBOSS_DEVELOPER_STUDIO = "About JBoss Developer
Studio";
+ }
+
+ public class Button {
+ public static final String NEXT = "Next >";
+ public static final String BACK = "< Back";
+ public static final String CANCEL = "Cancel";
+ public static final String FINISH = "Finish";
+ public static final String OK = "OK";
+ public static final String YES = "Yes";
+ public static final String NO = "No";
+ public static final String CLOSE = "Close";
+ }
+
+ public class Shell {
+ public static final String NEW_JAVA_PROJECT = "New Java Project";
+ public static final String NEW_JAVA_CLASS = "New Java Class";
+ public static final String NEW_HIBERNATE_MAPPING_FILE = "New Hibernate XML Mapping
file (hbm.xml)";
+ public static final String NEW = "New";
+ public static final String NEW_JSP_FILE = "New File JSP";
+ public static final String NEW_XHTML_FILE = "New File XHTML";
+ public static final String SAVE_RESOURCE = "Save Resource";
+ public static final String RENAME_RESOURCE = "Rename Resource";
+ public static final String PROPERTIES = "Properties";
+ }
+
+ public class EntityGroup {
+ public static final String HIBERNATE = "Hibernate";
+ public static final String JAVA = "Java";
+ public static final String SEAM = "Seam";
+ }
+
+ public class EntityLabel {
+ public static final String HIBERNATE_MAPPING_FILE = "Hibernate XML Mapping file
(hbm.xml)";
+ public static final String JAVA_CLASS = "Class";
+ public static final String JAVA_PROJECT = "Java Project";
+ public static final String SEAM_PROJECT = "Seam Web Project";
+ }
+
+ public class JavaProjectWizard {
+ public static final String PROJECT_NAME = "Project name:";
+ }
+
+ public class NewClassCreationWizard {
+ public static final String CLASS_NAME = "Name:";
+ public static final String PACKAGE_NAME = "Package:";
+ }
+
+ public class ShowViewDialog {
+ public static final String JAVA_GROUP = "Java";
+ public static final String PROJECT_EXPLORER = "Project Explorer";
+
+ }
+
+ public class View {
+ public static final String WELCOME = "Welcome";
+ public static final String PROJECT_EXPLORER = "Project Explorer";
+ public static final String PACKAGE_EXPLORER = "Package Explorer";
+ }
+
+ public class ViewGroup {
+ public static final String GENERAL = "General";
+ public static final String JAVA = "Java";
+ }
+
+ public class SelectPerspectiveDialog {
+ public static final String JAVA = "Java";
+ public static final String HIBERNATE = "Hibernate";
+
+ }
+
+ public class WebProjectsTree {
+ public static final String WEB_CONTENT = "WebContent";
+ public static final String TAG_LIBRARIES = "Tag Libraries";
+ public static final String RESOURCE_BUNDLES = "Resource Bundles";
+ public static final String CONFIGURATION = "Configuration";
+ public static final String BEANS = "Beans";
+ public static final String TILES = "Tiles";
+ public static final String WEB_XML = "web.xml";
+ public static final String CONTEXT_PARAMS = "Context Params";
+ public static final String JAVAX_FACES_CONFIG_FILES =
"javax.faces.CONFIG_FILES";
+ }
+
+ public class NewJSPFileDialog {
+ public static final String NAME = "Name*";
+ public static final String TEMPLATE = "Template";
+ public static final String TEMPLATE_JSF_BASE_PAGE = "JSFBasePage";
+ }
+
+ public class NewXHTMLFileDialog {
+ public static final String NAME = "Name*";
+ public static final String TEMPLATE = "Template";
+ public static final String TEMPLATE_FACELET_FORM_XHTML =
"FaceletForm.xhtml";
+ }
+ public class RenameResourceDialog {
+ public static final String NEW_NAME = "New name:";
+ }
+ public class PropertiesDialog {
+ public static final String PARAM_NAME = "Param-Name";
+ public static final String PARAM_VALUE = "Param-Value";
+ }
+}
Deleted:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/Label.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/Label.java 2009-11-21
15:31:28 UTC (rev 18773)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/Label.java 2009-11-23
09:55:44 UTC (rev 18774)
@@ -1,94 +0,0 @@
- /*******************************************************************************
- * Copyright (c) 2007-2009 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
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.ui.bot.ext.types;
-
-/**
- * Base label constants for all widgets. Naming convention is (except buttons
- * and menus) based on Eclipse platform class names of each part (e.g.
- * NewJavaProjectWizardPageOne)
- *
- * @author jpeterka
- */
-public class Label {
- public class Menu {
- public static final String FILE = "File";
- public static final String NEW = "New";
- public static final String PROJECT = "Project";
- public static final String OTHER = "Other...";
- public static final String WINDOW = "Window";
- public static final String SHOW_VIEW = "Show View";
- public static final String OPEN_PERSPECTIVE = "Open Perspective";
- public static final String OPEN_WITH = "Open With";
- public static final String TEXT_EDITOR = "Text Editor";
- public static final String EDIT = "Edit";
- public static final String SELECT_ALL = "Select All";
- }
-
- public class Button {
- public static final String NEXT = "Next >";
- public static final String BACK = "< Back";
- public static final String CANCEL = "Cancel";
- public static final String FINISH = "Finish";
- public static final String OK = "OK";
- }
-
- public class Shell {
- public static final String NEW_JAVA_PROJECT = "New Java Project";
- public static final String NEW_JAVA_CLASS = "New Java Class";
- public static final String NEW_HIBERNATE_MAPPING_FILE = "New Hibernate XML Mapping
file (hbm.xml)";
- public static final String NEW = "New";
- }
-
- public class EntityGroup {
- public static final String HIBERNATE = "Hibernate";
- public static final String JAVA = "Java";
- public static final String SEAM = "Seam";
- }
-
- public class EntityLabel {
- public static final String HIBERNATE_MAPPING_FILE = "Hibernate XML Mapping file
(hbm.xml)";
- public static final String JAVA_CLASS = "Class";
- public static final String JAVA_PROJECT = "Java Project";
- public static final String SEAM_PROJECT = "Seam Web Project";
- }
-
- public class JavaProjectWizard {
- public static final String PROJECT_NAME = "Project name:";
- }
-
- public class NewClassCreationWizard {
- public static final String CLASS_NAME = "Name:";
- public static final String PACKAGE_NAME = "Package:";
- }
-
- public class ShowViewDialog {
- public static final String JAVA_GROUP = "Java";
- public static final String PROJECT_EXPLORER = "Project Explorer";
-
- }
-
- public class View {
- public static final String WELCOME = "Welcome";
- public static final String PROJECT_EXPLORER = "Project Explorer";
- public static final String PACKAGE_EXPLORER = "Package Explorer";
- }
-
- public class ViewGroup {
- public static final String GENERAL = "General";
- public static final String JAVA = "Java";
- }
-
- public class SelectPerspectiveDialog {
- public static final String JAVA = "Java";
- public static final String HIBERNATE = "Hibernate";
-
- }
-}
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2009-11-21
15:31:28 UTC (rev 18773)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2009-11-23
09:55:44 UTC (rev 18774)
@@ -24,7 +24,7 @@
public String getGroupLabel() {
String viewLabel = "";
switch (this) {
- case PROJECT_EXPLORER: viewLabel = Label.ViewGroup.GENERAL; break;
+ case PROJECT_EXPLORER: viewLabel = IDELabel.ViewGroup.GENERAL; break;
default: fail("Unknown View Type");
}
return viewLabel;
@@ -33,7 +33,7 @@
public String getViewLabel() {
String viewLabel = "";
switch (this) {
- case PROJECT_EXPLORER: viewLabel = Label.View.PROJECT_EXPLORER; break;
+ case PROJECT_EXPLORER: viewLabel = IDELabel.View.PROJECT_EXPLORER; break;
default: fail("Unknown View Type");
}
return viewLabel;