JBoss Tools SVN: r30471 - in trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test: editor/tags and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2011-04-11 10:03:00 -0400 (Mon, 11 Apr 2011)
New Revision: 30471
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java
Removed:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/RichFacesTagsTest.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CalendarTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnGroupTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnsTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ComboBoxTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataDefinitionTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataGridTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataScrollerTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataTableTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/EditorTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/FileUploadTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceInputTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ListShuttleTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelMenuTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PickListTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ProgressTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SpacerTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TreeTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java
Log:
added Ajax Command Button Tag Test
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -41,6 +41,7 @@
import org.jboss.tools.vpe.ui.bot.test.editor.tags.ColumnTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.ColumnsTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.ComboBoxTagTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.tags.CommandButtonTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.CoreHTMLTagsTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataDefinitionTagTest;
import org.jboss.tools.vpe.ui.bot.test.editor.tags.DataGridTagTest;
@@ -157,7 +158,8 @@
suite.addTestSuite(ExtendedDataTableTagTest.class);
suite.addTestSuite(ToolbarAndToolbarGroupTagTest.class);
suite.addTestSuite(TogglePanelAndToogleControlTagTest.class);
- suite.addTestSuite(XhtmlFilePerformanceTest.class);
+ suite.addTestSuite(CommandButtonTagTest.class);
+ suite.addTestSuite(XhtmlFilePerformanceTest.class);
return new TestSetup(suite);
}
}
Copied: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java (from rev 30466, trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/RichFacesTagsTest.java)
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -0,0 +1,102 @@
+/*******************************************************************************
+
+ * Copyright (c) 2007-2011 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.editor.tags;
+
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
+import org.jboss.tools.vpe.ui.bot.test.editor.VPEEditorTestCase;
+import org.jboss.tools.vpe.ui.bot.test.tools.SWTBotWebBrowser;
+/**
+ * Abstract Tag Test behavior
+ * @author vlado pakan
+ *
+ */
+public abstract class AbstractTagTest extends VPEEditorTestCase {
+
+ protected static final String TEST_PAGE_NAME_JSP = "TagTest.jsp";
+ protected static final String TEST_PAGE_NAME_XHTML = "TagTest.xhtml";
+
+ protected SWTBotEditorExt jspEditor;
+ protected SWTBotEditorExt xhtmlEditor;
+ protected SWTBotWebBrowser jspWebBrowser;
+ protected SWTBotWebBrowser xhtmlWebBrowser;
+ protected SWTBotExt botExt;
+
+ public AbstractTagTest() {
+ super();
+ botExt = new SWTBotExt();
+ }
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ eclipse.maximizeActiveShell();
+ createJspPage(AbstractTagTest.TEST_PAGE_NAME_JSP);
+ jspEditor = botExt.swtBotEditorExtByTitle(AbstractTagTest.TEST_PAGE_NAME_JSP);
+ jspWebBrowser = new SWTBotWebBrowser(AbstractTagTest.TEST_PAGE_NAME_JSP,botExt);
+ createXhtmlPage(AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ xhtmlEditor = botExt.swtBotEditorExtByTitle(AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ xhtmlWebBrowser = new SWTBotWebBrowser(AbstractTagTest.TEST_PAGE_NAME_XHTML,botExt);
+
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ return false;
+ }
+ @Override
+ protected void tearDown() throws Exception {
+ jspEditor.close();
+ xhtmlEditor.close();
+ super.tearDown();
+ }
+ /**
+ * Runs Tag Testing
+ */
+ public void testTag (){
+ initPageContent ();
+ savePageContent ();
+ verifyTag();
+ }
+ /**
+ * Initialize proper page content
+ */
+ protected abstract void initPageContent ();
+ /**
+ * Verify tag
+ */
+ protected abstract void verifyTag ();
+ /**
+ * Saves Page Content if it was changed and shows changed editor
+ */
+ protected void savePageContent(){
+ boolean wasSaved = false;
+ if (jspEditor.isDirty()){
+ jspEditor.save();
+ jspEditor.show();
+ wasSaved = true;
+ }
+ if (xhtmlEditor.isDirty()){
+ xhtmlEditor.save();
+ xhtmlEditor.show();
+ wasSaved = true;
+ }
+ if (wasSaved){
+ bot.sleep(Timing.time3S());
+ }
+ }
+}
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -20,7 +20,7 @@
* @author vlado pakan
*
*/
-public class ActionParamTagTest extends RichFacesTagsTest{
+public class ActionParamTagTest extends AbstractTagTest{
@Override
protected void initPageContent() {
xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -20,7 +20,7 @@
* @author vlado pakan
*
*/
-public class AjaxValidatorTagTest extends RichFacesTagsTest{
+public class AjaxValidatorTagTest extends AbstractTagTest{
private static final String INPUT_TEXT = "!*- Input Text";
@Override
protected void initPageContent() {
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -20,7 +20,7 @@
* @author vlado pakan
*
*/
-public class BeanValidatorTagTest extends RichFacesTagsTest{
+public class BeanValidatorTagTest extends AbstractTagTest{
private static final String INPUT_TEXT = "!*- Input Text";
@Override
protected void initPageContent() {
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CalendarTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CalendarTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CalendarTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class CalendarTagTest extends RichFacesTagsTest{
+public class CalendarTagTest extends AbstractTagTest{
@Override
protected void initPageContent() {
xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
@@ -43,7 +43,7 @@
"INPUT",
new String[]{"class"},
new String[]{"rich-calendar-input null"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("INPUT",0), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnGroupTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnGroupTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnGroupTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class ColumnGroupTagTest extends RichFacesTagsTest{
+public class ColumnGroupTagTest extends AbstractTagTest{
private static final String SPAN_COLUMN_VALUE = "!-*Span Column Value";
private static final String SPAN_ROW__VALUE = "!-*Span Row Value";
private static final String CELL_1_0_VALUE = "!-* Cell 1x0 Value";
@@ -59,29 +59,29 @@
"TD",
new String[]{"class","rowspan"},
new String[]{"dr-table-cell rich-table-cell dr-subtable-cell","2"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class","colspan"},
new String[]{"dr-table-cell rich-table-cell dr-subtable-cell","2"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class","breakbefore"},
new String[]{"dr-table-cell rich-table-cell dr-subtable-cell","true"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
ColumnGroupTagTest.SPAN_COLUMN_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
ColumnGroupTagTest.SPAN_ROW__VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
ColumnGroupTagTest.CELL_1_0_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
ColumnGroupTagTest.CELL_1_1_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TBODY",0), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class ColumnTagTest extends RichFacesTagsTest{
+public class ColumnTagTest extends AbstractTagTest{
private static final String COLUMN_HEADER_VALUE = "!-*Column Header Value";
private static final String COLUMN_VALUE = "!-*Column Value";
@Override
@@ -52,28 +52,28 @@
"TR",
new String[]{"class"},
new String[]{"dr-table-subheader rich-table-subheader"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"dr-table-subheadercell rich-table-subheadercell"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TR",
new String[]{"class"},
new String[]{"dr-table-firstrow rich-table-firstrow"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"dr-table-cell rich-table-cell"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
ColumnTagTest.COLUMN_HEADER_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
ColumnTagTest.COLUMN_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TD",2), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnsTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnsTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnsTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -16,7 +16,7 @@
* @author vlado pakan
*
*/
-public class ColumnsTagTest extends RichFacesTagsTest{
+public class ColumnsTagTest extends AbstractTagTest{
private static final String columnHeader = "Column Header";
private static final String columnValue = "Column Value";
@@ -52,30 +52,30 @@
protected void verifyTag() {
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
columnHeader,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
columnValue,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TR",
new String[]{"class"},
new String[]{"dr-table-subheader rich-table-subheader"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"dr-table-subheadercell rich-table-subheadercell"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TR",
new String[]{"class"},
new String[]{"dr-table-firstrow rich-table-firstrow"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"dr-table-cell rich-table-cell"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ComboBoxTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ComboBoxTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ComboBoxTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class ComboBoxTagTest extends RichFacesTagsTest{
+public class ComboBoxTagTest extends AbstractTagTest{
private static final String defaultLabel = "DefaultLabel";
@Override
@@ -48,22 +48,22 @@
"INPUT",
new String[]{"type","class","value"},
new String[]{"text","rich-combobox-font-disabled rich-combobox-input-inactive",defaultLabel},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContains(jspWebBrowser,
"INPUT",
new String[]{"type","class"},
new String[]{"text","rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContains(jspWebBrowser,
"INPUT",
new String[]{"type","class"},
new String[]{"text","rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContains(jspWebBrowser,
"DIV",
new String[]{"class"},
new String[]{"rich-combobox-strut rich-combobox-font"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
// check tag selection
jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("INPUT"), 0);
bot.sleep(Timing.time3S());
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+
+ * Copyright (c) 2007-2011 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.editor.tags;
+
+import org.jboss.tools.ui.bot.ext.Timing;
+
+/**
+ * Tests ajax command button Tag behavior
+ * @author vlado pakan
+ *
+ */
+public class CommandButtonTagTest extends AbstractTagTest{
+ @Override
+ protected void initPageContent() {
+ jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ "<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
+ "<%@ taglib uri=\"http://richfaces.org/a4j\" prefix=\"a4j\" %>\n" +
+ "<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
+ "<html>\n" +
+ " <head>\n" +
+ " </head>\n" +
+ " <body>\n" +
+ " <f:view>\n" +
+ " <a4j:commandButton type=\"Submit\">\n" +
+ " </a4j:commandButton>\n" +
+ " </f:view>\n" +
+ " </body> \n" +
+ "</html>");
+ }
+
+ @Override
+ protected void verifyTag() {
+ assertVisualEditorContains(jspWebBrowser,
+ "INPUT",
+ new String[]{"type"},
+ new String[]{"Submit"},
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
+ // check tag selection
+ jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("INPUT",0), 0);
+ bot.sleep(Timing.time3S());
+ String selectedText = jspEditor.getSelection();
+ String hasToStartWith = "<a4j:commandButton type=\"Submit\">";
+ assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ String hasEndWith = "</a4j:commandButton>";
+ assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
+ }
+
+}
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataDefinitionTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataDefinitionTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataDefinitionTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class DataDefinitionTagTest extends RichFacesTagsTest{
+public class DataDefinitionTagTest extends AbstractTagTest{
private static String testText = "test_text";
private static int numRows = 3;
@Override
@@ -47,21 +47,21 @@
protected void verifyTag() {
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataDefinitionTagTest.testText,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsManyNodes(xhtmlWebBrowser,
"DD",
DataDefinitionTagTest.numRows,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"DL",
new String[]{"class"},
new String[]{"listClass"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"DD",
new String[]{"class"},
new String[]{"columnClass"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DD",2), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataGridTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataGridTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataGridTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class DataGridTagTest extends RichFacesTagsTest{
+public class DataGridTagTest extends AbstractTagTest{
private static final String HEADER_VALUE = "!-*Header Value";
private static final String FOOTER_VALUE = "!-*Footer Value";
private static final String CELL_0_VALUE = "!-*Cell 0 Value";
@@ -58,63 +58,63 @@
"TABLE",
new String[]{"class","columns","elements"},
new String[]{"dr-table rich-table",DataGridTagTest.GRID_COLUMNS,DataGridTagTest.GRID_ELEMENTS},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"THEAD",
null,
null,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TFOOT",
null,
null,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TR",
new String[]{"class"},
new String[]{"dr-table-header rich-table-header"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"dr-table-headercell rich-table-headercell"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TR",
new String[]{"class"},
new String[]{"dr-table-footer rich-table-footer"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"dr-table-footercell rich-table-footercell"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TR",
new String[]{"class"},
new String[]{"dr-table-row rich-table-row"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"dr-table-cell rich-table-cell"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsManyNodes(xhtmlWebBrowser,
"SPAN",
2 + (2 * Integer.parseInt(DataGridTagTest.GRID_ELEMENTS)),
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataGridTagTest.HEADER_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataGridTagTest.FOOTER_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataGridTagTest.CELL_0_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataGridTagTest.CELL_1_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("THEAD",0), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class DataListTagTest extends RichFacesTagsTest{
+public class DataListTagTest extends AbstractTagTest{
private static final String ROW_0_VALUE = "!-* Row 0 Value";
private static final String ROW_1_VALUE = "!-* Row 1 Value";
private static final String ROW_2_VALUE = "!-* Row 2 Value";
@@ -51,21 +51,21 @@
"UL",
new String[]{"class"},
new String[]{"dr-list rich-datalist"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"LI",
new String[]{"class"},
new String[]{"dr-list-item rich-list-item"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataListTagTest.ROW_0_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataListTagTest.ROW_1_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataListTagTest.ROW_2_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selecti
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("LI",0), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class DataOrderedListTagTest extends RichFacesTagsTest{
+public class DataOrderedListTagTest extends AbstractTagTest{
private static final String ROW_0_VALUE = "!-* Row 0 Value";
private static final String ROW_1_VALUE = "!-* Row 1 Value";
private static final String ROW_2_VALUE = "!-* Row 2 Value";
@@ -51,21 +51,21 @@
"OL",
new String[]{"class"},
new String[]{"dr-list rich-orderedlist"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"LI",
new String[]{"class"},
new String[]{"dr-list-item rich-list-item"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataOrderedListTagTest.ROW_0_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataOrderedListTagTest.ROW_1_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataOrderedListTagTest.ROW_2_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selecti
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("LI",0), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataScrollerTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataScrollerTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataScrollerTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class DataScrollerTagTest extends RichFacesTagsTest{
+public class DataScrollerTagTest extends AbstractTagTest{
private static final String DATA_SCROLLER_STYLE = "background-color: red;";
@Override
protected void initPageContent() {
@@ -45,22 +45,22 @@
"DIV",
new String[]{"class","style"},
new String[]{"rich-datascr",DataScrollerTagTest.DATA_SCROLLER_STYLE},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"rich-datascr-button rich-datascr-button-dsbld"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"rich-datascr-act"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"rich-datascr-inact"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataTableTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataTableTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataTableTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class DataTableTagTest extends RichFacesTagsTest{
+public class DataTableTagTest extends AbstractTagTest{
private static final String TABLE_HEADER_VALUE = "!-*Table Header Value";
private static final String COLUMN_HEADER_VALUE = "!-*Column Header Value";
private static final String COLUMN_0_VALUE = "!-*Column 0 Value";
@@ -58,49 +58,49 @@
"TABLE",
new String[]{"class"},
new String[]{"dr-table rich-table"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TR",
new String[]{"class"},
new String[]{"dr-table-header rich-table-header"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"dr-table-headercell rich-table-headercell"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TR",
new String[]{"class"},
new String[]{"dr-table-subheader rich-table-subheader"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"dr-table-subheadercell rich-table-subheadercell"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TR",
new String[]{"class"},
new String[]{"dr-table-firstrow rich-table-firstrow"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"dr-table-cell rich-table-cell"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataTableTagTest.TABLE_HEADER_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataTableTagTest.COLUMN_HEADER_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataTableTagTest.COLUMN_0_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
DataTableTagTest.COLUMN_1_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("THEAD",0), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/EditorTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/EditorTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/EditorTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class EditorTagTest extends RichFacesTagsTest{
+public class EditorTagTest extends AbstractTagTest{
@Override
protected void initPageContent() {
xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
@@ -44,7 +44,7 @@
"DIV",
new String[]{"class"},
new String[]{"mceIframeContainer"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class ExtendedDataTableTagTest extends RichFacesTagsTest{
+public class ExtendedDataTableTagTest extends AbstractTagTest{
private static final String COL_0_VALUE = "!-* Col 0 Value";
private static final String COL_1_VALUE = "!-* Col 1 Value";
private static final String COL_0_LABEL = "!-* Col 0 Label";
@@ -59,44 +59,44 @@
"TR",
new String[]{"class"},
new String[]{"dr-table-subheader rich-table-subheader"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TH",
new String[]{"class"},
new String[]{"dr-table-subheadercell rich-table-subheadercell"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TR",
new String[]{"class"},
new String[]{"dr-table-subfooter rich-table-subfooter"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"dr-table-subfootercell rich-table-subfootercell dr-table-subfooter rich-table-subfooter"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TR",
new String[]{"class"},
new String[]{"dr-body-table-tr"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"dr-table-cell rich-table-cell"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
ExtendedDataTableTagTest.COL_0_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
ExtendedDataTableTagTest.COL_1_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
ExtendedDataTableTagTest.COL_0_LABEL,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
ExtendedDataTableTagTest.COL_1_LABEL,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selecti
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TABLE",1), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/FileUploadTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/FileUploadTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/FileUploadTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class FileUploadTagTest extends RichFacesTagsTest{
+public class FileUploadTagTest extends AbstractTagTest{
@Override
protected void initPageContent() {
jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
@@ -45,37 +45,37 @@
"B",
new String[]{"title"},
new String[]{"rich:fileUpload fileUploadListener: maxFilesQuantity: 1 id: upload immediateUpload: false acceptedTypes: jpg style: width:500; height:500"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContains(jspWebBrowser,
"DIV",
new String[]{"class"},
new String[]{"rich-fileupload-list-decor"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContains(jspWebBrowser,
"DIV",
new String[]{"class"},
new String[]{"rich-fileupload-button-border"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContains(jspWebBrowser,
"DIV",
new String[]{"class"},
new String[]{"rich-fileupload-button rich-fileupload-font"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContains(jspWebBrowser,
"DIV",
new String[]{"class"},
new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-add"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContains(jspWebBrowser,
"DIV",
new String[]{"class"},
new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-start"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContains(jspWebBrowser,
"DIV",
new String[]{"class"},
new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-clear"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
// check tag selection
jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("B",0), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceInputTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceInputTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceInputTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class InplaceInputTagTest extends RichFacesTagsTest{
+public class InplaceInputTagTest extends AbstractTagTest{
private static final String defaultLabel = "DefaultLabel";
@Override
protected void initPageContent() {
@@ -42,10 +42,10 @@
"SPAN",
new String[]{"vpe-user-toggle-id","title","class"},
new String[]{"false","rich:inplaceInput defaultLabel: " + defaultLabel,"rich-inplace rich-inplace-view"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContainsNodeWithValue(jspWebBrowser,
defaultLabel,
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
// check tag selection
jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("SPAN",2), 0);
bot.sleep(Timing.time3S());
@@ -61,12 +61,12 @@
"SPAN",
new String[]{"vpe-user-toggle-id","class"},
new String[]{"true","rich-inplace rich-inplace-edit"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContains(jspWebBrowser,
"INPUT",
new String[]{"type","class","value"},
new String[]{"text","rich-inplace-field",defaultLabel},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertTrue("Selected text in Source Pane has to be '" + expectedSelectedText + "'" +
"\nbut it is '" + selectedText + "'",
selectedText.trim().equals(expectedSelectedText));
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class InplaceSelectInputTagTest extends RichFacesTagsTest{
+public class InplaceSelectInputTagTest extends AbstractTagTest{
private static final String defaultLabel = "DefaultLabel";
private static final String option1 = "Option 1";
private static final String option2 = "Option 2";
@@ -47,10 +47,10 @@
"SPAN",
new String[]{"vpe-user-toggle-id","title","class"},
new String[]{"false","rich:inplaceSelect value: 0 defaultLabel: " + defaultLabel,"rich-inplace-select rich-inplace-select-view"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContainsNodeWithValue(jspWebBrowser,
defaultLabel,
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
// check tag selection
jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("SPAN",2), 0);
bot.sleep(Timing.time3S());
@@ -70,16 +70,16 @@
"SPAN",
new String[]{"vpe-user-toggle-id","class"},
new String[]{"true","rich-inplace-select rich-inplace-select-edit"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContainsNodeWithValue(jspWebBrowser,
option1,
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorContainsNodeWithValue(jspWebBrowser,
option2,
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
assertVisualEditorNotContainNodeWithValue(jspWebBrowser,
defaultLabel,
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
selectedText = jspEditor.getSelection();
// check tag selection
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ListShuttleTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ListShuttleTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ListShuttleTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class ListShuttleTagTest extends RichFacesTagsTest{
+public class ListShuttleTagTest extends AbstractTagTest{
@Override
protected void initPageContent() {
xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
@@ -43,55 +43,55 @@
assertVisualEditorContainsNodeWithValue(
xhtmlWebBrowser,
"Copy all",
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(
xhtmlWebBrowser,
"Copy",
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(
xhtmlWebBrowser,
"Remove All",
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(
xhtmlWebBrowser,
"Remove",
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(
xhtmlWebBrowser,
"First",
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(
xhtmlWebBrowser,
"Up",
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(
xhtmlWebBrowser,
"Last",
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(
xhtmlWebBrowser,
"Down",
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"DIV",
new String[]{"class"},
new String[]{"rich-shuttle-button-content"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TABLE",
new String[]{"class"},
new String[]{"rich-list-shuttle"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"DIV",
new String[]{"class"},
new String[]{"rich-shuttle-controls"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"DIV",
new String[]{"class"},
new String[]{"rich-shuttle-control"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelMenuTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelMenuTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelMenuTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class PanelMenuTagTest extends RichFacesTagsTest{
+public class PanelMenuTagTest extends AbstractTagTest{
private static String getSubGroupLabel (final int groupIndex , final int subGroupIndex){
StringBuffer sb = new StringBuffer();
@@ -104,29 +104,29 @@
"TD",
new String[]{"class"},
new String[]{"rich-pmenu-top-group-self-label"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TABLE",
new String[]{"class"},
new String[]{"dr-pmenu-top-group rich-pmenu-group"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
PanelMenuTagTest.getGroupLabel(0),
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
PanelMenuTagTest.getGroupLabel(1),
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
PanelMenuTagTest.getGroupLabel(2),
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorNotContainNodeWithValue(xhtmlWebBrowser,
PanelMenuTagTest.getGroupItemLabel(0, 0),
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
@@ -173,12 +173,12 @@
selectedText.trim().endsWith(hasToEndWith));
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
PanelMenuTagTest.getSubGroupItemLabel(1, 0, 0),
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TD",
new String[]{"class"},
new String[]{"rich-pmenu-item-label"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class PanelTagTest extends RichFacesTagsTest{
+public class PanelTagTest extends AbstractTagTest{
private static final String HEADER_VALUE = "!-*Header Value";
private static final String BODY_VALUE = "!-*Body Value";
@Override
@@ -50,18 +50,18 @@
"DIV",
new String[]{"class"},
new String[]{"dr-pnl rich-panel"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"DIV",
new String[]{"class"},
new String[]{"dr-pnl-b rich-panel-body"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
PanelTagTest.HEADER_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
PanelTagTest.BODY_VALUE,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PickListTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PickListTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PickListTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class PickListTagTest extends RichFacesTagsTest{
+public class PickListTagTest extends AbstractTagTest{
private static final String[] options = new String[] {"Option0","Option1","Option2","Option3"};
@Override
@@ -57,41 +57,41 @@
protected void verifyTag() {
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
"Copy all",
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
"Copy",
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
"Remove All",
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
"Remove",
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TABLE",
new String[]{"class"},
new String[]{"rich-list-picklist"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TABLE",
new String[]{"class"},
new String[]{"rich-picklist-body"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TABLE",
new String[]{"class"},
new String[]{"rich-picklist-internal-tab"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"TBODY",
null,
null,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
int index = 0;
for (String option : options ){
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
option,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
StringBuffer sbTitle = new StringBuffer("");
sbTitle.append("f:selectItem itemLabel: ");
sbTitle.append(option);
@@ -103,7 +103,7 @@
"OPTION",
new String[]{"title"},
new String[]{sbTitle.toString()},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
index++;
}
// check tag selection
@@ -143,7 +143,7 @@
"OPTION",
new String[]{"title","style"},
new String[]{sbOptionTitle.toString(),"border: 2px solid rgb(0, 0, 255) ! important;"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ProgressTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ProgressTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ProgressTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class ProgressTagTest extends RichFacesTagsTest{
+public class ProgressTagTest extends AbstractTagTest{
@Override
protected void initPageContent() {
jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
@@ -42,7 +42,7 @@
"DIV",
new String[]{"title","class"},
new String[]{"rich:progressBar mode: client id: progressBar","rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell"},
- RichFacesTagsTest.TEST_PAGE_NAME_JSP);
+ AbstractTagTest.TEST_PAGE_NAME_JSP);
// check tag selection
jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
Deleted: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/RichFacesTagsTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/RichFacesTagsTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/RichFacesTagsTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -1,102 +0,0 @@
-/*******************************************************************************
-
- * Copyright (c) 2007-2011 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.vpe.ui.bot.test.editor.tags;
-
-import org.jboss.tools.ui.bot.ext.SWTBotExt;
-import org.jboss.tools.ui.bot.ext.Timing;
-import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
-import org.jboss.tools.vpe.ui.bot.test.editor.VPEEditorTestCase;
-import org.jboss.tools.vpe.ui.bot.test.tools.SWTBotWebBrowser;
-/**
- * Tests Rich Faces Tags behavior
- * @author vlado pakan
- *
- */
-public abstract class RichFacesTagsTest extends VPEEditorTestCase {
-
- protected static final String TEST_PAGE_NAME_JSP = "RichFacesTagsTest.jsp";
- protected static final String TEST_PAGE_NAME_XHTML = "RichFacesTagsTest.xhtml";
-
- protected SWTBotEditorExt jspEditor;
- protected SWTBotEditorExt xhtmlEditor;
- protected SWTBotWebBrowser jspWebBrowser;
- protected SWTBotWebBrowser xhtmlWebBrowser;
- protected SWTBotExt botExt;
-
- public RichFacesTagsTest() {
- super();
- botExt = new SWTBotExt();
- }
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- eclipse.maximizeActiveShell();
- createJspPage(RichFacesTagsTest.TEST_PAGE_NAME_JSP);
- jspEditor = botExt.swtBotEditorExtByTitle(RichFacesTagsTest.TEST_PAGE_NAME_JSP);
- jspWebBrowser = new SWTBotWebBrowser(RichFacesTagsTest.TEST_PAGE_NAME_JSP,botExt);
- createXhtmlPage(RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
- xhtmlEditor = botExt.swtBotEditorExtByTitle(RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
- xhtmlWebBrowser = new SWTBotWebBrowser(RichFacesTagsTest.TEST_PAGE_NAME_XHTML,botExt);
-
- }
-
- @Override
- protected void closeUnuseDialogs() {
-
- }
-
- @Override
- protected boolean isUnuseDialogOpened() {
- return false;
- }
- @Override
- protected void tearDown() throws Exception {
- jspEditor.close();
- xhtmlEditor.close();
- super.tearDown();
- }
- /**
- * Runs Tag Testing
- */
- public void testTag (){
- initPageContent ();
- savePageContent ();
- verifyTag();
- }
- /**
- * Initialize proper page content
- */
- protected abstract void initPageContent ();
- /**
- * Verify tag
- */
- protected abstract void verifyTag ();
- /**
- * Saves Page Content if it was changed and shows changed editor
- */
- protected void savePageContent(){
- boolean wasSaved = false;
- if (jspEditor.isDirty()){
- jspEditor.save();
- jspEditor.show();
- wasSaved = true;
- }
- if (xhtmlEditor.isDirty()){
- xhtmlEditor.save();
- xhtmlEditor.show();
- wasSaved = true;
- }
- if (wasSaved){
- bot.sleep(Timing.time3S());
- }
- }
-}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SpacerTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SpacerTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SpacerTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class SpacerTagTest extends RichFacesTagsTest{
+public class SpacerTagTest extends AbstractTagTest{
private static final String SPACER_STYLE = "background-color: red;";
@Override
protected void initPageContent() {
@@ -44,7 +44,7 @@
"IMG",
new String[]{"width","height","class","style"},
new String[]{"1px","1px","rich-spacer",SpacerTagTest.SPACER_STYLE},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("IMG",0), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class TogglePanelAndToogleControlTagTest extends RichFacesTagsTest{
+public class TogglePanelAndToogleControlTagTest extends AbstractTagTest{
private static final String FACET_0_LABEL = "!-* Facet 0 Label";
private static final String FACET_1_LABEL = "!-* Facet 1 Label";
@Override
@@ -51,10 +51,10 @@
protected void verifyTag() {
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
TogglePanelAndToogleControlTagTest.FACET_0_LABEL,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorNotContainNodeWithValue(xhtmlWebBrowser,
TogglePanelAndToogleControlTagTest.FACET_1_LABEL,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class ToolbarAndToolbarGroupTagTest extends RichFacesTagsTest{
+public class ToolbarAndToolbarGroupTagTest extends AbstractTagTest{
private static final String GROUP_0_LABEL = "!-* Group 0 Label";
private static final String GROUP_1_LABEL = "!-* Group 1 Label";
@Override
@@ -51,13 +51,13 @@
"TD",
new String[]{"class"},
new String[]{"dr-toolbar-int rich-toolbar-item"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
ToolbarAndToolbarGroupTagTest.GROUP_0_LABEL,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
ToolbarAndToolbarGroupTagTest.GROUP_1_LABEL,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TBODY",0), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TreeTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TreeTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TreeTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class TreeTagTest extends RichFacesTagsTest{
+public class TreeTagTest extends AbstractTagTest{
private static final String typeLibrary = "library";
private static final String typePathway = "pathway";
private static final String typeOrganism = "organism";
@@ -55,18 +55,18 @@
protected void verifyTag() {
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
TreeTagTest.typePathway,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
TreeTagTest.typeLibrary,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
TreeTagTest.typeOrganism,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"IMG",
new String[]{"class"},
new String[]{"treePictureStyle"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java 2011-04-11 13:18:51 UTC (rev 30470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java 2011-04-11 14:03:00 UTC (rev 30471)
@@ -18,7 +18,7 @@
* @author vlado pakan
*
*/
-public class VirtualEarthTagTest extends RichFacesTagsTest{
+public class VirtualEarthTagTest extends AbstractTagTest{
@Override
protected void initPageContent() {
xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
@@ -42,12 +42,12 @@
assertVisualEditorContainsManyNodes(xhtmlWebBrowser,
"IMG",
2,
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
assertVisualEditorContains(xhtmlWebBrowser,
"SCRIPT",
new String[]{"type","src"},
new String[]{"text/javascript","mozileLoader.js"},
- RichFacesTagsTest.TEST_PAGE_NAME_XHTML);
+ AbstractTagTest.TEST_PAGE_NAME_XHTML);
// check tag selection
xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("IMG",0), 0);
bot.sleep(Timing.time3S());
13 years, 6 months
JBoss Tools SVN: r30470 - in branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest: src/org/jboss/tools/modeshape/rest/log and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2011-04-11 09:18:51 -0400 (Mon, 11 Apr 2011)
New Revision: 30470
Added:
branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/.options
Modified:
branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/build.properties
branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/log/EclipseLogger.java
Log:
JBIDE-8706 Logging Of the SLF4J ModeShape Logging Does Not Adhere To Eclipse Log Levels. Changed SLF4J trace logging to only log if Eclipse is in debug mode and this plugin's "/debug" option has been set to "true." The log levels of error, warning, and info are filtered out of the Error View by using settings available via the view's preferences but are always logged by Eclipse.
Added: branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/.options
===================================================================
--- branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/.options (rev 0)
+++ branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/.options 2011-04-11 13:18:51 UTC (rev 30470)
@@ -0,0 +1,3 @@
+# To turn on trace logging, change below value to "true" and start application with "-debug this-directory-path/.options"
+
+org.jboss.tools.modeshape.rest/debug=false
Property changes on: branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/.options
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/build.properties
===================================================================
--- branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/build.properties 2011-04-11 13:01:08 UTC (rev 30469)
+++ branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/build.properties 2011-04-11 13:18:51 UTC (rev 30470)
@@ -21,8 +21,8 @@
.,\
about.html,\
jcip-annotations.jar,\
- modeshape-client.jar
-src.includes = src/
+ modeshape-client.jar,\
+ .options
jars.compile.order = .
source.. = src/
output.. = bin/
Modified: branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/log/EclipseLogger.java
===================================================================
--- branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/log/EclipseLogger.java 2011-04-11 13:01:08 UTC (rev 30469)
+++ branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/log/EclipseLogger.java 2011-04-11 13:18:51 UTC (rev 30470)
@@ -26,6 +26,9 @@
*/
public final class EclipseLogger implements Logger {
+ private static boolean DEBUG_MODE = Platform.inDebugMode()
+ && Boolean.parseBoolean(Platform.getDebugOption(IUiConstants.PLUGIN_ID + "/debug")); //$NON-NLS-1$
+
private static ILog LOGGER = Platform.getLog(Platform.getBundle(IUiConstants.PLUGIN_ID));
private String name;
@@ -41,7 +44,7 @@
*/
@Override
public void debug( String message ) {
- if (isDebugEnabled()) info(message);
+ debug(message, (Throwable)null);
}
/**
@@ -52,7 +55,7 @@
@Override
public void debug( String pattern,
Object arg ) {
- if (isDebugEnabled()) info(pattern, arg);
+ debug(pattern, new Object[] { arg });
}
/**
@@ -63,7 +66,7 @@
@Override
public void debug( String pattern,
Object[] arguments ) {
- if (isDebugEnabled()) info(pattern, arguments);
+ debug(MessageFormat.format(pattern, arguments), arguments);
}
/**
@@ -74,7 +77,9 @@
@Override
public void debug( String message,
Throwable e ) {
- if (isDebugEnabled()) info(message, e);
+ if (isDebugEnabled()) {
+ info(message, e);
+ }
}
/**
@@ -97,7 +102,7 @@
public void debug( String pattern,
Object arg1,
Object arg2 ) {
- if (isDebugEnabled()) info(pattern, arg1, arg2);
+ debug(pattern, new Object[] { arg1, arg2 });
}
/**
@@ -156,7 +161,7 @@
*/
@Override
public void error( String message ) {
- if (isErrorEnabled()) LOGGER.log(new Status(IStatus.ERROR, IUiConstants.PLUGIN_ID, message, null));
+ error(message, (Throwable)null);
}
/**
@@ -167,8 +172,7 @@
@Override
public void error( String pattern,
Object arg ) {
- if (isErrorEnabled()) LOGGER.log(new Status(IStatus.ERROR, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern, arg),
- null));
+ error(pattern, new Object[] { arg });
}
/**
@@ -179,8 +183,7 @@
@Override
public void error( String pattern,
Object[] arguments ) {
- if (isErrorEnabled()) LOGGER.log(new Status(IStatus.ERROR, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern,
- arguments), null));
+ error(MessageFormat.format(pattern, arguments), (Throwable)null);
}
/**
@@ -191,7 +194,9 @@
@Override
public void error( String message,
Throwable e ) {
- if (isErrorEnabled()) LOGGER.log(new Status(IStatus.ERROR, IUiConstants.PLUGIN_ID, message, e));
+ if (isErrorEnabled()) {
+ LOGGER.log(new Status(IStatus.ERROR, IUiConstants.PLUGIN_ID, message, e));
+ }
}
/**
@@ -214,9 +219,7 @@
public void error( String pattern,
Object arg1,
Object arg2 ) {
- if (isErrorEnabled()) LOGGER.log(new Status(IStatus.ERROR, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern,
- arg1,
- arg2), null));
+ error(pattern, new Object[] { arg1, arg2 });
}
/**
@@ -285,7 +288,7 @@
*/
@Override
public void info( String message ) {
- if (isInfoEnabled()) LOGGER.log(new Status(IStatus.INFO, IUiConstants.PLUGIN_ID, message, null));
+ info(message, (Throwable)null);
}
/**
@@ -296,7 +299,7 @@
@Override
public void info( String pattern,
Object arg ) {
- if (isInfoEnabled()) LOGGER.log(new Status(IStatus.INFO, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern, arg), null));
+ info(pattern, new Object[] { arg });
}
/**
@@ -307,8 +310,7 @@
@Override
public void info( String pattern,
Object[] arguments ) {
- if (isInfoEnabled()) LOGGER.log(new Status(IStatus.INFO, IUiConstants.PLUGIN_ID,
- MessageFormat.format(pattern, arguments), null));
+ info(MessageFormat.format(pattern, arguments), (Throwable)null);
}
/**
@@ -319,7 +321,9 @@
@Override
public void info( String message,
Throwable e ) {
- if (isInfoEnabled()) LOGGER.log(new Status(IStatus.INFO, IUiConstants.PLUGIN_ID, message, e));
+ if (isInfoEnabled()) {
+ LOGGER.log(new Status(IStatus.INFO, IUiConstants.PLUGIN_ID, message, e));
+ }
}
/**
@@ -342,8 +346,7 @@
public void info( String pattern,
Object arg1,
Object arg2 ) {
- if (isInfoEnabled()) LOGGER.log(new Status(IStatus.INFO, IUiConstants.PLUGIN_ID,
- MessageFormat.format(pattern, arg1, arg2), null));
+ info(pattern, new Object[] { arg1, arg2 });
}
/**
@@ -402,7 +405,7 @@
*/
@Override
public boolean isDebugEnabled() {
- return true;
+ return DEBUG_MODE;
}
/**
@@ -462,7 +465,7 @@
*/
@Override
public boolean isTraceEnabled() {
- return true;
+ return isDebugEnabled();
}
/**
@@ -502,7 +505,7 @@
*/
@Override
public void trace( String message ) {
- if (isTraceEnabled()) info(message);
+ trace(message, (Throwable)null);
}
/**
@@ -513,7 +516,7 @@
@Override
public void trace( String pattern,
Object arg ) {
- if (isTraceEnabled()) info(pattern, arg);
+ trace(pattern, new Object[] { arg });
}
/**
@@ -524,7 +527,7 @@
@Override
public void trace( String pattern,
Object[] arguments ) {
- if (isTraceEnabled()) info(pattern, arguments);
+ trace(MessageFormat.format(pattern, arguments), (Throwable)null);
}
/**
@@ -535,7 +538,9 @@
@Override
public void trace( String message,
Throwable e ) {
- if (isTraceEnabled()) info(message, e);
+ if (isTraceEnabled()) {
+ debug(message, e);
+ }
}
/**
@@ -558,7 +563,7 @@
public void trace( String pattern,
Object arg1,
Object arg2 ) {
- if (isTraceEnabled()) info(pattern, arg1, arg2);
+ trace(pattern, new Object[] { arg1, arg2 });
}
/**
@@ -617,7 +622,7 @@
*/
@Override
public void warn( String message ) {
- if (isWarnEnabled()) LOGGER.log(new Status(IStatus.WARNING, IUiConstants.PLUGIN_ID, message, null));
+ warn(message, (Throwable)null);
}
/**
@@ -628,8 +633,7 @@
@Override
public void warn( String pattern,
Object arg ) {
- if (isWarnEnabled()) LOGGER.log(new Status(IStatus.WARNING, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern, arg),
- null));
+ warn(pattern, new Object[] { arg });
}
/**
@@ -640,8 +644,7 @@
@Override
public void warn( String pattern,
Object[] arguments ) {
- if (isWarnEnabled()) LOGGER.log(new Status(IStatus.WARNING, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern,
- arguments), null));
+ warn(MessageFormat.format(pattern, arguments), (Throwable)null);
}
/**
@@ -652,7 +655,9 @@
@Override
public void warn( String message,
Throwable e ) {
- if (isWarnEnabled()) LOGGER.log(new Status(IStatus.WARNING, IUiConstants.PLUGIN_ID, message, e));
+ if (isWarnEnabled()) {
+ LOGGER.log(new Status(IStatus.WARNING, IUiConstants.PLUGIN_ID, message, e));
+ }
}
/**
@@ -675,9 +680,7 @@
public void warn( String pattern,
Object arg1,
Object arg2 ) {
- if (isWarnEnabled()) LOGGER.log(new Status(IStatus.WARNING, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern,
- arg1,
- arg2), null));
+ warn(pattern, new Object[] { arg1, arg2 });
}
/**
13 years, 6 months
JBoss Tools SVN: r30469 - in trunk/modeshape/plugins/org.jboss.tools.modeshape.rest: src/org/jboss/tools/modeshape/rest/log and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2011-04-11 09:01:08 -0400 (Mon, 11 Apr 2011)
New Revision: 30469
Added:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/.options
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/build.properties
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/log/EclipseLogger.java
Log:
JBIDE-8706 Logging Of the SLF4J ModeShape Logging Does Not Adhere To Eclipse Log Levels. Changed SLF4J trace logging to only log if Eclipse is in debug mode and this plugin's "/debug" option has been set to "true." The log levels of error, warning, and info are filtered out of the Error View by using settings available via the view's preferences but are always logged by Eclipse.
Added: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/.options
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/.options (rev 0)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/.options 2011-04-11 13:01:08 UTC (rev 30469)
@@ -0,0 +1,3 @@
+# To turn on trace logging, change below value to "true" and start application with "-debug this-directory-path/.options"
+
+org.jboss.tools.modeshape.rest/debug=false
Property changes on: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/.options
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/build.properties
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/build.properties 2011-04-11 11:08:56 UTC (rev 30468)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/build.properties 2011-04-11 13:01:08 UTC (rev 30469)
@@ -21,7 +21,8 @@
.,\
about.html,\
jcip-annotations.jar,\
- modeshape-client.jar
+ modeshape-client.jar,\
+ .options
jars.compile.order = .
source.. = src/
output.. = bin/
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/log/EclipseLogger.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/log/EclipseLogger.java 2011-04-11 11:08:56 UTC (rev 30468)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/log/EclipseLogger.java 2011-04-11 13:01:08 UTC (rev 30469)
@@ -26,6 +26,9 @@
*/
public final class EclipseLogger implements Logger {
+ private static boolean DEBUG_MODE = Platform.inDebugMode()
+ && Boolean.parseBoolean(Platform.getDebugOption(IUiConstants.PLUGIN_ID + "/debug")); //$NON-NLS-1$
+
private static ILog LOGGER = Platform.getLog(Platform.getBundle(IUiConstants.PLUGIN_ID));
private String name;
@@ -41,7 +44,7 @@
*/
@Override
public void debug( String message ) {
- if (isDebugEnabled()) info(message);
+ debug(message, (Throwable)null);
}
/**
@@ -52,7 +55,7 @@
@Override
public void debug( String pattern,
Object arg ) {
- if (isDebugEnabled()) info(pattern, arg);
+ debug(pattern, new Object[] { arg });
}
/**
@@ -63,7 +66,7 @@
@Override
public void debug( String pattern,
Object[] arguments ) {
- if (isDebugEnabled()) info(pattern, arguments);
+ debug(MessageFormat.format(pattern, arguments), arguments);
}
/**
@@ -74,7 +77,9 @@
@Override
public void debug( String message,
Throwable e ) {
- if (isDebugEnabled()) info(message, e);
+ if (isDebugEnabled()) {
+ info(message, e);
+ }
}
/**
@@ -97,7 +102,7 @@
public void debug( String pattern,
Object arg1,
Object arg2 ) {
- if (isDebugEnabled()) info(pattern, arg1, arg2);
+ debug(pattern, new Object[] { arg1, arg2 });
}
/**
@@ -156,7 +161,7 @@
*/
@Override
public void error( String message ) {
- if (isErrorEnabled()) LOGGER.log(new Status(IStatus.ERROR, IUiConstants.PLUGIN_ID, message, null));
+ error(message, (Throwable)null);
}
/**
@@ -167,8 +172,7 @@
@Override
public void error( String pattern,
Object arg ) {
- if (isErrorEnabled()) LOGGER.log(new Status(IStatus.ERROR, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern, arg),
- null));
+ error(pattern, new Object[] { arg });
}
/**
@@ -179,8 +183,7 @@
@Override
public void error( String pattern,
Object[] arguments ) {
- if (isErrorEnabled()) LOGGER.log(new Status(IStatus.ERROR, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern,
- arguments), null));
+ error(MessageFormat.format(pattern, arguments), (Throwable)null);
}
/**
@@ -191,7 +194,9 @@
@Override
public void error( String message,
Throwable e ) {
- if (isErrorEnabled()) LOGGER.log(new Status(IStatus.ERROR, IUiConstants.PLUGIN_ID, message, e));
+ if (isErrorEnabled()) {
+ LOGGER.log(new Status(IStatus.ERROR, IUiConstants.PLUGIN_ID, message, e));
+ }
}
/**
@@ -214,9 +219,7 @@
public void error( String pattern,
Object arg1,
Object arg2 ) {
- if (isErrorEnabled()) LOGGER.log(new Status(IStatus.ERROR, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern,
- arg1,
- arg2), null));
+ error(pattern, new Object[] { arg1, arg2 });
}
/**
@@ -285,7 +288,7 @@
*/
@Override
public void info( String message ) {
- if (isInfoEnabled()) LOGGER.log(new Status(IStatus.INFO, IUiConstants.PLUGIN_ID, message, null));
+ info(message, (Throwable)null);
}
/**
@@ -296,7 +299,7 @@
@Override
public void info( String pattern,
Object arg ) {
- if (isInfoEnabled()) LOGGER.log(new Status(IStatus.INFO, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern, arg), null));
+ info(pattern, new Object[] { arg });
}
/**
@@ -307,8 +310,7 @@
@Override
public void info( String pattern,
Object[] arguments ) {
- if (isInfoEnabled()) LOGGER.log(new Status(IStatus.INFO, IUiConstants.PLUGIN_ID,
- MessageFormat.format(pattern, arguments), null));
+ info(MessageFormat.format(pattern, arguments), (Throwable)null);
}
/**
@@ -319,7 +321,9 @@
@Override
public void info( String message,
Throwable e ) {
- if (isInfoEnabled()) LOGGER.log(new Status(IStatus.INFO, IUiConstants.PLUGIN_ID, message, e));
+ if (isInfoEnabled()) {
+ LOGGER.log(new Status(IStatus.INFO, IUiConstants.PLUGIN_ID, message, e));
+ }
}
/**
@@ -342,8 +346,7 @@
public void info( String pattern,
Object arg1,
Object arg2 ) {
- if (isInfoEnabled()) LOGGER.log(new Status(IStatus.INFO, IUiConstants.PLUGIN_ID,
- MessageFormat.format(pattern, arg1, arg2), null));
+ info(pattern, new Object[] { arg1, arg2 });
}
/**
@@ -402,7 +405,7 @@
*/
@Override
public boolean isDebugEnabled() {
- return true;
+ return DEBUG_MODE;
}
/**
@@ -462,7 +465,7 @@
*/
@Override
public boolean isTraceEnabled() {
- return true;
+ return isDebugEnabled();
}
/**
@@ -502,7 +505,7 @@
*/
@Override
public void trace( String message ) {
- if (isTraceEnabled()) info(message);
+ trace(message, (Throwable)null);
}
/**
@@ -513,7 +516,7 @@
@Override
public void trace( String pattern,
Object arg ) {
- if (isTraceEnabled()) info(pattern, arg);
+ trace(pattern, new Object[] { arg });
}
/**
@@ -524,7 +527,7 @@
@Override
public void trace( String pattern,
Object[] arguments ) {
- if (isTraceEnabled()) info(pattern, arguments);
+ trace(MessageFormat.format(pattern, arguments), (Throwable)null);
}
/**
@@ -535,7 +538,9 @@
@Override
public void trace( String message,
Throwable e ) {
- if (isTraceEnabled()) info(message, e);
+ if (isTraceEnabled()) {
+ debug(message, e);
+ }
}
/**
@@ -558,7 +563,7 @@
public void trace( String pattern,
Object arg1,
Object arg2 ) {
- if (isTraceEnabled()) info(pattern, arg1, arg2);
+ trace(pattern, new Object[] { arg1, arg2 });
}
/**
@@ -617,7 +622,7 @@
*/
@Override
public void warn( String message ) {
- if (isWarnEnabled()) LOGGER.log(new Status(IStatus.WARNING, IUiConstants.PLUGIN_ID, message, null));
+ warn(message, (Throwable)null);
}
/**
@@ -628,8 +633,7 @@
@Override
public void warn( String pattern,
Object arg ) {
- if (isWarnEnabled()) LOGGER.log(new Status(IStatus.WARNING, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern, arg),
- null));
+ warn(pattern, new Object[] { arg });
}
/**
@@ -640,8 +644,7 @@
@Override
public void warn( String pattern,
Object[] arguments ) {
- if (isWarnEnabled()) LOGGER.log(new Status(IStatus.WARNING, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern,
- arguments), null));
+ warn(MessageFormat.format(pattern, arguments), (Throwable)null);
}
/**
@@ -652,7 +655,9 @@
@Override
public void warn( String message,
Throwable e ) {
- if (isWarnEnabled()) LOGGER.log(new Status(IStatus.WARNING, IUiConstants.PLUGIN_ID, message, e));
+ if (isWarnEnabled()) {
+ LOGGER.log(new Status(IStatus.WARNING, IUiConstants.PLUGIN_ID, message, e));
+ }
}
/**
@@ -675,9 +680,7 @@
public void warn( String pattern,
Object arg1,
Object arg2 ) {
- if (isWarnEnabled()) LOGGER.log(new Status(IStatus.WARNING, IUiConstants.PLUGIN_ID, MessageFormat.format(pattern,
- arg1,
- arg2), null));
+ warn(pattern, new Object[] { arg1, arg2 });
}
/**
13 years, 6 months
JBoss Tools SVN: r30468 - workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-11 07:08:56 -0400 (Mon, 11 Apr 2011)
New Revision: 30468
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentBuilderIntegrationTest.java
Log:
added jboss-thread source jar
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentBuilderIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentBuilderIntegrationTest.java 2011-04-11 11:04:25 UTC (rev 30467)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentBuilderIntegrationTest.java 2011-04-11 11:08:56 UTC (rev 30468)
@@ -12,7 +12,7 @@
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.fail;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertNotNull;
import java.io.File;
import java.io.IOException;
@@ -26,9 +26,9 @@
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
+import org.jboss.ide.eclipse.as7.deployment.Deployable;
import org.jboss.ide.eclipse.as7.deployment.DeploymentBuilder;
-import org.jboss.ide.eclipse.as7.deployment.DeploymentBuilder.Deployable;
-import org.jboss.ide.eclipse.as7.deployment.DeploymentBuilderException;
+import org.jboss.ide.eclipse.as7.deployment.DeploymentException;
import org.junit.Before;
import org.junit.Test;
import org.osgi.framework.Bundle;
@@ -61,13 +61,13 @@
}
@Test
- public void canDeploy() throws DeploymentBuilderException, URISyntaxException, IOException {
+ public void canDeploy() throws DeploymentException, URISyntaxException, IOException {
File file = getWarFile("minimalistic.war");
new DeploymentBuilder(HOST, PORT).add(file).deploy();
}
@Test
- public void getMatchingDeployables() throws DeploymentBuilderException, URISyntaxException, IOException {
+ public void returnsDeployables() throws DeploymentException, URISyntaxException, IOException {
String warName = "minimalistic.war";
File file = getWarFile(warName );
List<Deployable> deployables = new DeploymentBuilder(HOST, PORT).add(file).deploy();
@@ -76,7 +76,7 @@
}
@Test
- public void canGetDeploymentStatus() throws DeploymentBuilderException, URISyntaxException, IOException {
+ public void canGetDeploymentStatus() throws DeploymentException, URISyntaxException, IOException {
File file = getWarFile("minimalistic.war");
List<Deployable> deployables = new DeploymentBuilder(HOST, PORT).add(file).deploy();
Deployable deployable = deployables.get(0);
13 years, 6 months
JBoss Tools SVN: r30467 - in workspace/adietish/org.jboss.ide.eclipse.as7.deployment: src/org/jboss/ide/eclipse/as7/deployment and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-11 07:04:25 -0400 (Mon, 11 Apr 2011)
New Revision: 30467
Added:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-threads-2.0.0.CR8-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Deployable.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentException.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Session.java
Removed:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilderException.java
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java
Log:
added jboss-thread source jar
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-11 09:54:41 UTC (rev 30466)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-11 11:04:25 UTC (rev 30467)
@@ -2,7 +2,7 @@
<classpath>
<classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.0.CR8.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-logging-3.0.0.Beta3.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.CR8.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.CR8.jar" sourcepath="jboss-threads-2.0.0.CR8-sources.jar"/>
<classpathentry exported="true" kind="lib" path="shrinkwrap-api-1.0.0-alpha-11.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar" sourcepath="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar"/>
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-threads-2.0.0.CR8-sources.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-threads-2.0.0.CR8-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Deployable.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Deployable.java (rev 0)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Deployable.java 2011-04-11 11:04:25 UTC (rev 30467)
@@ -0,0 +1,90 @@
+package org.jboss.ide.eclipse.as7.deployment;
+
+import java.io.File;
+import java.text.MessageFormat;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.jboss.as.controller.client.helpers.standalone.DeploymentAction;
+import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentActionResult;
+import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentPlanResult;
+
+public class Deployable {
+
+ private String name;
+ private File file;
+ private Future<ServerDeploymentPlanResult> resultFuture;
+ private long timeout;
+ private DeploymentAction action;
+
+ protected Deployable(String name, File file, long timeout) {
+ this.name = name;
+ this.file = file;
+ this.timeout = timeout;
+ }
+
+ protected void setDeploymentAction(DeploymentAction action) {
+ this.action = action;
+ }
+
+ protected void setResultFuture(Future<ServerDeploymentPlanResult> resultFuture) {
+ this.resultFuture = resultFuture;
+ }
+
+ public File getFile() {
+ return file;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public IStatus getStatus() throws DeploymentException {
+ if (resultFuture == null
+ || action == null) {
+ return null;
+ }
+ try {
+ ServerDeploymentPlanResult result = resultFuture.get(timeout, TimeUnit.MILLISECONDS);
+ ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(action.getId());
+ return createStatus(action, actionResult);
+ } catch (Exception e) {
+ throw new DeploymentException(e);
+ }
+ }
+
+ private IStatus createStatus(DeploymentAction action, ServerDeploymentActionResult actionResult) {
+ IStatus status = null;
+ switch (actionResult.getResult()) {
+ case NOT_EXECUTED:
+ status = createStatus(IStatus.ERROR, "The operation {0} was not executed on unit {1}", action
+ .getType().name(), getName());
+ break;
+ case EXECUTED:
+ status = Status.OK_STATUS;
+ break;
+ case FAILED:
+ status = createStatus(IStatus.ERROR, "The operation {0} failed for unit {1}", action.getType()
+ .name(), getName());
+ break;
+ case ROLLED_BACK:
+ status = createStatus(IStatus.ERROR, "The operation {0} for unit {1} was rolled back", action
+ .getType().name(), getName());
+ break;
+ case CONFIGURATION_MODIFIED_REQUIRES_RESTART:
+ status = createStatus(
+ IStatus.WARNING,
+ "The operation {0} was not executed on unit {1}. The server configuration was changed though and the server needs to be restarted",
+ action.getType().name(), getName());
+ break;
+ }
+ return status;
+ }
+
+ private IStatus createStatus(int severity, String messagePattern, Object... messageArguments) {
+ return new Status(severity, Activator.getContext().getBundle().getSymbolicName(), MessageFormat.format(
+ messagePattern, messageArguments));
+ }
+}
\ No newline at end of file
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Deployable.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java 2011-04-11 09:54:41 UTC (rev 30466)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java 2011-04-11 11:04:25 UTC (rev 30467)
@@ -12,24 +12,16 @@
import java.io.File;
import java.io.IOException;
-import java.net.InetAddress;
import java.net.UnknownHostException;
-import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.jboss.as.controller.client.ModelControllerClient;
-import org.jboss.as.controller.client.helpers.standalone.DeploymentAction;
import org.jboss.as.controller.client.helpers.standalone.DeploymentPlan;
import org.jboss.as.controller.client.helpers.standalone.DeploymentPlanBuilder;
-import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentActionResult;
+import org.jboss.as.controller.client.helpers.standalone.InitialDeploymentPlanBuilder;
import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager;
import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentPlanResult;
-import org.jboss.as.protocol.StreamUtils;
/**
* @author André Dietisheim
@@ -38,14 +30,16 @@
public static final long DEFAULT_TIMEOUT = 15 * 1000;
- private ModelControllerClient client;
- private ServerDeploymentManager manager;
private final List<Deployable> deployables = new ArrayList<Deployable>();
private long timeout = DEFAULT_TIMEOUT;
+ private Session session;
+ public DeploymentBuilder(Session session) {
+ this.session = session;
+ }
+
public DeploymentBuilder(String host, int port) throws UnknownHostException {
- this.client = ModelControllerClient.Factory.create(InetAddress.getByName(host), port);
- this.manager = ServerDeploymentManager.Factory.create(client);
+ this.session = new Session(host, port);
}
public DeploymentBuilder add(String name, File file) {
@@ -62,19 +56,21 @@
return this;
}
- public List<Deployable> deploy() throws DeploymentBuilderException {
+ public List<Deployable> deploy() throws DeploymentException {
if (deployables.isEmpty()) {
- throw new DeploymentBuilderException("no files to deploy.");
+ throw new DeploymentException("no files to deploy.");
}
+ ServerDeploymentManager manager = session.getManager();
+ InitialDeploymentPlanBuilder builder = manager.newDeploymentPlan();
try {
- DeploymentPlanBuilder builder = addToBuilder(deployables, manager.newDeploymentPlan().withoutRollback());
+ addToBuilder(deployables, builder);
DeploymentPlan plan = builder.build();
Future<ServerDeploymentPlanResult> planResult = manager.execute(plan);
setResult(planResult, deployables);
return deployables;
} catch (Exception e) {
- throw new DeploymentBuilderException(e);
+ throw new DeploymentException(e);
} finally {
cleanup();
}
@@ -86,99 +82,15 @@
}
}
- private DeploymentPlanBuilder addToBuilder(List<Deployable> deployables, DeploymentPlanBuilder builder)
- throws IOException {
+ private void addToBuilder(List<Deployable> deployables, DeploymentPlanBuilder builder) throws IOException {
for (int i = 0; i < deployables.size(); i++) {
Deployable deployable = deployables.get(i);
builder = builder.add(deployable.getName(), deployable.getFile()).andDeploy();
deployable.setDeploymentAction(builder.getLastAction());
}
- return builder;
}
private void cleanup() {
- StreamUtils.safeClose(client);
+ session.close();
}
-
- public class Deployable {
-
- private String name;
- private File file;
- private Future<ServerDeploymentPlanResult> resultFuture;
- private long timeout;
- private DeploymentAction action;
-
- private Deployable(String name, File file, long timeout) {
- this.name = name;
- this.file = file;
- this.timeout = timeout;
- }
-
- private void setDeploymentAction(DeploymentAction action) {
- this.action = action;
- }
-
- private void setResultFuture(Future<ServerDeploymentPlanResult> resultFuture) {
- this.resultFuture = resultFuture;
- }
-
- public File getFile() {
- return file;
- }
-
- public String getName() {
- return name;
- }
-
- public IStatus getStatus() throws DeploymentBuilderException {
- if (resultFuture == null
- || action == null) {
- return null;
- }
- try {
- ServerDeploymentPlanResult result = resultFuture.get(timeout, TimeUnit.MILLISECONDS);
- ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(action.getId());
- return createStatus(action, actionResult);
- } catch (Exception e) {
- throw new DeploymentBuilderException(e);
- }
- }
-
- private IStatus createStatus(DeploymentAction action, ServerDeploymentActionResult actionResult) {
- if (actionResult == null) {
- return null;
- }
-
- IStatus status = null;
- switch (actionResult.getResult()) {
- case NOT_EXECUTED:
- status = createStatus(IStatus.ERROR, "The operation {0} was not executed on unit {1}", action
- .getType().name(), getName());
- break;
- case EXECUTED:
- status = Status.OK_STATUS;
- break;
- case FAILED:
- status = createStatus(IStatus.ERROR, "The operation {0} failed for unit {1}", action.getType()
- .name(), getName());
- break;
- case ROLLED_BACK:
- status = createStatus(IStatus.ERROR, "The operation {0} for unit {1} was rolled back", action
- .getType().name(), getName());
- break;
- case CONFIGURATION_MODIFIED_REQUIRES_RESTART:
- status = createStatus(
- IStatus.WARNING,
- "The operation {0} was not executed on unit {1}. The server configuration was changed though and the server needs to be restarted",
- action.getType().name(), getName());
- break;
- }
- return status;
- }
-
- private IStatus createStatus(int severity, String messagePattern, Object... messageArguments) {
- return new Status(severity, Activator.getContext().getBundle().getSymbolicName(), MessageFormat.format(
- messagePattern, messageArguments));
- }
- }
}
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilderException.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilderException.java 2011-04-11 09:54:41 UTC (rev 30466)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilderException.java 2011-04-11 11:04:25 UTC (rev 30467)
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc..
- * All rights reserved. This program and the accompanying materials
- * are 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 Incorporated - initial API and implementation
- *******************************************************************************/
-package org.jboss.ide.eclipse.as7.deployment;
-
-/**
- * @author André Dietisheim
- */
-public class DeploymentBuilderException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- public DeploymentBuilderException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public DeploymentBuilderException(Throwable cause) {
- super(cause);
- }
-
- public DeploymentBuilderException(String message) {
- super(message);
- }
-
-}
Copied: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentException.java (from rev 30454, workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilderException.java)
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentException.java (rev 0)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentException.java 2011-04-11 11:04:25 UTC (rev 30467)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.ide.eclipse.as7.deployment;
+
+/**
+ * @author André Dietisheim
+ */
+public class DeploymentException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ public DeploymentException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public DeploymentException(Throwable cause) {
+ super(cause);
+ }
+
+ public DeploymentException(String message) {
+ super(message);
+ }
+
+}
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentException.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Session.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Session.java (rev 0)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Session.java 2011-04-11 11:04:25 UTC (rev 30467)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ide.eclipse.as7.deployment;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager;
+import org.jboss.as.protocol.StreamUtils;
+
+/**
+ * @author André Dietisheim
+ */
+public class Session {
+
+ private ModelControllerClient client;
+ private ServerDeploymentManager manager;
+
+ public Session(String host, int port) throws UnknownHostException {
+ this.client = ModelControllerClient.Factory.create(InetAddress.getByName(host), port);
+ this.manager = ServerDeploymentManager.Factory.create(client);
+ }
+
+ public ServerDeploymentManager getManager() {
+ return manager;
+ }
+
+ public void close() {
+ StreamUtils.safeClose(client);
+ }
+}
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Session.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 6 months
JBoss Tools SVN: r30466 - workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-11 05:54:41 -0400 (Mon, 11 Apr 2011)
New Revision: 30466
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java
Log:
now returning builder that was returned by operation
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java 2011-04-11 09:50:06 UTC (rev 30465)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java 2011-04-11 09:54:41 UTC (rev 30466)
@@ -26,7 +26,6 @@
import org.jboss.as.controller.client.helpers.standalone.DeploymentAction;
import org.jboss.as.controller.client.helpers.standalone.DeploymentPlan;
import org.jboss.as.controller.client.helpers.standalone.DeploymentPlanBuilder;
-import org.jboss.as.controller.client.helpers.standalone.InitialDeploymentPlanBuilder;
import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentActionResult;
import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager;
import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentPlanResult;
@@ -43,12 +42,10 @@
private ServerDeploymentManager manager;
private final List<Deployable> deployables = new ArrayList<Deployable>();
private long timeout = DEFAULT_TIMEOUT;
- private InitialDeploymentPlanBuilder builder;
public DeploymentBuilder(String host, int port) throws UnknownHostException {
this.client = ModelControllerClient.Factory.create(InetAddress.getByName(host), port);
this.manager = ServerDeploymentManager.Factory.create(client);
- this.builder = manager.newDeploymentPlan();
}
public DeploymentBuilder add(String name, File file) {
@@ -71,7 +68,7 @@
}
try {
- addWarFiles(builder, deployables);
+ DeploymentPlanBuilder builder = addToBuilder(deployables, manager.newDeploymentPlan().withoutRollback());
DeploymentPlan plan = builder.build();
Future<ServerDeploymentPlanResult> planResult = manager.execute(plan);
setResult(planResult, deployables);
@@ -89,12 +86,14 @@
}
}
- private void addWarFiles(DeploymentPlanBuilder builder, List<Deployable> deployables) throws IOException {
+ private DeploymentPlanBuilder addToBuilder(List<Deployable> deployables, DeploymentPlanBuilder builder)
+ throws IOException {
for (int i = 0; i < deployables.size(); i++) {
Deployable deployable = deployables.get(i);
- DeploymentPlanBuilder addBuilder = builder.add(deployable.getName(), deployable.getFile()).andDeploy();
- deployable.setDeploymentAction(addBuilder.getLastAction());
+ builder = builder.add(deployable.getName(), deployable.getFile()).andDeploy();
+ deployable.setDeploymentAction(builder.getLastAction());
}
+ return builder;
}
private void cleanup() {
@@ -146,6 +145,10 @@
}
private IStatus createStatus(DeploymentAction action, ServerDeploymentActionResult actionResult) {
+ if (actionResult == null) {
+ return null;
+ }
+
IStatus status = null;
switch (actionResult.getResult()) {
case NOT_EXECUTED:
@@ -178,8 +181,4 @@
messagePattern, messageArguments));
}
}
-
- public static class Deployment {
-
- }
}
13 years, 6 months
JBoss Tools SVN: r30465 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-04-11 05:50:06 -0400 (Mon, 11 Apr 2011)
New Revision: 30465
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaEntityImpl.java
Log:
https://issues.jboss.org/browse/JBIDE-8708
Return valid DBTable name
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaEntityImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaEntityImpl.java 2011-04-11 07:31:30 UTC (rev 30464)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaEntityImpl.java 2011-04-11 09:50:06 UTC (rev 30465)
@@ -16,10 +16,13 @@
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.Filter;
-import org.eclipse.jpt.common.utility.internal.iterators.TransformationIterator;
+import org.eclipse.jpt.common.utility.internal.CollectionTools;
+import org.eclipse.jpt.common.utility.internal.NotNullFilter;
+import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
import org.eclipse.jpt.jpa.core.context.BaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.Table;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaEntity;
@@ -311,20 +314,6 @@
messages.add(message);
}
- /*protected String getResourceDefaultName() {
- NamingStrategy ns = getJpaProject().getNamingStrategy();
- if (getJpaProject().isNamingStrategyEnabled() && ns != null){
- try {
- return ns.classToTableName(javaResourcePersistentType.getName());
- } catch (Exception e) {
- Message m = new LocalMessage(IMessage.HIGH_SEVERITY,
- Messages.NAMING_STRATEGY_EXCEPTION, new String[0], null);
- HibernateJptPlugin.logException(m.getText(), e);
- }
- }
- return javaResourcePersistentType.getName();
- }*/
-
@Override
protected PrimaryKeyJoinColumnOwner buildPrimaryKeyJoinColumnOwner() {
return new HibernatePrimaryKeyJoinColumnOwner();
@@ -398,26 +387,30 @@
return getPrimaryKeyColumnName();
}
}
-
}
-
- @Override
- public String getPrimaryTableName() {
- return this.getTable().getDBTableName();
+
+ protected boolean tableNameIsValid(String tableName) {
+ return this.tableIsUndefined || CollectionTools.contains(this.getAllAssociatedDBTableNames(), tableName);
}
+
+ public Iterable<String> getAllAssociatedDBTableNames() {
+ return this.convertToDBNames(this.getAllAssociatedTables());
+ }
- @Override
- public String getDefaultTableName() {
- return super.getDefaultTableName();
+ /**
+ * strip out <code>null</code> names
+ */
+ protected Iterable<String> convertToDBNames(Iterable<ReadOnlyTable> tables) {
+ return new FilteringIterable<String>(this.convertToDBNames_(tables), NotNullFilter.<String>instance());
}
/**
* Convert Table to it's DB name.
*/
- protected Iterator<String> tableNames(Iterator<Table> tables) {
- return new TransformationIterator<Table, String>(tables) {
+ protected Iterable<String> convertToDBNames_(Iterable<ReadOnlyTable> tables) {
+ return new TransformationIterable<ReadOnlyTable, String>(tables) {
@Override
- protected String transform(Table t) {
+ protected String transform(ReadOnlyTable t) {
if (t instanceof HibernateTable) {
return ((HibernateTable)t).getDBTableName();
} else {
@@ -427,6 +420,11 @@
};
}
+ @Override
+ public String getPrimaryTableName() {
+ return this.getTable().getDBTableName();
+ }
+
// ********** cacheable **********
@Override
13 years, 6 months
JBoss Tools SVN: r30462 - workspace/grid/bpel-examples.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-04-11 02:48:01 -0400 (Mon, 11 Apr 2011)
New Revision: 30462
Added:
workspace/grid/bpel-examples/Fault_Compensation.zip
workspace/grid/bpel-examples/While_Wait.zip
workspace/grid/bpel-examples/While_Wait_WS.zip
Log:
add some bpel samples
Added: workspace/grid/bpel-examples/Fault_Compensation.zip
===================================================================
(Binary files differ)
Property changes on: workspace/grid/bpel-examples/Fault_Compensation.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/grid/bpel-examples/While_Wait.zip
===================================================================
(Binary files differ)
Property changes on: workspace/grid/bpel-examples/While_Wait.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/grid/bpel-examples/While_Wait_WS.zip
===================================================================
(Binary files differ)
Property changes on: workspace/grid/bpel-examples/While_Wait_WS.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
13 years, 6 months