JBoss Tools SVN: r23927 - trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-08-04 14:40:03 -0400 (Wed, 04 Aug 2010)
New Revision: 23927
Added:
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/SimpleTest.js
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/libsimpletest.so
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/simple.xpt
Log:
simple test application for xulrunner
Added: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/SimpleTest.js
===================================================================
--- trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/SimpleTest.js (rev 0)
+++ trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/SimpleTest.js 2010-08-04 18:40:03 UTC (rev 23927)
@@ -0,0 +1,108 @@
+/* vim:set ts=2 sw=2 sts=2 et cin: */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Google Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Darin Fisher <darin(a)meer.net>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+const SIMPLETEST_CONTRACTID = "@test.mozilla.org/simple-test;1?impl=js";
+const SIMPLETEST_CLASSID = Components.ID("{4177e257-a0dc-49b9-a774-522a000a49fa}");
+
+function SimpleTest() {
+}
+
+SimpleTest.prototype = {
+ QueryInterface: function(iid) {
+ if (iid.equals(Components.interfaces.nsISimpleTest) ||
+ iid.equals(Components.interfaces.nsISupports))
+ return this;
+ throw Components.results.NS_ERROR_NO_INTERFACE;
+ },
+
+ add: function(a, b) {
+ dump("add(" + a + "," + b + ") from JS\n");
+ return a + b;
+ }
+};
+
+var Module = {
+ _classes: {
+ simpletest: {
+ classID : SIMPLETEST_CLASSID,
+ contractID : SIMPLETEST_CONTRACTID,
+ className : "SimpleTest",
+ factory : {
+ createInstance: function(delegate, iid) {
+ if (delegate)
+ throw Components.results.NS_ERROR_NO_AGGREGATION;
+ return new SimpleTest().QueryInterface(iid);
+ }
+ }
+ }
+ },
+
+ registerSelf: function(compMgr, fileSpec, location, type)
+ {
+ var reg = compMgr.QueryInterface(
+ Components.interfaces.nsIComponentRegistrar);
+
+ for (var key in this._classes) {
+ var c = this._classes[key];
+ reg.registerFactoryLocation(c.classID, c.className, c.contractID,
+ fileSpec, location, type);
+ }
+ },
+
+ getClassObject: function(compMgr, cid, iid)
+ {
+ if (!iid.equals(Components.interfaces.nsIFactory))
+ throw Components.results.NS_ERROR_NO_INTERFACE;
+
+ for (var key in this._classes) {
+ var c = this._classes[key];
+ if (cid.equals(c.classID))
+ return c.factory;
+ }
+
+ throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
+ },
+
+ canUnload: function (aComponentManager)
+ {
+ return true;
+ }
+};
+
+function NSGetModule(compMgr, fileSpec) {
+ return Module;
+}
Added: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/libsimpletest.so
===================================================================
(Binary files differ)
Property changes on: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/libsimpletest.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/simple.xpt
===================================================================
(Binary files differ)
Property changes on: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/simple.xpt
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 4 months
JBoss Tools SVN: r23926 - in trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86: simple and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-08-04 14:31:22 -0400 (Wed, 04 Aug 2010)
New Revision: 23926
Added:
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/application.ini
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/en-US.jar
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/en-US.manifest
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/simple.jar
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/simple.manifest
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/components.list
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/defaults/
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/defaults/preferences/
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/defaults/preferences/simple-prefs.js
trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/extensions/
Log:
simple test application for xulrunner
Added: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/application.ini
===================================================================
--- trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/application.ini (rev 0)
+++ trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/application.ini 2010-08-04 18:31:22 UTC (rev 23926)
@@ -0,0 +1,42 @@
+[App]
+;
+; This field specifies your organization's name. This field is recommended,
+; but optional.
+Vendor=MozillaTest
+;
+; This field specifies your application's name. This field is required.
+Name=Simple
+;
+; This field specifies your application's version. This field is required.
+Version=0.1
+;
+; This field specifies your application's build ID (timestamp). This field is
+; required.
+BuildID=20070625
+;
+; This field specifies a compact copyright notice for your application. This
+; field is optional.
+Copyright=Copyright (c) 2004 Mozilla.org
+;
+; This ID is just an example. Every XUL app ought to have it's own unique ID.
+; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
+; irc.mozilla.org and /msg botbot uuid. This field is optional.
+ID={3aea3f07-ffe3-4060-bb03-bff3a5365e90}
+
+[Gecko]
+;
+; This field is required. It specifies the minimum Gecko version that this
+; application requires.
+MinVersion=1.9.2
+;
+; This field is optional. It specifies the maximum Gecko version that this
+; application requires. It should be specified if your application uses
+; unfrozen interfaces.
+MaxVersion=1.9.2
+
+[Shell]
+;
+; This field specifies the location of your application's main icon with file
+; extension excluded. NOTE: Unix style file separators are required. This
+; field is optional.
+Icon=chrome/icons/default/simple
Property changes on: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/application.ini
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/en-US.jar
===================================================================
(Binary files differ)
Property changes on: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/en-US.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/en-US.manifest
===================================================================
--- trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/en-US.manifest (rev 0)
+++ trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/en-US.manifest 2010-08-04 18:31:22 UTC (rev 23926)
@@ -0,0 +1 @@
+locale simple en-US jar:en-US.jar!/locale/en-US/
Added: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/simple.jar
===================================================================
(Binary files differ)
Property changes on: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/simple.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/simple.manifest
===================================================================
--- trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/simple.manifest (rev 0)
+++ trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/chrome/simple.manifest 2010-08-04 18:31:22 UTC (rev 23926)
@@ -0,0 +1 @@
+content simple jar:simple.jar!/content/
Added: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/components.list
===================================================================
--- trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/components.list (rev 0)
+++ trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/components/components.list 2010-08-04 18:31:22 UTC (rev 23926)
@@ -0,0 +1,2 @@
+libsimpletest.so
+SimpleTest.js
Added: trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/defaults/preferences/simple-prefs.js
===================================================================
--- trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/defaults/preferences/simple-prefs.js (rev 0)
+++ trunk/xulrunner/plugins/org.mozilla.xulrunner.gtk.linux.x86/simple/defaults/preferences/simple-prefs.js 2010-08-04 18:31:22 UTC (rev 23926)
@@ -0,0 +1,2 @@
+pref("toolkit.defaultChromeURI", "chrome://simple/content/simple.xul");
+pref("general.useragent.extra.simple", "SimpleApp/0.1");
15 years, 4 months
JBoss Tools SVN: r23925 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-08-04 13:29:02 -0400 (Wed, 04 Aug 2010)
New Revision: 23925
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs/SeamPdf.xml
Log:
https://jira.jboss.org/browse/JBIDE-5231
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs/SeamPdf.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs/SeamPdf.xml 2010-08-04 16:49:52 UTC (rev 23924)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs/SeamPdf.xml 2010-08-04 17:29:02 UTC (rev 23925)
@@ -408,5 +408,789 @@
<component name="pageNumber">
<description>The current page number can be placed inside of a header or footer using the p:pageNumber tag. The page number tag can only be used in the context of a header or footer and can only be used once.</description>
</component>
+
+ <component name="chapter">
+ <description>If the generated document follows a book/article structure, the p:chapter and p:section tags can be used to provide the necessary structure. Sections can only be used inside of chapters, but they may be nested arbitrarily deep. Most PDF viewers provide easy navigation between chapters and sections in a document.</description>
+ <attribute name="alignment">
+ <description>The alignment of the chapter/section box section. Seam PDF supports the following horizontal alignment values: left, right, center, justify and justifyall. The vertical alignment values are top, middle, bottom, and baseline.</description>
+ <proposal type="enumeration">
+ <param value="left" />
+ <param value="right" />
+ <param value="center" />
+ <param value="justify" />
+ <param value="justifyall" />
+ <param value="top" />
+ <param value="middle" />
+ <param value="bottom" />
+ <param value="baseline" />
+ </proposal>
+ </attribute>
+ <attribute name="number">
+ <description>The chapter number. Every chapter should be assigned a chapter number.</description>
+ </attribute>
+ <attribute name="numberDepth">
+ <description>The depth of numbering for section. All sections are numbered relative to their surrounding chapter/sections. The fourth section of of the first section of chapter three would be section 3.1.4, if displayed at the default number depth of three. To omit the chapter number, a number depth of 2 should be used. In that case, the section number would be displayed as 1.4.</description>
+ </attribute>
+ </component>
+
+ <component name="section">
+ <description>If the generated document follows a book/article structure, the p:chapter and p:section tags can be used to provide the necessary structure. Sections can only be used inside of chapters, but they may be nested arbitrarily deep. Most PDF viewers provide easy navigation between chapters and sections in a document.</description>
+ <attribute name="alignment">
+ <description>The alignment of the chapter/section box section. Seam PDF supports the following horizontal alignment values: left, right, center, justify and justifyall. The vertical alignment values are top, middle, bottom, and baseline.</description>
+ <proposal type="enumeration">
+ <param value="left" />
+ <param value="right" />
+ <param value="center" />
+ <param value="justify" />
+ <param value="justifyall" />
+ <param value="top" />
+ <param value="middle" />
+ <param value="bottom" />
+ <param value="baseline" />
+ </proposal>
+ </attribute>
+ <attribute name="number">
+ <description>The chapter number. Every chapter should be assigned a chapter number.</description>
+ </attribute>
+ <attribute name="numberDepth">
+ <description>The depth of numbering for section. All sections are numbered relative to their surrounding chapter/sections. The fourth section of of the first section of chapter three would be section 3.1.4, if displayed at the default number depth of three. To omit the chapter number, a number depth of 2 should be used. In that case, the section number would be displayed as 1.4.</description>
+ </attribute>
+ </component>
+
+ <component name="title">
+ <description>Any chapter or section can contain a p:title. The title will be displayed next to the chapter/section number. The body of the title may contain raw text or may be a p:paragraph.</description>
+ </component>
+ <component name="list">
+ <attribute name="type">
+ <description> The ordering/bulleting style of list. One of: NUMBERED, LETTERED, GREEK, ROMAN, ZAPFDINGBATS, ZAPFDINGBATS_NUMBER. If no style is given, the list items are bulleted.</description>
+ <proposal type="enumeration">
+ <param value="NUMBERED" />
+ <param value="LETTERED" />
+ <param value="GREEK" />
+ <param value="ROMAN" />
+ <param value="ZAPFDINGBATS" />
+ <param value="ZAPFDINGBATS_NUMBER" />
+ </proposal>
+ </attribute>
+ <attribute name="listSymbol">
+ <description>For bulleted lists, specifies the bullet symbol.</description>
+ </attribute>
+ <attribute name="indent">
+ <description>The indentation level of the list.</description>
+ </attribute>
+ <attribute name="lowerCase">
+ <description>For list styles using letters, indicates whether the letters should be lower case.</description>
+ </attribute>
+ <attribute name="charNumber">
+ <description>For ZAPFDINGBATS, indicates the character code of the bullet character.</description>
+ </attribute>
+ <attribute name="numberType">
+ <description>For ZAPFDINGBATS_NUMBER, indicates the numbering style.</description>
+ </attribute>
+ </component>
+
+ <component name="listItem">
+ <attribute name="alignment">
+ <description>The alignment of the list item. Seam PDF supports the following horizontal alignment values: left, right, center, justify and justifyall. The vertical alignment values are top, middle, bottom, and baseline.</description>
+ <proposal type="enumeration">
+ <param value="left" />
+ <param value="right" />
+ <param value="center" />
+ <param value="justify" />
+ <param value="justifyall" />
+ <param value="top" />
+ <param value="middle" />
+ <param value="bottom" />
+ <param value="baseline" />
+ </proposal>
+ </attribute>
+ <attribute name="indentationLeft">
+ <description>The left indentation amount.</description>
+ </attribute>
+ <attribute name="indentationRight">
+ <description>The right indentation amount.</description>
+ </attribute>
+ <attribute name="listSymbol">
+ <description>Overrides the default list symbol for this list item.</description>
+ </attribute>
+ </component>
+
+ <component name="table">
+ <attribute name="columns">
+ <description>The number of columns (cells) that make up a table row.</description>
+ </attribute>
+ <attribute name="widths">
+ <description>The relative widths of each column. There should be one value for each column. For example: widths="2 1 1" would indicate that there are 3 columns and the first column should be twice the size of the second and third column.</description>
+ </attribute>
+ <attribute name="headerRows">
+ <description>The initial number of rows which are considered to be headers or footer rows and should be repeated if the table spans multiple pages.</description>
+ </attribute>
+ <attribute name="footerRows">
+ <description>The number of rows that are considered to be footer rows. This value is subtracted from the headerRows value. If document has 2 rows which make up the header and one row that makes up the footer, headerRows should be set to 3 and footerRows should be set to 1</description>
+ </attribute>
+ <attribute name="widthPercentage">
+ <description>The percentage of the page width that the table spans.</description>
+ </attribute>
+ <attribute name="horizontalAlignment">
+ <description>The horizontal alignment of the table. Seam PDF supports the following horizontal alignment values: left, right, center, justify and justifyall.</description>
+ <proposal type="enumeration">
+ <param value="left" />
+ <param value="right" />
+ <param value="center" />
+ <param value="justify" />
+ <param value="justifyall" />
+ </proposal>
+ </attribute>
+ <attribute name="skipFirstHeader" />
+ <attribute name="runDirection" />
+ <attribute name="lockedWidth" />
+ <attribute name="splitRows" />
+ <attribute name="spacingBefore">
+ <description>The blank space to be inserted before the element.</description>
+ </attribute>
+ <attribute name="spacingAfter">
+ <description>The blank space to be inserted after the element.</description>
+ </attribute>
+ <attribute name="extendLastRow" />
+ <attribute name="headersInEvent" />
+ <attribute name="splitLate" />
+ <attribute name="keepTogether" />
+ </component>
+
+ <component name="cell">
+ <attribute name="colspan">
+ <description>Cells can span more than one column by declaring a colspan greater than 1. Tables do not have the ability to span across multiple rows.</description>
+ </attribute>
+ <attribute name="horizontalAlignment">
+ <description>The horizontal alignment of the cell. Seam PDF supports the following horizontal alignment values: left, right, center, justify and justifyall.</description>
+ <proposal type="enumeration">
+ <param value="left" />
+ <param value="right" />
+ <param value="center" />
+ <param value="justify" />
+ <param value="justifyall" />
+ </proposal>
+ </attribute>
+ <attribute name="verticalAlignment">
+ <description>The vertical alignment of the cell. Seam PDF supports the following vertical alignment values: top, middle, bottom, and baseline.</description>
+ <proposal type="enumeration">
+ <param value="top" />
+ <param value="middle" />
+ <param value="bottom" />
+ <param value="baseline" />
+ </proposal>
+ </attribute>
+ <attribute name="padding">
+ <description>Padding on a given side can also be specified using paddingLeft, paddingRight, paddingTop and paddingBottom.</description>
+ </attribute>
+ <attribute name="paddingLeft" />
+ <attribute name="paddingRight" />
+ <attribute name="paddingTop" />
+ <attribute name="paddingBottom" />
+ <attribute name="useBorderPadding" />
+ <attribute name="leading" />
+ <attribute name="multipliedLeading" />
+ <attribute name="indent" />
+ <attribute name="extraParagraphSpace" />
+ <attribute name="fixedHeight" />
+ <attribute name="noWrap" />
+ <attribute name="minimumHeight" />
+ <attribute name="followingIndent" />
+ <attribute name="rightIndent" />
+ <attribute name="spaceCharRatio" />
+ <attribute name="runDirection" />
+ <attribute name="arabicOptions" />
+ <attribute name="useAscender" />
+ <attribute name="grayFill" />
+ <attribute name="rotation" />
+ </component>
+
+ <component name="barchart">
+ <description>Displays a bar chart.</description>
+ <attribute name="borderVisible">
+ <description>Controls whether or not a border is displayed around the entire chart.</description>
+ </attribute>
+ <attribute name="borderPaint">
+ <description>The color of the border, if visible.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="borderBackgroundPaint">
+ <description>The default background color of the chart.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="borderStroke" />
+ <attribute name="domainAxisLabel">
+ <description>The text label for the domain axis.</description>
+ </attribute>
+ <attribute name="domainAxisPaint">
+ <description>The color of the domain axis label.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="domainGridlinesVisible">
+ <description>Controls whether or not gridlines for the domain axis are shown on the chart.</description>
+ </attribute>
+ <attribute name="domainGridlinePaint">
+ <description>The color of the domain gridlines, if visible.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="domainGridlineStroke">
+ <description>The stroke style of the domain gridleines, if visible.</description>
+ </attribute>
+ <attribute name="height">
+ <description>The height of the chart.</description>
+ </attribute>
+ <attribute name="width">
+ <description>The width of the chart.</description>
+ </attribute>
+ <attribute name="is3D">
+ <description>A boolean value indicating that the chart should be rendered in 3D instead of 2D.</description>
+ </attribute>
+ <attribute name="legend">
+ <description>A boolean value indicating whether or not the chart should include a legend.</description>
+ </attribute>
+ <attribute name="legendItemPaint">
+ <description>The default color of the text labels in the legend.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="legendItemBackgoundPaint">
+ <description>The background color for the legend, if different from the chart background color.</description>
+ </attribute>
+ <attribute name="orientation">
+ <description>The orientation of the plot, either vertical (the default) or horizontal.</description>
+ <proposal type="enumeration">
+ <param value="vertical" />
+ <param value="horizontal" />
+ </proposal>
+ </attribute>
+ <attribute name="plotBackgroundPaint">
+ <description>The color of the plot background.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="plotBackgroundAlpha">
+ <description>The alpha (transparency) level of the plot background. It should be a number between 0 (completely transparent) and 1 (completely opaque).</description>
+ </attribute>
+ <attribute name="plotForegroundAlpha">
+ <description>The alpha (transparency) level of the plot. It should be a number between 0 (completely transparent) and 1 (completely opaque).</description>
+ </attribute>
+ <attribute name="plotOutlinePaint">
+ <description>The color of the range gridlines, if visible.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="plotOutlineStroke">
+ <description>The stroke style of the range gridleines, if visible.</description>
+ </attribute>
+ <attribute name="rangeAxisLabel">
+ <description>The text label for the range axis.</description>
+ </attribute>
+ <attribute name="rangeAxisPaint">
+ <description>The color of the range axis label.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="rangeGridlinesVisible">
+ <description>Controls whether or not gridlines for the range axis are shown on the chart.</description>
+ </attribute>
+ <attribute name="rangeGridlinePaint">
+ <description>The color of the range gridlines, if visible.</description>
+ </attribute>
+ <attribute name="rangeGridlineStroke">
+ <description>The stroke style of the range gridleines, if visible.</description>
+ </attribute>
+ <attribute name="title">
+ <description>The chart title text.</description>
+ </attribute>
+ <attribute name="titlePaint">
+ <description>The color of the chart title text.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="titleBackgroundPaint">
+ <description>The background color around the chart title.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ </component>
+
+ <component name="linechart">
+ <description>Displays a line chart.</description>
+ <attribute name="borderVisible">
+ <description>Controls whether or not a border is displayed around the entire chart.</description>
+ </attribute>
+ <attribute name="borderPaint">
+ <description>The color of the border, if visible.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="borderBackgroundPaint">
+ <description>The default background color of the chart.</description>
+ </attribute>
+ <attribute name="borderStroke" />
+ <attribute name="domainAxisLabel">
+ <description>The text label for the domain axis.</description>
+ </attribute>
+ <attribute name="domainAxisPaint">
+ <description>The color of the domain axis label.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="domainGridlinesVisible">
+ <description>Controls whether or not gridlines for the domain axis are shown on the chart.</description>
+ </attribute>
+ <attribute name="domainGridlinePaint">
+ <description>The color of the domain gridlines, if visible.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="domainGridlineStroke">
+ <description>The stroke style of the domain gridleines, if visible.</description>
+ </attribute>
+ <attribute name="height">
+ <description>The height of the chart.</description>
+ </attribute>
+ <attribute name="width">
+ <description>The width of the chart.</description>
+ </attribute>
+ <attribute name="is3D">
+ <description>A boolean value indicating that the chart should be rendered in 3D instead of 2D.</description>
+ </attribute>
+ <attribute name="legend">
+ <description>A boolean value indicating whether or not the chart should include a legend.</description>
+ </attribute>
+ <attribute name="legendItemPaint">
+ <description>The default color of the text labels in the legend.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="legendItemBackgoundPaint">
+ <description>The background color for the legend, if different from the chart background color.</description>
+ </attribute>
+ <attribute name="orientation">
+ <description>The orientation of the plot, either vertical (the default) or horizontal.</description>
+ <proposal type="enumeration">
+ <param value="vertical" />
+ <param value="horizontal" />
+ </proposal>
+ </attribute>
+ <attribute name="plotBackgroundPaint">
+ <description>The color of the plot background.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="plotBackgroundAlpha">
+ <description>The alpha (transparency) level of the plot background. It should be a number between 0 (completely transparent) and 1 (completely opaque).</description>
+ </attribute>
+ <attribute name="plotOutlinePaint">
+ <description>The color of the range gridlines, if visible.</description>
+ </attribute>
+ <attribute name="plotOutlineStroke">
+ <description>The stroke style of the range gridleines, if visible.</description>
+ </attribute>
+ <attribute name="rangeAxisLabel">
+ <description>The text label for the range axis.</description>
+ </attribute>
+ <attribute name="rangeAxisPaint">
+ <description>The color of the range axis label.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="rangeGridlinesVisible">
+ <description>Controls whether or not gridlines for the range axis are shown on the chart.</description>
+ </attribute>
+ <attribute name="rangeGridlinePaint">
+ <description>The color of the range gridlines, if visible.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="rangeGridlineStroke">
+ <description>The stroke style of the range gridleines, if visible.</description>
+ </attribute>
+ <attribute name="title">
+ <description>The chart title text.</description>
+ </attribute>
+ <attribute name="titlePaint">
+ <description>The color of the chart title text.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="titleBackgroundPaint">
+ <description>The background color around the chart title.</description>
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ </component>
+
+ <component name="piechart">
+ <description>Displays a pie chart.</description>
+ <attribute name="title">
+ <description>The chart title text.</description>
+ </attribute>
+ <attribute name="label" />
+ <attribute name="legend">
+ <description>A boolean value indicating whether or not the chart should include a legend.</description>
+ </attribute>
+ <attribute name="is3D">
+ <description>A boolean value indicating that the chart should be rendered in 3D instead of 2D.</description>
+ </attribute>
+ <attribute name="labelLinkMargin" />
+ <attribute name="labelLinkPaint">
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="labelLinkStroke" />
+ <attribute name="labelLinksVisible" />
+ <attribute name="labelOutlinePaint">
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="labelOutlineStroke" />
+ <attribute name="labelShadowPaint">
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="labelPaint" />
+ <attribute name="labelGap" />
+ <attribute name="labelBackgroundPaint">
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="startAngle" />
+ <attribute name="circular" />
+ <attribute name="direction" />
+ <attribute name="sectionOutlinePaint">
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="sectionOutlineStroke" />
+ <attribute name="sectionOutlinesVisible" />
+ <attribute name="baseSectionOutlinePaint">
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="baseSectionPaint">
+ <proposal type="enumeration">
+ <param value="white" />
+ <param value="gray" />
+ <param value="lightgray" />
+ <param value="darkgray" />
+ <param value="black" />
+ <param value="red" />
+ <param value="pink" />
+ <param value="yellow" />
+ <param value="green" />
+ <param value="magenta" />
+ <param value="cyan" />
+ <param value="blue" />
+ </proposal>
+ </attribute>
+ <attribute name="baseSectionOutlineStroke" />
+ </component>
+
</tag-lib>
\ No newline at end of file
15 years, 4 months
JBoss Tools SVN: r23924 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core: src/org/jboss/tools/deltacloud/core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-08-04 12:49:52 -0400 (Wed, 04 Aug 2010)
New Revision: 23924
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudException.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudAuthException.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Activator.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
Log:
2010-08-04 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/client/DeltaCloudAuthException.java: New file.
* src/org/jboss/tools/deltacloud/core/DeltaCloudException.java: New file.
* src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java: New file.
* src/org/jboss/tools/deltacloud/core/Activator.java (logErrorMessage): Ditto.
(log): Ditto.
* src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java (listDeltaCloudObjects):
Check for errors.
(checkForErrors): New method to check for connection errors.
(buildHardwareProfile): Check for errors and change so method throws exceptions.
(buildInstance): Ditto.
* src/org/jboss/tools/deltacloud/core/DeltaCloud.java (getInstances): Log error instead of
printing stack trace.
(getImages): Ditto.
(getRealms): New method.
(testConnection): Ditto.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-08-04 16:45:53 UTC (rev 23923)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-08-04 16:49:52 UTC (rev 23924)
@@ -1,3 +1,21 @@
+2010-08-04 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ * src/org/jboss/tools/deltacloud/core/client/DeltaCloudAuthException.java: New file.
+ * src/org/jboss/tools/deltacloud/core/DeltaCloudException.java: New file.
+ * src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java: New file.
+ * src/org/jboss/tools/deltacloud/core/Activator.java (logErrorMessage): Ditto.
+ (log): Ditto.
+ * src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java (listDeltaCloudObjects):
+ Check for errors.
+ (checkForErrors): New method to check for connection errors.
+ (buildHardwareProfile): Check for errors and change so method throws exceptions.
+ (buildInstance): Ditto.
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (getInstances): Log error instead of
+ printing stack trace.
+ (getImages): Ditto.
+ (getRealms): New method.
+ (testConnection): Ditto.
+
2010-08-03 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java (getClouds): Remove default
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Activator.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Activator.java 2010-08-04 16:45:53 UTC (rev 23923)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/Activator.java 2010-08-04 16:49:52 UTC (rev 23924)
@@ -1,6 +1,11 @@
package org.jboss.tools.deltacloud.core;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
import org.osgi.framework.BundleContext;
/**
@@ -47,4 +52,23 @@
return plugin;
}
+ public static void log(IStatus status) {
+ Activator.getDefault().getLog().log(status);
+ }
+
+ public static void logErrorMessage(String message) {
+ log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, message, null));
+ }
+
+ public static void log(Throwable e) {
+ if (e instanceof InvocationTargetException)
+ e = ((InvocationTargetException) e).getTargetException();
+ IStatus status = null;
+ if (e instanceof CoreException)
+ status = ((CoreException) e).getStatus();
+ else
+ status = new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, e.getMessage(), e);
+ log(status);
+ }
+
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-08-04 16:45:53 UTC (rev 23923)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-08-04 16:49:52 UTC (rev 23924)
@@ -7,10 +7,12 @@
import java.util.List;
import org.eclipse.core.runtime.ListenerList;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudAuthException;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.core.client.Image;
import org.jboss.tools.deltacloud.core.client.Instance;
+import org.jboss.tools.deltacloud.core.client.Realm;
public class DeltaCloud {
@@ -79,8 +81,7 @@
instances.add(instance);
}
} catch (DeltaCloudClientException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ Activator.log(e);
}
DeltaCloudInstance[] instanceArray = new DeltaCloudInstance[instances.size()];
instanceArray = instances.toArray(instanceArray);
@@ -97,10 +98,35 @@
images.add(image);
}
} catch (DeltaCloudClientException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ Activator.log(e);
}
return images.toArray(new DeltaCloudImage[images.size()]);
}
+ public boolean testConnection() {
+ String instanceId = "madeupValue"; //$NON-NLS-1$
+ try {
+ client.listInstances(instanceId);
+ return true;
+ } catch (DeltaCloudAuthException e) {
+ return false;
+ } catch (DeltaCloudClientException e) {
+ return true;
+ }
+ }
+
+ public DeltaCloudRealm[] getRealms() {
+ ArrayList<DeltaCloudRealm> realms = new ArrayList<DeltaCloudRealm>();
+ try {
+ List<Realm> list = client.listRealms();
+ for (Iterator<Realm> i = list.iterator(); i.hasNext();) {
+ DeltaCloudRealm realm = new DeltaCloudRealm(i.next());
+ realms.add(realm);
+ }
+ } catch (DeltaCloudClientException e) {
+ Activator.log(e);
+ }
+ return realms.toArray(new DeltaCloudRealm[realms.size()]);
+ }
+
}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudException.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudException.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudException.java 2010-08-04 16:49:52 UTC (rev 23924)
@@ -0,0 +1,22 @@
+package org.jboss.tools.deltacloud.core;
+
+public class DeltaCloudException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ public DeltaCloudException(String message, Throwable clause)
+ {
+ super(message, clause);
+ }
+
+ public DeltaCloudException(Throwable clause)
+ {
+ super(clause);
+ }
+
+ public DeltaCloudException(String message)
+ {
+ super(message);
+ }
+
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java 2010-08-04 16:49:52 UTC (rev 23924)
@@ -0,0 +1,25 @@
+package org.jboss.tools.deltacloud.core;
+
+import org.jboss.tools.deltacloud.core.client.Realm;
+
+public class DeltaCloudRealm {
+
+ private Realm realm;
+
+ public DeltaCloudRealm(Realm realm) {
+ this.realm = realm;
+ }
+
+ public String getId() {
+ return realm.getId();
+ }
+
+ public String getName() {
+ return realm.getName();
+ }
+
+ public String getState() {
+ return realm.getState();
+ }
+
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudAuthException.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudAuthException.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudAuthException.java 2010-08-04 16:49:52 UTC (rev 23924)
@@ -0,0 +1,22 @@
+package org.jboss.tools.deltacloud.core.client;
+
+public class DeltaCloudAuthException extends DeltaCloudClientException {
+
+ private static final long serialVersionUID = 1L;
+
+ public DeltaCloudAuthException(String message, Throwable clause)
+ {
+ super(message, clause);
+ }
+
+ public DeltaCloudAuthException(Throwable clause)
+ {
+ super(clause);
+ }
+
+ public DeltaCloudAuthException(String message)
+ {
+ super(message);
+ }
+
+}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-08-04 16:45:53 UTC (rev 23923)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-08-04 16:49:52 UTC (rev 23924)
@@ -233,8 +233,22 @@
sendRequest(DCNS.INSTANCES + "/" + instanceId + DCNS.DESTROY, RequestType.GET);
}
- private Instance buildInstance(String xml)
+ private void checkForErrors(Document d) throws DeltaCloudClientException
{
+ NodeList n = d.getElementsByTagName("error");
+ for (int i = 0; i < n.getLength();)
+ {
+ Node node = n.item(i);
+ String status = node.getAttributes().getNamedItem("status").getNodeValue();
+ if (status.equals("403"))
+ throw new DeltaCloudAuthException("Authorization error");
+ else
+ throw new DeltaCloudClientException("Connection error");
+ }
+ }
+
+ private Instance buildInstance(String xml) throws DeltaCloudClientException
+ {
try
{
Instance instance = JAXB.unmarshal(new StringReader(xml), Instance.class);
@@ -242,15 +256,17 @@
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(new InputSource(new StringReader(xml)));
-
- instance.setImageId(getIdFromHref(getAttributeValues(document, "image", "href").get(0)));
- instance.setProfileId(getIdFromHref(getAttributeValues(document, "hardware_profile", "href").get(0)));
- getProfileProperties(instance, getPropertyNodes(document, "hardware_profile"));
- instance.setRealmId(getIdFromHref(getAttributeValues(document, "realm", "href").get(0)));
- instance.setState(getElementText(document, "state").get(0));
+
+ checkForErrors(document);
+ instance.setImageId(getIdFromHref(getAttributeValues(document, "image", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
+ instance.setProfileId(getIdFromHref(getAttributeValues(document, "hardware_profile", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
+ getProfileProperties(instance, getPropertyNodes(document, "hardware_profile")); //$NON-NLS-1$
+ instance.setRealmId(getIdFromHref(getAttributeValues(document, "realm", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
+ instance.setState(getElementText(document, "state").get(0)); //$NON-NLS-1$
+
ArrayList<Instance.Action> actions = new ArrayList<Instance.Action>();
- for(String s : getAttributeValues(document, "link", "rel"))
+ for(String s : getAttributeValues(document, "link", "rel")) //$NON-NLS-1$ //$NON-NLS-2$
{
actions.add(Instance.Action.valueOf(s.toUpperCase()));
}
@@ -258,14 +274,16 @@
return instance;
}
+ catch (DeltaCloudClientException e) {
+ throw e;
+ }
catch(Exception e)
{
- e.printStackTrace();
+ return null;
}
- return null;
}
- private HardwareProfile buildHardwareProfile(String xml)
+ private HardwareProfile buildHardwareProfile(String xml) throws DeltaCloudClientException
{
try
{
@@ -274,36 +292,38 @@
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(new InputSource(new StringReader(xml)));
-
- List<Node> nodes = getPropertyNodes(document, "hardware_profile");
+
+ checkForErrors(document);
+ List<Node> nodes = getPropertyNodes(document, "hardware_profile"); //$NON-NLS-1$
+
for (Node n : nodes) {
Property p = new Property();
- p.setName(n.getAttributes().getNamedItem("name").getNodeValue());
- p.setValue(n.getAttributes().getNamedItem("value").getNodeValue());
- p.setUnit(n.getAttributes().getNamedItem("unit").getNodeValue());
- p.setKind(n.getAttributes().getNamedItem("kind").getNodeValue());
- if (p.getKind().equals("range")) {
+ p.setName(n.getAttributes().getNamedItem("name").getNodeValue()); //$NON-NLS-1$
+ p.setValue(n.getAttributes().getNamedItem("value").getNodeValue()); //$NON-NLS-1$
+ p.setUnit(n.getAttributes().getNamedItem("unit").getNodeValue()); //$NON-NLS-1$
+ p.setKind(n.getAttributes().getNamedItem("kind").getNodeValue()) ; //$NON-NLS-1$
+ if (p.getKind().equals("range")) { //$NON-NLS-1$
NodeList children = n.getChildNodes();
for (int i = 0; i < children.getLength(); ++i) {
Node child = children.item(i);
- if (child.getNodeName().equals("range")) {
- String first = child.getAttributes().getNamedItem("first").getNodeValue();
- String last = child.getAttributes().getNamedItem("last").getNodeValue();
+ if (child.getNodeName().equals("range")) { //$NON-NLS-1$
+ String first = child.getAttributes().getNamedItem("first").getNodeValue(); //$NON-NLS-1$
+ String last = child.getAttributes().getNamedItem("last").getNodeValue(); //$NON-NLS-1$
p.setRange(first, last);
}
}
}
- else if (p.getKind().equals("enum")) {
+ else if (p.getKind().equals("enum")) { //$NON-NLS-1$
ArrayList<String> enums = new ArrayList<String>();
NodeList children = n.getChildNodes();
for (int i = 0; i < children.getLength(); ++i) {
Node child = children.item(i);
- if (child.getNodeName().equals("enum")) {
+ if (child.getNodeName().equals("enum")) { //$NON-NLS-1$
NodeList enumChildren = child.getChildNodes();
for (int j = 0; j < enumChildren.getLength(); ++j) {
Node enumChild = enumChildren.item(j);
- enums.add(enumChild.getAttributes().getNamedItem("value").getNodeValue());
+ enums.add(enumChild.getAttributes().getNamedItem("value").getNodeValue()); //$NON-NLS-1$
}
}
}
@@ -400,6 +420,8 @@
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(is);
+ checkForErrors(document);
+
document.getElementsByTagName(path).toString();
ArrayList<T> dco = new ArrayList<T>();
@@ -410,6 +432,9 @@
dco.add(buildDeltaCloudObject(clazz, nodeList.item(i)));
}
return dco;
+ } catch (DeltaCloudClientException e)
+ {
+ throw e;
}
catch(Exception e)
{
15 years, 4 months
JBoss Tools SVN: r23923 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-08-04 12:45:53 -0400 (Wed, 04 Aug 2010)
New Revision: 23923
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
Log:
2010-08-04 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java (addPages):
(performTest): New method to test connection.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionPage.java (checkURL):
(NewCloudConnectionPage): Pass in calling wizard.
(.widgetSelected): New method for test button.
(createControl): Add test button and refine format layout.
(validate): Clear the message area each time.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties: Add new
messages for connection testing purposes.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-08-04 16:40:23 UTC (rev 23922)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-08-04 16:45:53 UTC (rev 23923)
@@ -1,3 +1,15 @@
+2010-08-04 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java (addPages):
+ (performTest): New method to test connection.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionPage.java (checkURL):
+ (NewCloudConnectionPage): Pass in calling wizard.
+ (.widgetSelected): New method for test button.
+ (createControl): Add test button and refine format layout.
+ (validate): Clear the message area each time.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties: Add new
+ messages for connection testing purposes.
+
2010-08-03 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance.java: New file.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java 2010-08-04 16:40:23 UTC (rev 23922)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnection.java 2010-08-04 16:45:53 UTC (rev 23923)
@@ -8,6 +8,7 @@
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudImage;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.ui.Activator;
@@ -28,7 +29,7 @@
@Override
public void addPages() {
// TODO Auto-generated method stub
- mainPage = new NewCloudConnectionPage(WizardMessages.getString(MAINPAGE_NAME));
+ mainPage = new NewCloudConnectionPage(WizardMessages.getString(MAINPAGE_NAME), this);
addPage(mainPage);
}
@@ -37,6 +38,20 @@
return mainPage.isPageComplete();
}
+ public boolean performTest() {
+ String name = mainPage.getName();
+ String url = mainPage.getURL();
+ String username = mainPage.getUsername();
+ String password = mainPage.getPassword();
+ try {
+ DeltaCloud newCloud = new DeltaCloud(name, new URL(url), username, password);
+ return newCloud.testConnection();
+ } catch (MalformedURLException e) {
+ Activator.log(e);
+ return false;
+ }
+ }
+
@Override
public boolean performFinish() {
String name = mainPage.getName();
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionPage.java 2010-08-04 16:40:23 UTC (rev 23922)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionPage.java 2010-08-04 16:45:53 UTC (rev 23923)
@@ -14,13 +14,19 @@
import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
@@ -45,6 +51,7 @@
private static final String USERNAME_LABEL = "UserName.label"; //$NON-NLS-1$
private static final String TYPE_LABEL = "Type.label"; //$NON-NLS-1$
private static final String PASSWORD_LABEL = "Password.label"; //$NON-NLS-1$
+ private static final String TESTBUTTON_LABEL = "TestButton.label"; //$NON-NLS-1$
private static final String UNKNOWN_TYPE_LABEL = "UnknownType.label"; //$NON-NLS-1$
private static final String EC2_USER_INFO = "EC2UserNameLink.text"; //$NON-NLS-1$
private static final String EC2_PASSWORD_INFO = "EC2PasswordLink.text"; //$NON-NLS-1$
@@ -52,7 +59,13 @@
private static final String INVALID_URL = "ErrorInvalidURL.text"; //$NON-NLS-1$
private static final String NONCLOUD_URL = "ErrorNonCloudURL.text"; //$NON-NLS-1$
+ private static final String TEST_SUCCESSFUL = "NewCloudConnectionTest.success"; //$NON-NLS-1$
+ private static final String TEST_FAILURE = "NewCloudConnectionTest.failure"; //$NON-NLS-1$
+
+ private NewCloudConnection wizard;
+
private Label errorLabel;
+ private Button testButton;
private Text nameText;
private Text urlText;
@@ -80,9 +93,26 @@
}
};
+
+ private SelectionListener buttonListener = new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent event) {
+ boolean successful = false;
+ if (getURLValid()) {
+ successful = wizard.performTest();
+ }
+ if (successful) {
+ setMessage(WizardMessages.getString(TEST_SUCCESSFUL));
+ } else {
+ setErrorMessage(WizardMessages.getString(TEST_FAILURE));
+ }
+ }
+
+ };
- public NewCloudConnectionPage(String pageName) {
+ public NewCloudConnectionPage(String pageName, NewCloudConnection wizard) {
super(pageName);
+ this.wizard= wizard;
setDescription(WizardMessages.getString(DESCRIPTION));
setTitle(WizardMessages.getString(TITLE));
setPageComplete(false);
@@ -115,6 +145,9 @@
private void validate() {
boolean complete = true;
boolean errorFree = true;
+
+ setMessage(null);
+
name = nameText.getText();
if (name.length() > 0) {
if (DeltaCloudManager.getDefault().findCloud(name) != null) {
@@ -172,7 +205,7 @@
// Method to check the URL for validity as Delta-cloud API specifier.
// Since this is run in thread, it does not use the setErrorMessage()
// method and instead writes error messages to the typeText label.
- private synchronized void checkURL() {
+ private synchronized boolean checkURL() {
boolean valid = false;
String oldurl = url;
url = urlText.getText();
@@ -232,8 +265,10 @@
}
setURLValid(valid);
}
- typeText.setText(cloudType);
+ if (!typeText.getText().equals(cloudType))
+ typeText.setText(cloudType);
}
+ return valid;
}
/**
@@ -295,6 +330,10 @@
passwordText = new Text(container, SWT.BORDER | SWT.PASSWORD | SWT.SINGLE);
passwordText.addModifyListener(textListener);
+ testButton = new Button(container, SWT.NULL);
+ testButton.setText(WizardMessages.getString(TESTBUTTON_LABEL));
+ testButton.addSelectionListener(buttonListener);
+
Link ec2userLink = new Link(container, SWT.NULL);
ec2userLink.setText(WizardMessages.getString(EC2_USER_INFO));
ec2userLink.addListener(SWT.Selection, linkListener);
@@ -309,7 +348,7 @@
errorLabel.setLayoutData(f);
f = new FormData();
- f.top = new FormAttachment(errorLabel, 8);
+ f.top = new FormAttachment(errorLabel, 11);
nameLabel.setLayoutData(f);
f = new FormData();
@@ -339,13 +378,13 @@
typeText.setLayoutData(f);
f = new FormData();
- f.top = new FormAttachment(typeText, 8);
+ f.top = new FormAttachment(typeText, 16);
usernameLabel.setLayoutData(f);
f = new FormData();
f.left = new FormAttachment(typeText, 0, SWT.LEFT);
- f.top = new FormAttachment(typeText, 5);
- f.right = new FormAttachment(100, 0);
+ f.top = new FormAttachment(typeText, 13);
+ f.right = new FormAttachment(100, -70);
usernameText.setLayoutData(f);
f = new FormData();
@@ -360,10 +399,19 @@
f = new FormData();
f.left = new FormAttachment(usernameText, 0, SWT.LEFT);
f.top = new FormAttachment(ec2userLink, 5);
- f.right = new FormAttachment(100, 0);
+ f.right = new FormAttachment(100, -70);
passwordText.setLayoutData(f);
f = new FormData();
+ int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ Point minSize = testButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ f.width = Math.max(widthHint, minSize.x);
+ f.left = new FormAttachment(usernameText, 10);
+ f.top = new FormAttachment(usernameText, 0);
+ f.right = new FormAttachment(100, 0);
+ testButton.setLayoutData(f);
+
+ f = new FormData();
f.left = new FormAttachment(passwordText, 0, SWT.LEFT);
f.top = new FormAttachment(passwordText, 5);
ec2pwLink.setLayoutData(f);
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-08-04 16:40:23 UTC (rev 23922)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-08-04 16:45:53 UTC (rev 23923)
@@ -1,6 +1,8 @@
NewCloudConnection.desc=Specify connection details for a cloud you wish to access
NewCloudConnection.title=Cloud Connection
NewCloudConnection.name=Cloud Connection
+NewCloudConnectionTest.success=Connection Test successful
+NewCloudConnectionTest.failure=Connection Test failed
Url.label=URL:
Name.label=Name:
15 years, 4 months
JBoss Tools SVN: r23922 - in trunk/drools/features: org.drools.eclipse.task.feature and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-04 12:40:23 -0400 (Wed, 04 Aug 2010)
New Revision: 23922
Modified:
trunk/drools/features/org.drools.eclipse.feature/pom.xml
trunk/drools/features/org.drools.eclipse.task.feature/pom.xml
trunk/drools/features/org.guvnor.tools.feature/pom.xml
Log:
switch feature versions to 5.1.0, not 5.1.0-SNAPSHOT
Modified: trunk/drools/features/org.drools.eclipse.feature/pom.xml
===================================================================
--- trunk/drools/features/org.drools.eclipse.feature/pom.xml 2010-08-04 15:27:32 UTC (rev 23921)
+++ trunk/drools/features/org.drools.eclipse.feature/pom.xml 2010-08-04 16:40:23 UTC (rev 23922)
@@ -9,6 +9,6 @@
</parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.drools.eclipse.feature</artifactId>
- <version>5.1.0-SNAPSHOT</version>
+ <version>5.1.0</version>
<packaging>eclipse-feature</packaging>
</project>
Modified: trunk/drools/features/org.drools.eclipse.task.feature/pom.xml
===================================================================
--- trunk/drools/features/org.drools.eclipse.task.feature/pom.xml 2010-08-04 15:27:32 UTC (rev 23921)
+++ trunk/drools/features/org.drools.eclipse.task.feature/pom.xml 2010-08-04 16:40:23 UTC (rev 23922)
@@ -9,6 +9,6 @@
</parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.drools.eclipse.task.feature</artifactId>
- <version>5.1.0-SNAPSHOT</version>
+ <version>5.1.0</version>
<packaging>eclipse-feature</packaging>
</project>
Modified: trunk/drools/features/org.guvnor.tools.feature/pom.xml
===================================================================
--- trunk/drools/features/org.guvnor.tools.feature/pom.xml 2010-08-04 15:27:32 UTC (rev 23921)
+++ trunk/drools/features/org.guvnor.tools.feature/pom.xml 2010-08-04 16:40:23 UTC (rev 23922)
@@ -9,6 +9,6 @@
</parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.guvnor.tools.feature</artifactId>
- <version>5.1.0-SNAPSHOT</version>
+ <version>5.1.0</version>
<packaging>eclipse-feature</packaging>
</project>
15 years, 4 months
JBoss Tools SVN: r23921 - in trunk/vpe/tests/org.jboss.tools.vpe.spring.test: resources/SpringTest/src/main/webapp/WEB-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-08-04 11:27:32 -0400 (Wed, 04 Aug 2010)
New Revision: 23921
Added:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/eval.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/eval.jsp.xml
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java
Log:
add tests for spring:eval (https://jira.jboss.org/browse/JBIDE-6711)
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/eval.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/eval.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/eval.jsp 2010-08-04 15:27:32 UTC (rev 23921)
@@ -0,0 +1,25 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<html>
+<body>
+ <h1>Test of spring:eval</h1>
+
+ <form:form modelAttribute="formBean">
+
+ <div id="eval1">
+ <spring:eval expression="T(org.jboss.tools.vpe.spring.test.springtest.data.CategoryType).values()"/>
+ </div>
+
+ <div id="eval2">
+ <spring:eval var="categories"
+ expression="T(org.jboss.tools.vpe.spring.test.springtest.data.CategoryType).values()"/>
+ </div>
+
+ <form:select path="selectedCategories1">
+ <form:options items="${categories}"/>
+ </form:select>
+
+ </form:form>
+</body>
+</html>
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/eval.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/eval.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/eval.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/eval.jsp.xml 2010-08-04 15:27:32 UTC (rev 23921)
@@ -0,0 +1,12 @@
+<tests>
+ <test id="eval1">
+ <DIV ID="eval1">
+ <SPAN CLASS="vpe-text">
+ T(org.jboss.tools.vpe.spring.test.springtest.data.CategoryType).values()
+ </SPAN>
+ </DIV>
+ </test>
+ <test id="eval2">
+ <DIV ID="eval2"></DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/eval.jsp.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-04 14:37:38 UTC (rev 23920)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-04 15:27:32 UTC (rev 23921)
@@ -14,6 +14,7 @@
<bean name="/radiobuttons.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/option.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/options.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
+ <bean name="/eval.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/errors.htm" class="org.jboss.tools.vpe.spring.test.springtest.controller.ErrorsController">
<property name="validator" ref="userValidator"/>
</bean>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-04 14:37:38 UTC (rev 23920)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-04 15:27:32 UTC (rev 23921)
@@ -22,4 +22,6 @@
<br/>
<a href="nestedPath.htm">nestedPath.htm</a>
<br/>
+<a href="eval.htm">eval.htm</a>
+<br/>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-04 14:37:38 UTC (rev 23920)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-04 15:27:32 UTC (rev 23921)
@@ -105,6 +105,10 @@
performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/escapeBody.jsp"); //$NON-NLS-1$
}
+ public void testEval() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/eval.jsp"); //$NON-NLS-1$
+ }
+
@Override
protected String getTestProjectName() {
return SpringAllTests.IMPORT_PROJECT_NAME;
15 years, 4 months
JBoss Tools SVN: r23920 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-08-04 10:37:38 -0400 (Wed, 04 Aug 2010)
New Revision: 23920
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs/JsfHtmlBasic.xml
Log:
https://jira.jboss.org/browse/JBIDE-6303
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs/JsfHtmlBasic.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs/JsfHtmlBasic.xml 2010-08-04 13:13:46 UTC (rev 23919)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/taglibs/JsfHtmlBasic.xml 2010-08-04 14:37:38 UTC (rev 23920)
@@ -2,7 +2,11 @@
<!DOCTYPE tag-lib PUBLIC "-//Red Hat, Inc//DTD Knowledge Base 2.0//EN" "http://anonsvn.jboss.org/repos/jbosstools/trunk/jst/plugins/org.jboss.too...">
<tag-lib defaultPrefix="h">
<component closeTag="true" name="commandButton">
- <attribute name="action" required="true" />
+ <attribute name="action" required="true">
+ <proposal type="beanMethodBySignature">
+ <param name="returnType" value="java.lang.String" />
+ </proposal>
+ </attribute>
<attribute name="value" required="true" />
<attribute name="image">
<proposal type="file">
15 years, 4 months
JBoss Tools SVN: r23919 - in trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test: src/org/jboss/tools/vpe/ui/bot/test and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-08-04 09:13:46 -0400 (Wed, 04 Aug 2010)
New Revision: 23919
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
Log:
Added test JspFileEditingTest
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF 2010-08-04 13:11:17 UTC (rev 23918)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/META-INF/MANIFEST.MF 2010-08-04 13:13:46 UTC (rev 23919)
@@ -34,5 +34,6 @@
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: junit.framework
Export-Package: org.jboss.tools.vpe.ui.bot.test,
- org.jboss.tools.vpe.ui.bot.test.jbide
+ org.jboss.tools.vpe.ui.bot.test.jbide,
+ org.jboss.tools.vpe.ui.bot.test.tools
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 2010-08-04 13:11:17 UTC (rev 23918)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-08-04 13:13:46 UTC (rev 23919)
@@ -7,6 +7,7 @@
import org.jboss.tools.vpe.ui.bot.test.editor.BlockCommentTest;
import org.jboss.tools.vpe.ui.bot.test.editor.ToggleCommentTest;
import org.jboss.tools.vpe.ui.bot.test.editor.VerificationOfNameSpacesTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.JspFileEditingTest;
import org.jboss.tools.vpe.ui.bot.test.editor.pagedesign.AddSubstitutedELExpressionFolderScopeTest;
import org.jboss.tools.vpe.ui.bot.test.editor.preferences.AlwaysHideSelectionBarWithoutPromptTest;
import org.jboss.tools.vpe.ui.bot.test.editor.preferences.BorderForUnknownTagsTest;
@@ -31,7 +32,7 @@
public class VPEAllBotTests extends SWTBotTestCase{
public static Test suite(){
TestSuite suite = new TestSuite("VPE All Tests"); //$NON-NLS-1$
-
+
suite.addTestSuite(CancelTagLibDefenitionTest.class);
suite.addTestSuite(ImportTagsFromTLDFileTest.class);
suite.addTestSuite(ToggleCommentTest.class);
@@ -55,6 +56,7 @@
suite.addTestSuite(NewXHTMLPageWizardTest.class);
suite.addTestSuite(VPESourceCodeTemplatesPreferencePageTest.class);
suite.addTestSuite(ExternalizeStringsDialogTest.class);
+ suite.addTestSuite(JspFileEditingTest.class);
return new TestSetup(suite);
}
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java 2010-08-04 13:13:46 UTC (rev 23919)
@@ -0,0 +1,79 @@
+/*******************************************************************************
+
+ * Copyright (c) 2007-2010 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;
+
+
+import java.io.File;
+import java.io.IOException;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.helper.FileHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.vpe.ui.bot.test.tools.SWTBotWebBrowser;
+import org.mozilla.interfaces.nsIDOMNode;
+/**
+ * Tests large XHTML file editing
+ * @author vlado pakan
+ *
+ */
+public class JspFileEditingTest extends VPEEditorTestCase {
+
+ public JspFileEditingTest() {
+ super();
+ }
+
+ public void testJspFileEditing(){
+ try{
+ String resourceWebContentLocation = getPathToResources("WebContent");
+ FileHelper.copyFilesBinaryRecursively(new File(resourceWebContentLocation),
+ new File(FileHelper.getProjectLocation(JBT_TEST_PROJECT_NAME, bot),"WebContent"),
+ null);
+ }catch (IOException ioe){
+ throw new RuntimeException("Unable to copy necessary files from plugin's resources directory",ioe);
+ }
+ bot.menu(IDELabel.Menu.FILE).menu(IDELabel.Menu.REFRESH).click();
+ bot.sleep(Timing.time1S());
+
+ eclipse.maximizeActiveShell();
+ openPage();
+ openPalette();
+ SWTBotWebBrowser swtBotWebBrowser = new SWTBotWebBrowser(TEST_PAGE,bot);
+
+ nsIDOMNode node = swtBotWebBrowser.getDomNodeByTagName("INPUT",1);
+
+ swtBotWebBrowser.selectDomNode(node,0);
+ bot.sleep(Timing.time1S());
+
+ swtBotWebBrowser.clickContextMenu(node, SWTBotWebBrowser.INSERT_AFTER_MENU_LABEL,
+ SWTBotWebBrowser.JSF_MENU_LABEL,
+ SWTBotWebBrowser.HTML_MENU_LABEL,
+ SWTBotWebBrowser.H_OUTPUT_TEXT_TAG_MENU_LABEL);
+
+ final SWTBotEclipseEditor jspTextEditor = bot.editorByTitle(TEST_PAGE).toTextEditor();
+ jspTextEditor.save();
+ // Check if tag h:outputText was properly added
+ String editorText = jspTextEditor.getText();
+ assertTrue("File " + TEST_PAGE + " has to contain string '<h:outputText/>' but it doesn't",
+ editorText.contains("<h:outputText/>"));
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ return false;
+ }
+
+}
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java 2010-08-04 13:13:46 UTC (rev 23919)
@@ -0,0 +1,376 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.vpe.ui.bot.test.tools;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.lang.reflect.Field;
+import java.util.Arrays;
+
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Decorations;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.WidgetResult;
+import org.eclipse.ui.IEditorReference;
+import org.jboss.tools.jst.jsp.editor.IVisualEditor;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.parts.ObjectMultiPageEditorBot;
+import org.jboss.tools.vpe.editor.VpeEditorPart;
+import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
+import org.jboss.tools.vpe.editor.mozilla.MozillaEventAdapter;
+import org.jboss.tools.vpe.xulrunner.util.XPCOM;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMEvent;
+import org.mozilla.interfaces.nsIDOMEventTarget;
+import org.mozilla.interfaces.nsIDOMNamedNodeMap;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.mozilla.interfaces.nsIDOMNodeList;
+import org.mozilla.interfaces.nsIDOMWindow;
+import org.mozilla.interfaces.nsIEditor;
+import org.mozilla.interfaces.nsISelection;
+import org.mozilla.interfaces.nsISelectionController;
+import org.mozilla.interfaces.nsISelectionListener;
+import org.mozilla.interfaces.nsISupports;
+import org.w3c.dom.Node;
+
+/**
+ * Helper to work with web browser used by JBoss Tools contained in JSP MultiPage Editor
+ * @author Vladimir Pakan
+ *
+ */
+public class SWTBotWebBrowser {
+ public static final String INSERT_AROUND_MENU_LABEL = "Insert around";
+ public static final String INSERT_BEFORE_MENU_LABEL = "Insert before";
+ public static final String INSERT_AFTER_MENU_LABEL = "Insert after";
+ public static final String INSERT_INTO_MENU_LABEL = "Insert into";
+ public static final String REPLACE_WITH_MENU_LABEL = "Replace with";
+ public static final String STRIP_TAG_MENU_LABEL = "Strip Tag";
+ public static final String JSF_MENU_LABEL = "JSF";
+ public static final String HTML_MENU_LABEL = "HTML";
+ public static final String H_OUTPUT_TEXT_TAG_MENU_LABEL = "<h:outputText>";
+
+ private Display display;
+ private IVisualEditor visualEditor;
+ private MozillaEditor mozillaEditor;
+ private SWTBot bot;
+
+ public SWTBotWebBrowser (String title, SWTBot bot){
+ ObjectMultiPageEditorBot objectMultiPageEditorBot = new ObjectMultiPageEditorBot(title);
+ IEditorReference ref = objectMultiPageEditorBot.getEditorReference();
+ JSPMultiPageEditor multiPageEditor = null;
+ if (ref.getPart(true) instanceof JSPMultiPageEditor) {
+ multiPageEditor = (JSPMultiPageEditor)ref.getPart(true);
+ }
+ assertNotNull(multiPageEditor);
+ this.bot = bot;
+ this.visualEditor = multiPageEditor.getVisualEditor();
+ this.mozillaEditor = ((VpeEditorPart)multiPageEditor.getVisualEditor()).getVisualEditor();
+ this.display = getBrowser().getDisplay();
+ }
+
+ /**
+ * For debug purposes. Displays formatted node
+ * @param node
+ * @param depth
+ */
+ @SuppressWarnings("unused")
+ private static void displayNsIDOMNode(nsIDOMNode node , int depth) {
+ System.out.println("");
+ System.out.print(fillString(' ', depth) + "<" + node.getNodeName() + " ");
+
+ // display node's attributes
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ nsIDOMNamedNodeMap modelAttributes = node.getAttributes();
+ for (int i = 0; i < modelAttributes.getLength(); i++) {
+ nsIDOMNode modelAttr = modelAttributes.item(i);
+ System.out.print(modelAttr.getNodeName() + "=" + modelAttr.getNodeValue().replaceAll("\n", "") + " ");
+ }
+ }
+ System.out.println(">");
+ if (node.getNodeValue() != null){
+ System.out.println(fillString(' ', depth + 2) + node.getNodeValue());
+ }
+ // display children
+ nsIDOMNodeList children = node.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++) {
+
+ nsIDOMNode child = children.item(i);
+
+ // leave out empty text nodes in test dom model
+ if ((child.getNodeType() == Node.TEXT_NODE)
+ && ((child.getNodeValue() == null) || (child.getNodeValue().trim()
+ .length() == 0)))
+ continue;
+
+ displayNsIDOMNode(child, depth + 2);
+
+ }
+ System.out.println(fillString(' ', depth) + "<" + node.getNodeName() + "/>");
+ }
+ /**
+ * Displays complete browser DOM
+ */
+ public void displayWebBrowserDOM(){
+ SWTBotWebBrowser.displayNsIDOMNode(mozillaEditor.getDomDocument(), 0);
+ }
+ /**
+ * Returns browser DOM Document
+ * @return
+ */
+ public nsIDOMDocument getNsIDOMDocument(){
+ return mozillaEditor.getDomDocument();
+ }
+ /**
+ * Selects node within visual editor
+ * @param node
+ * @param offset
+ */
+ public void selectDomNode (final nsIDOMNode node, final int offset){
+ setFocus();
+ final nsISelection selection = getSelectionController().getSelection(nsISelectionController.SELECTION_NORMAL);
+ selection.removeAllRanges();
+ selection.collapse(node,offset);
+ display.syncExec(new Runnable() {
+ public void run() {
+ getMozillaEventAdapter().notifySelectionChanged(getNsIDOMDocument(), selection, nsISelectionListener.MOUSEDOWN_REASON);
+ }
+ });
+ try {
+ Thread.sleep(Timing.time5S());
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ /**
+ * Returns node corresponding to specified tagName
+ * @param tagName
+ * @param order - index of tagName tag in DOM model from all tagName nodes contained in model
+ * @return
+ */
+ public nsIDOMNode getDomNodeByTagName(String tagName , int order) {
+
+ nsIDOMNode result = null;
+
+ nsIDOMNodeList nodeList = getNsIDOMDocument().getElementsByTagName(tagName);
+
+ if (nodeList.getLength() > order){
+ result = nodeList.item(order);
+ }
+
+ return result;
+
+ }
+ /**
+ * Returns first node corresponding to specified tagName
+ * @param tagName
+ * @return
+ */
+ public nsIDOMNode getDomNodeByTagName(String tagName) {
+ return getDomNodeByTagName(tagName, 0);
+ }
+ /**
+ * Returns nsIDOMWindow containing WebBrowser Content
+ * @return
+ */
+ public nsIDOMWindow getContentDOMWindow (){
+ return mozillaEditor.getXulRunnerEditor().getWebBrowser().getContentDOMWindow();
+ }
+ /**
+ * Returns WebBrowser nsISelectionController
+ * @return
+ */
+ public nsISelectionController getSelectionController(){
+ return getEditor().getSelectionController();
+ }
+ /**
+ * Returns WebBrowser nsIEditor
+ * @return
+ */
+ public nsIEditor getEditor(){
+ return mozillaEditor.getEditor();
+
+ }
+ /**
+ * Returns Mozilla Event Adapter MozillaEventAdapter
+ * @return
+ */
+ public MozillaEventAdapter getMozillaEventAdapter(){
+ return mozillaEditor.getMozillaEventAdapter();
+
+ }
+ /**
+ * Returns selected DOM Node
+ * @return
+ */
+ public nsIDOMNode getSelectedDomNode (){
+ nsIDOMNode result = null;
+ display.syncExec(new Runnable() {
+ public void run() {
+ mozillaEditor.setFocus();
+ }
+ });
+ nsISelection selection = getSelectionController().getSelection(nsISelectionController.SELECTION_NORMAL);
+ if (selection != null){
+ result = selection.getFocusNode();
+ }
+ return result;
+ }
+ /**
+ * Sets focus to Web Browser
+ */
+ public void setFocus(){
+ display.syncExec(new Runnable() {
+ public void run() {
+ mozillaEditor.setFocus();
+ }
+ });
+ }
+ /**
+ * Returns associated SWT Browser
+ * @return
+ */
+ public Browser getBrowser (){
+ return mozillaEditor.getXulRunnerEditor().getBrowser();
+ }
+ /**
+ * Fill string with length count with character ch
+ * @param ch
+ * @param count
+ * @return
+ */
+ private static String fillString (char ch, int count){
+ String result = null;
+ if (count > 0){
+ char[] charArray = new char[count];
+ Arrays.fill(charArray, ch);
+ result = new String(charArray);
+ }
+ else {
+ result = "";
+ }
+ return result;
+ }
+ /**
+ * Returns associated Moziilla Editor
+ * @return
+ */
+ public MozillaEditor getMozillaEditor() {
+ return mozillaEditor;
+ }
+ /**
+ * Clicks on Browser Context Menu
+ * @param node
+ * @param menus
+ */
+ public void clickContextMenu(final nsIDOMNode node , final String... menuLabels){
+ // Create Context Menu Event
+ final nsIDOMEvent domEvent = new nsIDOMEvent() {
+
+ public nsISupports queryInterface(String arg0) {
+ return XPCOM.queryInterface(node,nsISupports.class);
+ }
+ public void stopPropagation() {
+ }
+ public void preventDefault() {
+ }
+ public void initEvent(String arg0, boolean arg1, boolean arg2) {
+ }
+ public String getType() {
+ return "contextmenu";
+ }
+ public double getTimeStamp() {
+ return 0;
+ }
+ public nsIDOMEventTarget getTarget() {
+ return XPCOM.queryInterface(node,nsIDOMEventTarget.class);
+ }
+ public int getEventPhase() {
+ return 0;
+ }
+
+ public nsIDOMEventTarget getCurrentTarget() {
+ return XPCOM.queryInterface(node,nsIDOMEventTarget.class);
+ }
+ public boolean getCancelable() {
+ return false;
+ }
+ public boolean getBubbles() {
+ return false;
+ }
+ };
+ // Simulate Context Menu Event
+ display.syncExec(new Runnable() {
+ public void run() {
+ getMozillaEventAdapter().handleEvent(domEvent);
+ }
+ });
+ // Get Top Menu
+ Menu topMenu = UIThreadRunnable.syncExec(new WidgetResult<Menu>() {
+ public Menu run() {
+ Menu result = null;
+ Composite parent = mozillaEditor.getControl().getParent();
+ while (!(parent instanceof Decorations)){
+ parent = parent.getParent();
+ }
+ try {
+ Field menusField = Decorations.class.getDeclaredField("menus");
+ menusField.setAccessible(true);
+ Object menusObject = menusField.get(parent);
+ if (menusObject != null){
+ Menu[] menus = (Menu[])menusObject;
+ MenuItem topMenuItem = null;
+ int index = menus.length - 1;
+ while (topMenuItem == null && index >= 0){
+ if (menus[index] != null){
+ MenuItem[] menuItems = menus[index].getItems();
+ int menuItemIndex = 0;
+ while (topMenuItem == null && menuItemIndex < menuItems.length){
+ if (menuItems[menuItemIndex].getText().equals(menuLabels[0])){
+ topMenuItem = menuItems[menuItemIndex];
+ }
+ menuItemIndex++;
+ }
+ }
+ index--;
+ }
+ if (topMenuItem != null){
+ result = topMenuItem.getParent();
+ }
+ }
+ else{
+ throw new WidgetNotFoundException("Unable to find MenuItem with label " + menuLabels[0]);
+ }
+ } catch (SecurityException se) {
+ throw new WidgetNotFoundException("Unable to find MenuItem with label " + menuLabels[0],se);
+ } catch (NoSuchFieldException nsfe) {
+ throw new WidgetNotFoundException("Unable to find MenuItem with label " + menuLabels[0],nsfe);
+ } catch (IllegalArgumentException iae) {
+ throw new WidgetNotFoundException("Unable to find MenuItem with label " + menuLabels[0],iae);
+ } catch (IllegalAccessException iace) {
+ throw new WidgetNotFoundException("Unable to find MenuItem with label " + menuLabels[0],iace);
+ }
+ return result;
+ }});
+
+ ContextMenuHelper.clickContextMenu(topMenu, menuLabels);
+
+ }
+
+}
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 4 months
JBoss Tools SVN: r23918 - in trunk/vpe: plugins/org.jboss.tools.vpe.spring/templates and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-08-04 09:11:17 -0400 (Wed, 04 Aug 2010)
New Revision: 23918
Added:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/nestedPath.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/nestedPath.jsp.xml
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/bind.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/errors.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java
Log:
add tests for spring:nestedPath (https://jira.jboss.org/browse/JBIDE-6711)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2010-08-04 13:08:15 UTC (rev 23917)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2010-08-04 13:11:17 UTC (rev 23918)
@@ -43,23 +43,23 @@
* @return
*/
public static nsIDOMNode getSelectedNode(nsISelection selection) {
-
- if (selection.getAnchorNode() == selection.getFocusNode()) {
- if (selection.getFocusNode() != null) {
- if ((selection.getFocusNode().getNodeType() != nsIDOMNode.TEXT_NODE)
+ nsIDOMNode selectedNode = null;
+ nsIDOMNode focusNode = selection.getFocusNode();
+ if (selection.getAnchorNode() == focusNode) {
+ if (focusNode != null) {
+ if ((focusNode.getNodeType() != nsIDOMNode.TEXT_NODE)
&& (selection.getFocusOffset() != 0)) {
- return selection.getFocusNode().getChildNodes().item(
+ selectedNode = focusNode.getChildNodes().item(
selection.getFocusOffset() - 1);
} else
- return selection.getFocusNode();
+ selectedNode = selection.getFocusNode();
}
} else {
nsIDOMRange range = selection.getRangeAt(0);
- nsIDOMNode visualAncestor = range.getCommonAncestorContainer();
- return visualAncestor;
+ selectedNode = range.getCommonAncestorContainer();
}
- return null;
+ return selectedNode;
}
/**
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml 2010-08-04 13:08:15 UTC (rev 23917)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml 2010-08-04 13:11:17 UTC (rev 23918)
@@ -451,7 +451,7 @@
</vpe:tag>
<vpe:tag name="spring:nestedPath" case-sensitive="yes">
- <vpe:template children="no" modify="no" />
+ <vpe:template children="yes" modify="no" />
</vpe:tag>
<vpe:tag name="spring:transform" case-sensitive="yes">
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/bind.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/bind.jsp 2010-08-04 13:08:15 UTC (rev 23917)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/bind.jsp 2010-08-04 13:11:17 UTC (rev 23918)
@@ -1,6 +1,6 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<style>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp 2010-08-04 13:08:15 UTC (rev 23917)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkboxes.jsp 2010-08-04 13:11:17 UTC (rev 23918)
@@ -1,5 +1,5 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
-<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<style>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/errors.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/errors.jsp 2010-08-04 13:08:15 UTC (rev 23917)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/errors.jsp 2010-08-04 13:11:17 UTC (rev 23918)
@@ -1,5 +1,5 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<style>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/nestedPath.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/nestedPath.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/nestedPath.jsp 2010-08-04 13:11:17 UTC (rev 23918)
@@ -0,0 +1,47 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<html>
+<head>
+<style>
+.redText {
+ -moz-appearance: none;
+ color: red;
+ font: bold;
+}
+</style>
+</head>
+<body>
+<h1>Test of spring:nestedPath</h1>
+
+<form:form modelAttribute="formBean">
+ <div id="userNestedPath">
+ <spring:nestedPath path="user">
+ <table>
+ <tr>
+ <td>First Name:</td>
+ <td><form:input path="firstName" /></td>
+ <td>
+ <form:errors id="firstNameErrors"
+ path="firstName"
+ cssClass="redText" />
+ </td>
+ </tr>
+ <tr>
+ <td>Last Name:</td>
+ <td><form:input path="lastName" /></td>
+ <td>
+ <form:errors id="lastNameErrors"
+ path="lastName"
+ cssClass="redText" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="right"><input type="submit" value="Test" /></td>
+ </tr>
+ </table>
+ </spring:nestedPath>
+ </div>
+</form:form>
+</body>
+</html>
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/nestedPath.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/nestedPath.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/nestedPath.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/nestedPath.jsp.xml 2010-08-04 13:11:17 UTC (rev 23918)
@@ -0,0 +1,45 @@
+<tests>
+ <test id="userNestedPath">
+ <DIV ID="userNestedPath">
+ <TABLE>
+ <TR>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ First Name:
+ </SPAN>
+ </TD>
+ <TD>
+ <INPUT TYPE="text" VALUE="firstName" />
+
+ </TD>
+ <TD>
+ <SPAN CLASS="redText" ID="firstNameErrors">
+ Errors for firstName field.
+ </SPAN>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ Last Name:
+ </SPAN>
+ </TD>
+ <TD>
+ <INPUT TYPE="text" VALUE="lastName" />
+
+ </TD>
+ <TD>
+ <SPAN CLASS="redText" ID="lastNameErrors">
+ Errors for lastName field.
+ </SPAN>
+ </TD>
+ </TR>
+ <TR>
+ <TD ALIGN="right" COLSPAN="2">
+ <INPUT TYPE="submit" VALUE="Test" />
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/nestedPath.jsp.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp 2010-08-04 13:08:15 UTC (rev 23917)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/option.jsp 2010-08-04 13:11:17 UTC (rev 23918)
@@ -1,5 +1,5 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
-<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<style>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp 2010-08-04 13:08:15 UTC (rev 23917)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/options.jsp 2010-08-04 13:11:17 UTC (rev 23918)
@@ -1,5 +1,5 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
-<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<style>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp 2010-08-04 13:08:15 UTC (rev 23917)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobutton.jsp 2010-08-04 13:11:17 UTC (rev 23918)
@@ -1,5 +1,5 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
-<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<style>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp 2010-08-04 13:08:15 UTC (rev 23917)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/radiobuttons.jsp 2010-08-04 13:11:17 UTC (rev 23918)
@@ -1,5 +1,5 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
-<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<style>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-04 13:08:15 UTC (rev 23917)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-04 13:11:17 UTC (rev 23918)
@@ -23,6 +23,9 @@
<bean name="/hasBindErrors.htm" class="org.jboss.tools.vpe.spring.test.springtest.controller.ErrorsController">
<property name="validator" ref="beanValidator"/>
</bean>
+ <bean name="/nestedPath.htm" class="org.jboss.tools.vpe.spring.test.springtest.controller.ErrorsController">
+ <property name="validator" ref="userValidator"/>
+ </bean>
<bean name="/select.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/escapeBody.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean id="userValidator" class="org.jboss.tools.vpe.spring.test.springtest.validator.UserValidator"/>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-04 13:08:15 UTC (rev 23917)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-04 13:11:17 UTC (rev 23918)
@@ -20,4 +20,6 @@
<br/>
<a href="select.htm">select.htm</a>
<br/>
+<a href="nestedPath.htm">nestedPath.htm</a>
+<br/>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-04 13:08:15 UTC (rev 23917)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-04 13:11:17 UTC (rev 23918)
@@ -64,6 +64,10 @@
public void testBind() throws Throwable {
performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/bind.jsp"); //$NON-NLS-1$
}
+
+ public void testNestedPath() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/nestedPath.jsp"); //$NON-NLS-1$
+ }
public void testSelect() throws Throwable {
performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/select.jsp"); //$NON-NLS-1$
15 years, 4 months