JBoss Tools SVN: r10753 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-10-08 14:37:02 -0400 (Wed, 08 Oct 2008)
New Revision: 10753
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
Log:
Bug fix https://jira.jboss.org/jira/browse/JBIDE-2856 .
Now attributes style and styleClass are not applied for popup menu, selection items and input.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-10-08 17:35:10 UTC (rev 10752)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-10-08 18:37:02 UTC (rev 10753)
@@ -183,9 +183,12 @@
final nsIDOMElement rootDiv = visualDocument.createElement(HTML.TAG_DIV);
//Fix https://jira.jboss.org/jira/browse/JBIDE-2430 issue with resizement.
- rootDiv.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_WIDTH+Constants.COLON+sourceWidth);
+ rootDiv.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_WIDTH+Constants.COLON+sourceWidth);
+ final nsIDOMElement comboBoxDiv = visualDocument.createElement(HTML.TAG_DIV);
final nsIDOMElement secondDiv = visualDocument.createElement(HTML.TAG_DIV);
- secondDiv.setAttribute(HTML.ATTR_ALIGN, this.sourceAlign);
+ comboBoxDiv.setAttribute(HTML.ATTR_ALIGN, this.sourceAlign); //$NON-NLS-1$
+ secondDiv.setAttribute(HTML.ATTR_ALIGN, this.sourceAlign);
+ //comboBoxDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("secondDiv")); //$NON-NLS-1$
secondDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("secondDiv")); //$NON-NLS-1$
String secondDivSubStyle = "; position: {0}; z-index: {1} ;"; //$NON-NLS-1$
if (isToggle) {
@@ -194,6 +197,8 @@
secondDivSubStyle = MessageFormat.format(secondDivSubStyle, "static", "0"); //$NON-NLS-1$ //$NON-NLS-2$
}
// TODO add ATTR_STYLE.
+ comboBoxDiv.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + this.sourceListWidth
+ + Constants.SEMICOLON + secondDivSubStyle);
secondDiv.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + this.sourceListWidth
+ Constants.SEMICOLON + secondDivSubStyle + sourceStyle);
final nsIDOMElement thirdDiv = visualDocument.createElement(HTML.TAG_DIV);
@@ -248,11 +253,12 @@
+ calculateWithForDiv(this.sourceWidth, 10));
forthEmptyDiv.appendChild(visualDocument.createTextNode("Struts")); //$NON-NLS-1$
- rootDiv.appendChild(secondDiv);
+ rootDiv.appendChild(comboBoxDiv);
+ comboBoxDiv.appendChild(secondDiv);
secondDiv.appendChild(thirdDiv);
if (isToggle) {
- secondDiv.appendChild(createToogleDiv(pageContext, source, visualDocument));
+ comboBoxDiv.appendChild(createToogleDiv(pageContext, source, visualDocument));
}
thirdDiv.appendChild(firstInput);
thirdDiv.appendChild(secondInput);
17 years, 3 months
JBoss Tools SVN: r10752 - in trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test: src/org/jboss/tools/jsf/text/ext and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-08 13:35:10 -0400 (Wed, 08 Oct 2008)
New Revision: 10752
Added:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/tests/
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/ELExprPartitionerTest.java
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JsfTextExtAllTests.java
Log:
Package name changed for jst.text.ext tests to exclude from coverage report
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF 2008-10-08 15:40:46 UTC (rev 10751)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF 2008-10-08 17:35:10 UTC (rev 10752)
@@ -19,5 +19,5 @@
org.jboss.tools.tests
Eclipse-LazyStart: true
Bundle-Vendor: Red Hat, Inc.
-Export-Package: org.jboss.tools.jsf.text.ext.tests
+Export-Package: org.jboss.tools.jsf.text.ext.test
Bundle-ClassPath: jsf-text-ext-tests.jar
Copied: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test (from rev 8499, trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/tests)
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/ELExprPartitionerTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/tests/ELExprPartitionerTest.java 2008-06-02 14:43:15 UTC (rev 8499)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/ELExprPartitionerTest.java 2008-10-08 17:35:10 UTC (rev 10752)
@@ -8,7 +8,7 @@
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.jsf.text.ext.tests;
+package org.jboss.tools.jsf.text.ext.test;
import java.util.ArrayList;
import java.util.HashMap;
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JsfTextExtAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/tests/JsfTextExtAllTests.java 2008-06-02 14:43:15 UTC (rev 8499)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JsfTextExtAllTests.java 2008-10-08 17:35:10 UTC (rev 10752)
@@ -8,7 +8,7 @@
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
******************************************************************************/
-package org.jboss.tools.jsf.text.ext.tests;
+package org.jboss.tools.jsf.text.ext.test;
import junit.framework.Test;
import junit.framework.TestSuite;
17 years, 3 months
JBoss Tools SVN: r10751 - trunk/examples/features/org.jboss.tools.project.examples.feature.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-08 11:40:46 -0400 (Wed, 08 Oct 2008)
New Revision: 10751
Added:
trunk/examples/features/org.jboss.tools.project.examples.feature/.project
trunk/examples/features/org.jboss.tools.project.examples.feature/build.properties
trunk/examples/features/org.jboss.tools.project.examples.feature/feature.properties
trunk/examples/features/org.jboss.tools.project.examples.feature/feature.xml
Log:
Initial import.
Added: trunk/examples/features/org.jboss.tools.project.examples.feature/.project
===================================================================
--- trunk/examples/features/org.jboss.tools.project.examples.feature/.project (rev 0)
+++ trunk/examples/features/org.jboss.tools.project.examples.feature/.project 2008-10-08 15:40:46 UTC (rev 10751)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.project.examples.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/examples/features/org.jboss.tools.project.examples.feature/build.properties
===================================================================
--- trunk/examples/features/org.jboss.tools.project.examples.feature/build.properties (rev 0)
+++ trunk/examples/features/org.jboss.tools.project.examples.feature/build.properties 2008-10-08 15:40:46 UTC (rev 10751)
@@ -0,0 +1,2 @@
+bin.includes = feature.xml,\
+ feature.properties
Added: trunk/examples/features/org.jboss.tools.project.examples.feature/feature.properties
===================================================================
Added: trunk/examples/features/org.jboss.tools.project.examples.feature/feature.xml
===================================================================
--- trunk/examples/features/org.jboss.tools.project.examples.feature/feature.xml (rev 0)
+++ trunk/examples/features/org.jboss.tools.project.examples.feature/feature.xml 2008-10-08 15:40:46 UTC (rev 10751)
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.project.examples.feature"
+ label="Project Examples"
+ version="1.0.0"
+ provider-name="Red Hat, Inc."
+ plugin="org.jboss.tools.project.examples">
+
+ <description url="http://www.example.com/description">
+ Project Examples
+ </description>
+
+ <copyright>
+ Copyright (c) 2008 Red Hat, Inc.
+Distributed under license by Red Hat, Inc. All rights reserved.
+This program is made available under the terms of the
+Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+Contributors:
+Red Hat, Inc. - initial API and implementation
+ </copyright>
+
+ <license url="http://www.eclipse.org/legal/epl-v10.html">
+ Eclipse Public License - v 1.0
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS
+ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.
+1. DEFINITIONS
+"Contribution" means:
+a) in the case of the initial Contributor, the initial code and
+documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program;
+where such changes and/or additions to the Program originate
+from and are distributed by that particular Contributor. A Contribution
+'originates' from a Contributor if it was added to the Program
+by such Contributor itself or anyone acting on such Contributor's
+behalf. Contributions do not include additions to the Program
+which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.
+"Contributor" means any person or entity that distributes the
+Program.
+"Licensed Patents " mean patent claims licensable by a Contributor
+which are necessarily infringed by the use or sale of its Contribution
+alone or when combined with the Program.
+"Program" means the Contributions distributed in accordance with
+this Agreement.
+"Recipient" means anyone who receives the Program under this
+Agreement, including all Contributors.
+2. GRANT OF RIGHTS
+a) Subject to the terms of this Agreement, each Contributor hereby
+grants Recipient a non-exclusive, worldwide, royalty-free copyright
+license to reproduce, prepare derivative works of, publicly display,
+publicly perform, distribute and sublicense the Contribution
+of such Contributor, if any, and such derivative works, in source
+code and object code form.
+b) Subject to the terms of this Agreement, each Contributor hereby
+grants Recipient a non-exclusive, worldwide, royalty-free patent
+license under Licensed Patents to make, use, sell, offer to sell,
+import and otherwise transfer the Contribution of such Contributor,
+if any, in source code and object code form. This patent license
+shall apply to the combination of the Contribution and the Program
+if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to
+be covered by the Licensed Patents. The patent license shall
+not apply to any other combinations which include the Contribution.
+No hardware per se is licensed hereunder.
+c) Recipient understands that although each Contributor grants
+the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe
+the patent or other intellectual property rights of any other
+entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement
+of intellectual property rights or otherwise. As a condition
+to exercising the rights and licenses granted hereunder, each
+Recipient hereby assumes sole responsibility to secure any other
+intellectual property rights needed, if any. For example, if
+a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient
+copyright rights in its Contribution, if any, to grant the copyright
+license set forth in this Agreement.
+3. REQUIREMENTS
+A Contributor may choose to distribute the Program in object
+code form under its own license agreement, provided that:
+a) it complies with the terms and conditions of this Agreement;
+and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties
+and conditions, express and implied, including warranties or
+conditions of title and non-infringement, and implied warranties
+or conditions of merchantability and fitness for a particular
+purpose;
+ii) effectively excludes on behalf of all Contributors all liability
+for damages, including direct, indirect, special, incidental
+and consequential damages, such as lost profits;
+iii) states that any provisions which differ from this Agreement
+are offered by that Contributor alone and not by any other party;
+and
+iv) states that source code for the Program is available from
+such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for
+software exchange.
+When the Program is made available in source code form:
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of
+the Program.
+Contributors may not remove or alter any copyright notices contained
+within the Program.
+Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.
+4. COMMERCIAL DISTRIBUTION
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While
+this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any
+losses, damages and costs (collectively "Losses") arising from
+claims, lawsuits and other legal actions brought by a third party
+against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection
+with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any
+claims or Losses relating to any actual or alleged intellectual
+property infringement. In order to qualify, an Indemnified Contributor
+must: a) promptly notify the Commercial Contributor in writing
+of such claim, and b) allow the Commercial Contributor to control,
+and cooperate with the Commercial Contributor in, the defense
+and any related settlement negotiations. The Indemnified Contributor
+may participate in any such claim at its own expense.
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have
+to defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any
+other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+5. NO WARRANTY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM
+IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with
+its exercise of rights under this Agreement , including but not
+limited to the risks and costs of program errors, compliance
+with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+6. DISCLAIMER OF LIABILITY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE
+OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGES.
+7. GENERAL
+If any provision of this Agreement is invalid or unenforceable
+under applicable law, it shall not affect the validity or enforceability
+of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be
+reformed to the minimum extent necessary to make such provision
+valid and enforceable.
+If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging
+that the Program itself (excluding combinations of the Program
+with other software or hardware) infringes such Recipient's patent(s),
+then such Recipient's rights granted under Section 2(b) shall
+terminate as of the date such litigation is filed.
+All Recipient's rights under this Agreement shall terminate if
+it fails to comply with any of the material terms or conditions
+of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If
+all Recipient's rights under this Agreement terminate, Recipient
+agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under
+this Agreement and any licenses granted by Recipient relating
+to the Program shall continue and survive.
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted
+and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other
+than the Agreement Steward has the right to modify this Agreement.
+The Eclipse Foundation is the initial Agreement Steward. The
+Eclipse Foundation may assign the responsibility to serve as
+the Agreement Steward to a suitable separate entity. Each new
+version of the Agreement will be given a distinguishing version
+number. The Program (including Contributions) may always be distributed
+subject to the version of the Agreement under which it was received.
+In addition, after a new version of the Agreement is published,
+Contributor may elect to distribute the Program (including its
+Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights
+or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under
+this Agreement are reserved.
+This Agreement is governed by the laws of the State of New York
+and the intellectual property laws of the United States of America.
+No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose.
+Each party waives its rights to a jury trial in any resulting
+litigation.
+ </license>
+
+ <url>
+ <update label="JBossTools Update Site" url="http://download.jboss.org/jbosstools/updates/stable"/>
+ </url>
+
+
+
+ <plugin
+ id="org.jboss.tools.project.examples"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
17 years, 3 months
JBoss Tools SVN: r10750 - trunk/examples/features.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-08 11:40:28 -0400 (Wed, 08 Oct 2008)
New Revision: 10750
Added:
trunk/examples/features/org.jboss.tools.project.examples.feature/
Log:
Initial import.
17 years, 3 months
JBoss Tools SVN: r10749 - in trunk/examples/plugins/org.jboss.tools.project.examples: META-INF and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-08 11:39:37 -0400 (Wed, 08 Oct 2008)
New Revision: 10749
Added:
trunk/examples/plugins/org.jboss.tools.project.examples/.classpath
trunk/examples/plugins/org.jboss.tools.project.examples/.project
trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/
trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF
trunk/examples/plugins/org.jboss.tools.project.examples/about.html
trunk/examples/plugins/org.jboss.tools.project.examples/about.ini
trunk/examples/plugins/org.jboss.tools.project.examples/about.mappings
trunk/examples/plugins/org.jboss.tools.project.examples/about.properties
trunk/examples/plugins/org.jboss.tools.project.examples/build.properties
trunk/examples/plugins/org.jboss.tools.project.examples/icons/
trunk/examples/plugins/org.jboss.tools.project.examples/icons/examples_wiz.gif
trunk/examples/plugins/org.jboss.tools.project.examples/icons/new_wiz.gif
trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
trunk/examples/plugins/org.jboss.tools.project.examples/projectExamples.xml
trunk/examples/plugins/org.jboss.tools.project.examples/rhds_wiz.png
trunk/examples/plugins/org.jboss.tools.project.examples/src/
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Category.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Project.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
Log:
Initial import.
Added: trunk/examples/plugins/org.jboss.tools.project.examples/.classpath
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/.classpath (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/.classpath 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/examples/plugins/org.jboss.tools.project.examples/.project
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/.project (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/.project 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.project.examples</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Project Examples
+Bundle-SymbolicName: org.jboss.tools.project.examples;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: org.jboss.tools.project.examples.ProjectExamplesActivator
+Bundle-Vendor: Red Hat, inc
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.jface,
+ org.eclipse.osgi,
+ org.eclipse.ecf,
+ org.eclipse.ecf.filetransfer,
+ org.eclipse.equinox.common,
+ org.eclipse.ecf.provider.filetransfer,
+ org.eclipse.equinox.security,
+ org.eclipse.equinox.p2.engine,
+ org.eclipse.equinox.p2.core,
+ org.eclipse.ui.ide
+Bundle-ActivationPolicy: lazy
Added: trunk/examples/plugins/org.jboss.tools.project.examples/about.html
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/about.html (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/about.html 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Project Examples</title>
+<style type="text/css" media="screen">
+<!--
+ body {
+ font-family: Sans-serif, Arial, Helvetica;
+ }
+
+-->
+</style>
+</head>
+<body>
+<h1>JBoss Portlet</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a href="http://www.jboss.org/tools">JBoss Tools project page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License - Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/examples/plugins/org.jboss.tools.project.examples/about.ini
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/about.ini (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/about.ini 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+# test
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=rhds_wiz.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
+
Added: trunk/examples/plugins/org.jboss.tools.project.examples/about.mappings
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/about.mappings (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/about.mappings 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,5 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
Added: trunk/examples/plugins/org.jboss.tools.project.examples/about.properties
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/about.properties (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/about.properties 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,2 @@
+blurb=JBoss Project Examples\n\nVersion\: {featureVersion}\n\n(c) Copyright JBoss Inc. contributors and others 2004 - 2008. All rights reserved.\nVisit http\://jboss.org/tools
+
Added: trunk/examples/plugins/org.jboss.tools.project.examples/build.properties
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/build.properties (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/build.properties 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/,\
+ projectExamples.xml
Added: trunk/examples/plugins/org.jboss.tools.project.examples/icons/examples_wiz.gif
===================================================================
(Binary files differ)
Property changes on: trunk/examples/plugins/org.jboss.tools.project.examples/icons/examples_wiz.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/plugins/org.jboss.tools.project.examples/icons/new_wiz.gif
===================================================================
(Binary files differ)
Property changes on: trunk/examples/plugins/org.jboss.tools.project.examples/icons/new_wiz.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension point="org.eclipse.ui.newWizards">
+ <category
+ name="JBoss Tools"
+ id="org.jboss.ide.eclipse.ui.wizards">
+ </category>
+ <wizard
+ id="org.jboss.tools.project.examples.wizard.NewProjectExamplesWizard"
+ name="Project Examples"
+ class="org.jboss.tools.project.examples.wizard.NewProjectExamplesWizard"
+ category="org.jboss.ide.eclipse.ui.wizards"
+ icon="icons/examples_wiz.gif">
+ </wizard>
+ </extension>
+</plugin>
Added: trunk/examples/plugins/org.jboss.tools.project.examples/projectExamples.xml
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/projectExamples.xml (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/projectExamples.xml 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,46 @@
+<projects>
+ <project>
+ <category>Seam</category>
+ <name>dvdstore</name>
+ <shortDescription>Seam DVD Store Example</shortDescription>
+ <description>This example demonstrates the use of Seam with jBPM pageflow and business process management. It runs on JBoss AS and Tomcat.</description>
+ <size>10000000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/seam-examples/...
+ </url>
+ </project>
+
+ <project>
+ <category>Portlet</category>
+ <name>TestJavaPortlet</name>
+ <shortDescription>JBoss Java Portlet Example</shortDescription>
+ <description>This example demonstrates the use of JBoss Java Portlet. It runs on JBoss Portal 2.7.0.</description>
+ <size>10000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/portlet-exampl...
+ </url>
+ </project>
+
+ <project>
+ <category>Portlet</category>
+ <name>TestJSFPortlet</name>
+ <shortDescription>JBoss JSF Portlet Example</shortDescription>
+ <description>This example demonstrates the use of JBoss JSF Portlet. It runs on JBoss Portal 2.7.0.</description>
+ <size>4000000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/portlet-exampl...
+ </url>
+ </project>
+
+ <project>
+ <category>Portlet</category>
+ <name>TestSeamPortlet</name>
+ <shortDescription>JBoss Seam Portlet Example</shortDescription>
+ <description>This example demonstrates the use of JBoss Seam Portlet. It runs on JBoss Portal 2.7.0.</description>
+ <size>10000000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/portlet-exampl...
+ </url>
+ </project>
+
+</projects>
\ No newline at end of file
Added: trunk/examples/plugins/org.jboss.tools.project.examples/rhds_wiz.png
===================================================================
(Binary files differ)
Property changes on: trunk/examples/plugins/org.jboss.tools.project.examples/rhds_wiz.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,72 @@
+package org.jboss.tools.project.examples;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class ProjectExamplesActivator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.project.examples";
+
+ // The shared instance
+ private static ProjectExamplesActivator plugin;
+
+ private static BundleContext context;
+
+ /**
+ * The constructor
+ */
+ public ProjectExamplesActivator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ this.context = context;
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ context = null;
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static ProjectExamplesActivator getDefault() {
+ return plugin;
+ }
+
+ public static void log(Throwable e) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, e
+ .getLocalizedMessage(), e);
+ ProjectExamplesActivator.getDefault().getLog().log(status);
+ }
+
+ public static BundleContext getBundleContext() {
+ return context;
+ }
+
+}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/filetransfer/ECFExamplesTransport.java 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,435 @@
+package org.jboss.tools.project.examples.filetransfer;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.ProtocolException;
+import java.net.URL;
+import java.net.URLEncoder;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.ecf.core.ContainerCreateException;
+import org.eclipse.ecf.core.ContainerFactory;
+import org.eclipse.ecf.core.IContainer;
+import org.eclipse.ecf.core.security.ConnectContextFactory;
+import org.eclipse.ecf.core.security.IConnectContext;
+import org.eclipse.ecf.filetransfer.IFileTransferListener;
+import org.eclipse.ecf.filetransfer.IIncomingFileTransfer;
+import org.eclipse.ecf.filetransfer.IRemoteFile;
+import org.eclipse.ecf.filetransfer.IRemoteFileSystemBrowserContainerAdapter;
+import org.eclipse.ecf.filetransfer.IRemoteFileSystemListener;
+import org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter;
+import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
+import org.eclipse.ecf.filetransfer.RemoteFileSystemException;
+import org.eclipse.ecf.filetransfer.UserCancelledException;
+import org.eclipse.ecf.filetransfer.events.IFileTransferEvent;
+import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveDataEvent;
+import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveDoneEvent;
+import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveStartEvent;
+import org.eclipse.ecf.filetransfer.events.IRemoteFileSystemBrowseEvent;
+import org.eclipse.ecf.filetransfer.events.IRemoteFileSystemEvent;
+import org.eclipse.ecf.filetransfer.identity.FileCreateException;
+import org.eclipse.ecf.filetransfer.identity.FileIDFactory;
+import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory;
+import org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
+import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI.AuthenticationInfo;
+import org.eclipse.equinox.internal.provisional.p2.core.repository.IRepository;
+import org.eclipse.equinox.security.storage.ISecurePreferences;
+import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
+import org.eclipse.equinox.security.storage.StorageException;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * @author snjeza
+ * based on org.eclipse.equinox.internal.p2.updatesite.ECFTransport
+ *
+ */
+public class ECFExamplesTransport {
+
+ /**
+ * The number of password retry attempts allowed before failing.
+ */
+ private static final int LOGIN_RETRIES = 3;
+ private static final ProtocolException ERROR_401 = new ProtocolException();
+ private static final String SERVER_REDIRECT = "Server redirected too many times";
+
+ private static ECFExamplesTransport INSTANCE;
+ private ServiceTracker retrievalFactoryTracker;
+
+ /**
+ * A job that waits on a barrier.
+ */
+ static class WaitJob extends Job {
+ private final Object[] barrier;
+
+ /**
+ * Creates a wait job.
+ * @param location A location string that is used in the job name
+ * @param barrier The job will wait until the first entry in the barrier is non-null
+ */
+ WaitJob(String location, Object[] barrier) {
+ super("Loading");
+ this.barrier = barrier;
+ setSystem(true);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IStatus run(IProgressMonitor monitor) {
+ synchronized (barrier) {
+ while (barrier[0] == null) {
+ try {
+ barrier.wait();
+ } catch (InterruptedException e) {
+ //ignore
+ }
+ }
+ }
+ return Status.OK_STATUS;
+ }
+ }
+
+ /**
+ * Private to avoid client instantiation.
+ */
+ private ECFExamplesTransport() {
+ retrievalFactoryTracker = new ServiceTracker(ProjectExamplesActivator.getBundleContext(), IRetrieveFileTransferFactory.class.getName(), null);
+ retrievalFactoryTracker.open();
+ }
+
+ /**
+ * Returns an initialized instance of ECFExamplesTransport
+ */
+ public static synchronized ECFExamplesTransport getInstance() {
+ if (INSTANCE == null) {
+ INSTANCE = new ECFExamplesTransport();
+ }
+ return INSTANCE;
+ }
+
+ /**
+ * Gets the last modified date for the specified file.
+ * @param location - The URL location of the file.
+ * @return A <code>long</code> representing the date. Returns <code>0</code> if the file is not found or an error occurred.
+ * @exception OperationCanceledException if the request was canceled.
+ */
+ public long getLastModified(URL location) throws CoreException {
+ String locationString = location.toExternalForm();
+ try {
+ IConnectContext context = getConnectionContext(locationString, false);
+ for (int i = 0; i < LOGIN_RETRIES; i++) {
+ try {
+ return doGetLastModified(locationString, context);
+ } catch (ProtocolException e) {
+ if (ERROR_401 == e)
+ context = getConnectionContext(locationString, true);
+ } catch (Exception e) {
+ e.getMessage();
+ }
+ }
+ } catch (UserCancelledException e) {
+ throw new OperationCanceledException();
+ }
+ //too many retries, so report as failure
+ throw new CoreException(new Status(IStatus.ERROR, ProjectExamplesActivator.PLUGIN_ID, "IO error", null));
+ }
+
+ /**
+ * Perform the ECF call to get the last modified time, failing if there is any
+ * protocol failure such as an authentication failure.
+ */
+ private long doGetLastModified(String location, IConnectContext context) throws ProtocolException {
+ IContainer container;
+ try {
+ container = ContainerFactory.getDefault().createContainer();
+ } catch (ContainerCreateException e) {
+ return 0;
+ }
+ IRemoteFileSystemBrowserContainerAdapter adapter = (IRemoteFileSystemBrowserContainerAdapter) container.getAdapter(IRemoteFileSystemBrowserContainerAdapter.class);
+ if (adapter == null) {
+ return 0;
+ }
+ IRemoteFile remoteFile = checkFile(adapter, location, context);
+ if (remoteFile == null) {
+ return 0;
+ }
+ return remoteFile.getInfo().getLastModified();
+ }
+
+ /**
+ * Downloads the contents of the given URL to the given output stream. The
+ * destination stream will be closed by this method whether it succeeds
+ * to download or not.
+ */
+ public IStatus download(String name,String url, OutputStream destination, IProgressMonitor monitor) {
+ try {
+ IConnectContext context = getConnectionContext(url, false);
+ for (int i = 0; i < LOGIN_RETRIES; i++) {
+ try {
+ return performDownload(name,url, destination, context, monitor);
+ } catch (ProtocolException e) {
+ if (e == ERROR_401)
+ context = getConnectionContext(url, true);
+ }
+ }
+ } catch (UserCancelledException e) {
+ return Status.CANCEL_STATUS;
+ } catch (CoreException e) {
+ return e.getStatus();
+ } finally {
+ try {
+ destination.close();
+ } catch (IOException e) {
+ //ignore secondary failure
+ }
+ }
+ //reached maximum number of retries without success
+ return new Status(IStatus.ERROR, ProjectExamplesActivator.PLUGIN_ID, "IO error", null);
+ }
+
+ public IStatus performDownload(String name,String toDownload, OutputStream target, IConnectContext context, IProgressMonitor monitor) throws ProtocolException {
+ IRetrieveFileTransferFactory factory = (IRetrieveFileTransferFactory) retrievalFactoryTracker.getService();
+ if (factory == null)
+ return new Status(IStatus.ERROR, ProjectExamplesActivator.PLUGIN_ID, "IO error");
+
+ return transfer(name,factory.newInstance(), toDownload, target, context, monitor);
+ }
+
+ private IStatus transfer(final String name,final IRetrieveFileTransferContainerAdapter retrievalContainer, final String toDownload, final OutputStream target, IConnectContext context, final IProgressMonitor monitor) throws ProtocolException {
+ final IStatus[] result = new IStatus[1];
+ IFileTransferListener listener = new IFileTransferListener() {
+ private long transferStartTime;
+ protected int oldWorked;
+
+ public void handleTransferEvent(IFileTransferEvent event) {
+ if (event instanceof IIncomingFileTransferReceiveStartEvent) {
+ IIncomingFileTransferReceiveStartEvent rse = (IIncomingFileTransferReceiveStartEvent) event;
+ try {
+ if (target != null) {
+ rse.receive(target);
+ transferStartTime = System.currentTimeMillis();
+ }
+ if (monitor != null) {
+ long fileLength = rse.getSource().getFileLength();
+ final long totalWork = ((fileLength == -1) ? 100 : fileLength);
+ int work = (totalWork > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) totalWork;
+ monitor.beginTask("Downloading " + name,work);
+ oldWorked=0;
+ }
+ } catch (IOException e) {
+ IStatus status = convertToStatus(e);
+ synchronized (result) {
+ result[0] = status;
+ result.notify();
+ }
+ }
+ }
+ if (event instanceof IIncomingFileTransferReceiveDataEvent) {
+ IIncomingFileTransfer source = ((IIncomingFileTransferReceiveDataEvent) event).getSource();
+ if (monitor != null) {
+ if (monitor.isCanceled()) {
+ source.cancel();
+ return;
+ }
+ long fileLength = source.getFileLength();
+ final long totalWork = ((fileLength == -1) ? 100 : fileLength);
+ double factor = (totalWork > Integer.MAX_VALUE) ? (((double) Integer.MAX_VALUE) / ((double) totalWork)) : 1.0;
+ long received = source.getBytesReceived();
+ int worked = (int) Math.round(factor * received);
+ double downloadRateBytesPerSecond = (received / ((System.currentTimeMillis() + 1 - transferStartTime) / 1000.0));
+
+ String rates = String.format(" (at %s/s)", AbstractRetrieveFileTransfer.toHumanReadableBytes(downloadRateBytesPerSecond));
+ String receivedString = AbstractRetrieveFileTransfer.toHumanReadableBytes(received);
+ String fileLengthString = AbstractRetrieveFileTransfer.toHumanReadableBytes(fileLength);
+ monitor.subTask(receivedString + " of " + fileLengthString + rates);
+ monitor.worked(worked-oldWorked);
+ oldWorked=worked;
+ }
+ }
+ if (event instanceof IIncomingFileTransferReceiveDoneEvent) {
+ Exception exception = ((IIncomingFileTransferReceiveDoneEvent) event).getException();
+ IStatus status = convertToStatus(exception);
+ synchronized (result) {
+ result[0] = status;
+ result.notify();
+ }
+ }
+ }
+ };
+
+ try {
+ retrievalContainer.setConnectContextForAuthentication(context);
+ retrievalContainer.sendRetrieveRequest(FileIDFactory.getDefault().createFileID(retrievalContainer.getRetrieveNamespace(), toDownload), listener, null);
+ } catch (IncomingFileTransferException e) {
+ IStatus status = e.getStatus();
+ Throwable exception = status.getException();
+ if (exception instanceof IOException) {
+ if (exception.getMessage() != null && (exception.getMessage().indexOf("401") != -1 || exception.getMessage().indexOf(SERVER_REDIRECT) != -1)) //$NON-NLS-1$
+ throw ERROR_401;
+ }
+ return status;
+ } catch (FileCreateException e) {
+ return e.getStatus();
+ }
+ waitFor(toDownload, result);
+ return result[0];
+ }
+
+ private IRemoteFile checkFile(final IRemoteFileSystemBrowserContainerAdapter retrievalContainer, final String location, IConnectContext context) throws ProtocolException {
+ final Object[] result = new Object[2];
+ final Object FAIL = new Object();
+ IRemoteFileSystemListener listener = new IRemoteFileSystemListener() {
+ public void handleRemoteFileEvent(IRemoteFileSystemEvent event) {
+ Exception exception = event.getException();
+ if (exception != null) {
+ synchronized (result) {
+ result[0] = FAIL;
+ result[1] = exception;
+ result.notify();
+ }
+ } else if (event instanceof IRemoteFileSystemBrowseEvent) {
+ IRemoteFileSystemBrowseEvent fsbe = (IRemoteFileSystemBrowseEvent) event;
+ IRemoteFile[] remoteFiles = fsbe.getRemoteFiles();
+ if (remoteFiles != null && remoteFiles.length > 0 && remoteFiles[0] != null) {
+ synchronized (result) {
+ result[0] = remoteFiles[0];
+ result.notify();
+ }
+ } else {
+ synchronized (result) {
+ result[0] = FAIL;
+ result.notify();
+ }
+ }
+ }
+ }
+ };
+ try {
+ retrievalContainer.setConnectContextForAuthentication(context);
+ retrievalContainer.sendBrowseRequest(FileIDFactory.getDefault().createFileID(retrievalContainer.getBrowseNamespace(), location), listener);
+ } catch (RemoteFileSystemException e) {
+ return null;
+ } catch (FileCreateException e) {
+ return null;
+ }
+ waitFor(location, result);
+ if (result[0] == FAIL && result[1] instanceof IOException) {
+ IOException ioException = (IOException) result[1];
+ //throw a special exception for authentication failure so we know to prompt for username/password
+ String message = ioException.getMessage();
+ if (message != null && (message.indexOf(" 401 ") != -1 || message.indexOf(SERVER_REDIRECT) != -1)) //$NON-NLS-1$
+ throw ERROR_401;
+ }
+ if (result[0] instanceof IRemoteFile)
+ return (IRemoteFile) result[0];
+ return null;
+ }
+
+
+ /**
+ * Returns the connection context for the given URL. This may prompt the
+ * user for user name and password as required.
+ *
+ * @param xmlLocation - the file location requiring login details
+ * @param prompt - use <code>true</code> to prompt the user instead of
+ * looking at the secure preference store for login, use <code>false</code>
+ * to only try the secure preference store
+ * @throws UserCancelledException when the user cancels the login prompt
+ * @throws CoreException if the password cannot be read or saved
+ * @return The connection context
+ */
+ public IConnectContext getConnectionContext(String xmlLocation, boolean prompt) throws UserCancelledException, CoreException {
+ ISecurePreferences securePreferences = SecurePreferencesFactory.getDefault();
+ IPath hostLocation = new Path(xmlLocation).removeLastSegments(1);
+ String nodeKey;
+ try {
+ nodeKey = URLEncoder.encode(hostLocation.toString(), "UTF-8"); //$NON-NLS-1$
+ } catch (UnsupportedEncodingException e2) {
+ //fall back to default platform encoding
+ nodeKey = URLEncoder.encode(hostLocation.toString());
+ }
+ String nodeName = IRepository.PREFERENCE_NODE + '/' + nodeKey;
+ ISecurePreferences prefNode = null;
+ if (securePreferences.nodeExists(nodeName))
+ prefNode = securePreferences.node(nodeName);
+ if (!prompt) {
+ if (prefNode == null)
+ return null;
+ try {
+ String username = prefNode.get(IRepository.PROP_USERNAME, null);
+ String password = prefNode.get(IRepository.PROP_PASSWORD, null);
+ //if we don't have stored connection data just return a null connection context
+ if (username == null || password == null)
+ return null;
+ return ConnectContextFactory.createUsernamePasswordConnectContext(username, password);
+ } catch (StorageException e) {
+ String msg = "Internal Error";
+ throw new CoreException(new Status(IStatus.ERROR, ProjectExamplesActivator.PLUGIN_ID, msg, e));
+ }
+ }
+ //need to prompt user for user name and password
+ ServiceTracker adminUITracker = new ServiceTracker(ProjectExamplesActivator.getBundleContext(), IServiceUI.class.getName(), null);
+ adminUITracker.open();
+ IServiceUI adminUIService = (IServiceUI) adminUITracker.getService();
+ AuthenticationInfo loginDetails = null;
+ if (adminUIService != null)
+ loginDetails = adminUIService.getUsernamePassword(hostLocation.toString());
+ //null result means user canceled password dialog
+ if (loginDetails == null)
+ throw new UserCancelledException();
+ //save user name and password if requested by user
+ if (loginDetails.saveResult()) {
+ if (prefNode == null)
+ prefNode = securePreferences.node(nodeName);
+ try {
+ prefNode.put(IRepository.PROP_USERNAME, loginDetails.getUserName(), true);
+ prefNode.put(IRepository.PROP_PASSWORD, loginDetails.getPassword(), true);
+ prefNode.flush();
+ } catch (StorageException e1) {
+ String msg = "Internal error";
+ throw new CoreException(new Status(IStatus.ERROR, ProjectExamplesActivator.PLUGIN_ID, msg, e1));
+ } catch (IOException e) {
+ String msg = "Internal error";
+ throw new CoreException(new Status(IStatus.ERROR, ProjectExamplesActivator.PLUGIN_ID, msg, e));
+ }
+ }
+ return ConnectContextFactory.createUsernamePasswordConnectContext(loginDetails.getUserName(), loginDetails.getPassword());
+ }
+
+ private IStatus convertToStatus(Exception e) {
+ if (e == null)
+ return Status.OK_STATUS;
+ if (e instanceof UserCancelledException)
+ return new Status(IStatus.CANCEL, ProjectExamplesActivator.PLUGIN_ID, e.getMessage(), e);
+ return new Status(IStatus.ERROR, ProjectExamplesActivator.PLUGIN_ID, e.getMessage(), e);
+ }
+
+ /**
+ * Waits until the first entry in the given array is non-null.
+ */
+ private void waitFor(String location, Object[] barrier) {
+ WaitJob wait = new WaitJob(location, barrier);
+ wait.schedule();
+ while (barrier[0] == null) {
+ boolean logged = false;
+ try {
+ wait.join();
+ } catch (InterruptedException e) {
+ if (!logged)
+ LogHelper.log(new Status(IStatus.WARNING, ProjectExamplesActivator.PLUGIN_ID, "Unexpected interrupt while waiting on ECF transfer", e));
+ }
+ }
+ }
+}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Category.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Category.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Category.java 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,72 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.project.examples.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author snjeza
+ *
+ */
+public class Category {
+
+ private String name;
+ private List<Project> projects = new ArrayList<Project>();
+ public static Category OTHER = new Category("Other");
+
+ public Category(String name) {
+ super();
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public List<Project> getProjects() {
+ return projects;
+ }
+
+ public void setProjects(List<Project> projects) {
+ this.projects = projects;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Category other = (Category) obj;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ return true;
+ }
+
+}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Project.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Project.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/Project.java 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,98 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.project.examples.model;
+
+import java.math.BigDecimal;
+
+/**
+ * @author snjeza
+ *
+ */
+public class Project {
+
+ private String name;
+ private String shortDescription;
+ private String description;
+ private String url;
+ private long size;
+ private Category category;
+
+ public Project() {
+ name="";
+ shortDescription="";
+ description="";
+ url="";
+ setCategory(Category.OTHER);
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getShortDescription() {
+ return shortDescription;
+ }
+
+ public void setShortDescription(String shortDescription) {
+ this.shortDescription = shortDescription;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public long getSize() {
+ return size;
+ }
+
+ public void setSize(long size) {
+ this.size = size;
+ }
+
+ public Category getCategory() {
+ return category;
+ }
+
+ public void setCategory(Category category) {
+ this.category = category;
+ }
+
+ public String getSizeAsText() {
+ String sizeString = "";
+ BigDecimal sizeDecimal = new BigDecimal(size);
+ BigDecimal MB = new BigDecimal(1024*1024);
+ BigDecimal KB = new BigDecimal(1024);
+ if (sizeDecimal.compareTo(MB) > 0) {
+ sizeString = String.format("%5.2fM", sizeDecimal.divide(MB));
+ } else if (sizeDecimal.compareTo(KB) > 0) {
+ sizeString = String.format("%5.2fK", sizeDecimal.divide(KB));
+ } else {
+ sizeString = String.format("%d", size);
+ }
+ return sizeString;
+ }
+}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectUtil.java 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,242 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.project.examples.model;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+import org.jboss.tools.project.examples.filetransfer.ECFExamplesTransport;
+import org.osgi.framework.Bundle;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * @author snjeza
+ *
+ */
+public class ProjectUtil {
+
+ private final static String PROJECT_EXAMPLES_XML = "http://anonsvn.jboss.org/repos/jbosstools/workspace/examples/projectExamp...";
+ private static final String PROTOCOL_FILE = "file";
+
+ private ProjectUtil() {
+
+ }
+
+ public static List<Category> getTestProjects() {
+ Category seamCategory = new Category("Seam");
+ Project project = new Project();
+ project.setName("dvdstore");
+ project.setShortDescription("Seam DVD Store Example");
+ project
+ .setDescription("This example demonstrates the use of Seam with jBPM pageflow and business process management. It runs on JBoss AS and Tomcat.");
+ project.setSize(10000);
+ project
+ .setUrl("http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/portlet-exampl...");
+ project.setCategory(seamCategory);
+ seamCategory.getProjects().add(project);
+
+ Category portletCategory = new Category("Portlet");
+
+ project = new Project();
+ project.setName("TestJavaPortlet");
+ project.setShortDescription("JBoss Java Portlet Example");
+ project
+ .setDescription("This example demonstrates the use of JBoss Java Portlet. It runs on JBoss Portal 2.7.0");
+ project.setSize(10000);
+ project
+ .setUrl("http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/portlet-exampl...");
+ project.setCategory(portletCategory);
+ portletCategory.getProjects().add(project);
+
+ project = new Project();
+ project.setName("TestJSFPortlet");
+ project.setShortDescription("JBoss JSF Portlet Example");
+ project
+ .setDescription("This example demonstrates the use of JBoss JSF Portlet. It runs on JBoss Portal 2.7.0");
+ project.setSize(4000000);
+ project
+ .setUrl("http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/portlet-exampl...");
+ project.setCategory(portletCategory);
+ portletCategory.getProjects().add(project);
+
+ project = new Project();
+ project.setName("TestSeamPortlet");
+ project.setShortDescription("JBoss Seam Portlet Example");
+ project
+ .setDescription("This example demonstrates the use of JBoss Seam Portlet. It runs on JBoss Portal 2.7.0");
+ project.setSize(10000000);
+ project
+ .setUrl("http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/portlet-exampl...");
+ project.setCategory(portletCategory);
+ portletCategory.getProjects().add(project);
+
+ Category otherCategory = new Category("Other");
+
+ List<Category> list = new ArrayList<Category>();
+ list.add(seamCategory);
+ list.add(portletCategory);
+ list.add(otherCategory);
+
+ return list;
+ }
+
+ public static List<Category> getProjects() {
+ List<Category> list = new ArrayList<Category>();
+ Category other = Category.OTHER;
+ try {
+ // TODO add a progress monitor
+ File file = getProjectExamplesFile(PROJECT_EXAMPLES_XML,"projectExamples", ".xml",null);
+ if (file.exists() && file.isFile()) {
+ DocumentBuilderFactory dbf = DocumentBuilderFactory
+ .newInstance();
+ DocumentBuilder db = dbf.newDocumentBuilder();
+ Document doc = db.parse(file);
+ NodeList projects = doc.getElementsByTagName("project");
+ int len = projects.getLength();
+ for (int i = 0; i < len; i++) {
+ Node node = projects.item(i);
+ Project project = new Project();
+ Category category = other;
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ Element element = (Element) node;
+ NodeList children = element.getChildNodes();
+ int cLen = children.getLength();
+ for (int j = 0; j < cLen; j++) {
+ Node cNode = children.item(j);
+ if (cNode.getNodeType() == Node.ELEMENT_NODE) {
+ Element child = (Element) cNode;
+ String nodeName = child.getNodeName();
+ if (nodeName.equals("category")) {
+ String value = getContent(child);
+ boolean found = false;
+ for (Category cat:list) {
+ if (cat.getName().equals(value)) {
+ category=cat;
+ found=true;
+ break;
+ }
+ }
+ if (!found) {
+ category = new Category(value);
+ list.add(category);
+ }
+ project.setCategory(category);
+ }
+ if (nodeName.equals("name")) {
+ project.setName(getContent(child));
+ }
+ if (nodeName.equals("shortDescription")) {
+ project.setShortDescription(getContent(child));
+ }
+ if (nodeName.equals("description")) {
+ project.setDescription(getContent(child));
+ }
+ if (nodeName.equals("url")) {
+ project.setUrl(getContent(child));
+ }
+ if (nodeName.equals("size")) {
+ long size = 0;
+ try {
+ size = new Long(getContent(child));
+ } catch (Exception ignored) {
+ }
+ project.setSize(size);
+ }
+ }
+ }
+ }
+ category.getProjects().add(project);
+ }
+ }
+ } catch (Exception e) {
+ ProjectExamplesActivator.log(e);
+ }
+ list.add(other);
+ return list;
+ }
+
+ private static String getContent(Element child) {
+ String value = child.getTextContent();
+ if (value == null) {
+ value="";
+ }
+ return value.trim();
+ }
+
+ private static File getProjectExamplesXmlTest() throws Exception {
+ Bundle bundle = Platform.getBundle(ProjectExamplesActivator.PLUGIN_ID);
+ URL examplesURL = bundle.getEntry("/projectExamples.xml");
+ URL url = FileLocator.resolve(examplesURL);
+ File file = new File(FileLocator.toFileURL(url).getFile());
+ return file;
+ }
+
+ public static File getProjectExamplesFile(String urlString,String prefix, String suffix, IProgressMonitor monitor) {
+ URL url;
+ try {
+ url = new URL(urlString);
+ } catch (MalformedURLException e) {
+ ProjectExamplesActivator.log(e);
+ return null;
+ }
+ File file = null;
+ if (PROTOCOL_FILE.equals(url.getProtocol())) {
+ try {
+ //assume all illegal characters have been properly encoded, so use URI class to unencode
+ file = new File(new URI(url.toExternalForm()));
+ } catch (Exception e) {
+ //URL contains unencoded characters
+ file = new File(url.getFile());
+ }
+ if (!file.exists())
+ return null;
+ } else {
+ try {
+ file = File.createTempFile(prefix,suffix);
+ file.deleteOnExit();
+ BufferedOutputStream destination = new BufferedOutputStream(new FileOutputStream(file));
+ IStatus result = getTransport().download(prefix,url.toExternalForm(), destination, monitor);
+ if (!result.isOK())
+ return null;
+ } catch (FileNotFoundException e) {
+ ProjectExamplesActivator.log(e);
+ return null;
+ } catch (IOException e) {
+ ProjectExamplesActivator.log(e);
+ return null;
+ }
+ }
+ return file;
+ }
+
+ private static ECFExamplesTransport getTransport() {
+ return ECFExamplesTransport.getInstance();
+ }
+}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard.java 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,173 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.project.examples.wizard;
+
+/**
+ * @author snjeza
+ *
+ */
+import java.io.File;
+import java.util.zip.ZipFile;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.wizards.datatransfer.ImportOperation;
+import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+import org.jboss.tools.project.examples.model.Project;
+import org.jboss.tools.project.examples.model.ProjectUtil;
+
+public class NewProjectExamplesWizard extends Wizard implements INewWizard {
+
+ private static final IOverwriteQuery OVERWRITE_ALL_QUERY = new IOverwriteQuery() {
+ public String queryOverwrite(String pathString) {
+ return IOverwriteQuery.ALL;
+ }
+ };
+
+ /**
+ * The workbench.
+ */
+ private IWorkbench workbench;
+
+ /**
+ * The current selection.
+ */
+ private IStructuredSelection selection;
+
+ private NewProjectExamplesWizardPage page;
+
+ protected boolean overwrite;
+
+ public NewProjectExamplesWizard() {
+ super();
+ setWindowTitle("New Project Example");
+
+ }
+
+ /**
+ * Creates an empty wizard for creating a new resource in the workspace.
+ */
+
+ @Override
+ public boolean performFinish() {
+ final Project project = page.getSelectedProject();
+ if (project == null) {
+ return false;
+ }
+ WorkspaceJob job = new WorkspaceJob("Downloading...") {
+
+ @Override
+ public IStatus runInWorkspace(IProgressMonitor monitor)
+ throws CoreException {
+ String url = project.getUrl();
+ String name = project.getName();
+ final File file = ProjectUtil.getProjectExamplesFile(url, name,
+ ".zip",monitor);
+ if (file == null) {
+ return Status.CANCEL_STATUS;
+ }
+ try {
+ importProject(project, file, monitor);
+ } catch (final Exception e) {
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ MessageDialogWithToggle.openError(getShell(), "Error", e
+ .getMessage(), "Detail", false,
+ ProjectExamplesActivator.getDefault()
+ .getPreferenceStore(), "errorDialog");
+ }
+
+ });
+ ProjectExamplesActivator.log(e);
+ }
+ return Status.OK_STATUS;
+ }
+
+ };
+ job.setUser(true);
+ job.schedule();
+ //try {
+ // job.join();
+ //} catch (InterruptedException e) {
+ // return false;
+ //}
+ return true;
+ }
+
+ private void importProject(Project projectDescription, File file, IProgressMonitor monitor) throws Exception {
+ final String projectName = projectDescription.getName();
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IProject project = workspace.getRoot().getProject(projectName);
+ if (project.exists()) {
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ overwrite = MessageDialog.openQuestion(getShell(), "Question", "Overwrite project '" + projectName + "'");
+ }
+
+ });
+ if (!overwrite) {
+ return;
+ }
+ project.delete(true, true, monitor);
+ }
+ project.create(monitor);
+ project.open(monitor);
+ ZipFile sourceFile = new ZipFile(file);
+ ZipFileStructureProvider structureProvider = new ZipFileStructureProvider(
+ sourceFile);
+
+ ImportOperation operation = new ImportOperation(workspace.getRoot().getFullPath(),
+ structureProvider.getRoot(), structureProvider,
+ OVERWRITE_ALL_QUERY);
+ operation.setContext(getShell());
+ operation.run(monitor);
+
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ this.selection = selection;
+ initializeDefaultPageImageDescriptor();
+ }
+
+ protected void initializeDefaultPageImageDescriptor() {
+ ImageDescriptor desc = ProjectExamplesActivator
+ .imageDescriptorFromPlugin(ProjectExamplesActivator.PLUGIN_ID,
+ "icons/new_wiz.gif");
+ setDefaultPageImageDescriptor(desc);
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+ page = new NewProjectExamplesWizardPage();
+ addPage(page);
+ }
+
+}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2008-10-08 15:39:37 UTC (rev 10749)
@@ -0,0 +1,186 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.project.examples.wizard;
+
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+import org.jboss.tools.project.examples.model.Category;
+import org.jboss.tools.project.examples.model.Project;
+import org.jboss.tools.project.examples.model.ProjectUtil;
+
+/**
+ * @author snjeza
+ *
+ */
+public class NewProjectExamplesWizardPage extends WizardPage {
+
+ private Project selectedProject;
+
+ public NewProjectExamplesWizardPage() {
+ super("org.jboss.tools.project.examples");
+ setTitle( "Project Example" );
+ setDescription( "Import Project Example" );
+ setImageDescriptor( ProjectExamplesActivator.imageDescriptorFromPlugin(ProjectExamplesActivator.PLUGIN_ID, "icons/new_wiz.gif"));
+
+ }
+
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent,SWT.NULL);
+ composite.setLayout(new GridLayout(1,false));
+
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.widthHint= 225;
+ composite.setLayoutData(gd);
+
+ TreeViewer viewer = new TreeViewer(composite,SWT.SINGLE);
+ Tree tree = viewer.getTree();
+ tree.setLayoutData(new GridData(GridData.FILL_BOTH));
+ tree.setFont(parent.getFont());
+
+ viewer.setLabelProvider(new ProjectLabelProvider());
+ viewer.setContentProvider(new ProjectContentProvider());
+ viewer.setInput(ProjectUtil.getProjects());
+
+ Label descriptionLabel = new Label(composite,SWT.NULL);
+ descriptionLabel.setText("Description:");
+ final Text text = new Text(composite,SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
+ gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
+ gd.heightHint=75;
+ text.setLayoutData(gd);
+
+ Composite internal = new Composite(composite, SWT.NULL);
+ internal.setLayout(new GridLayout(2,false));
+ gd = new GridData(GridData.FILL_BOTH);
+ internal.setLayoutData(gd);
+
+ Label projectNameLabel = new Label(internal,SWT.NULL);
+ projectNameLabel.setText("Project name:");
+ final Text projectName = new Text(internal,SWT.BORDER | SWT.READ_ONLY);
+ projectName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Label projectSizeLabel = new Label(internal,SWT.NULL);
+ projectSizeLabel.setText("Project size:");
+ final Text projectSize = new Text(internal,SWT.BORDER | SWT.READ_ONLY);
+ projectSize.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Label projectURLLabel = new Label(internal,SWT.NULL);
+ projectURLLabel.setText("URL:");
+ final Text projectURL = new Text(internal,SWT.BORDER | SWT.READ_ONLY);
+ projectURL.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ Object selected = selection.getFirstElement();
+ if (selected instanceof Project) {
+ selectedProject = (Project) selected;
+ text.setText(selectedProject.getDescription());
+ setPageComplete(true);
+ projectName.setText(selectedProject.getName());
+ projectURL.setText(selectedProject.getUrl());
+ projectSize.setText(selectedProject.getSizeAsText());
+ } else {
+ selectedProject=null;
+ text.setText("");
+ projectName.setText("");
+ projectURL.setText("");
+ projectSize.setText("");
+ setPageComplete(false);
+ }
+ }
+
+ });
+ setPageComplete(false);
+
+ setControl(composite);
+ }
+
+ private class ProjectLabelProvider extends LabelProvider {
+
+ @Override
+ public Image getImage(Object element) {
+ return super.getImage(element);
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof Category) {
+ Category category = (Category) element;
+ return category.getName();
+ }
+ if (element instanceof Project) {
+ Project project = (Project) element;
+ return project.getShortDescription();
+ }
+ return super.getText(element);
+ }
+ }
+
+ private class ProjectContentProvider implements ITreeContentProvider {
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof List) {
+ List children = (List) parentElement;
+ return children.toArray();
+ }
+ if (parentElement instanceof Category) {
+ Category category = (Category) parentElement;
+ return category.getProjects().toArray();
+ }
+ return new Object[0];
+ }
+
+ public Object getParent(Object element) {
+ if (element instanceof Project) {
+ return ((Project)element).getCategory();
+ }
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ return element instanceof Category;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ }
+
+ public Project getSelectedProject() {
+ return selectedProject;
+ }
+}
17 years, 3 months
JBoss Tools SVN: r10748 - trunk/examples/plugins.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-08 11:39:00 -0400 (Wed, 08 Oct 2008)
New Revision: 10748
Added:
trunk/examples/plugins/org.jboss.tools.project.examples/
Log:
Initial import.
17 years, 3 months
JBoss Tools SVN: r10745 - trunk.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-08 11:33:50 -0400 (Wed, 08 Oct 2008)
New Revision: 10745
Added:
trunk/examples/
Log:
17 years, 3 months
JBoss Tools SVN: r10744 - trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-08 10:07:16 -0400 (Wed, 08 Oct 2008)
New Revision: 10744
Added:
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELModelTest.java
Modified:
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/CommonELAllTests.java
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java
Log:
JBIDE-1497.
Tests added
Modified: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/CommonELAllTests.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/CommonELAllTests.java 2008-10-08 14:06:11 UTC (rev 10743)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/CommonELAllTests.java 2008-10-08 14:07:16 UTC (rev 10744)
@@ -23,6 +23,7 @@
TestSuite suite = new TestSuite();
suite.setName("All tests for " + PLUGIN_ID);
suite.addTestSuite(ELParserTest.class);
+ suite.addTestSuite(ELModelTest.class);
return suite;
}
}
Added: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELModelTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELModelTest.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELModelTest.java 2008-10-08 14:07:16 UTC (rev 10744)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.common.el.core.test;
+
+import java.util.List;
+
+import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.model.ELInstance;
+import org.jboss.tools.common.el.core.model.ELMethodInvocation;
+import org.jboss.tools.common.el.core.model.ELModel;
+import org.jboss.tools.common.el.core.model.ELMultiExpression;
+import org.jboss.tools.common.el.core.model.ELObject;
+import org.jboss.tools.common.el.core.model.ELObjectType;
+import org.jboss.tools.common.el.core.model.ELParameters;
+import org.jboss.tools.common.el.core.parser.ELParser;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
+
+import junit.framework.TestCase;
+
+public class ELModelTest extends TestCase {
+
+ protected void setUp() throws Exception {
+ }
+
+ public void testELModel() {
+ ELParser parser = ELParserUtil.getJbossFactory().createParser();
+ String el = "#{a.b(c.d(),\"ooo\",s['h'])}xx#{(18 + a) * d + 14}";
+ ELModel model = parser.parse(el);
+
+ List<ELInstance> instances = model.getInstances();
+
+ assertEquals(2, instances.size());
+
+ ELInstance instance_1 = instances.get(0);
+ ELExpression expr1 = instance_1.getExpression();
+ assertTrue(expr1 instanceof ELMethodInvocation);
+
+ ELMethodInvocation method1 = (ELMethodInvocation)expr1;
+ ELParameters paramsObject1 = method1.getParameters();
+ List<ELExpression> paramsList1 = paramsObject1.getParameters();
+ assertEquals(3, paramsList1.size());
+
+ ELExpression param_1_1 = paramsList1.get(0);
+ assertEquals(ELObjectType.EL_METHOD_INVOCATION, param_1_1.getType());
+
+ ELExpression param_1_2 = paramsList1.get(1);
+ assertEquals(ELObjectType.EL_VALUE, param_1_2.getType());
+
+ ELExpression param_1_3 = paramsList1.get(2);
+ assertEquals(ELObjectType.EL_ARGUMENT_INVOCATION, param_1_3.getType());
+
+
+ ELInstance instance_2 = instances.get(1);
+ ELExpression expr2 = instance_2.getExpression();
+ assertEquals(ELObjectType.EL_MULTI_EXPRESSION, expr2.getType());
+
+ List<ELExpression> exprList2 = ((ELMultiExpression)expr2).getExpressions();
+ assertEquals(3, exprList2.size());
+ ELExpression expr_2_1 = exprList2.get(0);
+ assertEquals(ELObjectType.EL_COMPLEX_EXPRESSION, expr_2_1.getType());
+ }
+
+}
Modified: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java 2008-10-08 14:06:11 UTC (rev 10743)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java 2008-10-08 14:07:16 UTC (rev 10744)
@@ -140,6 +140,21 @@
checkCorrectEL(t,"#{true}");
checkCorrectEL(t,"#{false}");
}
+
+ public void testComplexMath() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t, "#{(7 * (13 + 7.9)) * (a + b.c / d) / (1.E5) - (1/a.b+8./c.d)}");
+ }
+
+ public void testComplexInvocation() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t, "#{a.b[a1.b1(a2.b2,a3.b3(x))][y].c(a4.b4,a5.b5[a6(b6)])}");
+ }
+
+ public void testSeveralELInstances() {
+ Tokenizer t = TokenizerFactory.createJbossTokenizer();
+ checkCorrectEL(t, "aaa#{a}bbb#{1}#{c()}");
+ }
private void checkCorrectEL(Tokenizer t, String test) {
LexicalToken token = t.parse(test);
@@ -155,7 +170,7 @@
checkIncorrectEL(t, "#{a.}", 4);
//2. Incorrect use of ')'
checkIncorrectEL(t, "#{a.b + -c.d + g)}", 16);
- //2. Incorrect use of ')' in second EL instance
+ //2. Incorrect use of '.' in second EL instance
checkIncorrectEL(t, "#{a.b + -c.d + g}#{hh.vv..m()}", 25);
}
17 years, 3 months
JBoss Tools SVN: r10743 - in trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el: internal/core/model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-08 10:06:11 -0400 (Wed, 08 Oct 2008)
New Revision: 10743
Added:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELMultiExpression.java
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELMultiExpressionImpl.java
Log:
JBIDE-1497.
Interface added
Added: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELMultiExpression.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELMultiExpression.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELMultiExpression.java 2008-10-08 14:06:11 UTC (rev 10743)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.el.core.model;
+
+import java.util.List;
+
+import org.jboss.tools.common.el.internal.core.model.ELOperatorImpl;
+
+/**
+ * expression (operation expression)+
+ * @author V. Kabanovich
+ */
+public interface ELMultiExpression {
+
+ public List<ELExpression> getExpressions();
+
+ public List<ELOperatorImpl> getOperators();
+
+}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELMultiExpressionImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELMultiExpressionImpl.java 2008-10-08 13:47:19 UTC (rev 10742)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELMultiExpressionImpl.java 2008-10-08 14:06:11 UTC (rev 10743)
@@ -13,7 +13,9 @@
import java.util.ArrayList;
import java.util.List;
+import org.jboss.tools.common.el.core.model.ELExpression;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
+import org.jboss.tools.common.el.core.model.ELMultiExpression;
import org.jboss.tools.common.el.core.model.ELObject;
import org.jboss.tools.common.el.core.model.ELObjectType;
@@ -21,14 +23,14 @@
* expression (operation expression)+
* @author V. Kabanovich
*/
-public class ELMultiExpressionImpl extends ELExpressionImpl {
- List<ELExpressionImpl> expressions = new ArrayList<ELExpressionImpl>();
+public class ELMultiExpressionImpl extends ELExpressionImpl implements ELMultiExpression {
+ List<ELExpression> expressions = new ArrayList<ELExpression>();
List<ELOperatorImpl> operators = new ArrayList<ELOperatorImpl>();
public ELMultiExpressionImpl() {
}
- public List<ELExpressionImpl> getExpressions() {
+ public List<ELExpression> getExpressions() {
return expressions;
}
@@ -79,8 +81,8 @@
}
public void collectInvocations(List<ELInvocationExpression> list) {
- for (ELExpressionImpl expr: expressions) {
- expr.collectInvocations(list);
+ for (ELExpression expr: expressions) {
+ ((ELExpressionImpl)expr).collectInvocations(list);
}
}
17 years, 3 months
JBoss Tools SVN: r10742 - in trunk/seam/plugins: org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-08 09:47:19 -0400 (Wed, 08 Oct 2008)
New Revision: 10742
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2731
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2008-10-08 13:23:14 UTC (rev 10741)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2008-10-08 13:47:19 UTC (rev 10742)
@@ -17,8 +17,10 @@
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.core.project.facet.SeamProjectPreferences;
/**
* Data model provider for Seam facet wizard page
@@ -137,4 +139,27 @@
Platform.getBundle(SeamCorePlugin.PLUGIN_ID).getEntry(
"/templates")).getPath()); //$NON-NLS-1$
}
-}
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider#init()
+ */
+ @Override
+ public void init() {
+ super.init();
+ model.setProperty(ISeamFacetDataModelProperties.DB_TYPE, SeamProjectPreferences.getStringPreference(SeamProjectPreferences.HIBERNATE_DEFAULT_DB_TYPE));
+ model.setProperty(ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE, SeamProjectPreferences.getStringPreference(SeamProjectPreferences.SEAM_DEFAULT_CONNECTION_PROFILE));
+ model.setProperty(ISeamFacetDataModelProperties.DB_DEFAULT_SCHEMA_NAME, "");
+ model.setProperty(ISeamFacetDataModelProperties.DB_DEFAULT_CATALOG_NAME, "");
+ model.setProperty(ISeamFacetDataModelProperties.DB_ALREADY_EXISTS, false);
+ model.setProperty(ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY, false);
+ if(model.getProperty(IFacetDataModelProperties.FACET_PROJECT_NAME)!=null) {
+ model.setProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME, "org.domain." + model.getProperty(IFacetDataModelProperties.FACET_PROJECT_NAME) + ".session"); //$NON-NLS-1$
+ model.setProperty(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME, "org.domain." + model.getProperty(IFacetDataModelProperties.FACET_PROJECT_NAME) + ".entity"); //$NON-NLS-1$
+ model.setProperty(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME, "org.domain." + model.getProperty(IFacetDataModelProperties.FACET_PROJECT_NAME) + ".test"); //$NON-NLS-1$
+ }
+ // TODO
+// jBossSeamHome
+// jBossAsDeployAs
+ }
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-10-08 13:23:14 UTC (rev 10741)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-10-08 13:47:19 UTC (rev 10742)
@@ -53,7 +53,6 @@
import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;
import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
-import org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard;
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
import org.hibernate.eclipse.console.utils.DriverClassHelpers;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -155,27 +154,6 @@
}
/**
- * This method is useful for seam facet modify wizard.
- */
- private void initModel() {
- synchEditorsAndModel(jBossHibernateDbTypeEditor);
-// synchEditorsAndModel(jBossSeamHomeEditor);
- synchEditorsAndModel(jBossAsDeployAsEditor);
- synchEditorsAndModel(connProfileSelEditor);
- synchEditorsAndModel(dbSchemaName);
- synchEditorsAndModel(dbCatalogName);
- synchEditorsAndModel(dbTablesExists);
- synchEditorsAndModel(recreateTablesOnDeploy);
- synchEditorsAndModel(sessionBeanPkgNameditor);
- synchEditorsAndModel(entityBeanPkgNameditor);
- synchEditorsAndModel(testsPkgNameditor);
- }
-
- private void synchEditorsAndModel(IFieldEditor editor) {
- model.setProperty(editor.getName(), editor.getValue());
- }
-
- /**
* @return
*/
private String getDefaultDbType() {
@@ -270,10 +248,6 @@
model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_DIALECT,
HIBERNATE_HELPER.getDialectClass(jBossHibernateDbTypeEditor.getValueAsString()));
-
- if(!isNewProjectWizard()) {
- initModel();
- }
}
/**
17 years, 3 months
JBoss Tools SVN: r10741 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-10-08 09:23:14 -0400 (Wed, 08 Oct 2008)
New Revision: 10741
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
Log:
code adjustment
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-10-08 13:23:01 UTC (rev 10740)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-10-08 13:23:14 UTC (rev 10741)
@@ -21,6 +21,7 @@
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.events.DisposeEvent;
@@ -71,13 +72,15 @@
final static String CSS_FILE_SELECT_DIALOG = "Select CSS file from the tree:";
final static String CSS_FILE_SELECT_DIALOG_EMPTY_MESSAGE = "No CSS file in the current project";
final static String SKIP_FIRST_CHAR = ".";
-
+
/**
*
* @param parentShell
- * @param allProject (if allProject is true - browse css file in all projects, else only in current project)
+ * @param allProject
+ * (if allProject is true - browse css file in all projects, else
+ * only in current project)
*/
- public CSSClassDialog(Shell parentShell,boolean allProject) {
+ public CSSClassDialog(Shell parentShell, boolean allProject) {
super(parentShell);
this.allProject = allProject;
setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX
@@ -120,22 +123,22 @@
IResource res = null;
if (allProject) {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
- res = workspace.getRoot().findMember(text.getText());
+ res = workspace.getRoot().findMember(text.getText());
} else {
IProject project = Util.getCurrentProject();
- if (project!=null)
+ if (project != null)
res = project.findMember(text.getText());
}
-
+
if (res != null) {
if (res instanceof IFile) {
- file = (IFile) res;
- cssModel = new CSSModel(file);
- classCombo.removeAll();
- List<String> selectors = cssModel.getSelectors();
- for (String selector : selectors) {
- classCombo.add(selector);
- }
+ file = (IFile) res;
+ cssModel = new CSSModel(file);
+ classCombo.removeAll();
+ List<String> selectors = cssModel.getSelectors();
+ for (String selector : selectors) {
+ classCombo.add(selector);
+ }
}
}
}
@@ -150,7 +153,8 @@
.getImageDescriptor(Constants.IMAGE_FOLDERLARGE_FILE_LOCATION);
Image image = imageDesc.createImage();
button.setImage(image);
- button.setToolTipText(MessageUtil.getString("CSS_BROWSE_BUTTON_TOOLTIP"));
+ button.setToolTipText(MessageUtil
+ .getString("CSS_BROWSE_BUTTON_TOOLTIP"));
button.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
Button button = (Button) e.getSource();
@@ -170,19 +174,18 @@
classCombo.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
-
+
}
public void widgetSelected(SelectionEvent e) {
String style = cssModel.getStyle(classCombo.getText());
- classCombo.setToolTipText(cssModel.getCSSText(classCombo.getText()));
+ classCombo.setToolTipText(cssModel.getCSSText(classCombo
+ .getText()));
styleComposite.recreateStyleComposite(style);
}
-
+
});
-
-
-
+
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
@@ -201,12 +204,13 @@
dialog.setAllowMultiple(false);
dialog
.setEmptyListMessage(CSS_FILE_SELECT_DIALOG_EMPTY_MESSAGE);
- dialog.open();
- IResource res = (IResource) dialog.getFirstResult();
- if (allProject) {
- text.setText(res.getFullPath().toOSString());
- } else {
- text.setText(res.getProjectRelativePath().toOSString());
+ if (dialog.open() == Window.OK) {
+ IResource res = (IResource) dialog.getFirstResult();
+ if (allProject) {
+ text.setText(res.getFullPath().toOSString());
+ } else {
+ text.setText(res.getProjectRelativePath().toOSString());
+ }
}
}
});
@@ -237,7 +241,7 @@
return composite;
}
-
+
public void saveChanges() {
styleComposite.updateStyle();
String newStyle = styleComposite.getNewStyle();
@@ -246,9 +250,9 @@
}
public String getSelectorName() {
- return selectorName;
+ return selectorName;
}
-
+
/**
* Method for creating dialog area
*
@@ -256,9 +260,9 @@
*
*/
protected Control createDialogArea(final Composite parent) {
-
+
final Composite composite = (Composite) super.createDialogArea(parent);
-
+
return createDialogComposite(composite);
}
@@ -281,7 +285,4 @@
selectorName = sel;
super.okPressed();
}
-
-
-
}
17 years, 3 months
JBoss Tools SVN: r10740 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-10-08 09:23:01 -0400 (Wed, 08 Oct 2008)
New Revision: 10740
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1913
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java 2008-10-08 13:21:36 UTC (rev 10739)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java 2008-10-08 13:23:01 UTC (rev 10740)
@@ -225,19 +225,21 @@
IPath[] paths = DialogSelectionHelper.chooseFileEntries(getShell(), (IPath)null, new Path[0],
title, description,
new String[0], isPath, true, false);//$NON-NLS-1$
- strPath = paths[0].toOSString();
- if (isPath){
- for (int i = 1; i < paths.length; i++) {
- strPath += File.pathSeparator + paths[i].toOSString();
- }
- }
+ if (paths != null && paths.length > 0){
+ strPath = paths[0].toOSString();
+ if (isPath){
+ for (int i = 1; i < paths.length; i++) {
+ strPath += File.pathSeparator + paths[i].toOSString();
+ }
+ }
+ }
} else return;
String oldPath = ((Text)value).getText();
if (isPath && oldPath.trim().length() > 0 && strPath != null)
((Text)value).setText( oldPath + File.pathSeparator + strPath );
else {
- if (strPath == null) strPath = "";
- ((Text)value).setText( strPath );
+ if (strPath != null)
+ ((Text)value).setText( strPath );
}
}
};
17 years, 3 months
JBoss Tools SVN: r10739 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-08 09:21:36 -0400 (Wed, 08 Oct 2008)
New Revision: 10739
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDndUtil.java
Log:
=processing of url transfer was added, because when me make external drag&drop under linux, we should processed this transfer
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java 2008-10-08 11:11:00 UTC (rev 10738)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java 2008-10-08 13:21:36 UTC (rev 10739)
@@ -15,6 +15,7 @@
import org.eclipse.swt.events.TypedEvent;
import org.jboss.tools.common.model.ui.editors.dnd.context.DropContext;
import org.jboss.tools.common.model.ui.editors.dnd.context.IDNDTextEditor;
+import org.jboss.tools.vpe.editor.util.VpeDebugUtil;
import org.jboss.tools.vpe.xulrunner.XPCOM;
import org.mozilla.interfaces.nsIComponentManager;
import org.mozilla.interfaces.nsIDOMEvent;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-10-08 11:11:00 UTC (rev 10738)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-10-08 13:21:36 UTC (rev 10739)
@@ -164,8 +164,8 @@
import org.mozilla.interfaces.nsISelectionListener;
import org.mozilla.interfaces.nsISupports;
import org.mozilla.interfaces.nsISupportsCString;
+import org.mozilla.interfaces.nsISupportsString;
import org.mozilla.xpcom.Mozilla;
-import org.mozilla.xpcom.XPCOMException;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -2782,33 +2782,6 @@
return tagname;
}
- /**
- * Determine is nsIFile instance.
- *
- * @param support
- * @return
- */
- private boolean isNsIFileInstance(nsISupports support) {
- boolean rst = true;
-
- try {
- support.queryInterface(nsIFile.NS_IFILE_IID);
- } catch (XPCOMException e) {
- rst = false;
- }
- return rst;
- }
-
- private boolean isNsIStringInstance(nsISupports support) {
- boolean rst = true;
-
- try {
- support.queryInterface(nsISupportsCString.NS_ISUPPORTSCSTRING_IID);
- } catch (XPCOMException e) {
- rst = false;
- }
- return rst;
- }
public void externalDrop(nsIDOMMouseEvent mouseEvent, String flavor, String data) {
onHideTooltip();
@@ -2823,19 +2796,23 @@
// if(object == null)
nsISupports aValue = DndUtil.getDnDValue(mouseEvent);
- String aFlavor = "";
- if (isNsIFileInstance(aValue)) {
+ String aFlavor = ""; //$NON-NLS-1$
+ if (VpeDndUtil.isNsIFileInstance(aValue)) {
nsIFile aFile = (nsIFile) aValue.queryInterface(nsIFile.NS_IFILE_IID);
-
+
if (aValue != null) {
data = aFile.getPath();
aFlavor = DndUtil.kFileMime;
}
- } else if (isNsIStringInstance(aValue)) {
+ } else if (VpeDndUtil.isNsICStringInstance(aValue)) {
nsISupportsCString aString = (nsISupportsCString) aValue.queryInterface(nsISupportsCString.NS_ISUPPORTSCSTRING_IID);
data = aString.getData();
aFlavor = DndUtil.kHTMLMime;
+ } else if (VpeDndUtil.isNsIStringInstance(aValue)) {
+ nsISupportsString aString = (nsISupportsString) aValue.queryInterface(nsISupportsString.NS_ISUPPORTSSTRING_IID);
+ data = aString.getData();
+ aFlavor = DndUtil.kURLMime;
}
// if (object.getFileType() == XModelObject.FILE
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDndUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDndUtil.java 2008-10-08 11:11:00 UTC (rev 10738)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDndUtil.java 2008-10-08 13:21:36 UTC (rev 10739)
@@ -19,20 +19,26 @@
import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
import org.jboss.tools.common.model.ui.views.palette.PaletteInsertHelper;
import org.jboss.tools.vpe.VpePlugin;
+import org.mozilla.interfaces.nsIFile;
+import org.mozilla.interfaces.nsISupports;
+import org.mozilla.interfaces.nsISupportsCString;
+import org.mozilla.interfaces.nsISupportsString;
+import org.mozilla.xpcom.XPCOMException;
public class VpeDndUtil {
- public static boolean isDropEnabled(IModelObjectEditorInput input) {
- return DnDUtil.isPasteEnabled(input.getXModelObject());
+
+ public static boolean isDropEnabled(IModelObjectEditorInput input) {
+ return DnDUtil.isPasteEnabled(input.getXModelObject());
}
public static void drop(IModelObjectEditorInput input,
ISourceViewer viewer, ISelectionProvider provider) {
Properties properties = new Properties();
- properties.setProperty("isDrop", "true");
- properties.setProperty("actionSourceGUIComponentID", "editor");
- properties.setProperty("accepsAsString", "true");
- properties.put("selectionProvider", provider);
- properties.put("viewer", viewer);
+ properties.setProperty("isDrop", "true"); //$NON-NLS-1$//$NON-NLS-2$
+ properties.setProperty("actionSourceGUIComponentID", "editor"); //$NON-NLS-1$//$NON-NLS-2$
+ properties.setProperty("accepsAsString", "true"); //$NON-NLS-1$//$NON-NLS-2$
+ properties.put("selectionProvider", provider); //$NON-NLS-1$
+ properties.put("viewer", viewer); //$NON-NLS-1$
try {
DnDUtil.paste(input.getXModelObject(), properties);
@@ -41,5 +47,52 @@
VpePlugin.getPluginLog().logError(ex);
}
}
+
+ /**
+ * Determine is nsIFile instance.
+ *
+ * @param support
+ * @return
+ */
+ public static boolean isNsIFileInstance(nsISupports support) {
+ boolean rst = true;
+
+ try {
+ support.queryInterface(nsIFile.NS_IFILE_IID);
+ } catch (XPCOMException e) {
+ rst = false;
+ }
+ return rst;
+ }
+ /**
+ * Determine is csstring instance
+ * @param support
+ * @return
+ */
+ public static boolean isNsICStringInstance(nsISupports support) {
+ boolean rst = true;
+ try {
+ support.queryInterface(nsISupportsCString.NS_ISUPPORTSCSTRING_IID);
+ } catch (XPCOMException e) {
+ rst = false;
+ }
+ return rst;
+ }
+ /**
+ * Determine is string instance
+ * @param support
+ * @return
+ */
+ public static boolean isNsIStringInstance(nsISupports support) {
+ boolean rst = true;
+
+ try {
+ support.queryInterface(nsISupportsString.NS_ISUPPORTSSTRING_IID);
+ } catch (XPCOMException e) {
+ rst = false;
+ }
+ return rst;
+ }
+
}
17 years, 3 months
JBoss Tools SVN: r10738 - trunk/birt/docs/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-08 07:11:00 -0400 (Wed, 08 Oct 2008)
New Revision: 10738
Modified:
trunk/birt/docs/en/modules/birt_designer.xml
Log:
Modified: trunk/birt/docs/en/modules/birt_designer.xml
===================================================================
--- trunk/birt/docs/en/modules/birt_designer.xml 2008-10-08 11:06:52 UTC (rev 10737)
+++ trunk/birt/docs/en/modules/birt_designer.xml 2008-10-08 11:11:00 UTC (rev 10738)
@@ -12,37 +12,45 @@
<title>BIRT Designer</title>
- <para>There are a number of ways we can improve the report's appearance: </para>
-
- <itemizedlist><listitem><para>Add a title to the top of the report;</para></listitem>
+
- Add a title to the top of the report.
- Add some color to enhance the column headings.
- Shrink the size of the city and state columns.
- Add some color to make the state and city group headers stand out.
- Format the phone numbers.
- Sort customers by name.
- </itemizedlist>
-
-
-
-
<section id="birt_designer_introduction">
- <title>BIRT Designer</title>
- <para> text here</para>
+ <title>BIRT Report Designer</title>
+ <para>BIRT Designer is an intuitive and quite easy Eclipse-based set of plugins to make reports. We will pass you through all its features.</para>
+
</section>
<section id="birt_designer_features">
- <title>BIRT Designer Features</title>
- <para>text here</para>
+ <title>BIRT Report Designer Features</title>
+ <para>Here are the main BIRT Report Designer features:</para>
+ <itemizedlist><listitem><para><emphasis role="bold"></emphasis>Palette - Contains the standard BIRT report elements such as labels, tables, and charts and is used in conjunction with the Layout View to design reports.</para></listitem>
+
+
+
+ </itemizedlist>
+
+
+ <para>There are a number of ways we can improve the report's appearance: </para>
+
+ <itemizedlist><listitem><para>Add a title to the top of the report;</para></listitem>
+
+
+
+ Add a title to the top of the report.
+ Add some color to enhance the column headings.
+ Shrink the size of the city and state columns.
+ Add some color to make the state and city group headers stand out.
+ Format the phone numbers.
+ Sort customers by name.
+ </itemizedlist>
</section>
</chapter>
17 years, 3 months
JBoss Tools SVN: r10737 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-10-08 07:06:52 -0400 (Wed, 08 Oct 2008)
New Revision: 10737
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1913
Added despotic call of selectionChangeListener
Combo dialog layout fixed
Null path selection error fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-10-08 10:57:44 UTC (rev 10736)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-10-08 11:06:52 UTC (rev 10737)
@@ -494,7 +494,9 @@
public static String ExporterSettingsTab_template_directory_for;
public static String ExporterSettingsTab_use_java5_syntax;
public static String ExporterSettingsTab_select_dir;
+ public static String ExporterSettingsTab_select_dir2;
public static String ExporterSettingsTab_select_path;
+ public static String ExporterSettingsTab_select_path2;
public static String GeneralExceptionStatusHandler_exception_while_generating_code;
public static String GeneralExceptionStatusHandler_generating_code;
public static String PathHelper_does_not_exist;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-10-08 10:57:44 UTC (rev 10736)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-10-08 11:06:52 UTC (rev 10737)
@@ -486,7 +486,9 @@
ExporterSettingsTab_template_directory_for=Template directory for
ExporterSettingsTab_use_java5_syntax=Use Java 5 syntax
ExporterSettingsTab_select_dir=Select directory
+ExporterSettingsTab_select_dir2=Select directory from filesystem or workspace.
ExporterSettingsTab_select_path=Select path
+ExporterSettingsTab_select_path2=Select path from filesystem or workspace.
ExporterSettingsTab_use_java5_syntax=Use Java 5 syntax
GeneralExceptionStatusHandler_exception_while_generating_code=Exception while generating code
GeneralExceptionStatusHandler_generating_code=Generating code
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java 2008-10-08 10:57:44 UTC (rev 10736)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/AddPropertyDialog.java 2008-10-08 11:06:52 UTC (rev 10737)
@@ -96,17 +96,23 @@
public void keyPressed(KeyEvent e) {}
public void keyReleased(KeyEvent e) {
- if (e.keyCode == SWT.ARROW_UP || e.keyCode == SWT.ARROW_DOWN) return;
+ if (e.keyCode == SWT.ARROW_UP || e.keyCode == SWT.ARROW_DOWN) {
+ //linux doesn't call selectionChanged event on this events
+ propertyCombo.setSelection(propertyCombo.getSelection(), false);
+ return;
+ }
- for (int i = 0; i < combo.getItemCount(); i++) {
+ for (int i = 0; i < combo.getItemCount(); i++) {
if (combo.getText().equals(combo.getItem(i))){
- combo.select(i);
- propertyCombo.setSelection(propertyCombo.getSelection(), false);
+ if (combo.getSelectionIndex() != i){
+ combo.select(i);
+ propertyCombo.setSelection(propertyCombo.getSelection(), false);
+ }
return;
}
- }
- disposeBrowseButton();
- createTextValueComposite(2);
+ }
+ disposeBrowseButton();
+ createTextValueComposite(2);
}
});
@@ -194,7 +200,7 @@
public void widgetSelected(SelectionEvent e) {
String title = isPath ? HibernateConsoleMessages.ExporterSettingsTab_select_path: HibernateConsoleMessages.ExporterSettingsTab_select_dir;
- String description = title;
+ String description = isPath ? HibernateConsoleMessages.ExporterSettingsTab_select_path2 : HibernateConsoleMessages.ExporterSettingsTab_select_dir2;
MessageDialog dialog = new MessageDialog(getShell(),
title,
@@ -229,7 +235,10 @@
String oldPath = ((Text)value).getText();
if (isPath && oldPath.trim().length() > 0 && strPath != null)
((Text)value).setText( oldPath + File.pathSeparator + strPath );
- else ((Text)value).setText( strPath );
+ else {
+ if (strPath == null) strPath = "";
+ ((Text)value).setText( strPath );
+ }
}
};
}
@@ -313,7 +322,7 @@
}
value = new Combo(parent, SWT.BORDER | SWT.LEAD | SWT.DROP_DOWN | SWT.READ_ONLY);
GridData bgd = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
- bgd.horizontalSpan = 3;
+ bgd.horizontalSpan = 2;
value.setLayoutData(bgd);
((Combo)value).setItems(items);
((Combo)value).addModifyListener( modifyListener );
17 years, 3 months
JBoss Tools SVN: r10736 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-08 06:57:44 -0400 (Wed, 08 Oct 2008)
New Revision: 10736
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringFieldEditor.java
Log:
JBIDE-2802
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringFieldEditor.java 2008-10-08 10:56:50 UTC (rev 10735)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringFieldEditor.java 2008-10-08 10:57:44 UTC (rev 10736)
@@ -312,6 +312,10 @@
String newValue = textField.getText();
if (!newValue.equals(oldValue)) {
fireValueChanged(VALUE, oldValue, newValue);
+ if(textField == null) {
+ //disposed while firing
+ return;
+ }
oldValue = textField.getText();
}
}
17 years, 3 months
JBoss Tools SVN: r10735 - trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-08 06:56:50 -0400 (Wed, 08 Oct 2008)
New Revision: 10735
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/AddProviderSupport.java
Log:
JBIDE-2834
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/AddProviderSupport.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/AddProviderSupport.java 2008-10-08 10:13:53 UTC (rev 10734)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/src/org/jboss/tools/esb/core/model/handlers/AddProviderSupport.java 2008-10-08 10:56:50 UTC (rev 10735)
@@ -6,6 +6,7 @@
import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.FindObjectHelper;
+import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
public class AddProviderSupport extends SpecialWizardSupport {
String providerEntity;
@@ -61,7 +62,7 @@
XModelObject provider = getTarget().getModel().createModelObject(providerEntity, p0);
Properties p1 = extractStepData(1);
- XModelObject bus = getTarget().getModel().createModelObject(busEntity, p1);
+ XModelObject bus = XModelObjectLoaderUtil.createValidObject(getTarget().getModel(), busEntity, p1);
provider.addChild(bus);
17 years, 3 months
JBoss Tools SVN: r10734 - trunk/esb/plugins/org.jboss.tools.esb.project.ui.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-10-08 06:13:53 -0400 (Wed, 08 Oct 2008)
New Revision: 10734
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml
Log:
JBIDE-2865: revert to previous version because it has already been fixed
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml 2008-10-08 09:54:13 UTC (rev 10733)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml 2008-10-08 10:13:53 UTC (rev 10734)
@@ -25,7 +25,7 @@
<extension
point="org.eclipse.ui.preferencePages">
<page
- category="org.jboss.ide.eclipse.ui.MainPreferencePage"
+ category="org.jboss.tools.common.model.ui.MainPreferencePage"
class="org.jboss.tools.esb.project.ui.preference.controls.JBossESBRuntimePreferencePage"
id="org.jboss.tools.esb.project.runtime.preference"
name="JBoss ESB Runtimes">
17 years, 3 months
JBoss Tools SVN: r10733 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-08 05:54:13 -0400 (Wed, 08 Oct 2008)
New Revision: 10733
Modified:
trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-368
info on content assist is updated
Modified: trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml 2008-10-08 08:33:35 UTC (rev 10732)
+++ trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml 2008-10-08 09:54:13 UTC (rev 10733)
@@ -109,7 +109,7 @@
<row>
<entry>Content Assist</entry>
- <entry>Code completion proposals while working in java, xml, jsp, xhtml, xhtml, seam project
+ <entry>Code completion proposals while working with html, java, JavaScript , xml, jsp, xhtml, xhtml, seam project
and jsf configuration files. Content assist based on project data (dynamic code assist); with
graphical editor. Code completion for values from property files, beans attributes and
methods, navigation rule outcomes and jsf variables.</entry>
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2008-10-08 08:33:35 UTC (rev 10732)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2008-10-08 09:54:13 UTC (rev 10733)
@@ -155,7 +155,6 @@
<section id="CodeAssistAndDynamicCodeAssist42BasedOnProjectData">
-
<title>Content Assist</title>
<para><property>Content assist</property> is available when working with</para>
@@ -186,6 +185,11 @@
<link linkend="ContentAssistForRF">RichFaces components</link>
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="&esblinklink;#ESBContentAssist">ESB XML files</ulink>
+ </para>
+ </listitem>
</itemizedlist>
17 years, 3 months
JBoss Tools SVN: r10732 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-10-08 04:33:35 -0400 (Wed, 08 Oct 2008)
New Revision: 10732
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java
Log:
JBIDE-2846
Add subtitle and description on the wizard page and add a description label under the treeviewer to describe the data type.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java 2008-10-08 08:27:25 UTC (rev 10731)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java 2008-10-08 08:33:35 UTC (rev 10732)
@@ -111,7 +111,7 @@
// IWizardNode node = (IWizardNode) iterator.next();
// node.
// }
- this.setControl(viewer.getControl());
+ this.setControl(main);
}
public IWizardPage getNextPage() {
17 years, 3 months
JBoss Tools SVN: r10731 - in trunk/smooks/plugins: org.jboss.tools.smooks.ui/schema and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-10-08 04:27:25 -0400 (Wed, 08 Oct 2008)
New Revision: 10731
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/plugin.xml
trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/viewerInitor.exsd
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/BaseViewerInitor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IViewerInitor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ViewerInitorStore.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformSelectWizardNode.java
trunk/smooks/plugins/org.jboss.tools.smooks.xml/plugin.xml
Log:
JBIDE-2846
Add subtitle and description on the wizard page and add a description label under the treeviewer to describe the data type.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.javabean/plugin.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.javabean/plugin.xml 2008-10-08 08:11:10 UTC (rev 10730)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.javabean/plugin.xml 2008-10-08 08:27:25 UTC (rev 10731)
@@ -6,8 +6,9 @@
<viewerInitor
contentProvider="org.jboss.tools.smooks.javabean.model.BeanContentProvider"
creationWizard="org.jboss.tools.smooks.javabean.ui.NewJavaBeanStrucutredDataWizard"
+ description="This data type can get from any Java .class."
labelProvider="org.jboss.tools.smooks.javabean.model.BeanlabelProvider"
- name="JavaBean"
+ name="JavaBean Data Type"
typeID="org.jboss.tools.smooks.ui.viewerInitor.javabean">
</viewerInitor>
</extension>
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/viewerInitor.exsd
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/viewerInitor.exsd 2008-10-08 08:11:10 UTC (rev 10730)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/viewerInitor.exsd 2008-10-08 08:27:25 UTC (rev 10731)
@@ -1,146 +1,153 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.jboss.tools.smooks.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.jboss.tools.smooks.ui" id="viewerInitor" name="viewerInitor"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="viewerInitor" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="viewerInitor">
- <complexType>
- <attribute name="typeID" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="labelProvider" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.jface.viewers.ILabelProvider"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="contentProvider" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.jface.viewers.ITreeContentProvider"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="creationWizard" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn=":org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.tools.smooks.ui">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.jboss.tools.smooks.ui" id="viewerInitor" name="viewerInitor"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="viewerInitor" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="viewerInitor">
+ <complexType>
+ <attribute name="typeID" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="labelProvider" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.jface.viewers.ILabelProvider"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="contentProvider" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.jface.viewers.ITreeContentProvider"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="creationWizard" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="icon" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+</schema>
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/BaseViewerInitor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/BaseViewerInitor.java 2008-10-08 08:11:10 UTC (rev 10730)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/BaseViewerInitor.java 2008-10-08 08:27:25 UTC (rev 10731)
@@ -25,6 +25,7 @@
protected String name = "nonamed";
protected String wizardIconPath = null;
IConfigurationElement configurationElement = null;
+ protected String description;
/**
* @return the name
@@ -127,4 +128,12 @@
IConfigurationElement configurationElement) {
this.configurationElement = configurationElement;
}
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IViewerInitor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IViewerInitor.java 2008-10-08 08:11:10 UTC (rev 10730)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IViewerInitor.java 2008-10-08 08:27:25 UTC (rev 10731)
@@ -30,4 +30,6 @@
String getName();
String getWizardIconPath();
+
+ String getDescription();
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ViewerInitorStore.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ViewerInitorStore.java 2008-10-08 08:11:10 UTC (rev 10730)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/ViewerInitorStore.java 2008-10-08 08:27:25 UTC (rev 10731)
@@ -138,10 +138,11 @@
String iconPath = element.getAttribute(SmooksExtensionPointConstants.EXTENTION_POINT_ATTRIBUTE_ICON);
+ String description = element.getAttribute(SmooksExtensionPointConstants.EXTENTION_POINT_ATTRIBUTE_DESCRIPTION);
BaseViewerInitor initor = new BaseViewerInitor();
initor.setName(name);
-
+ initor.setDescription(description);
initor.setWizardIconPath(iconPath);
initor.setTypeID(typeID);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java 2008-10-08 08:11:10 UTC (rev 10730)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformDataWizardSelectionPage.java 2008-10-08 08:27:25 UTC (rev 10731)
@@ -31,7 +31,10 @@
import org.eclipse.jface.wizard.WizardSelectionPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
import org.jboss.tools.smooks.ui.IViewerInitor;
import org.jboss.tools.smooks.ui.ViewerInitorStore;
@@ -44,6 +47,7 @@
List registedWizard = new ArrayList();
TreeViewer viewer = null;
+ private Label desLabel;
/*
* (non-Javadoc)
@@ -52,12 +56,22 @@
*/
public void createControl(Composite parent) {
// parent.setLayout(new FillLayout());
- viewer = new TreeViewer(parent, SWT.NONE);
+ Composite main = new Composite(parent, SWT.NONE);
+
+ GridLayout gridLayout = new GridLayout();
+ main.setLayout(gridLayout);
+
+ viewer = new TreeViewer(main, SWT.NONE);
viewer.setContentProvider(new WizardNodeContentProvider());
viewer.setLabelProvider(new WizardNodeLabelProvider());
-
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ viewer.getTree().setLayoutData(gd);
createAllExtentionWizard();
+ desLabel = new Label(main, SWT.NONE);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ desLabel.setLayoutData(gd);
+
viewer.setInput(registedWizard);
if (!registedWizard.isEmpty()) {
this.setSelectedNode((IWizardNode) registedWizard.get(0));
@@ -68,8 +82,13 @@
IStructuredSelection selection = (IStructuredSelection) event
.getSelection();
IWizardNode node = (IWizardNode) selection.getFirstElement();
+ desLabel.setText("");
if (node != null) {
setSelectedNode(node);
+ if(node instanceof TransformSelectWizardNode){
+ String des = ((TransformSelectWizardNode)node).getDescription();
+ desLabel.setText(des);
+ }
IStrucutredDataCreationWizard wizard = (IStrucutredDataCreationWizard) node
.getWizard();
TransformDataSelectionWizard pw = (TransformDataSelectionWizard) getWizard();
@@ -129,12 +148,17 @@
wn.setWizard(wizard);
wn.setName(viewerInitor.getName());
wn.setIconPath(viewerInitor.getWizardIconPath());
+ wn.setDescription(viewerInitor.getDescription());
this.registedWizard.add(wn);
}
}
public TransformDataWizardSelectionPage(String pageName) {
super(pageName);
+
+ setDescription("Select the transform data type");
+ setTitle("Data Type Selection");
+
}
public void activeSelectionWizard() {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformSelectWizardNode.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformSelectWizardNode.java 2008-10-08 08:11:10 UTC (rev 10730)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/TransformSelectWizardNode.java 2008-10-08 08:27:25 UTC (rev 10731)
@@ -24,6 +24,15 @@
String name = "";
String iconPath = null;
String pluginID = null;
+ String description = "";
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
public String getPluginID() {
return pluginID;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.xml/plugin.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.xml/plugin.xml 2008-10-08 08:11:10 UTC (rev 10730)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.xml/plugin.xml 2008-10-08 08:27:25 UTC (rev 10731)
@@ -6,8 +6,9 @@
<viewerInitor
contentProvider="org.jboss.tools.smooks.xml.ui.XMLStructuredDataContentProvider"
creationWizard="org.jboss.tools.smooks.xml.ui.XMLStructuredDataWizard"
+ description="XML data type comes from any .xml file."
labelProvider="org.jboss.tools.smooks.xml.ui.XMLStructuredDataLabelProvider"
- name="XML"
+ name="XML Data Type"
typeID="org.jboss.tools.smooks.xml.viewerInitor.xml">
</viewerInitor>
</extension>
17 years, 3 months
JBoss Tools SVN: r10730 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-10-08 04:11:10 -0400 (Wed, 08 Oct 2008)
New Revision: 10730
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizardPage.java
Log:
JBIDE-2836
Change the new smooks file wizard page
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java 2008-10-08 07:42:08 UTC (rev 10729)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java 2008-10-08 08:11:10 UTC (rev 10730)
@@ -1,22 +1,27 @@
package org.jboss.tools.smooks.ui.wizards;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.operation.*;
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import java.io.*;
-import org.eclipse.ui.*;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
import org.jboss.tools.smooks.graphical.util.GraphicalInformationSaver;
import org.jboss.tools.smooks.ui.editors.TypeIDSelectionWizardPage;
-import org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext;
/**
* This is a sample new wizard. Its role is to create a new file resource in the
@@ -29,9 +34,12 @@
public class SmooksConfigFileNewWizard extends Wizard implements INewWizard {
private SmooksConfigFileNewWizardPage page;
- private ISelection selection;
private TypeIDSelectionWizardPage typeIDPage;
+ private IStructuredSelection selection;
+
+ private IWorkbench workbench;
+
/**
* Constructor for SmooksConfigFileNewWizard.
*/
@@ -43,9 +51,9 @@
/**
* Adding the page to the wizard.
*/
-
public void addPages() {
- page = new SmooksConfigFileNewWizardPage(selection);
+ page = new SmooksConfigFileNewWizardPage("newSmooksFile1",
+ getSelection());
addPage(page);
typeIDPage = new TypeIDSelectionWizardPage("");
addPage(typeIDPage);
@@ -56,13 +64,14 @@
* will create an operation and run it using wizard as execution context.
*/
public boolean performFinish() {
- final String containerName = page.getContainerName();
- final String fileName = page.getFileName();
+ // final String containerName = page.getContainerName();
+ // final String fileName = page.getFileName();
+ final IFile file = page.createNewFile();
IRunnableWithProgress op = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor)
throws InvocationTargetException {
try {
- doFinish(containerName, fileName, monitor);
+ doFinish(file, monitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
} finally {
@@ -89,21 +98,12 @@
* file.
*/
- private void doFinish(String containerName, String fileName,
- IProgressMonitor monitor) throws CoreException {
+ private void doFinish(final IFile file, IProgressMonitor monitor)
+ throws CoreException {
// create a sample file
- monitor.beginTask("Creating " + fileName, 2);
String sourceTypeID = typeIDPage.getSourceID();
String targetTypeID = typeIDPage.getTargetID();
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IResource resource = root.findMember(new Path(containerName));
- if (!resource.exists() || !(resource instanceof IContainer)) {
- throwCoreException("Container \"" + containerName
- + "\" does not exist.");
- }
- IContainer container = (IContainer) resource;
- final IFile file = container.getFile(new Path(fileName));
try {
InputStream stream = openContentStream();
if (file.exists()) {
@@ -137,8 +137,8 @@
*/
private InputStream openContentStream() {
- String contents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+
- " <smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.0.xsd\"/>";
+ String contents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ + " <smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.0.xsd\"/>";
return new ByteArrayInputStream(contents.getBytes());
}
@@ -148,13 +148,16 @@
throw new CoreException(status);
}
- /**
- * We will accept the selection in the workbench to see if we can initialize
- * from it.
- *
- * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
- */
public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
this.selection = selection;
}
+
+ public IStructuredSelection getSelection() {
+ return selection;
+ }
+
+ public void setSelection(IStructuredSelection selection) {
+ this.selection = selection;
+ }
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizardPage.java 2008-10-08 07:42:08 UTC (rev 10729)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizardPage.java 2008-10-08 08:11:10 UTC (rev 10730)
@@ -1,186 +1,37 @@
package org.jboss.tools.smooks.ui.wizards;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-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.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.ContainerSelectionDialog;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
/**
- * The "New" wizard page allows setting the container for the new file as well
- * as the file name. The page will only accept file name without the extension
- * OR with the extension that matches the expected one (smooks).
+ *
+ * @author dart
+ *
*/
-
-public class SmooksConfigFileNewWizardPage extends WizardPage {
- private Text containerText;
-
- private Text fileText;
-
- private ISelection selection;
-
- /**
- * Constructor for SampleNewWizardPage.
- *
- * @param pageName
- */
- public SmooksConfigFileNewWizardPage(ISelection selection) {
- super("wizardPage");
- setTitle("Smooks Configuration File");
- setDescription("This wizard creates a new smooks configuration file with *.smooks extension that can be opened by a Smooks editor.");
- this.selection = selection;
+public class SmooksConfigFileNewWizardPage extends WizardNewFileCreationPage {
+ public SmooksConfigFileNewWizardPage(String pageName,
+ IStructuredSelection selection) {
+ super(pageName, selection);
+ setFileExtension("smooks");
}
- /**
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- layout.numColumns = 3;
- layout.verticalSpacing = 9;
- Label label = new Label(container, SWT.NULL);
- label.setText("&Container:");
+ @Override
+ protected boolean validatePage() {
+ boolean flag = super.validatePage();
+ String name = this.getFileName();
+ if (name.indexOf(".") == -1)
+ return flag;
+ String extensionName = name.substring(name.indexOf(".") + 1, name
+ .length());
+ String error = null;
+ if (extensionName.equalsIgnoreCase(this.getFileExtension())) {
- containerText = new Text(container, SWT.BORDER | SWT.SINGLE);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- containerText.setLayoutData(gd);
- containerText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- dialogChanged();
- }
- });
-
- Button button = new Button(container, SWT.PUSH);
- button.setText("Browse...");
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleBrowse();
- }
- });
- label = new Label(container, SWT.NULL);
- label.setText("&File name:");
-
- fileText = new Text(container, SWT.BORDER | SWT.SINGLE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- fileText.setLayoutData(gd);
- fileText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- dialogChanged();
- }
- });
- initialize();
- dialogChanged();
- setControl(container);
- }
-
- /**
- * Tests if the current workbench selection is a suitable container to use.
- */
-
- private void initialize() {
- if (selection != null && selection.isEmpty() == false
- && selection instanceof IStructuredSelection) {
- IStructuredSelection ssel = (IStructuredSelection) selection;
- if (ssel.size() > 1)
- return;
- Object obj = ssel.getFirstElement();
- if (obj instanceof IResource) {
- IContainer container;
- if (obj instanceof IContainer)
- container = (IContainer) obj;
- else
- container = ((IResource) obj).getParent();
- containerText.setText(container.getFullPath().toString());
- }
+ } else {
+ error = "file extension must be \"smooks\"";
}
- fileText.setText("SmooksConfigurationFile.smooks");
- }
-
-
- /**
- * Uses the standard container selection dialog to choose the new value for
- * the container field.
- */
-
- private void handleBrowse() {
- ContainerSelectionDialog dialog = new ContainerSelectionDialog(
- getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
- "Select new file container");
- if (dialog.open() == ContainerSelectionDialog.OK) {
- Object[] result = dialog.getResult();
- if (result.length == 1) {
- containerText.setText(((Path) result[0]).toString());
- }
+ if (error != null) {
+ this.setErrorMessage(error);
}
+ return (error == null);
}
-
- /**
- * Ensures that both text fields are set.
- */
-
- private void dialogChanged() {
- IResource container = ResourcesPlugin.getWorkspace().getRoot()
- .findMember(new Path(getContainerName()));
- String fileName = getFileName();
-
- if (getContainerName().length() == 0) {
- updateStatus("File container must be specified");
- return;
- }
- if (container == null
- || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
- updateStatus("File container must exist");
- return;
- }
- if (!container.isAccessible()) {
- updateStatus("Project must be writable");
- return;
- }
- if (fileName.length() == 0) {
- updateStatus("File name must be specified");
- return;
- }
- if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
- updateStatus("File name must be valid");
- return;
- }
- int dotLoc = fileName.lastIndexOf('.');
- if (dotLoc != -1) {
- String ext = fileName.substring(dotLoc + 1);
- if (ext.equalsIgnoreCase("smooks") == false) {
- updateStatus("File extension must be \"smooks\"");
- return;
- }
- }
- updateStatus(null);
- }
-
- private void updateStatus(String message) {
- setErrorMessage(message);
- setPageComplete(message == null);
- }
-
- public String getContainerName() {
- return containerText.getText();
- }
-
- public String getFileName() {
- return fileText.getText();
- }
}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r10729 - in workspace/grid/org.jboss.tools.bpmnTo: META-INF and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-10-08 03:42:08 -0400 (Wed, 08 Oct 2008)
New Revision: 10729
Added:
workspace/grid/org.jboss.tools.bpmnTo/icons/
workspace/grid/org.jboss.tools.bpmnTo/icons/sample.gif
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/wizard/
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/wizard/B2JExportWizard.java
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BPMNResourcesChoicePage.java
Removed:
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/action/
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/action/
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BpmnToWizardDialog.java
Modified:
workspace/grid/org.jboss.tools.bpmnTo/META-INF/MANIFEST.MF
workspace/grid/org.jboss.tools.bpmnTo/plugin.properties
workspace/grid/org.jboss.tools.bpmnTo/plugin.xml
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2J.properties
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2JMessages.java
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/util/BPMNToUtil.java
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BpmnPoolsChoicePage.java
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BpmnToWizard.java
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/ErrorMessagesPage.java
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/GeneratedFileLocationPage.java
Log:
JBIDE-2842: create export wizard for bpmn -> jpdl
Modified: workspace/grid/org.jboss.tools.bpmnTo/META-INF/MANIFEST.MF
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/META-INF/MANIFEST.MF 2008-10-08 07:40:58 UTC (rev 10728)
+++ workspace/grid/org.jboss.tools.bpmnTo/META-INF/MANIFEST.MF 2008-10-08 07:42:08 UTC (rev 10729)
@@ -14,8 +14,9 @@
lib/dom4j-1.6.1.jar,
bin/
Bundle-Vendor: %PLUGIN_PROVIDER
-Import-Package: org.eclipse.core.resources
+Import-Package: org.eclipse.core.resources,
+ org.eclipse.ui.model
Export-Package: org.jboss.tools.bpmnto,
- org.jboss.tools.bpmnto.action,
org.jboss.tools.bpmnto.translate,
- org.jboss.tools.bpmnto.util
+ org.jboss.tools.bpmnto.util,
+ org.jboss.tools.bpmnto.wizard
Added: workspace/grid/org.jboss.tools.bpmnTo/icons/sample.gif
===================================================================
(Binary files differ)
Property changes on: workspace/grid/org.jboss.tools.bpmnTo/icons/sample.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: workspace/grid/org.jboss.tools.bpmnTo/plugin.properties
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/plugin.properties 2008-10-08 07:40:58 UTC (rev 10728)
+++ workspace/grid/org.jboss.tools.bpmnTo/plugin.properties 2008-10-08 07:42:08 UTC (rev 10729)
@@ -1,4 +1,5 @@
-b2jaction=BPMN -> JPDL
-bpmnto=BPMN TO
-PLUGIN_NAME=BPMNTO
+wizard.name=BPMN -> JPDL
+wizard.description = Export a BPMN file to JPDL
+category.name=BPMN Export
+PLUGIN_NAME=BPMNExport
PLUGIN_PROVIDER=Red Hat, Inc.
\ No newline at end of file
Modified: workspace/grid/org.jboss.tools.bpmnTo/plugin.xml
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/plugin.xml 2008-10-08 07:40:58 UTC (rev 10728)
+++ workspace/grid/org.jboss.tools.bpmnTo/plugin.xml 2008-10-08 07:42:08 UTC (rev 10729)
@@ -1,32 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
-<plugin>
-<extension
- point="org.eclipse.ui.popupMenus">
-
-
- <objectContribution
- id="org.jboss.tools.b2j.objectContribution.bpmnfile"
- nameFilter="*.bpmn"
- objectClass="org.eclipse.core.resources.IFile">
+<plugin>
+ <extension point="org.eclipse.ui.exportWizards">
+ <category name="%category.name"
+ id="org.jboss.tools.flow.convert.export.category"/>
+ <wizard name="%wizard.name"
+ icon="icons/sample.gif"
+ category="org.jboss.tools.flow.convert.export.category"
+ class="org.jboss.tools.b2j.wizard.B2JExportWizard"
+ id="org.jboss.tools.flow.convert.export.b2jexportwizard">
+ <description>%wizard.description</description>
+ <selection name="*.bpmn" class="org.eclipse.core.resources.IFile"/>
+ </wizard>
+ </extension>
- <menu
- label="%bpmnto"
- id="org.jboss.tools.bpmnTo.ActionSet"
- path="additions">
- <separator
- name="group">
- </separator>
- </menu>
-
- <action
- label="%b2jaction"
- class="org.jboss.tools.b2j.action.B2JAction"
- menubarPath="org.jboss.tools.bpmnTo.ActionSet/group"
- enablesFor="+"
- id="org.jboss.tools.b2j.B2JAction">
- </action>
- </objectContribution>
- </extension>
-
</plugin>
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2J.properties
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2J.properties 2008-10-08 07:40:58 UTC (rev 10728)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2J.properties 2008-10-08 07:42:08 UTC (rev 10729)
@@ -25,12 +25,23 @@
Bpmn_FlowTarget_Attribute_Name=target
Bpmn_FlowDefault_Attribute_Name=isDefault
Bpmn_Element_ID=iD
-Bpmn_Pool_Choose_Dialog_Message=Available BPMN Pools
-Bpmn_Pool_Choose_Dialog_Title=Select BPMN pools to translate
-Bpmn_GeneratedFile_Location_Dialog_Message=Please choose the generated files location. If click Cancel, the generated files will be put under the project
-Bpmn_GeneratedFile_Location_Dialog_Title=Select the generated files location
-Bpmn_Translate_Message_Dialog_Title=Warnings and Errors
-Bpmn_Translate_Message_Dialog_Message=The messages are errors and warnings during the translation:
+Bpmn_Wizard_Title=BPMN to jPDL Conversion
+Bpmn_File_Choose_WizardPage_Name=FileChoosePage
+Bpmn_File_Choose_WizardPage_Title=BPMN Resources
+Bpmn_File_Choose_WizardPage_ViewerTitle=BPMN resources
+Bpmn_File_Choose_WizardPage_Message=Select BPMN resources to convert
+Bpmn_Pool_Choose_WizardPage_Name=PoolPage
+Bpmn_Pool_Choose_WizardPage_Message=Available BPMN Pools
+Bpmn_Pool_Choose_WizardPage_Title=Select BPMN pools to translate
+Bpmn_GeneratedFile_Location_WizardPage_Name=LocationPage
+Bpmn_GeneratedFile_Location_WizardPage_Message=Select the target location
+Bpmn_GeneratedFile_Location_WizardPage_Title=Target Location
+Bpmn_GeneratedFile_Location_WizardPage_ViewerTitle=Target location
+Bpmn_GeneratedFile_Location_WizardPage_CheckBox=Overwrite existing resources
+Bpmn_Translate_Message_WizardPage_Name=MessagePage
+Bpmn_Translate_Message_WizardPage_Title=Conversion Warnings and Errors
+Bpmn_Translate_Message_WizardPage_Message=Warnings and Errors that occured during conversion
+Bpmn_Translate_Message_WizardpageViewer_Title=Warnings and Errors
Bpmn_EAnnotations_Element_Name=eAnnotations
Bpmn_Details_Element_Name=details
Bpmn_Value_Attribute_Name=value
@@ -38,6 +49,7 @@
Jpdl_Element_Decision_Suffix=Decision
Jpdl_Element_Complete_Suffix=Complete
Jpdl_Element_Cancel_Suffix=Cancel
+Jpdl_Element_Successful_Name=Successful?
Jpdl_Process_Definition_Name=processdefinition.xml
Jpdl_32_Namespace_Url=urn:jbpm.org:jpdl-3.2
Jpdl_Process_Definition_Element_Name=process-definition
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2JMessages.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2JMessages.java 2008-10-08 07:40:58 UTC (rev 10728)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2JMessages.java 2008-10-08 07:42:08 UTC (rev 10729)
@@ -49,12 +49,23 @@
public static String Bpmn_FlowSource_Attribute_Name;
public static String Bpmn_FlowTarget_Attribute_Name;
public static String Bpmn_FlowDefault_Attribute_Name;
- public static String Bpmn_Pool_Choose_Dialog_Message;
- public static String Bpmn_Pool_Choose_Dialog_Title;
- public static String Bpmn_GeneratedFile_Location_Dialog_Message;
- public static String Bpmn_GeneratedFile_Location_Dialog_Title;
- public static String Bpmn_Translate_Message_Dialog_Title;
- public static String Bpmn_Translate_Message_Dialog_Message;
+ public static String Bpmn_Wizard_Title;
+ public static String Bpmn_File_Choose_WizardPage_Name;
+ public static String Bpmn_File_Choose_WizardPage_Title;
+ public static String Bpmn_File_Choose_WizardPage_Message;
+ public static String Bpmn_File_Choose_WizardPage_ViewerTitle;
+ public static String Bpmn_Pool_Choose_WizardPage_Name;
+ public static String Bpmn_Pool_Choose_WizardPage_Message;
+ public static String Bpmn_Pool_Choose_WizardPage_Title;
+ public static String Bpmn_GeneratedFile_Location_WizardPage_Name;
+ public static String Bpmn_GeneratedFile_Location_WizardPage_Message;
+ public static String Bpmn_GeneratedFile_Location_WizardPage_Title;
+ public static String Bpmn_GeneratedFile_Location_WizardPage_ViewerTitle;
+ public static String Bpmn_GeneratedFile_Location_WizardPage_CheckBox;
+ public static String Bpmn_Translate_Message_WizardPage_Name;
+ public static String Bpmn_Translate_Message_WizardPage_Title;
+ public static String Bpmn_Translate_Message_WizardPage_Message;
+ public static String Bpmn_Translate_Message_WizardpageViewer_Title;
public static String Bpmn_EAnnotations_Element_Name;
public static String Bpmn_Details_Element_Name;
public static String Bpmn_Value_Attribute_Name;
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java 2008-10-08 07:40:58 UTC (rev 10728)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java 2008-10-08 07:42:08 UTC (rev 10729)
@@ -33,6 +33,7 @@
Document bpmnDocument;
List<Document> processDefs = new ArrayList<Document>();
+
Map<String, Element> map = new HashMap<String, Element>();
public Map<String, Element> getMap() {
@@ -452,5 +453,13 @@
.attributeValue(B2JMessages.Dom_Element_Name));
}
+
+ public List<Document> getProcessDefs() {
+ return processDefs;
+ }
+ public void setProcessDefs(List<Document> processDefs) {
+ this.processDefs = processDefs;
+ }
+
}
Added: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/wizard/B2JExportWizard.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/wizard/B2JExportWizard.java (rev 0)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/wizard/B2JExportWizard.java 2008-10-08 07:42:08 UTC (rev 10729)
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.b2j.wizard;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.dom4j.Document;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.b2j.messages.B2JMessages;
+import org.jboss.tools.b2j.translate.BPMN2JPDL;
+import org.jboss.tools.b2j.translate.GraphicalFileGenerator;
+import org.jboss.tools.b2j.translate.TranslateHelper;
+import org.jboss.tools.bpmnto.BpmnToPlugin;
+import org.jboss.tools.bpmnto.wizard.BpmnToWizard;
+
+/**
+ * @author Grid Qian
+ *
+ * the wizard for bpmn to jpdl translation
+ */
+public class B2JExportWizard extends BpmnToWizard {
+
+ private List<String> strForProcessList = new ArrayList<String>();
+ private List<String> strForGpdList = new ArrayList<String>();
+ private List<String> generatedFoldersList = new ArrayList<String>();
+
+ public void createGeneratedFile() {
+ String[] jpdlFolderNames = new String[this.generatedFoldersList.size()];
+
+ int i = 0;
+ for (String name : this.generatedFoldersList) {
+ jpdlFolderNames[i] = name;
+ i++;
+ }
+
+ String location = super.getContainerPath((IContainer) super
+ .getTargetLocationSelection().getFirstElement());
+
+ if (this.strForProcessList.size() > 0) {
+ i = 0;
+ String[] strs = new String[strForProcessList.size()];
+ for (String pro : this.strForProcessList) {
+ strs[i] = pro;
+ i++;
+ }
+ try {
+ TranslateHelper.createFiles(location, bpmnFileName, strs,
+ jpdlFolderNames,
+ B2JMessages.Jpdl_Process_Definition_Name);
+ } catch (Exception e) {
+ BpmnToPlugin.getDefault().logError(e.getMessage());
+ }
+ }
+
+ if (this.strForGpdList.size() > 0) {
+ i = 0;
+ String[] strs = new String[strForGpdList.size()];
+ for (String pro : this.strForGpdList) {
+ strs[i] = pro;
+ i++;
+ }
+ try {
+ TranslateHelper.createFiles(location, bpmnFileName, strs,
+ jpdlFolderNames, B2JMessages.Gpd_Definition_Name);
+ } catch (Exception e) {
+ BpmnToPlugin.getDefault().logError(e.getMessage());
+ }
+ }
+
+ }
+
+ public List<String> translateBpmnToStrings() {
+ List<String> warningList = new ArrayList<String>();
+ List<String> errorList = new ArrayList<String>();
+
+ Document bpmnDocument = null;
+ try {
+ bpmnDocument = getDocument(bpmnFileParentPath, bpmnFileName);
+ } catch (Exception e) {
+ errorList.add(NLS.bind(B2JMessages.Translate_Error_File_CanNotRead,
+ bpmnFileName));
+ }
+
+ BPMN2JPDL translator = new BPMN2JPDL(bpmnFileName, bpmnFileParentPath,
+ poolIdList, bpmnDocument);
+
+ this.setStrForProcessList(Arrays
+ .asList(translator.translateToStrings()));
+
+ for (Document def : translator.getProcessDefs()) {
+ this.generatedFoldersList.add(def.getName());
+ }
+
+ warningList.addAll(translator.getWarnings());
+ errorList.addAll(translator.getErrors());
+
+ // generate jpdl gpd file from *.bpmn_diagram
+ Document bpmnDiagramDocument = null;
+ try {
+ bpmnDiagramDocument = getDocument(bpmnFileParentPath,
+ TranslateHelper.getBpmnDiagramName(bpmnFileName));
+ } catch (Exception e) {
+ errorList.add(NLS.bind(B2JMessages.Translate_Error_File_CanNotRead,
+ TranslateHelper.getBpmnDiagramName(bpmnFileName)));
+ }
+ GraphicalFileGenerator generator = new GraphicalFileGenerator(
+ bpmnDiagramDocument, translator.getMap(), bpmnFileParentPath,
+ bpmnFileName);
+
+ this.setStrForGpdList(Arrays.asList(generator.translateToStrings()));
+
+ warningList.addAll(generator.getWarnings());
+ errorList.addAll(generator.getErrors());
+
+ List<String> list = new ArrayList<String>();
+ list.addAll(errorList);
+ list.addAll(warningList);
+
+ return list;
+ }
+
+ public List<String> getStrForProcessList() {
+ return strForProcessList;
+ }
+
+ public void setStrForProcessList(List<String> strForProcessList) {
+ this.strForProcessList = strForProcessList;
+ }
+
+ public List<String> getStrForGpdList() {
+ return strForGpdList;
+ }
+
+ public void setStrForGpdList(List<String> strForGpdList) {
+ this.strForGpdList = strForGpdList;
+ }
+
+ public List<String> getGeneratedFoldersList() {
+ return generatedFoldersList;
+ }
+
+ public void setGeneratedFoldersList(List<String> generatedFoldersList) {
+ this.generatedFoldersList = generatedFoldersList;
+ }
+}
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/util/BPMNToUtil.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/util/BPMNToUtil.java 2008-10-08 07:40:58 UTC (rev 10728)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/util/BPMNToUtil.java 2008-10-08 07:42:08 UTC (rev 10729)
@@ -19,6 +19,7 @@
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.Map;
import javax.xml.parsers.SAXParser;
@@ -27,6 +28,13 @@
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
import org.jboss.tools.b2j.messages.B2JMessages;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
@@ -149,4 +157,39 @@
}
return poolIDMap;
}
+
+
+ public static Composite createComposite(Composite parent, int numColumns) {
+ Composite composite = new Composite(parent, SWT.NULL);
+
+ GridLayout layout = new GridLayout();
+ layout.numColumns = numColumns;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ return composite;
+ }
+
+ @SuppressWarnings("unchecked")
+ public static boolean checkSelectedResources(ISelection selectedResources) {
+ boolean res = true;
+ if (selectedResources instanceof IStructuredSelection
+ && !selectedResources.isEmpty()) {
+ IStructuredSelection ss = (IStructuredSelection)selectedResources;
+ for (Iterator it = ss.iterator(); it.hasNext(); ){
+ Object o = it.next();
+ if (o instanceof IFile) {
+ if (!((IFile)o).getFileExtension().equalsIgnoreCase("bpmn")) {
+ res = false;
+ break;
+ }
+ } else {
+ res = false;
+ break;
+ }
+ }
+ } else {
+ res = false;
+ }
+ return res;
+ }
}
Added: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BPMNResourcesChoicePage.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BPMNResourcesChoicePage.java (rev 0)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BPMNResourcesChoicePage.java 2008-10-08 07:42:08 UTC (rev 10729)
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.bpmnto.wizard;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.jboss.tools.b2j.messages.B2JMessages;
+import org.jboss.tools.bpmnto.util.BPMNToUtil;
+
+/**
+ * @author Grid Qian
+ *
+ * the wizardpage used by user to choose the bpmn file
+ */
+public class BPMNResourcesChoicePage extends WizardPage {
+
+ private TreeViewer viewer;
+ private ISelection currentSelection;
+ private IWizard wizard;
+
+ public BPMNResourcesChoicePage(String pageName, String title,
+ String description) {
+ super(pageName);
+ this.setTitle(title);
+ this.setDescription(description);
+ }
+
+ public void createControl(Composite parent) {
+ Composite composite = createDialogArea(parent);
+
+ createListTitleArea(composite);
+ createListViewer(composite);
+ super.setControl(composite);
+
+ initializePage();
+ }
+
+ private Label createListTitleArea(Composite composite) {
+ Label label = new Label(composite, SWT.NONE);
+ label.setText(B2JMessages.Bpmn_File_Choose_WizardPage_ViewerTitle);
+ label.setFont(composite.getFont());
+ return label;
+ }
+
+ private void createListViewer(Composite composite) {
+ viewer = new TreeViewer(composite, SWT.BORDER | SWT.MULTI
+ | SWT.H_SCROLL | SWT.V_SCROLL);
+ viewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
+ viewer.setLabelProvider(new WorkbenchLabelProvider());
+ WorkbenchContentProvider cp = new WorkbenchContentProvider();
+ viewer.setContentProvider(cp);
+ viewer.setFilters(new ViewerFilter[] { new ProjectFilter() });
+ viewer.addPostSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ updateControls();
+ currentSelection = viewer.getSelection();
+ ((BpmnToWizard) wizard)
+ .setSelection((IStructuredSelection) currentSelection);
+
+ }
+ });
+ }
+
+ private void initializePage() {
+ wizard = this.getWizard();
+ viewer.setInput(ResourcesPlugin.getWorkspace());
+ if (this.currentSelection != null) {
+ viewer.setSelection(currentSelection, true);
+ }
+ }
+
+ @Override
+ public boolean isPageComplete() {
+ if (viewer != null) {
+ return BPMNToUtil.checkSelectedResources(viewer.getSelection());
+ }
+ return super.isPageComplete();
+ }
+
+ private void updateControls() {
+ super.getWizard().getContainer().updateButtons();
+ }
+
+ private Composite createDialogArea(Composite parent) {
+ // create a composite with standard margins and spacing
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 7;
+ layout.marginWidth = 7;
+ layout.verticalSpacing = 4;
+ layout.horizontalSpacing = 4;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+ return composite;
+ }
+
+ public void setSelection(ISelection selection) {
+ this.currentSelection = selection;
+ }
+
+ public ISelection getSelection() {
+ return currentSelection;
+ }
+}
+
+class ProjectFilter extends ViewerFilter {
+ @Override
+ public boolean select(Viewer viewer, Object parent, Object element) {
+ boolean res = false;
+ if (element instanceof IFile) {
+ IFile file = (IFile) element;
+ if (file.getFileExtension().equalsIgnoreCase("bpmn")) {
+ res = true;
+ }
+ }
+ if (element instanceof IContainer) {
+ res = true;
+ }
+ return res;
+ }
+}
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BpmnPoolsChoicePage.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BpmnPoolsChoicePage.java 2008-10-08 07:40:58 UTC (rev 10728)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BpmnPoolsChoicePage.java 2008-10-08 07:42:08 UTC (rev 10729)
@@ -45,54 +45,60 @@
CheckboxTableViewer listViewer;
String listTitle;
private Map<String, String> idMap;
+
private IWizard wizard;
- public BpmnPoolsChoicePage(String pageName, String listTitle,
- Map<String, String> idMap) {
+ public BpmnPoolsChoicePage(String pageName, String title, String listTitle) {
super(pageName);
this.listTitle = listTitle;
- this.idMap = idMap;
- this.setTitle(pageName);
+ this.setTitle(title);
}
public void createControl(Composite parent) {
Composite composite = createDialogArea(parent);
+
createListTitleArea(composite);
-
createListViewer(composite);
-
addSelectionButtons(composite);
+ setControl(composite);
- setControl(composite);
initializePage();
- initializeViewerSelection();
+ initializeViewer();
}
- private void initializeViewerSelection() {
- wizard = this.getWizard();
- List<String> poolIdList = ((BpmnToWizard) wizard).getPoolIdList();
- if (poolIdList.size() == 0) {
- listViewer.setAllChecked(false);
- } else {
- for (String id : poolIdList) {
- Set<Entry<String, String>> set = idMap.entrySet();
- Entry<String, String> selectedEntry = null;
- for (Entry<String, String> entry : set) {
- if (entry.getKey().equals(id)) {
- selectedEntry = entry;
- break;
- }
+ private Label createListTitleArea(Composite composite) {
+ Label label = new Label(composite, SWT.NONE);
+ label.setText(listTitle);
+ label.setFont(composite.getFont());
+ return label;
+ }
+
+ private void createListViewer(Composite composite) {
+ listViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
+ GridData data = new GridData(GridData.FILL_BOTH);
+ data.heightHint = 250;
+ data.widthHint = 300;
+ listViewer.getTable().setLayoutData(data);
+
+ listViewer.setLabelProvider(new LabelProvider());
+ listViewer.setContentProvider(new ArrayContentProvider());
+ listViewer.addCheckStateListener(new ICheckStateListener() {
+ @SuppressWarnings("unchecked")
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ if (event.getChecked()) {
+ (((BpmnToWizard) wizard)).getPoolIdList().add(
+ ((Entry<String, String>) event.getElement())
+ .getKey());
+ } else {
+ (((BpmnToWizard) wizard)).getPoolIdList().remove(
+ ((Entry<String, String>) event.getElement())
+ .getKey());
}
- listViewer.setChecked(selectedEntry, true);
+ changeComplete();
}
- }
+ });
}
- private void initializePage() {
- setPageComplete(false);
- listViewer.setInput(idMap.entrySet());
- }
-
private void addSelectionButtons(Composite composite) {
Composite buttonComposite = new Composite(composite, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -103,8 +109,8 @@
buttonComposite.setLayoutData(new GridData(SWT.END, SWT.TOP, true,
false));
- Button selectButton = createButton(buttonComposite, B2JMessages.Label_Select_All,
- false);
+ Button selectButton = createButton(buttonComposite,
+ B2JMessages.Label_Select_All, false);
SelectionListener listener = new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -145,39 +151,34 @@
return button;
}
- private void createListViewer(Composite composite) {
- listViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 250;
- data.widthHint = 300;
- listViewer.getTable().setLayoutData(data);
+ private void initializePage() {
+ setPageComplete(false);
+ }
- listViewer.setLabelProvider(new LabelProvider());
- listViewer.setContentProvider(new ArrayContentProvider());
- listViewer.addCheckStateListener(new ICheckStateListener() {
- @SuppressWarnings("unchecked")
- public void checkStateChanged(CheckStateChangedEvent event) {
- if (event.getChecked()) {
- (((BpmnToWizard) wizard)).getPoolIdList().add(
- ((Entry<String, String>) event.getElement())
- .getKey());
- } else {
- (((BpmnToWizard) wizard)).getPoolIdList().remove(
- ((Entry<String, String>) event.getElement())
- .getKey());
+ private void initializeViewer() {
+ if (listViewer == null) {
+ return;
+ }
+ listViewer.setInput(idMap.entrySet());
+ wizard = this.getWizard();
+ List<String> poolIdList = ((BpmnToWizard) wizard).getPoolIdList();
+ if (poolIdList.size() == 0) {
+ listViewer.setAllChecked(false);
+ } else {
+ for (String id : poolIdList) {
+ Set<Entry<String, String>> set = idMap.entrySet();
+ Entry<String, String> selectedEntry = null;
+ for (Entry<String, String> entry : set) {
+ if (entry.getKey().equals(id)) {
+ selectedEntry = entry;
+ break;
+ }
}
- changeComplete();
+ listViewer.setChecked(selectedEntry, true);
}
- });
+ }
}
- private Label createListTitleArea(Composite composite) {
- Label label = new Label(composite, SWT.NONE);
- label.setText(listTitle);
- label.setFont(composite.getFont());
- return label;
- }
-
private Composite createDialogArea(Composite parent) {
// create a composite with standard margins and spacing
Composite composite = new Composite(parent, SWT.NONE);
@@ -199,4 +200,13 @@
}
}
+ public Map<String, String> getIdMap() {
+ return idMap;
+ }
+
+ public void setIdMap(Map<String, String> idMap) {
+ this.idMap = idMap;
+ initializeViewer();
+ }
+
}
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BpmnToWizard.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BpmnToWizard.java 2008-10-08 07:40:58 UTC (rev 10728)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BpmnToWizard.java 2008-10-08 07:42:08 UTC (rev 10729)
@@ -15,47 +15,176 @@
import java.util.List;
import java.util.Map;
+import org.dom4j.Document;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IExportWizard;
+import org.eclipse.ui.IWorkbench;
import org.jboss.tools.b2j.messages.B2JMessages;
+import org.jboss.tools.bpmnto.util.BPMNToUtil;
+import org.jboss.tools.bpmnto.wizard.BPMNResourcesChoicePage;
/**
* @author Grid Qian
*
* the wizard for bpmn translation
*/
-public class BpmnToWizard extends Wizard{
+public abstract class BpmnToWizard extends Wizard implements IExportWizard {
- BpmnPoolsChoicePage poolsPage;
- GeneratedFileLocationPage locationPage;
- ErrorMessagesPage errorPage;
-
+ private BPMNResourcesChoicePage bpmnResPage;
+ private BpmnPoolsChoicePage poolsPage;
+ private GeneratedFileLocationPage locationPage;
+ private ErrorMessagesPage errorPage;
+
+ // the selected *.bpmn file
+ private IStructuredSelection selection;
+ // the selected folder to save these generated files
+ private IStructuredSelection targetLocationSelection;
// bpmn pool id:name map
- Map<String, String> idMap;
- List<String> poolIdList = new ArrayList<String>();
- String location;
- List<String> errorList = new ArrayList<String>();
+ private Map<String, String> idMap;
- public BpmnToWizard(String title,Map<String, String> idMap){
+ protected String bpmnFileName;
+ protected String bpmnFileParentPath;
+ protected List<String> poolIdList = new ArrayList<String>();
+ // the list contains errors or warnings when generating
+ protected List<String> errorList = new ArrayList<String>();
+
+ public BpmnToWizard() {
super();
- super.setWindowTitle(title);
- this.idMap = idMap;
+ super.setWindowTitle(B2JMessages.Bpmn_Wizard_Title);
}
-
- public void addPages(){
+
+ public void addPages() {
super.addPages();
- poolsPage = new BpmnPoolsChoicePage(B2JMessages.Bpmn_Pool_Choose_Dialog_Title, B2JMessages.Bpmn_Pool_Choose_Dialog_Message,idMap);
- locationPage = new GeneratedFileLocationPage(B2JMessages.Bpmn_GeneratedFile_Location_Dialog_Title,B2JMessages.Bpmn_GeneratedFile_Location_Dialog_Message);
- errorPage = new ErrorMessagesPage(B2JMessages.Bpmn_Translate_Message_Dialog_Title,B2JMessages.Bpmn_Translate_Message_Dialog_Message);
+
+ bpmnResPage = new BPMNResourcesChoicePage(
+ B2JMessages.Bpmn_File_Choose_WizardPage_Name,
+ B2JMessages.Bpmn_File_Choose_WizardPage_Title,
+ B2JMessages.Bpmn_File_Choose_WizardPage_Message);
+ bpmnResPage.setSelection(selection);
+ poolsPage = new BpmnPoolsChoicePage(
+ B2JMessages.Bpmn_Pool_Choose_WizardPage_Name,
+ B2JMessages.Bpmn_Pool_Choose_WizardPage_Title,
+ B2JMessages.Bpmn_Pool_Choose_WizardPage_Message);
+ errorPage = new ErrorMessagesPage(
+ B2JMessages.Bpmn_Translate_Message_WizardPage_Name,
+ B2JMessages.Bpmn_Translate_Message_WizardPage_Title,
+ B2JMessages.Bpmn_Translate_Message_WizardPage_Message);
+ locationPage = new GeneratedFileLocationPage(
+ B2JMessages.Bpmn_GeneratedFile_Location_WizardPage_Name,
+ B2JMessages.Bpmn_GeneratedFile_Location_WizardPage_Title,
+ B2JMessages.Bpmn_GeneratedFile_Location_WizardPage_Message);
+ locationPage.setSelection(selection);
+ addPage(bpmnResPage);
addPage(poolsPage);
+ addPage(errorPage);
addPage(locationPage);
- addPage(errorPage);
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench,
+ * org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.selection = selection;
+ initialize();
+ }
+
+ /*
+ * do some initial tasks
+ */
+ private void initialize() {
+ if (selection.getFirstElement() instanceof IFile) {
+ IFile bpmnFile = (IFile) selection.getFirstElement();
+ bpmnFileName = bpmnFile.getName();
+ bpmnFileParentPath = bpmnFile.getParent().getLocation()
+ .toOSString();
+ try {
+ idMap = BPMNToUtil.getPoolIDsFromDocument(getDocument(
+ bpmnFileParentPath, bpmnFileName));
+ } catch (Exception e) {
+ errorList.add(0, NLS.bind(
+ B2JMessages.Translate_Error_File_CanNotRead,
+ bpmnFileName));
+ e.printStackTrace();
+ }
+ }
+ if (poolsPage != null) {
+ poolsPage.setIdMap(idMap);
+ }
+ }
+
+ public IWizardPage getNextPage(IWizardPage page) {
+ if (page.getName()
+ .equals(B2JMessages.Bpmn_Pool_Choose_WizardPage_Name)) {
+ errorList = translateBpmnToStrings();
+ if (errorList.size() == 0) {
+ return locationPage;
+ }
+ errorPage.getListViewer().setInput(errorList);
+ return super.getNextPage(page);
+ } else {
+ return super.getNextPage(page);
+ }
+
+ }
+
public boolean performFinish() {
-
+ createGeneratedFile();
+ refreshWorkspace();
return true;
}
-
-
+
+ /*
+ * do the translation from bpmn to string list the sub class need to create
+ * a string list to reserve these strings the return list is error or
+ * warning messages
+ */
+ public abstract List<String> translateBpmnToStrings();
+
+ /*
+ * write the generated strings to the files
+ */
+ public abstract void createGeneratedFile();
+
+ /*
+ * get the path of the eclipse workspace container
+ */
+ protected String getContainerPath(IContainer container) {
+ return container.getLocation().toOSString();
+ }
+
+ /*
+ * get the dom document from a given path and file name
+ */
+ public Document getDocument(String bpmnFileParentPath, String bpmnFileName)
+ throws Exception {
+ Document bpmnDocument = null;
+ bpmnDocument = BPMNToUtil.parse(bpmnFileParentPath, bpmnFileName);
+ return bpmnDocument;
+ }
+
+ /*
+ * refresh eclipse workspace
+ */
+ public void refreshWorkspace() {
+ try {
+ ResourcesPlugin.getWorkspace().getRoot().refreshLocal(
+ IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
public List<String> getPoolIdList() {
return poolIdList;
}
@@ -63,15 +192,7 @@
public void setPoolIdList(List<String> poolIdList) {
this.poolIdList = poolIdList;
}
-
- public String getLocation() {
- return location;
- }
- public void setLocation(String location) {
- this.location = location;
- }
-
public List<String> getErrorList() {
return errorList;
}
@@ -80,4 +201,37 @@
this.errorList = errorList;
}
+ public IStructuredSelection getSelection() {
+ return selection;
+ }
+
+ public void setSelection(IStructuredSelection selection) {
+ this.selection = selection;
+ initialize();
+ }
+
+ public String getBpmnFileName() {
+ return bpmnFileName;
+ }
+
+ public void setBpmnFileName(String bpmnFileName) {
+ this.bpmnFileName = bpmnFileName;
+ }
+
+ public String getBpmnFileParentPath() {
+ return bpmnFileParentPath;
+ }
+
+ public void setBpmnFileParentPath(String bpmnFileParentPath) {
+ this.bpmnFileParentPath = bpmnFileParentPath;
+ }
+
+ public IStructuredSelection getTargetLocationSelection() {
+ return targetLocationSelection;
+ }
+
+ public void setTargetLocationSelection(
+ IStructuredSelection targetLocationSelection) {
+ this.targetLocationSelection = targetLocationSelection;
+ }
}
Deleted: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BpmnToWizardDialog.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BpmnToWizardDialog.java 2008-10-08 07:40:58 UTC (rev 10728)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/BpmnToWizardDialog.java 2008-10-08 07:42:08 UTC (rev 10729)
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.bpmnto.wizard;
-
-import java.util.List;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IActionDelegate;
-import org.jboss.tools.bpmnto.action.BpmnToAction;
-
-/**
- * @author Grid Qian
- *
- * wizard dialog for bpmn tranlation
- */
-public class BpmnToWizardDialog extends WizardDialog {
-
- IActionDelegate action;
-
- public BpmnToWizardDialog(Shell parentShell, IWizard newWizard,
- IActionDelegate action) {
- super(parentShell, newWizard);
- this.action = action;
- }
-
- public void nextPressed() {
- IWizardPage page = this.getCurrentPage();
- if (page instanceof GeneratedFileLocationPage) {
- List<String> list = ((BpmnToAction) action).errorList;
- String location = ((BpmnToWizard) this.getWizard()).getLocation();
- if (location == null || "".equals(location)) {
- location = ((BpmnToAction) action).bpmnFile.getParent()
- .getLocation().toOSString();
- }
- list.addAll(((BpmnToAction) action).translateBpmn(
- ((BpmnToAction) action).bpmnFile.getParent().getLocation()
- .toOSString(), ((BpmnToAction) action).bpmnFile
- .getName(), ((BpmnToWizard) this.getWizard())
- .getPoolIdList(), location));
- ((BpmnToWizard) this.getWizard()).setErrorList(list);
- ((ErrorMessagesPage) page.getNextPage()).listViewer
- .setInput(((BpmnToWizard) this.getWizard()).getErrorList());
- }
- showPage(page.getNextPage());
- }
-
-}
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/ErrorMessagesPage.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/ErrorMessagesPage.java 2008-10-08 07:40:58 UTC (rev 10728)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/ErrorMessagesPage.java 2008-10-08 07:42:08 UTC (rev 10729)
@@ -20,40 +20,43 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
+import org.jboss.tools.b2j.messages.B2JMessages;
/**
* @author Grid Qian
*
* the wizardpage for showing the error and warning messages from translating
*/
-public class ErrorMessagesPage extends WizardPage{
-
- TableViewer listViewer;
- String listTitle;
-
- protected ErrorMessagesPage(String pageName, String listTitle) {
+public class ErrorMessagesPage extends WizardPage {
+
+ private TableViewer listViewer;
+
+ protected ErrorMessagesPage(String pageName, String title, String description) {
super(pageName);
- this.listTitle = listTitle;
- this.setTitle(pageName);
+ this.setDescription(description);
+ this.setTitle(title);
}
public void createControl(Composite parent) {
Composite composite = createDialogArea(parent);
-
+
createListTitleArea(composite);
createListViewer(composite);
setControl(composite);
- initializeViewer();
-
}
- private void initializeViewer() {
- listViewer.setInput(((BpmnToWizard)this.getWizard()).getErrorList());
+ private Label createListTitleArea(Composite composite) {
+ Label label = new Label(composite, SWT.NONE);
+ label
+ .setText(B2JMessages.Bpmn_Translate_Message_WizardpageViewer_Title);
+ label.setFont(composite.getFont());
+ return label;
}
private void createListViewer(Composite composite) {
- listViewer = new TableViewer(composite, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ listViewer = new TableViewer(composite, SWT.SINGLE | SWT.H_SCROLL
+ | SWT.V_SCROLL | SWT.BORDER);
GridData data = new GridData(GridData.FILL_BOTH);
data.heightHint = 250;
data.widthHint = 300;
@@ -63,13 +66,6 @@
listViewer.setContentProvider(new ArrayContentProvider());
}
- private Label createListTitleArea(Composite composite) {
- Label label = new Label(composite, SWT.NONE);
- label.setText(listTitle);
- label.setFont(composite.getFont());
- return label;
- }
-
private Composite createDialogArea(Composite parent) {
// create a composite with standard margins and spacing
Composite composite = new Composite(parent, SWT.NONE);
@@ -86,5 +82,14 @@
public boolean isPageComplete() {
return true;
}
+
+ public TableViewer getListViewer() {
+ return listViewer;
+ }
+
+ public void setListViewer(TableViewer listViewer) {
+ this.listViewer = listViewer;
+ }
+
}
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/GeneratedFileLocationPage.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/GeneratedFileLocationPage.java 2008-10-08 07:40:58 UTC (rev 10728)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/wizard/GeneratedFileLocationPage.java 2008-10-08 07:42:08 UTC (rev 10729)
@@ -11,19 +11,28 @@
package org.jboss.tools.bpmnto.wizard;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.jboss.tools.b2j.messages.B2JMessages;
/**
@@ -31,74 +40,87 @@
*
* the wizardpage for the generated file location
*/
-public class GeneratedFileLocationPage extends WizardPage{
-
- String message;
- Text pathText;
+public class GeneratedFileLocationPage extends WizardPage {
+
+ private TreeViewer viewer;
+ private ISelection currentSelection;
+ private Button button;
private IWizard wizard;
- protected GeneratedFileLocationPage(String pageName, String message) {
+ protected GeneratedFileLocationPage(String pageName, String title,
+ String description) {
super(pageName);
- this.message = message;
- this.setTitle(pageName);
+ this.setDescription(description);
+ this.setTitle(title);
}
public void createControl(Composite parent) {
Composite composite = createDialogArea(parent);
- createMessageArea(composite);
- createLocationArea(composite);
-
- setControl(composite);
-
+
+ createListTitleArea(composite);
+ createListViewer(composite);
+ createCheckbox(composite);
+ super.setControl(composite);
+
+ initializePage();
+
}
-
- private void createLocationArea(Composite parent) {
- Group composite = new Group(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label label = new Label(composite, SWT.NONE);
- label.setText("Location:");
+
+ private Label createListTitleArea(Composite parent) {
+ Label label = new Label(parent, SWT.NONE);
+ label
+ .setText(B2JMessages.Bpmn_GeneratedFile_Location_WizardPage_ViewerTitle);
label.setFont(parent.getFont());
-
-
- pathText = new Text(composite, SWT.BORDER);
- pathText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- pathText.setEditable(false);
-
- Button browse = new Button(composite, SWT.PUSH);
- browse.setText(B2JMessages.Label_Button_Browse);
- browse.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.OPEN);
- dialog.setText(B2JMessages.Bpmn_GeneratedFile_Location_Dialog_Title);
- dialog.setMessage(B2JMessages.Bpmn_GeneratedFile_Location_Dialog_Message);
- String path = dialog.open();
- if (path != null && path.length() > 0) {
- pathText.setText(path);
- ((BpmnToWizard)wizard).setLocation(path);
- }
+ return label;
+ }
+
+ private void createListViewer(Composite composite) {
+ viewer = new TreeViewer(composite, SWT.BORDER | SWT.MULTI
+ | SWT.H_SCROLL | SWT.V_SCROLL);
+ viewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
+ viewer.setLabelProvider(new WorkbenchLabelProvider());
+ WorkbenchContentProvider cp = new WorkbenchContentProvider();
+ viewer.setContentProvider(cp);
+ viewer.setFilters(new ViewerFilter[] { new ProFilter() });
+ viewer.addPostSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ updateControls();
+ currentSelection = viewer.getSelection();
+ ((BpmnToWizard) wizard)
+ .setTargetLocationSelection((IStructuredSelection) currentSelection);
+
}
});
-
- initializePage();
+ }
-
+ private Button createCheckbox(Composite parent) {
+ button = new Button(parent, SWT.CHECK | SWT.NONE);
+ button
+ .setText(B2JMessages.Bpmn_GeneratedFile_Location_WizardPage_CheckBox);
+ button.setFont(parent.getFont());
+ return button;
}
private void initializePage() {
wizard = this.getWizard();
- pathText.setText(((BpmnToWizard)wizard).getLocation() == null ?"" : ((BpmnToWizard)wizard).getLocation());
-
+ viewer.setInput(ResourcesPlugin.getWorkspace());
+ if (this.currentSelection != null) {
+ if (currentSelection != null
+ && currentSelection instanceof ITreeSelection) {
+ // Select the parent project of this first bpmn file chosen
+ ITreeSelection node = (ITreeSelection) currentSelection;
+ TreePath[] paths = node.getPaths();
+ TreePath projPath = new TreePath(new Object[] { paths[0]
+ .getFirstSegment() });
+ TreeSelection projSel = new TreeSelection(projPath);
+ viewer.setSelection(projSel, true);
+ }
+ }
+ button.setSelection(true);
}
- private Label createMessageArea(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(message);
- label.setFont(parent.getFont());
- return label;
+ private void updateControls() {
+ super.getWizard().getContainer().updateButtons();
}
private Composite createDialogArea(Composite parent) {
@@ -113,9 +135,27 @@
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
return composite;
}
-
+
public boolean isPageComplete() {
+ if (viewer != null && viewer.getSelection() == null) {
+ return false;
+ }
return true;
}
+ public ISelection getSelection() {
+ return currentSelection;
+ }
+
+ public void setSelection(ISelection currentSelection) {
+ this.currentSelection = currentSelection;
+ }
+
}
+
+class ProFilter extends ViewerFilter {
+ @Override
+ public boolean select(Viewer viewer, Object parent, Object element) {
+ return element instanceof IContainer;
+ }
+}
17 years, 3 months
JBoss Tools SVN: r10728 - in trunk/esb/plugins/org.jboss.tools.esb.project.ui: src/org/jboss/tools/esb/project/ui/preference/controls and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-10-08 03:40:58 -0400 (Wed, 08 Oct 2008)
New Revision: 10728
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java
Log:
JBIDE-2865: fix the bug that the preference page has a invalid category
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml 2008-10-08 07:22:25 UTC (rev 10727)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml 2008-10-08 07:40:58 UTC (rev 10728)
@@ -25,7 +25,7 @@
<extension
point="org.eclipse.ui.preferencePages">
<page
- category="org.jboss.tools.common.model.ui.MainPreferencePage"
+ category="org.jboss.ide.eclipse.ui.MainPreferencePage"
class="org.jboss.tools.esb.project.ui.preference.controls.JBossESBRuntimePreferencePage"
id="org.jboss.tools.esb.project.runtime.preference"
name="JBoss ESB Runtimes">
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java 2008-10-08 07:22:25 UTC (rev 10727)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java 2008-10-08 07:40:58 UTC (rev 10728)
@@ -177,6 +177,11 @@
tempJbesb.setUserConfigClasspath(btnDefault.getSelection());
setJarGroupStatus();
setValue(null);
+ if(btnDefault.getSelection()){
+ jarGroup.setVisible(true);
+ }else{
+ jarGroup.setVisible(false);
+ }
}
});
@@ -188,6 +193,7 @@
jarGroup.setEnabled(isUserConfig);
listView.getTree().setEnabled(isUserConfig);
actionPanel.setEnabled(isUserConfig);
+ jarGroup.setVisible(isUserConfig);
}
protected void createListView(Composite parent) {
17 years, 3 months
JBoss Tools SVN: r10727 - trunk/common/tests/org.jboss.tools.common.text.ext.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-08 03:22:25 -0400 (Wed, 08 Oct 2008)
New Revision: 10727
Modified:
trunk/common/tests/org.jboss.tools.common.text.ext.test/META-INF/MANIFEST.MF
Log:
fix version number in test dependencies
Modified: trunk/common/tests/org.jboss.tools.common.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/META-INF/MANIFEST.MF 2008-10-08 06:52:49 UTC (rev 10726)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/META-INF/MANIFEST.MF 2008-10-08 07:22:25 UTC (rev 10727)
@@ -12,7 +12,7 @@
org.eclipse.ui.ide,
org.eclipse.core.runtime,
org.jboss.tools.jst.web,
- org.eclipse.jface.text;bundle-version="3.4.1",
- org.jboss.tools.common.model.ui;bundle-version="2.0.0"
+ org.eclipse.jface.text,
+ org.jboss.tools.common.model.ui
Export-Package: org.jboss.tools.common.text.ext.test
Bundle-ClassPath: common-text-ext-test.jar
17 years, 3 months
JBoss Tools SVN: r10726 - trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-08 02:52:49 -0400 (Wed, 08 Oct 2008)
New Revision: 10726
Removed:
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/tldHyperLinkTest.jsp
Log:
empty file removed
Deleted: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/tldHyperLinkTest.jsp
===================================================================
17 years, 3 months
JBoss Tools SVN: r10725 - trunk/tests/features/org.jboss.tools.test.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-08 02:52:29 -0400 (Wed, 08 Oct 2008)
New Revision: 10725
Modified:
trunk/tests/features/org.jboss.tools.test.feature/feature.xml
Log:
ext.text JUnit tests has been added to build
Modified: trunk/tests/features/org.jboss.tools.test.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2008-10-08 06:48:33 UTC (rev 10724)
+++ trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2008-10-08 06:52:29 UTC (rev 10725)
@@ -394,4 +394,10 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.jboss.tools.common.text.ext.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
17 years, 3 months
JBoss Tools SVN: r10724 - in trunk/common/tests/org.jboss.tools.common.text.ext.test: META-INF and 22 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-08 02:48:33 -0400 (Wed, 08 Oct 2008)
New Revision: 10724
Added:
trunk/common/tests/org.jboss.tools.common.text.ext.test/.classpath
trunk/common/tests/org.jboss.tools.common.text.ext.test/.project
trunk/common/tests/org.jboss.tools.common.text.ext.test/META-INF/
trunk/common/tests/org.jboss.tools.common.text.ext.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.text.ext.test/build.properties
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.classpath
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.project
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/.jsdtscope
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.jdt.core.prefs
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.common.component
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.validation.prefs
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/JavaSource/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/tools/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/tools/test/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/tools/test/ChangeListenerInstance.java
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/META-INF/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/faces-config.xml
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/lib/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/lib/jsf-api.jar
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/lib/jsf-impl.jar
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/lib/jsf-tlds.jar
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/web.xml
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/classHyperlinkTests.jsp
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/styleHyperlinkTests.jsp
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style1.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style10.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style11.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style12.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style13.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style14.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style2.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style3.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style4.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style5.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style6.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style7.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style8.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style9.css
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/lib/
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/lib/jsf-api.jar
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/lib/jsf-impl.jar
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/lib/jsf-tlds.jar
trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/tldHyperLinkTest.jsp
trunk/common/tests/org.jboss.tools.common.text.ext.test/src/
trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/
trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/
trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/
trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/
trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/
trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/
trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/
trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/CommonExtAllTests.java
trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/OpenOnsTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2858 JUnit Test Plug-in has been added
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/.classpath
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/.classpath (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/.classpath 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/.project
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/.project (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/.project 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.common.text.ext.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/META-INF/MANIFEST.MF 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Text Ext Test Plug-in
+Bundle-SymbolicName: org.jboss.tools.common.text.ext.test
+Bundle-Version: 1.0.0
+Require-Bundle: org.jboss.tools.common.text.ext,
+ org.junit,
+ org.jboss.tools.tests,
+ org.eclipse.core.resources,
+ org.eclipse.ui,
+ org.jboss.tools.jst.jsp,
+ org.eclipse.ui.ide,
+ org.eclipse.core.runtime,
+ org.jboss.tools.jst.web,
+ org.eclipse.jface.text;bundle-version="3.4.1",
+ org.jboss.tools.common.model.ui;bundle-version="2.0.0"
+Export-Package: org.jboss.tools.common.text.ext.test
+Bundle-ClassPath: common-text-ext-test.jar
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/build.properties
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/build.properties (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/build.properties 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,9 @@
+output.. = bin/
+bin.includes = META-INF/,\
+ projects/,\
+ common-text-ext-test.jar
+source.common-text-ext-test.jar = src/
+src.includes = projects/,\
+ src/,\
+ META-INF/,\
+ build.properties
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.classpath
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.classpath (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.classpath 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.preview.runtimeTarget/J2EE Preview"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.5.0-sun-1.5.0.15"/>
+ <classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
+</classpath>
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.project
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.project (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.project 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>HiperlinksTestProject</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/.jsdtscope
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/.jsdtscope (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/.jsdtscope 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.jdt.core.prefs 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,7 @@
+#Thu Oct 02 15:53:16 PDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,4 @@
+#Thu Oct 02 15:53:16 PDT 2008
+classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:java-1.5.0-sun-1.5.0.15/owners=jst.java\:5.0
+classpath.helper/org.eclipse.jst.server.core.container\:\:org.eclipse.jst.server.preview.runtimeTarget\:\:J2EE\ Preview/owners=jst.web\:2.4
+eclipse.preferences.version=1
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.jst.common.project.facet.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.common.component 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="HiperlinksTestProject">
+<wb-resource deploy-path="/" source-path="/WebContent"/>
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/JavaSource"/>
+<property name="context-root" value="HiperlinksTestProject"/>
+<property name="java-output-path"/>
+</wb-module>
+</project-modules>
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="J2EE Preview"/>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.web" version="2.4"/>
+</faceted-project>
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.validation.prefs
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.validation.prefs (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.validation.prefs 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,9 @@
+#Thu Oct 02 16:44:50 PDT 2008
+DELEGATES_PREFERENCE=delegateValidatorList
+USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.jboss.tools.seam.internal.core.validation.SeamProjectPropertyValidator;org.eclipse.jst.j2ee.internal.web.validation.UIWarValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
+USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.jboss.tools.seam.internal.core.validation.SeamProjectPropertyValidator;org.eclipse.jst.j2ee.internal.web.validation.UIWarValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
+USER_PREFERENCE=overrideGlobalPreferencesfalse
+eclipse.preferences.version=1
+override=false
+suspend=false
+vf.version=3
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/.settings/org.eclipse.wst.validation.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/tools/test/ChangeListenerInstance.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/tools/test/ChangeListenerInstance.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/tools/test/ChangeListenerInstance.java 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,9 @@
+package org.jboss.tools.test;
+/**
+ * Test class to verify Java Class hyperlink
+ * @author eskimo
+ *
+ */
+public class ChangeListenerInstance {
+
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/JavaSource/org/jboss/tools/test/ChangeListenerInstance.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/META-INF/MANIFEST.MF 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/faces-config.xml 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC
+ "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+
+<faces-config>
+
+</faces-config>
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/lib/jsf-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/lib/jsf-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/lib/jsf-impl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/lib/jsf-impl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/lib/jsf-tlds.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/lib/jsf-tlds.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/web.xml 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>HiperlinksTestProject</display-name>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
+ <!-- Faces Servlet -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <!-- Faces Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/classHyperlinkTests.jsp
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/classHyperlinkTests.jsp (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/classHyperlinkTests.jsp 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,35 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+
+<html>
+ <head>
+ <title>Input User Name Page</title>
+ <style>
+ .style-class9 {
+ /* in style comment 1 */
+ color: #0D5AAA;
+ border: 1px solid #EEE000;
+ /* in style comment 2 */
+ font-size: 24px;
+ background: #F0A8FF;
+ /* in style comment 3 */
+ }
+ .style-class10 {
+ /* in style comment 1 */
+ color: #0D5AAA;
+ border: 1px solid #EEE000;
+ /* in style comment 2 */
+ font-size: 24px;
+ background: #F0A8FF;
+ /* in style comment 3 */
+ }
+ </style>
+ </head>
+ <body>
+ <f:view>
+ <h1 class="style-class1">
+ <f:valueChangeListener type="org.jboss.tools.test.ChangeListenerInstance"/>
+ </h1>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/classHyperlinkTests.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/styleHyperlinkTests.jsp
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/styleHyperlinkTests.jsp (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/styleHyperlinkTests.jsp 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,67 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+
+<html>
+ <head>
+ <title>Input User Name Page</title>
+ <link href="stylesheet/style15.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style14.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style13.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style12.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style11.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style10.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style9.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style8.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style7.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style6.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style5.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style4.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style3.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style2.css" rel="stylesheet" type="text/css" />
+ <link href="stylesheet/style1.css" rel="stylesheet" type="text/css" />
+ <style>
+ .style-class9 {
+ /* in style comment 1 */
+ color: #0D5AAA;
+ border: 1px solid #EEE000;
+ /* in style comment 2 */
+ font-size: 24px;
+ background: #F0A8FF;
+ /* in style comment 3 */
+ }
+ .style-class10 {
+ /* in style comment 1 */
+ color: #0D5AAA;
+ border: 1px solid #EEE000;
+ /* in style comment 2 */
+ font-size: 24px;
+ background: #F0A8FF;
+ /* in style comment 3 */
+ }
+ </style>
+ </head>
+ <body>
+ <f:view>
+ <h1>
+ <h:outputText value="Title1" styleClass="style-class1"/>
+ </h1>
+ <h1>
+ <h:outputText value="Title2" styleClass="style-class2"/>
+ </h1>
+ <h1>
+ <h:outputText value="Title3" styleClass="style-class3"/>
+ </h1>
+ <h1>
+ <h:outputText value="Title4" styleClass="style-class4"/>
+ </h1>
+ <h:dataTable>
+ <h:column><h:outputText value="Title5" styleClass="style-class5"/></h:column>
+ <h:column><h:outputText value="Title6" styleClass="style-class6"/></h:column>
+ <h:column><h:outputText value="Title7" styleClass="style-class7"/></h:column>
+ <h:column><h:outputText value="Title8" styleClass="style-class8"/></h:column>
+ <h:column><h:outputText value="Title9" styleClass="style-class9"/></h:column>
+ <h:column><h:outputText value="Title10" styleClass="style-class10"/></h:column>
+ </h:dataTable>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/styleHyperlinkTests.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style1.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style1.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style1.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,46 @@
+<!--
+/* Comment */
+.style-class1 {
+ /* in style comment 1 */
+ color: #0D5798;
+ border: 1px solid #BBB000;
+ /* in style comment 2 */
+ font-size: 16px;
+
+ background: #F0A8FF;
+ /* in style comment 3 */
+}
+
+/* Comment */
+.style-class2 {
+ /* in style comment 4 */
+ color: #8CAFCD;
+ border: 1px solid #000BBB;
+ /* in style comment 5 */
+ font-size: 16px;
+ background: #3BF8FF;
+ /* in style comment 6 */
+}
+
+/* Comment */
+.style-class3 {
+ /* in style comment 7 */
+ color: black;
+ border: 1px solid #111111;
+ /* in style comment 8 */
+ font-size: 16px;
+ background: #3458FF;
+ /* in style comment 9 */
+}
+/* Comment */
+b, i, p {
+ /* in style comment 7 */
+ color: black;
+ border: 1px solid #111111;
+ /* in style comment 8 */
+ font-size: 16px;
+ background: #3458FF;
+ /* in style comment 9 */
+}
+/* in style comment 10 */
+//-->
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style1.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style10.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style10.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style10.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1 @@
+.style-class1<
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style10.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style11.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style11.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style11.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,7 @@
+<!--
+function name(str,pos) {
+ // comment
+ /* comment */
+ return 0;
+}
+//-->
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style11.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style12.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style12.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style12.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,5 @@
+<!--
+.style-class19 /* style comment */ {
+ color : red;
+}
+.style-class20 /* style comment */, style-class21 /
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style12.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style13.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style13.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style13.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,5 @@
+<!--
+.style-class, /* comment {
+ color: green;
+}
+//-->
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style13.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style14.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style14.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style14.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,3 @@
+cla$$1, &class2 {
+ color: green;
+}
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style14.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style2.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style2.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style2.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,34 @@
+<!--
+
+/* Comment */
+.style-class4 {
+ color: #0D5798;
+ border: 1px solid #CCCBBB;
+ font-size: 16px;
+ background: #F0FAFF;
+}
+
+/* Comment */
+.style-class5 {
+ color: #8CAFCD;
+ border: 1px solid #CCCAAA;
+ font-size: 16px;
+ background: #F0F8CF;
+}
+
+/* Comment */
+.style-class6 {
+ border: 1px solid #EEE222;
+ font-size: 16px;
+ background: #80F8FF;
+ color: black;
+}
+
+/* Comment */
+.style-class7,.style-class8 {
+ border: 1px solid #EEE222;
+ font-size: 16px;
+ background: #80F8FF;
+ color: black;
+}
+//-->
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style2.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style3.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style3.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style3.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,10 @@
+
+/* Comment */
+.style-class12 {
+ color: #0D5798;
+ border: 1px solid #CCCBBB;
+ font-size: 16px;
+ background: #F0FAFF;
+}
+
+/* Comment
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style3.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style4.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style4.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style4.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,8 @@
+
+/* Comment */
+ .style-class14 , .style-class15 {
+ color: #0D5798;
+ border: 1px solid #CCCBBB;
+ font-size: 16px;
+ background: #F0FAFF;
+ /* commnet error *
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style4.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style5.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style5.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style5.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,2 @@
+/
+
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style5.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style6.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style6.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style6.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,4 @@
+.style-class16 {
+ color: red;
+}
+//comment with error
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style6.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style7.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style7.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style7.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,8 @@
+
+/* Comment */
+ .style-class14 , .style-class15 {
+ color: #0D5798;
+ border: 1px solid #CCCBBB;
+ font-size: 16px;
+ background: #F0FAFF;
+ /
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style7.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style8.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style8.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style8.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,8 @@
+
+/* Comment */
+ .style-class14 , .style-class15 {
+ color: #0D5798;
+ border: 1px solid #CCCBBB;
+ font-size: 16px;
+ background: #F0FAFF;
+ // bad comment
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style8.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style9.css
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style9.css (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style9.css 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,2 @@
+/* Comment */
+.style-class1
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/WebContent/stylesheet/style9.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/lib/jsf-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/lib/jsf-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/lib/jsf-impl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/lib/jsf-impl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/lib/jsf-tlds.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/lib/jsf-tlds.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/tldHyperLinkTest.jsp
===================================================================
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/projects/HiperlinksTestProject/tldHyperLinkTest.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/CommonExtAllTests.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/CommonExtAllTests.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/CommonExtAllTests.java 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,22 @@
+package org.jboss.tools.common.text.ext.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.tools.test.util.ProjectImportTestSetup;
+
+
+public class CommonExtAllTests {
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Test for default package");
+ //$JUnit-BEGIN$
+
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(OpenOnsTest.class),
+ "org.jboss.tools.common.text.ext.test",
+ new String[]{"projects/HiperlinksTestProject"},
+ new String[]{"HiperlinksTestProject"}));
+
+ //$JUnit-END$
+ return suite;
+ }
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/CommonExtAllTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/OpenOnsTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/OpenOnsTest.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/OpenOnsTest.java 2008-10-08 06:48:33 UTC (rev 10724)
@@ -0,0 +1,189 @@
+package org.jboss.tools.common.text.ext.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.FindReplaceDocumentAdapter;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.DocumentProviderRegistry;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.jboss.tools.common.model.ui.editor.EditorPartWrapper;
+import org.jboss.tools.common.model.ui.editors.multipage.DefaultMultipageEditor;
+import org.jboss.tools.common.model.ui.texteditors.XMLTextEditorStandAlone;
+import org.jboss.tools.common.text.ext.hyperlink.CSSClassHyperlink;
+import org.jboss.tools.common.text.ext.hyperlink.ClassHyperlink;
+import org.jboss.tools.common.text.ext.hyperlink.HyperlinkDetector;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
+public class OpenOnsTest extends TestCase {
+
+ public static final String STYLE_OPENON_PROJECT = "HiperlinksTestProject";
+
+
+ public IProject project = null;
+
+ protected void setUp() {
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(
+ STYLE_OPENON_PROJECT);
+ }
+
+ public OpenOnsTest() {
+ super("styleClass OpenOn tests");
+ }
+
+ public static final String WEB_XML_FILE_PATH = "WebContent/WEB-INF/web.xml";
+
+ public void testServletNameOpenOn() throws PartInitException, BadLocationException {
+ IFile webXml = project.getFile(WEB_XML_FILE_PATH);
+ IEditorDescriptor descriptor = IDE.getEditorDescriptor(webXml);
+ IEditorPart editor = WorkbenchUtils.openEditor(webXml, descriptor.getId());
+ editor = ((EditorPartWrapper)editor).getEditor();
+ JobUtils.waitForIdle();
+ DefaultMultipageEditor xmlMultyPageEditor = (DefaultMultipageEditor) editor;
+ xmlMultyPageEditor.selectPageByName("Source");
+ ISourceViewer viewer = xmlMultyPageEditor.getSourceEditor().getTextViewer();
+
+ IDocument document = viewer.getDocument();
+ IRegion reg = new FindReplaceDocumentAdapter(document).find(0,
+ "Faces Servlet", true, true, false, false);
+ reg = new FindReplaceDocumentAdapter(document).find(reg.getOffset()+reg.getLength()+1,
+ "Faces Servlet", true, true, false, false);
+ reg = new FindReplaceDocumentAdapter(document).find(reg.getOffset()+reg.getLength()+1,
+ "Faces Servlet", true, true, false, false);
+ reg = new FindReplaceDocumentAdapter(document).find(reg.getOffset()+reg.getLength()+1,
+ "Faces Servlet", true, true, false, false);
+ IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, false);
+ links[0].open();
+ editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ System.out.println(editor.getSite().getSelectionProvider().getSelection().toString());
+ }
+
+ public void testTagAttributeOpenOn() throws BadLocationException {
+ IEditorPart editor = WorkbenchUtils.openEditor(project
+ .getFile(STYLE_TEST_FILE), JSPMultiPageEditor.EDITOR_ID);
+ assertTrue(editor instanceof JSPMultiPageEditor);
+ JobUtils.waitForIdle();
+ JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
+ ISourceViewer viewer = jspMultyPageEditor.getSourceEditor().getTextViewer();
+ IDocument document = jspMultyPageEditor.getSourceEditor().getTextViewer().getDocument();
+ IRegion reg = new FindReplaceDocumentAdapter(document).find(0,
+ "value", true, true, false, false);
+ IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, false);
+ links[0].open();
+ editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+
+ String fileName = editor.getEditorInput().getName();
+ System.out.println(fileName);
+ assertTrue("style1.css".equals(fileName));
+ }
+
+ public static final String STYLE_TEST_FILE = "WebContent/styleHyperlinkTests.jsp";
+ public static final String CSS1_TEST_FILE = "WebContent/stylesheet/style1.css";
+ public static final String CSS2_TEST_FILE = "WebContent/stylesheet/style2.css";
+
+ public void testStylesheetOpenOn() throws BadLocationException {
+ IEditorPart editor = WorkbenchUtils.openEditor(project
+ .getFile(STYLE_TEST_FILE), JSPMultiPageEditor.EDITOR_ID);
+ assertTrue(editor instanceof JSPMultiPageEditor);
+ JobUtils.waitForIdle();
+ JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
+ ISourceViewer viewer = jspMultyPageEditor.getSourceEditor().getTextViewer();
+ IDocument document = jspMultyPageEditor.getSourceEditor().getTextViewer().getDocument();
+ IRegion reg = new FindReplaceDocumentAdapter(document).find(0,
+ "stylesheet/style1.css", true, true, false, false);
+ IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, false);
+ links[0].open();
+ editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+
+ String fileName = editor.getEditorInput().getName();
+ assertTrue("style1.css".equals(fileName));
+ }
+
+ public void testStyleClassOpenOns() throws CoreException, BadLocationException {
+ IEditorPart editor = WorkbenchUtils.openEditor(project
+ .getFile(STYLE_TEST_FILE), JSPMultiPageEditor.EDITOR_ID);
+ assertTrue(editor instanceof JSPMultiPageEditor);
+ JobUtils.waitForIdle();
+ JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
+ ISourceViewer viewer = jspMultyPageEditor.getSourceEditor().getTextViewer();
+ IDocument document = jspMultyPageEditor.getSourceEditor().getTextViewer().getDocument();
+ IRegion reg = new FindReplaceDocumentAdapter(document).find(0,
+ "style-class9\"", true, true, false, false);
+ IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, false);
+ links[0].open();
+ editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+
+ String fileName = editor.getEditorInput().getName();
+ assertTrue("styleHyperlinkTests.jsp".equals(fileName));
+
+ reg = new FindReplaceDocumentAdapter(document).find(0,
+ "style-class3", true, true, false, false);
+ links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, false);
+ links[0].open();
+ editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+
+ fileName = editor.getEditorInput().getName();
+ assertTrue("style1.css".equals(fileName));
+
+ reg = new FindReplaceDocumentAdapter(document).find(0,
+ "style-class6", true, true, false, false);
+ links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, false);
+ links[0].open();
+ editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+
+ fileName = editor.getEditorInput().getName();
+ assertTrue("style2.css".equals(fileName));
+ }
+
+ public void testFilterNameOpenOn() {
+
+ }
+
+ public static final String CLASS_TEST_FILE = "WebContent/classHyperlinkTests.jsp";
+ public static final String CLASS1_TEST_FILE = "JavaSource/org/jboss/test/ChangeListenerInstance.java";
+
+ public void testClassNameOpenOn() throws CoreException, BadLocationException {
+ IEditorPart editor = WorkbenchUtils.openEditor(project
+ .getFile(CLASS_TEST_FILE), JSPMultiPageEditor.EDITOR_ID);
+ assertTrue(editor instanceof JSPMultiPageEditor);
+ JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
+ ISourceViewer viewer = jspMultyPageEditor.getSourceEditor().getTextViewer();
+
+// IEditorInput fileInput = new FileEditorInput(project
+// .getFile(CLASS_TEST_FILE));
+// IDocumentProvider documentProvider = DocumentProviderRegistry
+// .getDefault().getDocumentProvider(fileInput);
+//
+// documentProvider.connect(fileInput);
+// IDocument document = documentProvider.getDocument(fileInput);
+ IRegion reg = new FindReplaceDocumentAdapter(jspMultyPageEditor.getSourceEditor().getTextViewer().getDocument()).find(0,
+ "org.jboss.tools.test.ChangeListenerInstance", true, true, false, false);
+ IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, false);
+// ClassHyperlink classHyper = new ClassHyperlink();
+// classHyper.setOffset(reg.getOffset());
+// classHyper.setDocument(document);
+// classHyper.open();
+ links[0].open();
+ editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+
+ String fileName = editor.getEditorInput().getName();
+ assertTrue("ChangeListenerInstance.java".equals(fileName));
+ }
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.text.ext.test/src/org/jboss/tools/common/text/ext/test/OpenOnsTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 3 months
JBoss Tools SVN: r10722 - in trunk: common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-08 02:45:58 -0400 (Wed, 08 Oct 2008)
New Revision: 10722
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/EditorPartWrapper.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlink.java
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xpl/AbstractBaseHyperlink.java
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xpl/BaseHyperlinkDetector.java
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/util/CSSTextScanner.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Util.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/events/TabPropertySheetMouseAdapter.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/parsers/ColorParser.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsBeanNameHyperlink.java
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/ProjectImportTestSetup.java
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/WorkbenchUtils.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2858
JUnit tests have been added
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -770,34 +770,7 @@
* @location Absolute path on disk
*/
public static IFile getFile(String location) {
- location = new java.io.File(location).getAbsolutePath().replace('\\', '/');
- IProject[] projects = ModelPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; projects != null && i < projects.length; i++) {
- if (!projects[i].isOpen()) continue;
- String l = projects[i].getLocation().toFile().getAbsolutePath().replace('\\', '/');
- if (!l.endsWith("/")) l += "/";
- if (location.startsWith(l)) {
- String relative = location.substring(l.length());
- return projects[i].getFile(relative);
- }
- IResource[] ms = null;
- try {
- ms = projects[i].members(true);
- } catch (CoreException e) {
- //ignore - we do not care if project can give its members here.
- }
- if(ms != null) for (int j = 0; j < ms.length; j++) {
- if(!ms[j].isLinked() || !(ms[j] instanceof IContainer)) continue;
- IContainer c = (IContainer)ms[j];
- l = c.getLocation().toFile().getAbsolutePath().replace('\\', '/');
- if (!l.endsWith("/")) l += "/";
- if (location.startsWith(l)) {
- String relative = location.substring(l.length());
- return c.getFile(new Path(relative));
- }
- }
- }
- return null;
+ return ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(location).makeAbsolute());
}
public static IResource getFolder(String location) {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/EditorPartWrapper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/EditorPartWrapper.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editor/EditorPartWrapper.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -48,6 +48,9 @@
import org.jboss.tools.common.text.ext.IEditorWrapper;
public class EditorPartWrapper extends EditorPart implements IReusableEditor, IEditorWrapper {
+
+ public static final String EDITOR_ID = "org.jboss.tools.common.model.ui.editor.EditorPartWrapper";
+
IEditorPart editor;
String entity = null;
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlink.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlink.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlink.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -104,33 +104,6 @@
}
}
- //is never used
- IFile getFileToOpen(String fileName, String fileExt) {
- IFile documentFile = getFile();
-
- try {
- IProject project = documentFile.getProject();
-
- String name = fileName.replace('.','/')+ (fileExt != null ? "." + fileExt : "");
-
- if(project == null || !project.isOpen()) return null;
- if(!project.hasNature(JavaCore.NATURE_ID)) return null;
- IJavaProject javaProject = JavaCore.create(project);
- IClasspathEntry[] es = javaProject.getResolvedClasspath(true);
-
- for (int i = 0; i < es.length; i++) {
- if(es[i].getEntryKind() != IClasspathEntry.CPE_SOURCE) continue;
- IFile file = (IFile)project.getFile(es[i].getPath().lastSegment()+"/"+name);
- if(file != null && file.exists()) return file;
- }
- return null;
- } catch (CoreException x) {
- //ignore
- return null;
- }
-
- }
-
IRegion fLastRegion = null;
/**
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xpl/AbstractBaseHyperlink.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xpl/AbstractBaseHyperlink.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xpl/AbstractBaseHyperlink.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -54,18 +54,14 @@
super();
}
- private ITextViewer fTextViewer;
+ private IDocument fDocument;
private int fOffset;
- public void setTextViewer(ITextViewer textViewer) {
- fTextViewer = textViewer;
+ public void setDocument(IDocument document) {
+ fDocument = document;
}
- public ITextViewer getTextViewer() {
- return fTextViewer;
- }
-
public void setOffset(int offset) {
fOffset = offset;
}
@@ -291,7 +287,7 @@
* @return IDocument
*/
public IDocument getDocument() {
- return (fTextViewer == null ? null : fTextViewer.getDocument());
+ return fDocument;
}
/*
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xpl/BaseHyperlinkDetector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xpl/BaseHyperlinkDetector.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xpl/BaseHyperlinkDetector.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -72,7 +72,7 @@
IHyperlink hyperlink = defs[i].createHyperlink();
if(!hyperlinks.contains(hyperlink)) {
if (hyperlink instanceof AbstractHyperlink) {
- ((AbstractHyperlink)hyperlink).setTextViewer(textViewer);
+ ((AbstractHyperlink)hyperlink).setDocument(textViewer.getDocument());
((AbstractHyperlink)hyperlink).setOffset(region.getOffset());
}
hyperlinks.add(hyperlink);
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/util/CSSTextScanner.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/util/CSSTextScanner.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/util/CSSTextScanner.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -116,11 +116,6 @@
state = STATE_NAME;
return (readsCount > 0 ? getToken(CSS_CLASS_NAME_SEPARATOR) : nextNameToken());
}
- if (WS_DETECTOR.isWhitespace((char)ch)) {
- unread();
- state = STATE_NAME_SEPARATOR;
- return (readsCount > 0 ? getToken(CSS_CLASS_NAME_SEPARATOR) : nextNameSeparatorToken());
- }
if (ch == '{') {
unread();
state = STATE_BODY;
@@ -128,13 +123,19 @@
}
if (ch == '/') {
ch = read();
- if (ch == ICharacterScanner.EOF) break;
+ if (ch == ICharacterScanner.EOF) {
+ break;
+ }
if (ch == '*') {
// Comment openning
unread(); // Unread '*'-char
unread(); // Unread '/'-char
setState(STATE_COMMENT);
- return (readsCount > 0 ? getToken(CSS_CLASS_NAME_SEPARATOR) : nextCommentToken());
+ if (readsCount > 0) {
+ return getToken(CSS_CLASS_NAME_SEPARATOR);
+ } else {
+ return nextCommentToken();
+ }
}
// Broken file ??? Emulate END of text
clearText();
@@ -162,7 +163,9 @@
}
if (ch == '/') {
ch = read();
- if (ch == ICharacterScanner.EOF) break;
+ if (ch == ICharacterScanner.EOF) {
+ break;
+ }
if (ch == '*') {
// Comment openning
unread(); // Unread '*'-char
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -88,6 +88,8 @@
IReusableEditor, ITextEditorExtension, ITextEditorExtension2,
ITextEditorExtension3, INavigationLocationProvider, IMultiPageEditor {
+ public static final String EDITOR_ID = "org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor";
+
private static final String VISUALSOURCE_TAB_LABEL = "JSPMultiPageEditor.TabLabel.VisualSource"; //$NON-NLS-1$
private static final String SOURCE_TAB_LABEL = "JSPMultiPageEditor.TabLabel.Source"; //$NON-NLS-1$
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -17,6 +17,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -118,10 +119,8 @@
IResource res = null;
if (allProject) {
- IWorkspace workspace = Util.getCurrentWorkspace();
- if(workspace!=null) {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
res = workspace.getRoot().findMember(text.getText());
- }
} else {
IProject project = Util.getCurrentProject();
if (project!=null)
@@ -187,7 +186,7 @@
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
- IAdaptable project = Util.getCurrentWorkspace();
+ IAdaptable project = ResourcesPlugin.getWorkspace();
if (!allProject) {
project = Util.getCurrentProject();
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -10,6 +10,11 @@
******************************************************************************/
package org.jboss.tools.jst.jsp.outline.cssdialog.common;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
import org.eclipse.swt.graphics.RGB;
/**
@@ -24,11 +29,11 @@
public static final String extSizes[] = new String[] { "", "em", "ex",
"px", "in", "cm", "mm", "pt", "pc" };
- public static final String elemFolder[] = new String[] {
+ public static final Set elemFolder = Collections.unmodifiableSet(new HashSet(Arrays.asList(new String[] {
"background-image", "list-style-image", "cursor", "cue-after",
- "cue-before" };
+ "cue-before" })));
- public static final String extElem[] = new String[] {
+ public static final Set extElem = Collections.unmodifiableSet(new HashSet(Arrays.asList(new String[] {
"border-bottom-width", "border-left-width", "borer-right-width",
"border-top-width", "border-width", "bottom", "font-size",
"height", "left", "letter-spacing", "line-height", "margin",
@@ -37,7 +42,7 @@
"min-height", "min-width", "outline-width", "padding",
"padding-bottom", "padding-left", "padding-right", "padding-top",
"right", "size", "text-indent", "top", "vertical-align", "width",
- "word-spacing" };
+ "word-spacing" })));
public static final String NONE = "none";
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Util.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Util.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Util.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -17,7 +17,6 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -34,340 +33,276 @@
*/
public class Util {
- private static String RGB = "rgb"; //$NON-NLS-1$
+ private static String RGB = "rgb"; //$NON-NLS-1$
- private static String NONE = "none"; //$NON-NLS-1$
+ private static String NONE = "none"; //$NON-NLS-1$
- private static String THIN = "thin"; //$NON-NLS-1$
+ private static String THIN = "thin"; //$NON-NLS-1$
- private static String COMMA = ","; //$NON-NLS-1$
+ private static String COMMA = ","; //$NON-NLS-1$
- private static int START_INDEX_RED = 1;
- private static int END_INDEX_RED = 3;
- private static int START_INDEX_GRENN = 3;
- private static int END_INDEX_GREEN = 5;
- private static int START_INDEX_BLUE = 5;
- private static int END_INDEX_BLUE = 7;
+ private static int START_INDEX_RED = 1;
+ private static int END_INDEX_RED = 3;
+ private static int START_INDEX_GRENN = 3;
+ private static int END_INDEX_GREEN = 5;
+ private static int START_INDEX_BLUE = 5;
+ private static int END_INDEX_BLUE = 7;
- private static int MAX_VALUE_RGB = 255;
- private static int MIN_VALUE_RGB = 0;
+ private static int MAX_VALUE_RGB = 255;
+ private static int MIN_VALUE_RGB = 0;
- private static int COUNT_COLORS = 3;
+ private static int COUNT_COLORS = 3;
- private static int RADIX = 16;
+ private static int RADIX = 16;
- private static int COLOR_LENGTH = 7;
+ private static int COLOR_LENGTH = 7;
- private static int START_COLOR_INDEX = 0;
+ private static int START_COLOR_INDEX = 0;
- private static char OPEN_BRACKET = '{';
- private static char CLOSE_BRACKET = '}';
+ private static char OPEN_BRACKET = '{';
+ private static char CLOSE_BRACKET = '}';
- private static char SHARP = '#';
- private static String SHARP_STRING = "#"; //$NON-NLS-1$
+ private static char SHARP = '#';
+ private static String SHARP_STRING = "#"; //$NON-NLS-1$
- private static String ZERO_STR = "0"; //$NON-NLS-1$
- private static int NORMAL_MIN_VALUE = 10;
+ private static String ZERO_STR = "0"; //$NON-NLS-1$
+ private static int NORMAL_MIN_VALUE = 10;
- /**
- * Method for checking contain or not css attribute folder
- *
- * @param name
- * Name css attribute
- * @return true - contain, or else - dont contain
- */
- public static boolean containFolder(String name) {
+ /**
+ * Method for checking contain or not css attribute folder
+ *
+ * @param name
+ * Name css attribute
+ * @return true - contain, or else - dont contain
+ */
+ public static boolean containFolder(String name) {
+ return Constants.elemFolder.contains(name);
+ }
- for (int i = 0; i < Constants.elemFolder.length; i++)
- if (Constants.elemFolder[i].equals(name))
- return true;
- return false;
- }
+ /**
+ * Method for search string into css attributes
+ *
+ * @param name
+ * Name
+ * @param elementMap
+ * Map of css attributes
+ * @return true - find, or else - dont find
+ */
+ public static boolean searchInElement(String name,
+ HashMap<String, ArrayList<String>> elementMap) {
- /**
- * Method for search css attribute in block elements (Aural, Boxes,....)
- *
- * @param name
- * Name css attribute
- * @param set
- * Set of block elemnts
- * @return true - find, or else - dont find
- */
- public static boolean searchOnBlock(String name, Set<String> set) {
+ Set<String> set = elementMap.keySet();
- for (String str1 : set)
- if (str1.equals(name))
- return true;
+ for (String str : set) {
+ ArrayList<String> list = elementMap.get(str);
+ if(list.contains(name)) {
+ return true;
+ }
+ }
- return false;
- }
+ return false;
+ }
- /**
- * Method for search css attribute in combo elements (text-decoration,
- * font-weight,....)
- *
- * @param name
- * Name css attribute
- * @param set
- * Set of combo elemnts
- * @return true - find, or else - dont find
- */
- public static boolean searchInCombo(String name, Set<String> set) {
+ /**
+ * Method for get RGB from string
+ *
+ * @param color
+ * Color string
+ * @return RGB color, or null, if color invalid
+ */
+ public static RGB getColor(String color) {
- for (String str1 : set)
- if (str1.equals(name))
- return true;
+ if (color.equals(Constants.EMPTY_STRING) || color.equals(NONE)) {
+ return null;
+ }
- return false;
- }
+ if (color.charAt(START_COLOR_INDEX) == SHARP
+ && color.length() == COLOR_LENGTH) {
- /**
- * Method for search string into css attributes
- *
- * @param name
- * Name
- * @param elementMap
- * Map of css attributes
- * @return true - find, or else - dont find
- */
- public static boolean searchInElement(String name,
- HashMap<String, ArrayList<String>> elementMap) {
+ String strR = color.substring(START_INDEX_RED, END_INDEX_RED);
+ String strG = color.substring(START_INDEX_GRENN, END_INDEX_GREEN);
+ String strB = color.substring(START_INDEX_BLUE, END_INDEX_BLUE);
- Set<String> set = elementMap.keySet();
+ try {
+ Integer.parseInt(strR, RADIX);
+ Integer.parseInt(strG, RADIX);
+ Integer.parseInt(strB, RADIX);
+ } catch (NumberFormatException e) {
+ return null;
+ }
+ return convertColorHEX(color);
+ } else if (color.toLowerCase().indexOf(RGB) != Constants.DONT_CONTAIN) {
- for (String str : set) {
+ int start = color.indexOf(OPEN_BRACKET);
+ int end = color.indexOf(CLOSE_BRACKET);
+ String str = color.substring(start + 1, end);
- ArrayList<String> list = elementMap.get(str);
- for (String str1 : list)
- if (str1.equals(name))
- return true;
- }
+ StringTokenizer st = new StringTokenizer(str, COMMA);
- return false;
- }
+ int j = 0;
+ while (st.hasMoreTokens()) {
+ try {
+ int i = Integer.parseInt(st.nextToken().trim());
+ if (i < MIN_VALUE_RGB || i > MAX_VALUE_RGB) {
+ return null;
+ }
+ } catch (NumberFormatException e) {
+ return null;
+ }
+ j++;
+ }
+ if (j == COUNT_COLORS) {
+ return convertColorRGB(color);
+ }
+ } else {
+ HashMap<String, String> colorMap = ColorParser.getInstance()
+ .getMap();
- /**
- * Method for get RGB from string
- *
- * @param color
- * Color string
- * @return RGB color, or null, if color invalid
- */
- public static RGB getColor(String color) {
+ for (String key : colorMap.keySet()) {
+ if (colorMap.get(key).equalsIgnoreCase(color)) {
+ return convertColorHEX(key);
+ }
+ }
+ }
- if (color.equals(Constants.EMPTY_STRING) || color.equals(NONE))
- return null;
-
- if (color.charAt(START_COLOR_INDEX) == SHARP
- && color.length() == COLOR_LENGTH) {
-
- String strR = color.substring(START_INDEX_RED, END_INDEX_RED);
- String strG = color.substring(START_INDEX_GRENN, END_INDEX_GREEN);
- String strB = color.substring(START_INDEX_BLUE, END_INDEX_BLUE);
-
- try {
- Integer.parseInt(strR, RADIX);
- Integer.parseInt(strG, RADIX);
- Integer.parseInt(strB, RADIX);
- } catch (RuntimeException e) {
return null;
- }
- return convertColorHEX(color);
- } else if (color.toLowerCase().indexOf(RGB) != Constants.DONT_CONTAIN) {
+ }
- int start = color.indexOf(OPEN_BRACKET);
- int end = color.indexOf(CLOSE_BRACKET);
- String str = color.substring(start + 1, end);
+ /**
+ * Method for convert string(123px) into two string (123 and px)
+ *
+ * @param str
+ * String for convert
+ * @return Array two strings, or null, if str uncorrect
+ */
+ public static String[] convertExtString(String str) {
- StringTokenizer st = new StringTokenizer(str, COMMA);
+ if (str.equalsIgnoreCase(THIN))
+ return new String[] { THIN, Constants.EMPTY_STRING };
- int j = 0;
- while (st.hasMoreTokens()) {
- try {
- int i = Integer.parseInt(st.nextToken().trim());
- if (i < MIN_VALUE_RGB || i > MAX_VALUE_RGB)
+ if (str == null)
return null;
- } catch (NumberFormatException e) {
- return null;
- }
- j++;
- }
+ if (str.trim().equals(Constants.EMPTY_STRING))
+ return new String[] { Constants.EMPTY_STRING,
+ Constants.EMPTY_STRING };
- if (j == COUNT_COLORS)
- return convertColorRGB(color);
- } else {
- HashMap<String, String> colorMap = ColorParser.getInstance()
- .getMap();
+ String newStr = str.toLowerCase().trim();
- for (String key : colorMap.keySet())
- if (colorMap.get(key).equalsIgnoreCase(color))
- return convertColorHEX(key);
- }
+ int index = -1;
+ for (int i = 1; i < Constants.extSizes.length; i++) {
- return null;
- }
+ index = newStr.indexOf(Constants.extSizes[i]);
+ if (index != -1)
+ break;
+ }
- /**
- * Method for convert string(123px) into two string (123 and px)
- *
- * @param str
- * String for convert
- * @return Array two strings, or null, if str uncorrect
- */
- public static String[] convertExtString(String str) {
+ if (index == -1)
+ return new String[] { newStr, Constants.EMPTY_STRING };
- if (str.equalsIgnoreCase(THIN))
- return new String[] { THIN, Constants.EMPTY_STRING };
+ String number = newStr.substring(0, index);
+ String ext = newStr.substring(index, index + 2);
- if (str == null)
- return null;
+ return new String[] { number, ext };
+ }
- if (str.trim().equals(Constants.EMPTY_STRING))
- return new String[] { Constants.EMPTY_STRING,
- Constants.EMPTY_STRING };
-
- String newStr = str.toLowerCase().trim();
-
- int index = -1;
- for (int i = 1; i < Constants.extSizes.length; i++) {
-
- index = newStr.indexOf(Constants.extSizes[i]);
- if (index != -1)
- break;
+ /**
+ * Method for search css attribute into extElements
+ *
+ * @param name
+ * Name of css attribute
+ * @return true - find, or else - dont find
+ */
+ public static boolean searchInExtElement(String name) {
+ return Constants.extElem.contains(name);
}
- if (index == -1)
- return new String[] { newStr, Constants.EMPTY_STRING };
+ /**
+ * Method for getting RGB color from string color
+ *
+ * @param color
+ * String color
+ * @return RGB color
+ */
+ public static RGB convertColorRGB(String color) {
- String number = newStr.substring(0, index);
- String ext = newStr.substring(index, index + 2);
+ String newStr = color.trim().toLowerCase();
- return new String[] { number, ext };
- }
+ int rgb[] = new int[COUNT_COLORS];
- /**
- * Method for search css attribute into extElements
- *
- * @param name
- * Name of css attribute
- * @return true - find, or else - dont find
- */
- public static boolean searchInExtElement(String name) {
+ int start = newStr.indexOf(OPEN_BRACKET);
+ int end = newStr.indexOf(CLOSE_BRACKET);
+ String str = newStr.substring(start + 1, end);
- for (int i = 0; i < Constants.extElem.length; i++)
- if (Constants.extElem[i].equals(name))
- return true;
- return false;
- }
+ StringTokenizer st = new StringTokenizer(str, COMMA);
+ int i = 0;
+ while (st.hasMoreTokens())
+ rgb[i++] = Integer.parseInt(st.nextToken().trim());
+ return new RGB(rgb[0], rgb[1], rgb[2]);
+ }
- /**
- * Method for getting RGB color from string color
- *
- * @param color
- * String color
- * @return RGB color
- */
- public static RGB convertColorRGB(String color) {
+ /**
+ * Method for getting RGB color from hex string
+ *
+ * @param color
+ * String color
+ * @return RGB color
+ */
+ public static RGB convertColorHEX(String color) {
- String newStr = color.trim().toLowerCase();
+ String newStr = color.trim().toLowerCase();
- int rgb[] = new int[COUNT_COLORS];
+ String strR = newStr.substring(START_INDEX_RED, END_INDEX_RED);
+ String strG = newStr.substring(START_INDEX_GRENN, END_INDEX_GREEN);
+ String strB = newStr.substring(START_INDEX_BLUE, END_INDEX_BLUE);
- int start = newStr.indexOf(OPEN_BRACKET);
- int end = newStr.indexOf(CLOSE_BRACKET);
- String str = newStr.substring(start + 1, end);
+ int red = Integer.parseInt(strR, RADIX);
+ int green = Integer.parseInt(strG, RADIX);
+ int blue = Integer.parseInt(strB, RADIX);
- StringTokenizer st = new StringTokenizer(str, COMMA);
- int i = 0;
- while (st.hasMoreTokens())
- rgb[i++] = Integer.parseInt(st.nextToken().trim());
- return new RGB(rgb[0], rgb[1], rgb[2]);
- }
+ return new RGB(red, green, blue);
+ }
- /**
- * Method for getting RGB color from hex string
- *
- * @param color
- * String color
- * @return RGB color
- */
- public static RGB convertColorHEX(String color) {
-
- String newStr = color.trim().toLowerCase();
-
- String strR = newStr.substring(START_INDEX_RED, END_INDEX_RED);
- String strG = newStr.substring(START_INDEX_GRENN, END_INDEX_GREEN);
- String strB = newStr.substring(START_INDEX_BLUE, END_INDEX_BLUE);
-
- int red = Integer.parseInt(strR, RADIX);
- int green = Integer.parseInt(strG, RADIX);
- int blue = Integer.parseInt(strB, RADIX);
-
- return new RGB(red, green, blue);
- }
-
- /**
- * Method for convert RGB to String
- *
- * @param rgb
- * RGB color
- * @return String color
- */
- public static String createColorString(RGB rgb) {
- String colorStr = SHARP_STRING
- + (rgb.red < NORMAL_MIN_VALUE ? ZERO_STR
- : Constants.EMPTY_STRING)
- + Integer.toHexString(rgb.red)
- + (rgb.green < NORMAL_MIN_VALUE ? ZERO_STR
- : Constants.EMPTY_STRING)
- + Integer.toHexString(rgb.green)
- + Constants.EMPTY_STRING
- + (rgb.blue < NORMAL_MIN_VALUE ? ZERO_STR
- : Constants.EMPTY_STRING)
- + Integer.toHexString(rgb.blue);
- colorStr = colorStr.toUpperCase();
- if (ColorParser.getInstance().getMap().get(colorStr) != null)
- return ColorParser.getInstance().getMap().get(colorStr);
- return colorStr;
- }
-
- /**
- * Get current project
- *
- * @return
- */
- public static IProject getCurrentProject() {
- IEditorPart editor = JspEditorPlugin.getDefault().getWorkbench()
- .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- IEditorInput input = editor.getEditorInput();
- IFile file = null;
- if (input instanceof IFileEditorInput) {
- file = ((IFileEditorInput) input).getFile();
+ /**
+ * Method for convert RGB to String
+ *
+ * @param rgb
+ * RGB color
+ * @return String color
+ */
+ public static String createColorString(RGB rgb) {
+ String colorStr = SHARP_STRING
+ + (rgb.red < NORMAL_MIN_VALUE ? ZERO_STR
+ : Constants.EMPTY_STRING)
+ + Integer.toHexString(rgb.red)
+ + (rgb.green < NORMAL_MIN_VALUE ? ZERO_STR
+ : Constants.EMPTY_STRING)
+ + Integer.toHexString(rgb.green)
+ + Constants.EMPTY_STRING
+ + (rgb.blue < NORMAL_MIN_VALUE ? ZERO_STR
+ : Constants.EMPTY_STRING)
+ + Integer.toHexString(rgb.blue);
+ colorStr = colorStr.toUpperCase();
+ if (ColorParser.getInstance().getMap().get(colorStr) != null)
+ return ColorParser.getInstance().getMap().get(colorStr);
+ return colorStr;
}
- if (file == null)
- return null;
- IProject project = file.getProject();
- return project;
- }
-
- /**
- * Get current workspace
- *
- * @return
- */
- public static IWorkspace getCurrentWorkspace() {
- IEditorPart editor = JspEditorPlugin.getDefault().getWorkbench()
- .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- IEditorInput input = editor.getEditorInput();
- IFile file = null;
- if (input instanceof IFileEditorInput) {
- file = ((IFileEditorInput) input).getFile();
+ /**
+ * Get current project for opened editor
+ *
+ * @return
+ */
+ public static IProject getCurrentProject() {
+ IEditorPart editor = JspEditorPlugin.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ IEditorInput input = editor.getEditorInput();
+ IProject project = null;
+ if (input instanceof IFileEditorInput) {
+ IFile file = ((IFileEditorInput) input).getFile();
+ project = file.getProject();
+ }
+ return project;
}
- if (file == null)
- return null;
- IWorkspace workspace = file.getWorkspace();
- return workspace;
- }
+
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/events/TabPropertySheetMouseAdapter.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/events/TabPropertySheetMouseAdapter.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/events/TabPropertySheetMouseAdapter.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -103,29 +103,29 @@
*/
public void mouseDown(MouseEvent event) {
- for (int i = 0; i < tree.getColumnCount(); i++)
- tree.getColumn(i).pack();
-
- Control old = editor.getEditor();
- if (old != null)
- old.dispose();
-
- Point pt = new Point(event.x, event.y);
-
- final TreeItem item = tree.getItem(pt);
-
- if (item != null) {
-
- if (Util.searchOnBlock(item.getText(Constants.FIRST_COLUMN).trim(),
- elementsMap.keySet()))
- return;
-
- if (Util.searchInCombo(item.getText(Constants.FIRST_COLUMN).trim(),
- comboMap.keySet()))
- createCombo(item, Constants.SECOND_COLUMN);
- else
- createText(item, Constants.SECOND_COLUMN);
- }
+ for (int i = 0; i < tree.getColumnCount(); i++)
+ tree.getColumn(i).pack();
+
+ Control old = editor.getEditor();
+ if (old != null)
+ old.dispose();
+
+ Point pt = new Point(event.x, event.y);
+
+ final TreeItem item = tree.getItem(pt);
+
+ if (item != null) {
+
+ if (elementsMap.keySet().contains(item.getText(Constants.FIRST_COLUMN).trim())) {
+ return;
+ }
+
+ if (comboMap.keySet().contains(item.getText(Constants.FIRST_COLUMN).trim())) {
+ createCombo(item, Constants.SECOND_COLUMN);
+ } else {
+ createText(item, Constants.SECOND_COLUMN);
+ }
+ }
}
/**
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/parsers/ColorParser.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/parsers/ColorParser.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/parsers/ColorParser.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -50,12 +50,8 @@
private static final String FILE_NAME = "cssdialog/colors.xml"; //$NON-NLS-1$
- public static synchronized ColorParser getInstance() {
-
- if(colorParser==null) {
- colorParser = new ColorParser();
- }
- return colorParser;
+ public static ColorParser getInstance() {
+ return ColorParserHolder.INSTANCE;
}
/**
* Constructor for Color parser
@@ -107,4 +103,8 @@
}
return map;
}
+
+ private static class ColorParserHolder {
+ private static final ColorParser INSTANCE = new ColorParser();
+ }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -113,10 +113,11 @@
label.setText(format(key));
label.setLayoutData(new GridData(GridData.END, GridData.CENTER,
false, false));
- if (Util.searchInCombo(key, comboMap.keySet()))
- createCombo(this, key, styleAttributes.getAttribute(key));
- else
- createText(this, key, styleAttributes.getAttribute(key));
+ if (comboMap.keySet().contains(key)) {
+ createCombo(this, key, styleAttributes.getAttribute(key));
+ } else {
+ createText(this, key, styleAttributes.getAttribute(key));
+ }
}
}
@@ -145,10 +146,11 @@
label.setText(format(key));
label.setLayoutData(new GridData(GridData.END, GridData.CENTER,
false, false));
- if (Util.searchInCombo(key, comboMap.keySet()))
- createCombo(this, key, styleAttributes.getAttribute(key));
- else
- createText(this, key, styleAttributes.getAttribute(key));
+ if (comboMap.keySet().contains(key)) {
+ createCombo(this, key, styleAttributes.getAttribute(key));
+ } else {
+ createText(this, key, styleAttributes.getAttribute(key));
+ }
}
this.layout();
}
Modified: trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsBeanNameHyperlink.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsBeanNameHyperlink.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsBeanNameHyperlink.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -69,7 +69,7 @@
return;
}
StrutsFormBeanHyperlink openOn = new StrutsFormBeanHyperlink();
- openOn.setTextViewer(getTextViewer());
+ openOn.setDocument(getDocument());
openOn.setOffset(getOffset());
openOn.doHyperlink(region);
}
Modified: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/ProjectImportTestSetup.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/ProjectImportTestSetup.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/ProjectImportTestSetup.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -19,7 +19,6 @@
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.ui.ide.ResourceUtil;
import org.jboss.tools.test.util.xpl.EditorTestHelper;
/**
Modified: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/WorkbenchUtils.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/WorkbenchUtils.java 2008-10-08 05:39:34 UTC (rev 10721)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/test/util/WorkbenchUtils.java 2008-10-08 06:45:58 UTC (rev 10722)
@@ -13,17 +13,23 @@
import junit.framework.TestCase;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.jface.preference.PreferenceManager;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWizard;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.wizards.IWizardDescriptor;
/**
@@ -81,4 +87,14 @@
return PreferencesUtil.createPropertyDialogOn(WorkbenchUtils
.getActiveShell(), project, pageId, new String[] {pageId}, null);
}
+
+ public static IEditorPart openEditor(IFile inputFile, String editorId) {
+ IEditorPart part = null;
+ try {
+ part = getWorkbenchActivePage().openEditor(new FileEditorInput(inputFile), editorId);
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
+ return part;
+ }
}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r10721 - trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-10-08 01:39:34 -0400 (Wed, 08 Oct 2008)
New Revision: 10721
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
Log:
JBIDE-2832
fix it.
But , is it correct that more than one source node connect same one target node ?
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-07 20:33:24 UTC (rev 10720)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-08 05:39:34 UTC (rev 10721)
@@ -245,40 +245,47 @@
.getModelTargetConnections().isEmpty())
continue;
// how dispatch more than one connection???
- LineConnectionModel childConnection = (LineConnectionModel) ((IConnectableModel) child)
- .getModelTargetConnections().get(0);
- if (connectionIsUsed(childConnection))
- continue;
- Object[] properties = childConnection
- .getPropertyArray();
- JavaBeanModel jbean = (JavaBeanModel) child
- .getReferenceEntityModel();
- String currentSelectorName = getSelectorString(
- (AbstractStructuredDataModel) childConnection
- .getTarget(),
- (AbstractStructuredDataModel) childConnection
- .getSource(),
- (AbstractStructuredDataModel) source);
- AnyType binding = SmooksModelUtils
- .addBindingTypeToParamType(bindingsParam,
- jbean.getName(),
- currentSelectorName, null, null);
- for (int i = 0; i < properties.length; i++) {
- PropertyModel property = (PropertyModel) properties[i];
- String pname = property.getName();
- String pvalue = property.getValue();
- binding.getAnyAttribute().add(
- ExtendedMetaData.INSTANCE
- .demandFeature(null, pname,
- false), pvalue);
- }
+ List<Object> targetConnectionModelList = ((IConnectableModel) child)
+ .getModelTargetConnections();
+ for (Iterator iterator3 = targetConnectionModelList
+ .iterator(); iterator3.hasNext();) {
+ LineConnectionModel childConnection = (LineConnectionModel) iterator3
+ .next();
+ if (connectionIsUsed(childConnection))
+ continue;
+ Object[] properties = childConnection
+ .getPropertyArray();
+ JavaBeanModel jbean = (JavaBeanModel) child
+ .getReferenceEntityModel();
+ String currentSelectorName = getSelectorString(
+ (AbstractStructuredDataModel) childConnection
+ .getTarget(),
+ (AbstractStructuredDataModel) childConnection
+ .getSource(),
+ (AbstractStructuredDataModel) source);
+ AnyType binding = SmooksModelUtils
+ .addBindingTypeToParamType(
+ bindingsParam, jbean.getName(),
+ currentSelectorName, null, null);
+ for (int i = 0; i < properties.length; i++) {
+ PropertyModel property = (PropertyModel) properties[i];
+ String pname = property.getName();
+ String pvalue = property.getValue();
+ binding.getAnyAttribute().add(
+ ExtendedMetaData.INSTANCE
+ .demandFeature(null, pname,
+ false), pvalue);
+ }
- if (!jbean.isPrimitive()) {
- analyzeStructuredDataModel(resourceList, root,
- (AbstractStructuredDataModel) child,
- resourceConfig, currentSelectorName);
+ if (!jbean.isPrimitive()) {
+ analyzeStructuredDataModel(
+ resourceList,
+ root,
+ (AbstractStructuredDataModel) child,
+ resourceConfig, currentSelectorName);
+ }
+ this.setConnectionUsed(childConnection);
}
- this.setConnectionUsed(childConnection);
}
}
@@ -349,21 +356,19 @@
}
- /*
- * (non-Javadoc)
+ /**
+ * If root node don't connect , it will ask user to connect them .
*
- * @see org.jboss.tools.smooks.analyzer.IMappingAnalyzer#analyzeMappingGraphModel(org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext)
+ * @param context
*/
- public void analyzeMappingGraphModel(
- SmooksConfigurationFileGenerateContext context)
- throws SmooksAnalyzerException {
+ private void checkRootNodeConnected(
+ SmooksConfigurationFileGenerateContext context) {
GraphRootModel root = context.getDataMappingRootModel();
List sourceList = root.loadSourceModelList();
List targetList = root.loadTargetModelList();
JavaBeanModel rootSource = null;
JavaBeanModel rootTarget = null;
-
boolean needCheck = false;
for (Iterator iterator = sourceList.iterator(); iterator.hasNext();) {
@@ -433,8 +438,18 @@
}
}
}
+ }
- SmooksResourceListType listType = context.getSmooksResourceListModel();
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.smooks.analyzer.IMappingAnalyzer#analyzeMappingGraphModel(org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext)
+ */
+ public void analyzeMappingGraphModel(
+ SmooksConfigurationFileGenerateContext context)
+ throws SmooksAnalyzerException {
+ GraphRootModel root = context.getDataMappingRootModel();
+ checkRootNodeConnected(context);
this.analyzeGraphicalModel(root, context.getGeneratorResourceList());
}
17 years, 3 months
JBoss Tools SVN: r10720 - workspace/examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-07 16:33:24 -0400 (Tue, 07 Oct 2008)
New Revision: 10720
Added:
workspace/examples/.project
workspace/examples/projectExamples.xml
Log:
Added: workspace/examples/.project
===================================================================
--- workspace/examples/.project (rev 0)
+++ workspace/examples/.project 2008-10-07 20:33:24 UTC (rev 10720)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>examples</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Added: workspace/examples/projectExamples.xml
===================================================================
--- workspace/examples/projectExamples.xml (rev 0)
+++ workspace/examples/projectExamples.xml 2008-10-07 20:33:24 UTC (rev 10720)
@@ -0,0 +1,48 @@
+<projects>
+ <project>
+ <category>Seam</category>
+ <name>dvdstore</name>
+ <shortDescription>Seam DVD Store Example</shortDescription>
+ <description>This example demonstrates the use of Seam with jBPM
+ pageflow and business process management. It runs on JBoss AS and
+ Tomcat.</description>
+ <size>10000000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/seam-examples/...
+ </url>
+ </project>
+
+ <project>
+ <category>Portlet</category>
+ <name>TestJavaPortlet</name>
+ <shortDescription>JBoss Java Portlet Example</shortDescription>
+ <description>This example demonstrates the use of JBoss Java Portlet. It runs on JBoss Portal 2.7.0.</description>
+ <size>10000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/portlet-exampl...
+ </url>
+ </project>
+
+ <project>
+ <category>Portlet</category>
+ <name>TestJSFPortlet</name>
+ <shortDescription>JBoss JSF Portlet Example</shortDescription>
+ <description>This example demonstrates the use of JBoss JSF Portlet. It runs on JBoss Portal 2.7.0.</description>
+ <size>4000000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/portlet-exampl...
+ </url>
+ </project>
+
+ <project>
+ <category>Portlet</category>
+ <name>TestSeamPortlet</name>
+ <shortDescription>JBoss Seam Portlet Example</shortDescription>
+ <description>This example demonstrates the use of JBoss Seam Portlet. It runs on JBoss Portal 2.7.0.</description>
+ <size>10000000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/portlet-exampl...
+ </url>
+ </project>
+
+</projects>
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r10719 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-07 14:11:31 -0400 (Tue, 07 Oct 2008)
New Revision: 10719
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2731
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-10-07 16:44:16 UTC (rev 10718)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-10-07 18:11:31 UTC (rev 10719)
@@ -53,6 +53,7 @@
import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;
import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
+import org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard;
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
import org.hibernate.eclipse.console.utils.DriverClassHelpers;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -154,6 +155,27 @@
}
/**
+ * This method is useful for seam facet modify wizard.
+ */
+ private void initModel() {
+ synchEditorsAndModel(jBossHibernateDbTypeEditor);
+// synchEditorsAndModel(jBossSeamHomeEditor);
+ synchEditorsAndModel(jBossAsDeployAsEditor);
+ synchEditorsAndModel(connProfileSelEditor);
+ synchEditorsAndModel(dbSchemaName);
+ synchEditorsAndModel(dbCatalogName);
+ synchEditorsAndModel(dbTablesExists);
+ synchEditorsAndModel(recreateTablesOnDeploy);
+ synchEditorsAndModel(sessionBeanPkgNameditor);
+ synchEditorsAndModel(entityBeanPkgNameditor);
+ synchEditorsAndModel(testsPkgNameditor);
+ }
+
+ private void synchEditorsAndModel(IFieldEditor editor) {
+ model.setProperty(editor.getName(), editor.getValue());
+ }
+
+ /**
* @return
*/
private String getDefaultDbType() {
@@ -248,6 +270,10 @@
model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_DIALECT,
HIBERNATE_HELPER.getDialectClass(jBossHibernateDbTypeEditor.getValueAsString()));
+
+ if(!isNewProjectWizard()) {
+ initModel();
+ }
}
/**
@@ -410,7 +436,7 @@
private boolean isNewProjectWizard() {
// ModifyFacetedProjectWizard or NewProjectDataModelFacetWizard
- return getWizard() instanceof NewProjectDataModelFacetWizard;
+ return getWizard()==null || getWizard() instanceof NewProjectDataModelFacetWizard;
}
/**
17 years, 3 months
JBoss Tools SVN: r10718 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-07 12:44:16 -0400 (Tue, 07 Oct 2008)
New Revision: 10718
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2731
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-10-07 16:40:52 UTC (rev 10717)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-10-07 16:44:16 UTC (rev 10718)
@@ -289,10 +289,8 @@
if(ejbVersion!=null) {
doExecuteForEjb(project, fv, model, monitor);
} else if(webVersion!=null) {
- model.setProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, ISeamFacetDataModelProperties.DEPLOY_AS_WAR);
doExecuteForWar(project, fv, model, monitor);
} else if(earVersion!=null) {
- model.setProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, ISeamFacetDataModelProperties.DEPLOY_AS_WAR);
doExecuteForEar(project, fv, model, monitor);
}
}
17 years, 3 months
JBoss Tools SVN: r10717 - in trunk/seam/plugins: org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-07 12:40:52 -0400 (Tue, 07 Oct 2008)
New Revision: 10717
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2731
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-10-07 15:56:58 UTC (rev 10716)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-10-07 16:40:52 UTC (rev 10717)
@@ -221,7 +221,7 @@
* @return
*/
static boolean isWarConfiguration(IDataModel model) {
- return "war".equals(model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS)); //$NON-NLS-1$
+ return ISeamFacetDataModelProperties.DEPLOY_AS_WAR.equals(model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS));
}
static void createComponentsProperties(final File seamGenResFolder, String projectName, Boolean embedded) {
@@ -289,8 +289,10 @@
if(ejbVersion!=null) {
doExecuteForEjb(project, fv, model, monitor);
} else if(webVersion!=null) {
+ model.setProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, ISeamFacetDataModelProperties.DEPLOY_AS_WAR);
doExecuteForWar(project, fv, model, monitor);
} else if(earVersion!=null) {
+ model.setProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, ISeamFacetDataModelProperties.DEPLOY_AS_WAR);
doExecuteForEar(project, fv, model, monitor);
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-10-07 15:56:58 UTC (rev 10716)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-10-07 16:40:52 UTC (rev 10717)
@@ -17,6 +17,8 @@
import java.util.List;
import java.util.Map;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.datatools.connectivity.IConnectionProfile;
import org.eclipse.datatools.connectivity.ProfileManager;
@@ -24,7 +26,9 @@
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -33,6 +37,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
@@ -40,6 +45,7 @@
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener;
import org.eclipse.wst.common.frameworks.internal.operations.ProjectCreationDataModelProviderNew;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
@@ -47,7 +53,6 @@
import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;
import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
-import org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard;
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
import org.hibernate.eclipse.console.utils.DriverClassHelpers;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -63,6 +68,7 @@
import org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor;
import org.jboss.tools.seam.ui.wizard.SeamFormWizard;
import org.jboss.tools.seam.ui.wizard.SeamWizardFactory;
+import org.jboss.tools.seam.ui.wizard.SeamWizardUtils;
/**
* @author eskimo
@@ -159,8 +165,33 @@
* @return
*/
private Object getDeployAsDefaultValue() {
- return SeamProjectPreferences.getStringPreference(
- SeamProjectPreferences.JBOSS_AS_DEFAULT_DEPLOY_AS);
+ String result = SeamProjectPreferences.getStringPreference(SeamProjectPreferences.JBOSS_AS_DEFAULT_DEPLOY_AS);
+ if(!isNewProjectWizard()) {
+ ISelection sel = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
+ IProject project = SeamWizardUtils.getInitialProject(sel);
+ if(project == null) {
+ SeamCorePlugin.getPluginLog().logError("Can't get project name to initialize SeamInstallWizardPage for ModifyFacetedProjectWizard");
+ return result;
+ }
+ IFacetedProject facetedProject;
+ try {
+ facetedProject = ProjectFacetsManager.create(project);
+ if(facetedProject==null) {
+ SeamCorePlugin.getPluginLog().logError("Can't get faceted project to initialize SeamInstallWizardPage for ModifyFacetedProjectWizard");
+ return result;
+ }
+ } catch (CoreException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ return result;
+ }
+ IProjectFacetVersion webVersion = facetedProject.getProjectFacetVersion(IJ2EEFacetConstants.DYNAMIC_WEB_FACET);
+ if(webVersion!=null) {
+ return ISeamFacetDataModelProperties.DEPLOY_AS_WAR;
+ } else {
+ return ISeamFacetDataModelProperties.DEPLOY_AS_EAR;
+ }
+ }
+ return result;
}
/**
@@ -353,11 +384,13 @@
validatorDelegate.addValidatorForProperty(sessionBeanPkgNameditor
.getName(), new PackageNameValidator(
sessionBeanPkgNameditor.getName(), "session beans")); //$NON-NLS-1$
+ if(isNewProjectWizard()) {
+ validatorDelegate.addValidatorForProperty(
+ IFacetDataModelProperties.FACET_PROJECT_NAME,
+ new ProjectNamesDuplicationValidator(
+ IFacetDataModelProperties.FACET_PROJECT_NAME));
+ }
validatorDelegate.addValidatorForProperty(
- IFacetDataModelProperties.FACET_PROJECT_NAME,
- new ProjectNamesDuplicationValidator(
- IFacetDataModelProperties.FACET_PROJECT_NAME));
- validatorDelegate.addValidatorForProperty(
ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
getDeploymentTypeValidator(getWizard()));
}
@@ -375,6 +408,11 @@
initDefaultWizardProperties();
}
+ private boolean isNewProjectWizard() {
+ // ModifyFacetedProjectWizard or NewProjectDataModelFacetWizard
+ return getWizard() instanceof NewProjectDataModelFacetWizard;
+ }
+
/**
*
*/
@@ -542,15 +580,14 @@
IValidator getDeploymentTypeValidator(IWizard wizard) {
if(wizard instanceof NewProjectDataModelFacetWizard) {
return new DeploymentTypeValidator(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, ((NewProjectDataModelFacetWizard)wizard).getDataModel());
- } else if(wizard instanceof ModifyFacetedProjectWizard) {
- ModifyFacetedProjectWizard mfpw = (ModifyFacetedProjectWizard)wizard;
}
- return new IValidator() {
- public Map<String, String> validate(Object value, Object context) {
- SeamInstallWizardPage.this.validate();
- return ValidatorFactory.NO_ERRORS;
- }
- };
+ return new DeploymentTypeValidator(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, model);
+// return new IValidator() {
+// public Map<String, String> validate(Object value, Object context) {
+// SeamInstallWizardPage.this.validate();
+// return ValidatorFactory.NO_ERRORS;
+// }
+// };
}
static class DeploymentTypeValidator implements IValidator {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java 2008-10-07 15:56:58 UTC (rev 10716)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java 2008-10-07 16:40:52 UTC (rev 10717)
@@ -7,7 +7,7 @@
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.seam.ui.internal.project.facet;
import java.io.File;
@@ -34,12 +34,8 @@
import org.eclipse.jdt.internal.corext.util.Messages;
import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
-import org.jboss.tools.seam.core.SeamPreferences;
-import org.jboss.tools.seam.core.project.facet.SeamProjectPreferences;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
@@ -55,8 +51,7 @@
/**
*
*/
- static public Map<String, IValidator> validators
- = new HashMap<String, IValidator>();
+ static public Map<String, IValidator> validators = new HashMap<String, IValidator>();
/**
*
@@ -107,8 +102,8 @@
* @param text
* @return
*/
- public static Map<String, String> createErrormessage(String propertyName,
- String text) {
+ public static Map<String, String> createErrormessage(String propertyName,
+ String text) {
Map<String, String> map = createErrorMap();
map.put(propertyName, text);
return map;
@@ -127,10 +122,12 @@
File folder = new File(folderPath);
if (!folder.exists())
- return createErrormessage(SeamUIMessages.VALIDATOR_FACTORY_FOLDER + folderPath
+ return createErrormessage(SeamUIMessages.VALIDATOR_FACTORY_FOLDER
+ + folderPath
+ SeamUIMessages.VALIDATOR_FACTORY_DOES_NOT_EXISTS);
if (!folder.isDirectory())
- return createErrormessage(SeamUIMessages.VALIDATOR_FACTORY_PATH + folderPath
+ return createErrormessage(SeamUIMessages.VALIDATOR_FACTORY_PATH
+ + folderPath
+ SeamUIMessages.VALIDATOR_FACTORY_POINTS_TO_FILE);
return NO_ERRORS;
}
@@ -145,29 +142,36 @@
value, context);
if (errors.size() > 0) {
errors = createErrorMap();
- errors.put(ISeamFacetDataModelProperties.JBOSS_SEAM_HOME,
- SeamUIMessages.VALIDATOR_FACTORY_SEAM_HOME_FOLDER_DOES_NOT_EXISTS);
+ errors
+ .put(
+ ISeamFacetDataModelProperties.JBOSS_SEAM_HOME,
+ SeamUIMessages.VALIDATOR_FACTORY_SEAM_HOME_FOLDER_DOES_NOT_EXISTS);
return errors;
}
String version = (String) context;
- if(version.startsWith("2.")) { //$NON-NLS-1$
- File seamJarFile = new File(value.toString(), "lib/jboss-seam.jar"); //$NON-NLS-1$
+ if (version.startsWith("2.")) { //$NON-NLS-1$
+ File seamJarFile = new File(value.toString(),
+ "lib/jboss-seam.jar"); //$NON-NLS-1$
if (!seamJarFile.isFile()) {
errors = createErrorMap();
- errors.put(ISeamFacetDataModelProperties.JBOSS_SEAM_HOME,
- SeamUIMessages.VALIDATOR_FACTORY_HOME_FOLDER_POINTS_TO +
- SeamUIMessages.VALIDATOR_FACTORY_LOCATION_THAT_DOES_NOT_LOOK_LIKE_SEAM_HOME_FOLDER);
- }
+ errors
+ .put(
+ ISeamFacetDataModelProperties.JBOSS_SEAM_HOME,
+ SeamUIMessages.VALIDATOR_FACTORY_HOME_FOLDER_POINTS_TO
+ + SeamUIMessages.VALIDATOR_FACTORY_LOCATION_THAT_DOES_NOT_LOOK_LIKE_SEAM_HOME_FOLDER);
+ }
} else {
File seamJarFile = new File(value.toString(), "jboss-seam.jar"); //$NON-NLS-1$
if (!seamJarFile.isFile()) {
errors = createErrorMap();
- errors.put(ISeamFacetDataModelProperties.JBOSS_SEAM_HOME,
- SeamUIMessages.VALIDATOR_FACTORY_HOME_FOLDER_POINTS_TO +
- SeamUIMessages.VALIDATOR_FACTORY_LOCATION_THAT_DOES_NOT_LOOK_LIKE_SEAM_HOME_FOLDER);
- }
- }
+ errors
+ .put(
+ ISeamFacetDataModelProperties.JBOSS_SEAM_HOME,
+ SeamUIMessages.VALIDATOR_FACTORY_HOME_FOLDER_POINTS_TO
+ + SeamUIMessages.VALIDATOR_FACTORY_LOCATION_THAT_DOES_NOT_LOOK_LIKE_SEAM_HOME_FOLDER);
+ }
+ }
return errors;
}
@@ -182,15 +186,18 @@
value, context);
if (errors.size() > 0) {
errors = createErrorMap();
- errors.put(ISeamFacetDataModelProperties.JBOSS_AS_HOME,
- SeamUIMessages.VALIDATOR_FACTORY_JBOSS_AS_HOME_FOLDER_DOES_NOT_EXIST);
+ errors
+ .put(
+ ISeamFacetDataModelProperties.JBOSS_AS_HOME,
+ SeamUIMessages.VALIDATOR_FACTORY_JBOSS_AS_HOME_FOLDER_DOES_NOT_EXIST);
return errors;
}
if (!new File(value.toString(), "bin/twiddle.jar").isFile()) { //$NON-NLS-1$
- errors.put(
- ISeamFacetDataModelProperties.JBOSS_AS_HOME,
- SeamUIMessages.VALIDATOR_FACTORY_JBOSS_AS_HOME_FOLDER_POINT_TO_LOCATION_THAT_DOES_NOT +
- SeamUIMessages.VALIDATOR_FACTORY_LOOK_LIKE_JBOSS_AS_HOME_FOLDER);
+ errors
+ .put(
+ ISeamFacetDataModelProperties.JBOSS_AS_HOME,
+ SeamUIMessages.VALIDATOR_FACTORY_JBOSS_AS_HOME_FOLDER_POINT_TO_LOCATION_THAT_DOES_NOT
+ + SeamUIMessages.VALIDATOR_FACTORY_LOOK_LIKE_JBOSS_AS_HOME_FOLDER);
}
return errors;
}
@@ -209,9 +216,10 @@
.createAST(null);
IProblem[] problems = compilationUnit.getProblems();
if (problems.length > 0) {
- return createErrormessage(Messages.format(
- SeamUIMessages.VALIDATOR_FACTORY_COMPONENT_NAME_IS_NOT_VALID, problems[0]
- .getMessage()));
+ return createErrormessage(Messages
+ .format(
+ SeamUIMessages.VALIDATOR_FACTORY_COMPONENT_NAME_IS_NOT_VALID,
+ problems[0].getMessage()));
}
return ValidatorFactory.NO_ERRORS;
}
@@ -223,7 +231,10 @@
.toString(), CompilerOptions.VERSION_1_5,
CompilerOptions.VERSION_1_5);
if (status.getSeverity() == IStatus.ERROR) {
- return createErrormessage((Messages.format(NewWizardMessages.NewTypeWizardPage_error_InvalidPackageName, status.getMessage())));
+ return createErrormessage((Messages
+ .format(
+ NewWizardMessages.NewTypeWizardPage_error_InvalidPackageName,
+ status.getMessage())));
}
return ValidatorFactory.NO_ERRORS;
@@ -248,13 +259,13 @@
public static final IValidator SEAM_COMPONENT_NAME_VALIDATOR = new IValidator() {
public Map<String, String> validate(Object value, Object context) {
- IStatus status = JavaConventions.validateClassFileName(
- value.toString()+".class", "5.0", "5.0"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ IStatus status = JavaConventions.validateClassFileName(value
+ .toString()
+ + ".class", "5.0", "5.0"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (status.isOK()) {
return NO_ERRORS;
} else {
- return createErrormessage(
- SeamUIMessages.VALIDATOR_FACTORY_NAME_IS_NOT_VALID);
+ return createErrormessage(SeamUIMessages.VALIDATOR_FACTORY_NAME_IS_NOT_VALID);
}
}
};
@@ -267,7 +278,7 @@
public static final IValidator SEAM_JAVA_INTEFACE_NAME_CONVENTION_VALIDATOR = new IValidator() {
public Map<String, String> validate(Object value, Object context) {
- if(!(context instanceof Object[])) {
+ if (!(context instanceof Object[])) {
throw new IllegalArgumentException(
"Context parameter should be instance of Object[]"); //$NON-NLS-1$
}
@@ -294,7 +305,7 @@
public static final IValidator SEAM_METHOD_NAME_VALIDATOR = new IValidator() {
public Map<String, String> validate(Object value, Object context) {
- if(!(context instanceof Object[])) {
+ if (!(context instanceof Object[])) {
throw new IllegalArgumentException(
"Context parameter should be instance of Object[]"); //$NON-NLS-1$
}
@@ -305,12 +316,13 @@
CompilationUnit compilationUnit = createCompilationUnit(
"class ClassName {public void " //$NON-NLS-1$
- + value.toString() + "() {}}",project); //$NON-NLS-1$
+ + value.toString() + "() {}}", project); //$NON-NLS-1$
IProblem[] problems = compilationUnit.getProblems();
if (problems.length > 0) {
- return createErrormessage(targetName + SeamUIMessages.VALIDATOR_FACTORY_NAME_IS_NOT_VALID2);
+ return createErrormessage(targetName
+ + SeamUIMessages.VALIDATOR_FACTORY_NAME_IS_NOT_VALID2);
}
return NO_ERRORS;
@@ -320,7 +332,7 @@
public static final IValidator FILE_NAME_VALIDATOR = new IValidator() {
public Map<String, String> validate(Object value, Object context) {
- if(!(context instanceof Object[])) {
+ if (!(context instanceof Object[])) {
throw new IllegalArgumentException(
"Context parameter should be instance of Object[]"); //$NON-NLS-1$
}
@@ -331,7 +343,8 @@
if ("".equals(value) //$NON-NLS-1$
|| !project.getLocation().isValidSegment(value.toString()))
- return createErrormessage(targetName + SeamUIMessages.VALIDATOR_FACTORY_NAME_IS_NOT_VALID2);
+ return createErrormessage(targetName
+ + SeamUIMessages.VALIDATOR_FACTORY_NAME_IS_NOT_VALID2);
return NO_ERRORS;
}
@@ -340,7 +353,7 @@
public static final IValidator SEAM_PROJECT_NAME_VALIDATOR = new IValidator() {
public Map<String, String> validate(Object value, Object context) {
- if(value==null || "".equals(value)) { //$NON-NLS-1$
+ if (value == null || "".equals(value)) { //$NON-NLS-1$
return createErrormessage(SeamUIMessages.VALIDATOR_FACTORY_PRJ_NOT_SELECTED);
}
IResource project = ResourcesPlugin.getWorkspace().getRoot()
@@ -348,90 +361,129 @@
if (project == null || !(project instanceof IProject)
|| !project.exists()) {
- return createErrormessage(
- SeamUIMessages.VALIDATOR_FACTORY_PROJECT + value + SeamUIMessages.VALIDATOR_FACTORY_DOES_NOT_EXIST);
+ return createErrormessage(SeamUIMessages.VALIDATOR_FACTORY_PROJECT
+ + value
+ + SeamUIMessages.VALIDATOR_FACTORY_DOES_NOT_EXIST);
} else {
- IProject selection = (IProject)project;
+ IProject selection = (IProject) project;
try {
- if (!selection.hasNature(ISeamProject.NATURE_ID)
- || SeamCorePlugin.getSeamPreferences(selection)==null
-// || selection.getAdapter(IFacetedProject.class)==null
-// || !((IFacetedProject)selection.getAdapter(IFacetedProject.class)).hasProjectFacet(ProjectFacetsManager.getProjectFacet("jst.web"))
- || "".equals(SeamCorePlugin.getSeamPreferences(selection).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, ""))) { //$NON-NLS-1$
- return createErrormessage(
- SeamUIMessages.VALIDATOR_FACTORY_SELECTED_PROJECT + project.getName() + SeamUIMessages.VALIDATOR_FACTORY_IS_NOT_A_SEAM_WEB_PROJECT);
- } else {
- //TODO validate project(s) structure
+ if (!selection.hasNature(ISeamProject.NATURE_ID)
+ || SeamCorePlugin.getSeamPreferences(selection) == null
+ // ||
+ // selection.getAdapter(IFacetedProject.class)==null
+ // || !((IFacetedProject)selection.getAdapter(
+ // IFacetedProject
+ // .class)).hasProjectFacet(ProjectFacetsManager
+ // .getProjectFacet("jst.web"))
+ || "" .equals(SeamCorePlugin.getSeamPreferences(selection).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, ""))) { //$NON-NLS-1$
+ return createErrormessage(SeamUIMessages.VALIDATOR_FACTORY_SELECTED_PROJECT
+ + project.getName()
+ + SeamUIMessages.VALIDATOR_FACTORY_IS_NOT_A_SEAM_WEB_PROJECT);
+ } else {
+ // TODO validate project(s) structure
}
} catch (CoreException e) {
- // it might happen only if project is closed and project
+ // it might happen only if project is closed and project
// name typed by hand
- return createErrormessage(NLS.bind(SeamUIMessages.VALIDATOR_FACTORY_SELECTED_PRJ_IS_CLOSED, project.getName()));
+ return createErrormessage(NLS
+ .bind(
+ SeamUIMessages.VALIDATOR_FACTORY_SELECTED_PRJ_IS_CLOSED,
+ project.getName()));
}
}
return NO_ERRORS;
}
};
- public static final IValidator CONNECTION_PROFILE_VALIDATOR =
- new IValidator() {
+ private static class ConnectionProfileValidator implements IValidator {
+
+ private boolean allowEmptyConnection;
+
+ public ConnectionProfileValidator(boolean allowEmptyConnection) {
+ this.allowEmptyConnection = allowEmptyConnection;
+ }
+
public Map<String, String> validate(Object value, Object context) {
- if (value == null || "".equals(value.toString().trim())) { //$NON-NLS-1$
+ if (!allowEmptyConnection && (value == null || "".equals(value.toString().trim()))) { //$NON-NLS-1$
return createErrormessage(
ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE,
SeamUIMessages.VALIDATOR_FACTORY_CONNECTION_PROFILE_IS_NOT_SELECTED);
} else {
- IConnectionProfile connProfile
- = ProfileManager.getInstance().getProfileByName(value.toString());
+ IConnectionProfile connProfile = ProfileManager.getInstance()
+ .getProfileByName(value.toString());
Properties props = connProfile.getBaseProperties();
- Object driverClass
- = props.get("org.eclipse.datatools.connectivity.db.driverClass"); //$NON-NLS-1$
+ Object driverClass = props
+ .get("org.eclipse.datatools.connectivity.db.driverClass"); //$NON-NLS-1$
- if(driverClass==null || "".equals(driverClass)) { //$NON-NLS-1$
+ if (driverClass == null || "".equals(driverClass)) { //$NON-NLS-1$
return createErrormessage(
ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE,
- SeamUIMessages.VALIDATOR_FACTORY_DRIVER_CLASS_PROPERTY_IS_EMPTY_FOR_SELECTED
- + value + SeamUIMessages.VALIDATOR_FACTORY_CONNECTION_PROFILE);
+ SeamUIMessages.VALIDATOR_FACTORY_DRIVER_CLASS_PROPERTY_IS_EMPTY_FOR_SELECTED
+ + value
+ + SeamUIMessages.VALIDATOR_FACTORY_CONNECTION_PROFILE);
}
}
return NO_ERRORS;
}
- };
+ }
+ public static final IValidator CONNECTION_PROFILE_VALIDATOR = new ConnectionProfileValidator(false);
+
+ public static final IValidator CONNECTION_DRIVER_VALIDATOR = new ConnectionProfileValidator(true);
+
public static final IValidator SEAM_RUNTIME_NAME_VALIDATOR = new IValidator() {
public Map<String, String> validate(Object value, Object context) {
- Map<String,String> errors = NO_ERRORS;
+ Map<String, String> errors = NO_ERRORS;
if (value == null || "".equals(value.toString().trim())) { //$NON-NLS-1$
errors = createErrormessage(
ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
SeamUIMessages.VALIDATOR_FACTORY_SEAM_RUNTIME_IS_NOT_SELECTED);
- } else {
+ } else {
SeamRuntime rt = SeamRuntimeManager.getInstance()
- .findRuntimeByName(value.toString());
+ .findRuntimeByName(value.toString());
if (rt == null) {
- errors = createErrormessage(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
- NLS.bind(SeamUIMessages.VALIDATOR_FACTORY_CANNOT_FIND_SEAM_RUNTIME, value));
+ errors = createErrormessage(
+ ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
+ NLS
+ .bind(
+ SeamUIMessages.VALIDATOR_FACTORY_CANNOT_FIND_SEAM_RUNTIME,
+ value));
} else if (!new File(rt.getHomeDir()).exists()) {
- errors = createErrormessage(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
- NLS.bind(
- SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_HOME_DIR_IS_MISSING,value));
+ errors = createErrormessage(
+ ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
+ NLS
+ .bind(
+ SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_HOME_DIR_IS_MISSING,
+ value));
} else if (!new File(rt.getSeamGenDir()).exists()) {
- errors = createErrormessage(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
- NLS.bind(
- SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_TEMPLATES_DIR_IS_MISSING,value));
+ errors = createErrormessage(
+ ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
+ NLS
+ .bind(
+ SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_TEMPLATES_DIR_IS_MISSING,
+ value));
} else if (!new File(rt.getSrcTemplatesDir()).exists()) {
- errors = createErrormessage(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
- NLS.bind(
- SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_SRC_DIR_IS_MISSING,value));
+ errors = createErrormessage(
+ ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
+ NLS
+ .bind(
+ SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_SRC_DIR_IS_MISSING,
+ value));
} else if (!new File(rt.getViewTemplatesDir()).exists()) {
- errors = createErrormessage(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
- NLS.bind(
- SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_VIEW_DIR_IS_MISSING,value));
- } else if(!new File(rt.getResourceTemplatesDir()).exists()) {
- errors = createErrormessage(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
- NLS.bind(
- SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_RESOURCES_DIR_IS_MISSING,value));
+ errors = createErrormessage(
+ ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
+ NLS
+ .bind(
+ SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_VIEW_DIR_IS_MISSING,
+ value));
+ } else if (!new File(rt.getResourceTemplatesDir()).exists()) {
+ errors = createErrormessage(
+ ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
+ NLS
+ .bind(
+ SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_RESOURCES_DIR_IS_MISSING,
+ value));
}
}
return errors;
@@ -441,39 +493,52 @@
public static final IValidator SEAM_RUNTIME_VALIDATOR = new IValidator() {
public java.util.Map<String, String> validate(Object value,
Object context) {
- Map<String,String> errors = NO_ERRORS;
+ Map<String, String> errors = NO_ERRORS;
String rtName = value.toString();
- if(value==null || "".equals(value)) { //$NON-NLS-1$
+ if (value == null || "".equals(value)) { //$NON-NLS-1$
errors = createErrormessage(SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_NOT_CONFIGURED);
} else {
SeamRuntime rt = SeamRuntimeManager.getInstance()
.findRuntimeByName(value.toString());
if (rt == null) {
- errors = createErrormessage(NLS.bind(SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_CANNOT_BE_FOUND, value));
+ errors = createErrormessage(NLS
+ .bind(
+ SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_CANNOT_BE_FOUND,
+ value));
} else if (!new File(rt.getHomeDir()).exists()) {
- errors = createErrormessage(NLS.bind(
- SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_HOME_DIR_DOES_NOT_EXIST,value));
+ errors = createErrormessage(NLS
+ .bind(
+ SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_HOME_DIR_DOES_NOT_EXIST,
+ value));
} else if (!new File(rt.getSeamGenDir()).exists()) {
- errors = createErrormessage(NLS.bind(
- SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_TEMPLATES_DIR_DOES_NOT_EXIST,value));
+ errors = createErrormessage(NLS
+ .bind(
+ SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_TEMPLATES_DIR_DOES_NOT_EXIST,
+ value));
} else if (!new File(rt.getSrcTemplatesDir()).exists()) {
- errors = createErrormessage(NLS.bind(
- SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_SOURCE_TEMPLATES_DIR_DOES_NOT_EXIST,value));
+ errors = createErrormessage(NLS
+ .bind(
+ SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_SOURCE_TEMPLATES_DIR_DOES_NOT_EXIST,
+ value));
} else if (!new File(rt.getViewTemplatesDir()).exists()) {
- errors = createErrormessage(NLS.bind(
- SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_VIE_TEMPLATE_DIR_DOES_NOT_EXIST,value));
-// } else if(!new File(rt.getResourceTemplatesDir()).exists()) {
-// errors = createErrormessage(NLS.bind(
-// "Seam Runtime '{0)' resource templates directory doesn't exist for selected Seam Web Project",value));
+ errors = createErrormessage(NLS
+ .bind(
+ SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_VIE_TEMPLATE_DIR_DOES_NOT_EXIST,
+ value));
+ // } else if(!new
+ // File(rt.getResourceTemplatesDir()).exists()) {
+ // errors = createErrormessage(NLS.bind(
+ // "Seam Runtime '{0)' resource templates directory doesn't exist for selected Seam Web Project"
+ // ,value));
}
}
return errors;
}
};
- public static CompilationUnit createCompilationUnit(String classDecl,
- IProject project) {
+ public static CompilationUnit createCompilationUnit(String classDecl,
+ IProject project) {
ASTParser parser = ASTParser.newParser(AST.JLS3);
parser.setSource(classDecl.toCharArray());
parser.setProject(JavaCore.create(project));
17 years, 3 months
JBoss Tools SVN: r10716 - trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-07 11:56:58 -0400 (Tue, 07 Oct 2008)
New Revision: 10716
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/PropertyListFormLayoutData.java
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/SeamComponentsCoreFormLayoutData.java
Log:
JBIDE-2855
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/PropertyListFormLayoutData.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/PropertyListFormLayoutData.java 2008-10-07 15:56:50 UTC (rev 10715)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/PropertyListFormLayoutData.java 2008-10-07 15:56:58 UTC (rev 10716)
@@ -27,6 +27,7 @@
static String ENT_FILTERS = "SeamCoreFilters"; //$NON-NLS-1$
static String ENT_FILTERS_20 = "SeamPersistenceFilters"; //$NON-NLS-1$
static String ENT_RULE_FILES = "SeamDroolsRuleFiles"; //$NON-NLS-1$
+ static String ENT_INTERCEPTORS = "SeamCoreInterceptors"; //$NON-NLS-1$
static String ENT_RESTRICTIONS = "SeamFrameworkRestrictions"; //$NON-NLS-1$
static String ENT_HINTS = "SeamFrameworkHints"; //$NON-NLS-1$
@@ -113,6 +114,13 @@
final static IFormData BUNDLE_NAMES_FORM_DEFINITION = new FormData(
ENT_BUNDLE_NAMES, new String[]{null}, BUNDLE_NAMES_DEFINITIONS);
+ private final static IFormData[] INTERCEPTORS_DEFINITIONS = new IFormData[] {
+ createListDefinition("Interceptors") //$NON-NLS-1$
+ };
+
+ final static IFormData INTERCEPTORS_DEFINITION = new FormData(
+ ENT_INTERCEPTORS, new String[]{null}, INTERCEPTORS_DEFINITIONS);
+
private final static IFormData[] FILTERS_DEFINITIONS = new IFormData[] {
createListDefinition("Filters") //$NON-NLS-1$
};
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/SeamComponentsCoreFormLayoutData.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/SeamComponentsCoreFormLayoutData.java 2008-10-07 15:56:50 UTC (rev 10715)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/core/SeamComponentsCoreFormLayoutData.java 2008-10-07 15:56:58 UTC (rev 10716)
@@ -33,6 +33,7 @@
PropertyListFormLayoutData.PROCESS_20_DEFS_FORM_DEFINITION,
PropertyListFormLayoutData.PAGEFLOW_20_DEFS_FORM_DEFINITION,
PropertyListFormLayoutData.BUNDLE_NAMES_FORM_DEFINITION,
+ PropertyListFormLayoutData.INTERCEPTORS_DEFINITION,
PropertyListFormLayoutData.FILTERS_FORM_DEFINITION,
PropertyListFormLayoutData.FILTERS_20_FORM_DEFINITION,
17 years, 3 months
JBoss Tools SVN: r10715 - in trunk/seam/plugins/org.jboss.tools.seam.xml: META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-07 11:56:50 -0400 (Tue, 07 Oct 2008)
New Revision: 10715
Added:
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/ELConstraint.java
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/IntELConstraint.java
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/ListELConstraint.java
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/ListIntELConstraint.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-core.meta
Log:
JBIDE-2855
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/META-INF/MANIFEST.MF 2008-10-07 15:55:01 UTC (rev 10714)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/META-INF/MANIFEST.MF 2008-10-07 15:56:50 UTC (rev 10715)
@@ -8,7 +8,8 @@
Bundle-SymbolicName: org.jboss.tools.seam.xml;singleton:=true
Bundle-Localization: plugin
Provide-Package: org.jboss.tools.seam.xml,
- org.jboss.tools.seam.xml.components.model
+ org.jboss.tools.seam.xml.components.model,
+ org.jboss.tools.seam.xml.components.model.constraint
Require-Bundle: org.jboss.tools.jst.web;visibility:=reexport,
org.eclipse.ui.ide,
org.eclipse.ui.views,
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml 2008-10-07 15:55:01 UTC (rev 10714)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/plugin.xml 2008-10-07 15:56:50 UTC (rev 10715)
@@ -41,6 +41,14 @@
class="org.jboss.tools.seam.xml.components.model.SeamComponents11FileLoader"/>
<xclass id="org.jboss.tools.seam.xml.components.model.SeamComponentsEntityRecognizer"
class="org.jboss.tools.seam.xml.components.model.SeamComponentsEntityRecognizer"/>
+
+ <xclass id="org.jboss.tools.seam.xml.components.model.constraint.ListELConstraint"
+ class="org.jboss.tools.seam.xml.components.model.constraint.ListELConstraint"/>
+ <xclass id="org.jboss.tools.seam.xml.components.model.constraint.IntELConstraint"
+ class="org.jboss.tools.seam.xml.components.model.constraint.IntELConstraint"/>
+ <xclass id="org.jboss.tools.seam.xml.components.model.constraint.ListIntELConstraint"
+ class="org.jboss.tools.seam.xml.components.model.constraint.ListIntELConstraint"/>
+
</extension>
<extension point="org.eclipse.wst.xml.core.catalogContributions">
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta 2008-10-07 15:55:01 UTC (rev 10714)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta 2008-10-07 15:56:50 UTC (rev 10715)
@@ -4,6 +4,11 @@
<XModelEntityGroup>
<VERSION DEPENDS="Model:1.0" MODULE="Struts Editor" VERSION="1.0"/>
<MAPPINGS>
+ <MAPPING name="AttributeConstraints">
+ <PAIR name="IntEL" value="org.jboss.tools.seam.xml.components.model.constraint.IntELConstraint"/>
+ <PAIR name="ListEL" value="org.jboss.tools.seam.xml.components.model.constraint.ListELConstraint"/>
+ <PAIR name="ListIntEL" value="org.jboss.tools.seam.xml.components.model.constraint.ListIntELConstraint"/>
+ </MAPPING>
<MAPPING name="FileVersions">
<PAIR name="SeamComponents1.1" value="FileSeamComponents11"/>
<PAIR name="SeamComponents1.2" value="FileSeamComponents12"/>
@@ -1112,9 +1117,40 @@
name="EditActions" path="EditActions"/>
<XActionItemReference entity="FileSeamComponents20"
name="SaveActions" path="SaveActions"/>
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%Create%"
+ ICON="action.new.struts.webapp.res_ref"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Component..." kind="action" name="AddComponent">
+ <EntityData EntityName="SeamComponent20">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="class" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%Create%"
+ ICON="action.new.struts.webapp.res_ref"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Factory..." kind="action" name="AddFactory">
+ <EntityData EntityName="SeamFactory20">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="value" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ WizardClassName="%Default%" displayName="Event..." kind="action" name="AddEvent">
+ <EntityData EntityName="SeamEvent20">
+ <AttributeData AttributeName="type"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ WizardClassName="%Default%" displayName="Import..." kind="action" name="AddImport">
+ <EntityData EntityName="SeamImport">
+ <AttributeData AttributeName="import"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
<XActionItemReference entity="FileSeamComponents20"
- name="CreateActions" path="CreateActions"/>
- <XActionItemReference entity="FileSeamComponents20"
name="CopyActions" path="CopyActions"/>
<XActionItemReference entity="FileSeamComponents20"
name="DeleteActions" path="DeleteActions"/>
@@ -1366,7 +1402,7 @@
<Editor name="AccessibleJava"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general" name="scope" xmlname="scope">
- <Constraint loader="List">
+ <Constraint loader="%ListEL%">
<value/>
<value name="stateless"/>
<value name="event"/>
@@ -1385,10 +1421,19 @@
</Constraint>
<Editor name="List"/>
</XModelAttribute>
- <XModelAttribute PROPERTIES="category=advanced" name="precedence" xmlname="precedence"/>
+ <XModelAttribute PROPERTIES="category=advanced" name="precedence" xmlname="precedence">
+ <Constraint loader="%ListIntEL%">
+ <value name=""/>
+ <value name="BUILT_IN"/>
+ <value name="FRAMEWORK"/>
+ <value name="APPLICATION"/>
+ <value name="DEPLOYMENT"/>
+ <value name="MOCK"/>
+ </Constraint>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced"
default="default(true)" name="installed" xmlname="installed">
- <Constraint loader="ListString">
+ <Constraint loader="%ListEL%">
<value name="default(true)"/>
<value name="true"/>
<value name="false"/>
@@ -1397,7 +1442,7 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced"
default="default(false)" name="auto-create" xmlname="auto-create">
- <Constraint loader="ListString">
+ <Constraint loader="%ListEL%">
<value name="default(false)"/>
<value name="true"/>
<value name="false"/>
@@ -1406,7 +1451,7 @@
</XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced"
default="default(false)" name="startup" xmlname="startup">
- <Constraint loader="ListString">
+ <Constraint loader="%ListEL%">
<value name="default(false)"/>
<value name="true"/>
<value name="false"/>
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-core.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-core.meta 2008-10-07 15:55:01 UTC (rev 10714)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-core.meta 2008-10-07 15:56:50 UTC (rev 10715)
@@ -747,6 +747,77 @@
</XModelEntity>
<XModelEntity ImplementingClass="%Custom%"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData"
+ XMLSUBPATH="core:init" name="SeamCoreInit21">
+ <XChildrenEntities>
+ <XChildEntity maxCount="1" name="SeamCoreInterceptors" required="yes"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.core.init" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="init" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;category=general"
+ default="org.jboss.seam.core.init" name="name" xmlname="name"/>
+ <XModelAttributeReference
+ attributes="class,scope,precedence,installed,auto-create,startup"
+ entity="SeamComponent20" name="component"/>
+ <XModelAttributeReference
+ attributes="debug,jndi-pattern,transaction-management-enabled,user-transaction-name"
+ entity="SeamCoreInit20" name="init"/>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions"/>
+ <XActionItem ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItemReference entity="SeamCoreInit20" name="CopyActions" path="CopyActions"/>
+ <XActionItemReference entity="SeamCoreInit20" name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="SeamCoreInit20" name="Properties" path="Properties"/>
+ <XActionItemReference entity="SeamCoreInit20" name="MoveActions" path="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData;children=%Ordered%;childrenLoader=list;saveDefault=false"
+ XMLSUBPATH="core:interceptors" name="SeamCoreInterceptors">
+ <XChildrenEntities>
+ <XChildEntity name="SeamListEntry"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.property" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="interceptors" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;category=general"
+ default="interceptors" name="name">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItemReference entity="SeamCoreBundleNames"
+ name="CreateActions" path="CreateActions"/>
+ <XActionItemReference entity="SeamCoreBundleNames" name="CopyActions" path="CopyActions"/>
+ <XActionItemReference entity="SeamCoreBundleNames"
+ name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="SeamCoreBundleNames" name="Properties" path="Properties"/>
+ <XActionItemReference entity="SeamCoreBundleNames" name="MoveActions" path="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData"
XMLSUBPATH="core:jbpm" name="SeamCoreJBPM">
<XChildrenEntities>
<XChildEntity maxCount="1" name="SeamCoreProcessDefinitions" required="yes"/>
@@ -959,6 +1030,52 @@
</XModelEntity>
<XModelEntity ImplementingClass="%Custom%"
PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData"
+ XMLSUBPATH="core:manager" name="SeamCoreManager21">
+ <XChildrenEntities/>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.core.manager" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="manager" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="id=true;category=general"
+ default="org.jboss.seam.core.manager" name="name" xmlname="name"/>
+ <XModelAttributeReference
+ attributes="class,scope,precedence,installed,auto-create"
+ entity="SeamComponent" name="component"/>
+ <XModelAttributeReference
+ attributes="conversation-timeout,concurrent-request-timeout,conversation-id-parameter,parent-conversation-id-parameter"
+ entity="SeamCoreManager" name="manager"/>
+ <XModelAttribute PROPERTIES="category=advanced" name="uri-encoding" xmlname="uri-encoding"/>
+ <XModelAttribute PROPERTIES="category=advanced"
+ name="default-flush-mode" xmlname="default-flush-mode">
+ <Constraint loader="List">
+ <value/>
+ <value name="MANUAL"/>
+ <value name="AUTO"/>
+ <value name="COMMIT"/>
+ </Constraint>
+ <Editor name="List"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem kind="list" name="CreateActions"/>
+ <XActionItem ICON="action.empty" displayName="Create" kind="list" name="EditActions"/>
+ <XActionItemReference entity="SeamCoreManager" name="CopyActions" path="CopyActions"/>
+ <XActionItemReference entity="SeamCoreManager" name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="SeamCoreManager" name="Properties" path="Properties"/>
+ <XActionItemReference entity="SeamCoreManager" name="MoveActions" path="MoveActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity ImplementingClass="%Custom%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.core.SeamComponentsCoreFormLayoutData"
XMLSUBPATH="core:microcontainer" name="SeamCoreMicrocontainer">
<XChildrenEntities/>
<XEntityRenderer>
@@ -1891,8 +2008,8 @@
</XEntityExtension>
<XEntityExtension name="FileSeamComponents21">
<XChildrenEntities>
- <XChildEntity name="SeamCoreInit20"/>
- <XChildEntity name="SeamCoreManager"/>
+ <XChildEntity name="SeamCoreInit21"/>
+ <XChildEntity name="SeamCoreManager21"/>
<XChildEntity name="SeamCorePojoCache"/>
<XChildEntity name="SeamCoreResourceLoader20"/>
<XChildEntity name="SeamBPMActor20"/>
@@ -1906,7 +2023,7 @@
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
PROPERTIES="validator.add=true" WizardClassName="%Default%"
displayName="Init..." kind="action" name="AddInit">
- <EntityData EntityName="SeamCoreInit20">
+ <EntityData EntityName="SeamCoreInit21">
<AttributeData AttributeName="name"/>
<AttributeData AttributeName="jndi-pattern" Mandatory="no"/>
<AttributeData AttributeName="debug" Mandatory="no"/>
@@ -1915,7 +2032,7 @@
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
PROPERTIES="validator.add=true" WizardClassName="%Default%"
displayName="Manager..." kind="action" name="AddManager">
- <EntityData EntityName="SeamCoreManager">
+ <EntityData EntityName="SeamCoreManager21">
<AttributeData AttributeName="name"/>
<AttributeData AttributeName="conversation-timeout" Mandatory="no"/>
</EntityData>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/ELConstraint.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/ELConstraint.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/ELConstraint.java 2008-10-07 15:56:50 UTC (rev 10715)
@@ -0,0 +1,40 @@
+package org.jboss.tools.seam.xml.components.model.constraint;
+
+import org.jboss.tools.common.meta.constraint.XAttributeConstraint;
+import org.jboss.tools.common.meta.constraint.impl.XAttributeConstraintImpl;
+
+public class ELConstraint extends XAttributeConstraintImpl {
+ public static ELConstraint INSTANCE = new ELConstraint();
+
+ public static XAttributeConstraint getInstance() {
+ return INSTANCE;
+ }
+
+ public boolean accepts(String value) {
+ if(value != null) {
+ if(value.startsWith("#{") && value.endsWith("}")) {
+ return true;
+ }
+ if(value.length() >= 2 && value.startsWith("@") && value.endsWith("@")) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Returns not null only if value starts with EL tokens.
+ */
+ public String getError(String value) {
+ if(accepts(value)) return null;
+ if(value.startsWith("#{")) {
+ return "value is not a correct EL.";
+ }
+ if(value.startsWith("@")) {
+ return "value is not a correct property.";
+ }
+
+ return super.getError(value);
+ }
+
+}
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/IntELConstraint.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/IntELConstraint.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/IntELConstraint.java 2008-10-07 15:56:50 UTC (rev 10715)
@@ -0,0 +1,23 @@
+package org.jboss.tools.seam.xml.components.model.constraint;
+
+import org.jboss.tools.common.meta.constraint.impl.XAttributeConstraintInt;
+
+public class IntELConstraint extends XAttributeConstraintInt {
+
+ public boolean accepts(String value) {
+ if(ELConstraint.getInstance().accepts(value)) {
+ return true;
+ }
+ return super.accepts(value);
+ }
+
+ public String getError(String value) {
+ if(accepts(value)) return null;
+ String error = ELConstraint.getInstance().getError(value);
+ if(error != null) {
+ return error;
+ }
+ return super.getError(value);
+ }
+
+}
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/ListELConstraint.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/ListELConstraint.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/ListELConstraint.java 2008-10-07 15:56:50 UTC (rev 10715)
@@ -0,0 +1,23 @@
+package org.jboss.tools.seam.xml.components.model.constraint;
+
+import org.jboss.tools.common.meta.constraint.impl.XAttributeConstraintList;
+
+public class ListELConstraint extends XAttributeConstraintList {
+
+ public boolean accepts(String value) {
+ if(ELConstraint.getInstance().accepts(value)) {
+ return true;
+ }
+ return super.accepts(value);
+ }
+
+ public String getError(String value) {
+ if(accepts(value)) return null;
+ String error = ELConstraint.getInstance().getError(value);
+ if(error != null) {
+ return error;
+ }
+ return super.getError(value);
+ }
+
+}
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/ListIntELConstraint.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/ListIntELConstraint.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/constraint/ListIntELConstraint.java 2008-10-07 15:56:50 UTC (rev 10715)
@@ -0,0 +1,23 @@
+package org.jboss.tools.seam.xml.components.model.constraint;
+
+import org.jboss.tools.common.meta.constraint.impl.XAttributeConstraintListInt;
+
+public class ListIntELConstraint extends XAttributeConstraintListInt {
+
+ public boolean accepts(String value) {
+ if(ELConstraint.getInstance().accepts(value)) {
+ return true;
+ }
+ return super.accepts(value);
+ }
+
+ public String getError(String value) {
+ if(accepts(value)) return null;
+ String error = ELConstraint.getInstance().getError(value);
+ if(error != null) {
+ return error;
+ }
+ return super.getError(value);
+ }
+
+}
17 years, 3 months
JBoss Tools SVN: r10714 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-07 11:55:01 -0400 (Tue, 07 Oct 2008)
New Revision: 10714
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java
Log:
JBIDE-2855
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java 2008-10-07 15:41:19 UTC (rev 10713)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java 2008-10-07 15:55:01 UTC (rev 10714)
@@ -165,6 +165,9 @@
if(!XMetaDataLoader.hasAttribute(element, LOADER) || loader.trim().length() == 0) {
loader = "";
}
+ if(loader != null && loader.startsWith("%")) {
+ loader = expand(loader, "AttributeConstraints");
+ }
constraint.init(loader, element);
}
17 years, 3 months
JBoss Tools SVN: r10713 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-07 11:41:19 -0400 (Tue, 07 Oct 2008)
New Revision: 10713
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
Log:
Fixed JUnit test
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2008-10-07 13:48:59 UTC (rev 10712)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2008-10-07 15:41:19 UTC (rev 10713)
@@ -11,11 +11,12 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.swt.widgets.Display;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
@@ -26,10 +27,11 @@
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
+import org.jboss.tools.seam.internal.core.project.facet.Seam2ProjectCreator;
import org.jboss.tools.seam.internal.core.project.facet.SeamFacetInstallDataModelProvider;
+import org.jboss.tools.seam.internal.core.project.facet.SeamProjectCreator;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
-import org.jboss.tools.test.util.xpl.EditorTestHelper;
/**
* Base class for facet related tests; based on the facet test class found in
@@ -56,8 +58,6 @@
protected static final IProjectFacetVersion javaFacesVersion;
private static final IProjectFacet seamFacet;
-
- private static final long MAX_IDLE = 30*60*1000L;
static {
seamFacet = ProjectFacetsManager.getProjectFacet("jst.seam");
@@ -171,7 +171,7 @@
fproj.installProjectFacet(javaFacesVersion, null, null);
}
- protected IFacetedProject createSeamProject(String baseProjectName, IDataModel config) throws CoreException {
+ protected IFacetedProject createSeamProject(String baseProjectName, final IDataModel config) throws CoreException {
final IFacetedProject fproj = ProjectFacetsManager.create(baseProjectName, null,
null);
@@ -183,6 +183,28 @@
assertTrue(seamProjectsSet.getActionFolder().exists());
assertTrue(seamProjectsSet.getModelFolder().exists());
+ final IProject proj = fproj.getProject();
+
+
+ ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+
+ public void run(IProgressMonitor monitor) throws CoreException {
+ String seamVersionString = config.getProperty(IFacetDataModelProperties.FACET_VERSION_STR).toString();
+ SeamVersion seamVersion = SeamVersion.parseFromString(seamVersionString);
+ SeamProjectCreator creator = null;
+ if(seamVersion == SeamVersion.SEAM_1_2) {
+ creator = new SeamProjectCreator(config, proj);
+ } else if(seamVersion == SeamVersion.SEAM_2_0) {
+ creator = new Seam2ProjectCreator(config, proj);
+ } else {
+ throw new RuntimeException("Can't get seam version from seam facet model");
+ }
+ creator.execute(monitor);
+ proj.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
+ }
+
+ },new NullProgressMonitor());
+
return fproj;
}
17 years, 3 months
JBoss Tools SVN: r10712 - trunk/birt/docs/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-07 09:48:59 -0400 (Tue, 07 Oct 2008)
New Revision: 10712
Modified:
trunk/birt/docs/en/modules/birt_designer.xml
Log:
Modified: trunk/birt/docs/en/modules/birt_designer.xml
===================================================================
--- trunk/birt/docs/en/modules/birt_designer.xml 2008-10-07 13:47:36 UTC (rev 10711)
+++ trunk/birt/docs/en/modules/birt_designer.xml 2008-10-07 13:48:59 UTC (rev 10712)
@@ -3,17 +3,33 @@
<?dbhtml filename="birtDesigner.html"?>
<chapterinfo>
<keywordset>
- <keyword>JBoss BIRT</keyword>
+ <keyword>JBoss</keyword>
<keyword>BIRT</keyword>
<keyword>BIRT Designer</keyword>
-
+ <keyword>BIRT Report Designer</keyword>
</keywordset>
</chapterinfo>
<title>BIRT Designer</title>
- <para>text here</para>
-
+ <para>There are a number of ways we can improve the report's appearance: </para>
+
+ <itemizedlist><listitem><para>Add a title to the top of the report;</para></listitem>
+
+
+
+ Add a title to the top of the report.
+ Add some color to enhance the column headings.
+ Shrink the size of the city and state columns.
+ Add some color to make the state and city group headers stand out.
+ Format the phone numbers.
+ Sort customers by name.
+ </itemizedlist>
+
+
+
+
+
<section id="birt_designer_introduction">
<title>BIRT Designer</title>
17 years, 3 months
JBoss Tools SVN: r10711 - in trunk/seam/plugins/org.jboss.tools.seam.xml.ui: src/org/jboss/tools/seam/xml/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-07 09:47:36 -0400 (Tue, 07 Oct 2008)
New Revision: 10711
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentFormLayoutData.java
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamXMLFormLayoutData.java
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/messages.properties
Log:
JBIDE-2855
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/plugin.xml 2008-10-07 13:47:16 UTC (rev 10710)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/plugin.xml 2008-10-07 13:47:36 UTC (rev 10711)
@@ -22,7 +22,7 @@
<xmlEditor
class="org.jboss.tools.jst.web.ui.editors.WebCompoundEditor"
contributorClass="org.jboss.tools.common.model.ui.texteditors.MultiPageContributor"
- entities="FileSeamComponents11,FileSeamComponents12,FileSeamComponents20,FileSeamComponent12,FileSeamComponent20"
+ entities="FileSeamComponents11,FileSeamComponents12,FileSeamComponents20,FileSeamComponents21,FileSeamComponent12,FileSeamComponent20,FileSeamComponent21"
icon="images/xstudio/editors/seam-components.gif"
name="%editors.spring-beans.name">
</xmlEditor>
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentFormLayoutData.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentFormLayoutData.java 2008-10-07 13:47:16 UTC (rev 10710)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentFormLayoutData.java 2008-10-07 13:47:36 UTC (rev 10711)
@@ -89,9 +89,27 @@
)
};
+ private final static IFormData[] COMPONENT_FILE_21_DEFINITIONS = new IFormData[] {
+ new FormData(
+ SeamXMLUIMessages.getString("SEAM_COMPONENT_FORM_LAYOUT_DATA_SEAM_COMPONENT_2_1_FILE"), //$NON-NLS-1$
+ SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
+ FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENT_FILE_21)
+ ),
+ SEAM_PROPERTY_LIST_DEFINITION,
+ new FormData(
+ SeamXMLUIMessages.getString("SEAM_COMPONENT_FORM_LAYOUT_DATA_ADVANCED"), //$NON-NLS-1$
+ SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
+ FormLayoutDataUtil.createAdvancedFormAttributeData(ENT_SEAM_COMPONENT_FILE_21)
+ )
+ };
+
final static IFormData SEAM_COMPONENT_FILE_FORM_DEFINITION = new FormData(
ENT_SEAM_COMPONENT_12, new String[]{null}, COMPONENT_FILE_12_DEFINITIONS);
final static IFormData SEAM_COMPONENT_FILE_20_FORM_DEFINITION = new FormData(
ENT_SEAM_COMPONENT_FILE_20, new String[]{null}, COMPONENT_FILE_20_DEFINITIONS);
+
+ final static IFormData SEAM_COMPONENT_FILE_21_FORM_DEFINITION = new FormData(
+ ENT_SEAM_COMPONENT_FILE_21, new String[]{null}, COMPONENT_FILE_21_DEFINITIONS);
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java 2008-10-07 13:47:16 UTC (rev 10710)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java 2008-10-07 13:47:36 UTC (rev 10711)
@@ -93,6 +93,18 @@
SEAM_IMPORT_LIST_DEFINITION
};
+ private final static IFormData[] FILE_21_DEFINITIONS = new IFormData[] {
+ new FormData(
+ "Seam Components 2.1 File",
+ SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
+ FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENTS_21)
+ ),
+ SEAM_COMPONENT_20_LIST_DEFINITION,
+ getFactoryList(ENT_SEAM_FACTORY_20),
+ getEventList(ENT_SEAM_EVENT_20),
+ SEAM_IMPORT_LIST_DEFINITION
+ };
+
final static IFormData FILE_12_FORM_DEFINITION = new FormData(
ENT_SEAM_COMPONENTS_12, new String[]{null}, FILE_12_DEFINITIONS);
@@ -102,4 +114,7 @@
final static IFormData FILE_20_FORM_DEFINITION = new FormData(
ENT_SEAM_COMPONENTS_20, new String[]{null}, FILE_20_DEFINITIONS);
+ final static IFormData FILE_21_FORM_DEFINITION = new FormData(
+ ENT_SEAM_COMPONENTS_21, new String[]{null}, FILE_21_DEFINITIONS);
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamXMLFormLayoutData.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamXMLFormLayoutData.java 2008-10-07 13:47:16 UTC (rev 10710)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamXMLFormLayoutData.java 2008-10-07 13:47:36 UTC (rev 10711)
@@ -25,8 +25,10 @@
SeamComponentsFileFormLayoutData.FILE_11_FORM_DEFINITION,
SeamComponentsFileFormLayoutData.FILE_12_FORM_DEFINITION,
SeamComponentsFileFormLayoutData.FILE_20_FORM_DEFINITION,
+ SeamComponentsFileFormLayoutData.FILE_21_FORM_DEFINITION,
SeamComponentFormLayoutData.SEAM_COMPONENT_FILE_FORM_DEFINITION,
SeamComponentFormLayoutData.SEAM_COMPONENT_FILE_20_FORM_DEFINITION,
+ SeamComponentFormLayoutData.SEAM_COMPONENT_FILE_21_FORM_DEFINITION,
SeamComponentFormLayoutData.SEAM_COMPONENT_FORM_DEFINITION,
SeamComponentFormLayoutData.SEAM_COMPONENT_20_FORM_DEFINITION,
SeamPropertyFormLayoutData.SEAM_PROPERTY_LIST_FORM_DEFINITION,
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/messages.properties 2008-10-07 13:47:16 UTC (rev 10710)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/messages.properties 2008-10-07 13:47:36 UTC (rev 10711)
@@ -16,6 +16,8 @@
SEAM_COMPONENTS_FILE_FORM_LAYOUT_DATA_EVENTS=Events
SEAM_COMPONENT_FORM_LAYOUT_DATA_SEAM_COMPONENT_1_2_FILE=Seam Component 1.2 File
SEAM_COMPONENT_FORM_LAYOUT_DATA_SEAM_COMPONENT_2_0_FILE=Seam Component 2.0 File
+SEAM_COMPONENT_FORM_LAYOUT_DATA_SEAM_COMPONENT_2_1_FILE=Seam Component 2.1 File
SEAM_COMPONENTS_FILE_FORM_LAYOUT_DATA_SEAM_COMPONENTS_11_FILE=Seam Components 1.1 File
SEAM_COMPONENTS_FILE_FORM_LAYOUT_DATA_SEAM_COMPONENTS_12_FILE=Seam Components 1.2 File
SEAM_COMPONENTS_FILE_FORM_LAYOUT_DATA_SEAM_COMPONENTS_20_FILE=Seam Components 2.0 File
+SEAM_COMPONENTS_FILE_FORM_LAYOUT_DATA_SEAM_COMPONENTS_21_FILE=Seam Components 2.1 File
17 years, 3 months
JBoss Tools SVN: r10710 - in trunk/seam/plugins/org.jboss.tools.seam.xml: schemas and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-07 09:47:16 -0400 (Tue, 07 Oct 2008)
New Revision: 10710
Added:
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/async-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/bpm-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/components-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/core-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/drools-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/framework-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/international-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/jms-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/mail-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/navigation-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/pages-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/persistence-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/remoting-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/security-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/theme-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/transaction-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/ui-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/web-2.1.xsd
trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/wicket-2.1.xsd
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-async.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-core.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-drools.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-framework.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-international.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-jms.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-mail.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-pdf.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-persistence.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-remoting.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-theme.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-transaction.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-web.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentConstants.java
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsFileLoader.java
Log:
JBIDE-2855
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-async.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-async.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-async.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -10,6 +10,7 @@
</MAPPING>
<MAPPING name="SeamSchemas">
<PAIR name="async$20" value="http://jboss.com/products/seam/async-2.0.xsd"/>
+ <PAIR name="async$21" value="http://jboss.com/products/seam/async-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -210,10 +211,15 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamAsyncPool"/>
+ <XChildEntity name="SeamAsyncQuartz"/>
+ <XChildEntity name="SeamAsyncTimer"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="Async" group="1"
kind="list" name="Async">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -8,6 +8,7 @@
<PAIR name="SeamComponents1.1" value="FileSeamComponents11"/>
<PAIR name="SeamComponents1.2" value="FileSeamComponents12"/>
<PAIR name="SeamComponents2.0" value="FileSeamComponents20"/>
+ <PAIR name="SeamComponents2.1" value="FileSeamComponents21"/>
</MAPPING>
<MAPPING name="FilteredTreeConstraints"/>
<MAPPING name="FilteredTrees"/>
@@ -412,38 +413,107 @@
<XEntityRenderer/>
<XModelAttributes/>
<XActionItem kind="list">
- <XActionItem displayName="New" group="1" kind="list" name="CreateActions">
- <XActionItem HandlerClassName="%Create%" ICON="action.empty"
- WizardClassName="%Default%" displayName="Add Simple Property..."
- kind="action" name="AddProperty">
- <EntityData EntityName="SeamProperty">
- <AttributeData AttributeName="name"/>
- <AttributeData AttributeName="value" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- <XActionItem HandlerClassName="%Create%" ICON="action.empty"
- WizardClassName="%Default%" displayName="Add List Property..."
- kind="action" name="AddListProperty">
- <EntityData EntityName="SeamPropertyList">
- <AttributeData AttributeName="name"/>
- </EntityData>
- </XActionItem>
- <XActionItem HandlerClassName="%Create%" ICON="action.empty"
- WizardClassName="%Default%" displayName="Add Map Property..."
- kind="action" name="AddMapProperty">
- <EntityData EntityName="SeamPropertyMap">
- <AttributeData AttributeName="name"/>
- </EntityData>
- </XActionItem>
- <XActionItem HIDE="always"
- HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.ShowMenuHandler"
- PROPERTIES="actionList=CreateActions" displayName="Property..."
- kind="action" name="AddAnyProperty"/>
+ <XActionItemReference entity="FileSeamComponent20"
+ name="CreateActions" path="CreateActions"/>
+ <XActionItemReference entity="FileSeamComponent20" name="Properties" path="Properties"/>
+ <XActionItem kind="list" name="VerifyActions">
+ <XActionItem kind="list" name="StaticActions"/>
</XActionItem>
- <XActionItem ICON="action.empty" kind="list" name="Properties">
- <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
- displayName="Properties..." kind="action" name="Properties"/>
- </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity
+ ImplementationLoadingClass="org.jboss.tools.seam.xml.components.model.SeamComponentsFileLoader"
+ ImplementingClass="org.jboss.tools.seam.xml.components.model.FileSeamComponentsImpl"
+ ObjectEditorClass="%XML%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.SeamXMLFormLayoutData"
+ XMLSUBPATH="component" name="FileSeamComponent21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamProperty"/>
+ <XChildEntity name="SeamPropertyList"/>
+ <XChildEntity name="SeamPropertyMap"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.file" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="components" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="name" xmlname="NAME"/>
+ <XModelAttribute PROPERTIES="id=true;category=general"
+ name="component-name" xmlname="name"/>
+ <XModelAttributeReference
+ attributes="class,scope,precedence,installed,auto-create,jndi-name,startup"
+ entity="SeamComponent20" name="component"/>
+ <XModelAttribute default="xml" name="extension" xmlname="EXTENSION">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ <XModelAttribute loader="ElementType" name="_lateload" visibility="false">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute default="no" name="isIncorrect" visibility="false">
+ <Constraint loader="List">
+ <value name="yes"/>
+ <value name="no"/>
+ </Constraint>
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute name="incorrectBody" visibility="false"/>
+ <XModelAttribute PROPERTIES="save=always"
+ default="http://jboss.com/products/seam/components" name="xmlns" xmlname="xmlns"/>
+ <XModelAttribute PROPERTIES="save=always"
+ default="http://www.w3.org/2001/XMLSchema-instance" name="xmlns:xsi" xmlname="xmlns:xsi"/>
+ <XModelAttribute PROPERTIES="save=always"
+ default="http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd"
+ name="xsi:schemaLocation" xmlname="xsi:schemaLocation"/>
+ <XModelAttribute name="namespaceMapping"/>
+ <XModelAttribute name="encoding">
+ <Constraint loader="ListString">
+ <value name="ISO-8859-1"/>
+ <value name="UTF-8"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=advanced"
+ default="default(false)" name="startup" xmlname="startup">
+ <Constraint loader="ListString">
+ <value name="default(false)"/>
+ <value name="true"/>
+ <value name="false"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItemReference entity="FileSeamComponent20" name="Open" path="Open"/>
+ <XActionItemReference entity="FileSeamComponent20" name="OpenWith" path="OpenWith"/>
+ <XActionItemReference entity="FileSeamComponent20" name="EditActions" path="EditActions"/>
+ <XActionItemReference entity="FileSeamComponent20" name="SaveActions" path="SaveActions"/>
+ <XActionItemReference entity="FileSeamComponent20"
+ name="CreateActions" path="CreateActions"/>
+ <XActionItemReference entity="FileSeamComponent20" name="CopyActions" path="CopyActions"/>
+ <XActionItemReference entity="FileSeamComponent20"
+ name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="FileSeamComponent20" name="Properties" path="Properties"/>
+ <XActionItemReference entity="FileSeamComponent20"
+ name="DiscardActions" path="DiscardActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity name="FileSeamComponent21_EditorActionList">
+ <XChildrenEntities/>
+ <XEntityRenderer/>
+ <XModelAttributes/>
+ <XActionItem kind="list">
+ <XActionItemReference entity="FileSeamComponent20"
+ name="CreateActions" path="CreateActions"/>
+ <XActionItemReference entity="FileSeamComponent20" name="Properties" path="Properties"/>
<XActionItem kind="list" name="VerifyActions">
<XActionItem kind="list" name="StaticActions"/>
</XActionItem>
@@ -971,42 +1041,97 @@
<XEntityRenderer/>
<XModelAttributes/>
<XActionItem kind="list">
- <XActionItem displayName="New" kind="list" name="CreateActions">
- <XActionItem HandlerClassName="%Create%"
- ICON="action.new.struts.webapp.res_ref"
- PROPERTIES="validator.add=true" WizardClassName="%Default%"
- displayName="Component..." kind="action" name="AddComponent">
- <EntityData EntityName="SeamComponent20">
- <AttributeData AttributeName="name"/>
- <AttributeData AttributeName="class" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- <XActionItem HandlerClassName="%Create%"
- ICON="action.new.struts.webapp.res_ref"
- PROPERTIES="validator.add=true" WizardClassName="%Default%"
- displayName="Factory..." kind="action" name="AddFactory">
- <EntityData EntityName="SeamFactory20">
- <AttributeData AttributeName="name"/>
- <AttributeData AttributeName="value" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- <XActionItem HandlerClassName="%Create%" ICON="action.empty"
- WizardClassName="%Default%" displayName="Event..." kind="action" name="AddEvent">
- <EntityData EntityName="SeamEvent20">
- <AttributeData AttributeName="type"/>
- </EntityData>
- </XActionItem>
- <XActionItem HandlerClassName="%Create%" ICON="action.empty"
- WizardClassName="%Default%" displayName="Import..." kind="action" name="AddImport">
- <EntityData EntityName="SeamImport">
- <AttributeData AttributeName="import"/>
- </EntityData>
- </XActionItem>
+ <XActionItemReference entity="FileSeamComponents20"
+ name="CreateActions" path="CreateActions"/>
+ <XActionItemReference entity="FileSeamComponents20" name="Properties" path="Properties"/>
+ <XActionItem kind="list" name="VerifyActions">
+ <XActionItem kind="list" name="StaticActions"/>
</XActionItem>
- <XActionItem ICON="action.empty" kind="list" name="Properties">
- <XActionItem HIDE="always" HandlerClassName="%Properties%"
- ICON="action.empty" displayName="Properties..." kind="action" name="Properties"/>
- </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity
+ ImplementationLoadingClass="org.jboss.tools.seam.xml.components.model.SeamComponentsFileLoader"
+ ImplementingClass="org.jboss.tools.seam.xml.components.model.FileSeamComponentsImpl"
+ ObjectEditorClass="%XML%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.SeamXMLFormLayoutData"
+ XMLSUBPATH="components" name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamComponent20"/>
+ <XChildEntity name="SeamFactory20"/>
+ <XChildEntity name="SeamEvent20"/>
+ <XChildEntity name="SeamImport"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.seam.file" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="components" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="name" xmlname="NAME"/>
+ <XModelAttribute default="xml" name="extension" xmlname="EXTENSION">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ <XModelAttribute loader="ElementType" name="_lateload" visibility="false">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute default="no" name="isIncorrect" visibility="false">
+ <Constraint loader="List">
+ <value name="yes"/>
+ <value name="no"/>
+ </Constraint>
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute name="incorrectBody" visibility="false"/>
+ <XModelAttribute PROPERTIES="save=always"
+ default="http://jboss.com/products/seam/components" name="xmlns" xmlname="xmlns"/>
+ <XModelAttribute PROPERTIES="save=always"
+ default="http://www.w3.org/2001/XMLSchema-instance" name="xmlns:xsi" xmlname="xmlns:xsi"/>
+ <XModelAttribute PROPERTIES="save=always"
+ default="http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd"
+ name="xsi:schemaLocation" xmlname="xsi:schemaLocation"/>
+ <XModelAttribute name="namespaceMapping"/>
+ <XModelAttribute name="encoding">
+ <Constraint loader="ListString">
+ <value name="ISO-8859-1"/>
+ <value name="UTF-8"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItemReference entity="FileSeamComponents20" name="Open" path="Open"/>
+ <XActionItemReference entity="FileSeamComponents20" name="OpenWith" path="OpenWith"/>
+ <XActionItemReference entity="FileSeamComponents20"
+ name="EditActions" path="EditActions"/>
+ <XActionItemReference entity="FileSeamComponents20"
+ name="SaveActions" path="SaveActions"/>
+ <XActionItemReference entity="FileSeamComponents20"
+ name="CreateActions" path="CreateActions"/>
+ <XActionItemReference entity="FileSeamComponents20"
+ name="CopyActions" path="CopyActions"/>
+ <XActionItemReference entity="FileSeamComponents20"
+ name="DeleteActions" path="DeleteActions"/>
+ <XActionItemReference entity="FileSeamComponents20" name="Properties" path="Properties"/>
+ <XActionItemReference entity="FileSeamComponents20"
+ name="DiscardActions" path="DiscardActions"/>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity name="FileSeamComponents21_EditorActionList">
+ <XChildrenEntities/>
+ <XEntityRenderer/>
+ <XModelAttributes/>
+ <XActionItem kind="list">
+ <XActionItemReference entity="FileSeamComponents21"
+ name="CreateActions" path="CreateActions"/>
+ <XActionItemReference entity="FileSeamComponents21" name="Properties" path="Properties"/>
<XActionItem kind="list" name="VerifyActions">
<XActionItem kind="list" name="StaticActions"/>
</XActionItem>
@@ -1857,6 +1982,8 @@
<XChildEntity name="FileSeamComponent12"/>
<XChildEntity name="FileSeamComponents20"/>
<XChildEntity name="FileSeamComponent20"/>
+ <XChildEntity name="FileSeamComponents21"/>
+ <XChildEntity name="FileSeamComponent21"/>
</XChildrenEntities>
<XActionItem kind="list">
<XActionItem ICON="action.empty" displayName="New" group="1"
@@ -1891,6 +2018,8 @@
<XChildEntity name="FileSeamComponent12"/>
<XChildEntity name="FileSeamComponents20"/>
<XChildEntity name="FileSeamComponent20"/>
+ <XChildEntity name="FileSeamComponents21"/>
+ <XChildEntity name="FileSeamComponent21"/>
</XChildrenEntities>
<XActionItem kind="list">
<XActionItem ICON="action.empty" displayName="New" group="1"
@@ -1925,6 +2054,8 @@
<XChildEntity name="FileSeamComponent12"/>
<XChildEntity name="FileSeamComponents20"/>
<XChildEntity name="FileSeamComponent20"/>
+ <XChildEntity name="FileSeamComponents21"/>
+ <XChildEntity name="FileSeamComponent21"/>
</XChildrenEntities>
<XActionItem kind="list"/>
</XEntityExtension>
@@ -1935,6 +2066,8 @@
<XChildEntity name="FileSeamComponent12"/>
<XChildEntity name="FileSeamComponents20"/>
<XChildEntity name="FileSeamComponent20"/>
+ <XChildEntity name="FileSeamComponents21"/>
+ <XChildEntity name="FileSeamComponent21"/>
</XChildrenEntities>
<XActionItem kind="list"/>
</XEntityExtension>
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-core.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-core.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-core.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -11,8 +11,10 @@
</MAPPING>
<MAPPING name="SeamSchemas">
<PAIR name="bpm$20" value="http://jboss.com/products/seam/bpm-2.0.xsd"/>
+ <PAIR name="bpm$21" value="http://jboss.com/products/seam/bpm-2.1.xsd"/>
<PAIR name="core" value="http://jboss.com/products/seam/core-1.2.xsd"/>
<PAIR name="core$20" value="http://jboss.com/products/seam/core-2.0.xsd"/>
+ <PAIR name="core$21" value="http://jboss.com/products/seam/core-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -1887,10 +1889,18 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamCoreInit20"/>
+ <XChildEntity name="SeamCoreManager"/>
+ <XChildEntity name="SeamCorePojoCache"/>
+ <XChildEntity name="SeamCoreResourceLoader20"/>
+ <XChildEntity name="SeamBPMActor20"/>
+ <XChildEntity name="SeamBPMJBPM20"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="Core" group="1"
kind="list" name="Core">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-drools.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-drools.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-drools.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -11,6 +11,7 @@
<MAPPING name="SeamSchemas">
<PAIR name="drools" value="http://jboss.com/products/seam/drools-1.2.xsd"/>
<PAIR name="drools$20" value="http://jboss.com/products/seam/drools-2.0.xsd"/>
+ <PAIR name="drools$21" value="http://jboss.com/products/seam/drools-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -328,10 +329,15 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamDroolsManagedWorkingMemory"/>
+ <XChildEntity name="SeamDroolsRuleBase"/>
+ <XChildEntity name="SeamDroolsRuleAgent"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="Drools" group="1"
kind="list" name="Drools">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-framework.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-framework.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-framework.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -11,6 +11,7 @@
<MAPPING name="SeamSchemas">
<PAIR name="framework" value="http://jboss.com/products/seam/framework-1.2.xsd"/>
<PAIR name="framework$20" value="http://jboss.com/products/seam/framework-2.0.xsd"/>
+ <PAIR name="framework$21" value="http://jboss.com/products/seam/framework-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -600,10 +601,16 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamFrameworkEntityQuery"/>
+ <XChildEntity name="SeamFrameworkHibernateEntityQuery"/>
+ <XChildEntity name="SeamFrameworkEntityHome"/>
+ <XChildEntity name="SeamFrameworkHibernateEntityHome"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="Framework" group="1"
kind="list" name="Framework">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-international.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-international.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-international.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -10,6 +10,7 @@
</MAPPING>
<MAPPING name="SeamSchemas">
<PAIR name="international$20" value="http://jboss.com/products/seam/international-2.0.xsd"/>
+ <PAIR name="international$21" value="http://jboss.com/products/seam/international-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -167,10 +168,14 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamCoreLocaleSelector20"/>
+ <XChildEntity name="SeamCoreTimeZoneSelector20"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="International"
group="1" kind="list" name="International">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-jms.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-jms.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-jms.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -11,6 +11,7 @@
<MAPPING name="SeamSchemas">
<PAIR name="jms" value="http://jboss.com/products/seam/jms-1.2.xsd"/>
<PAIR name="jms$20" value="http://jboss.com/products/seam/jms-2.0.xsd"/>
+ <PAIR name="jms$21" value="http://jboss.com/products/seam/jms-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -352,11 +353,15 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamJmsQueueConnection"/>
+ <XChildEntity name="SeamJmsTopicConnection"/>
+ <XChildEntity name="SeamJmsTopicPublisher"/>
+ <XChildEntity name="SeamJmsQueueSender"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" group="1"
- kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="JMS" group="1"
kind="list" name="JMS">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-mail.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-mail.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-mail.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -11,6 +11,7 @@
<MAPPING name="SeamSchemas">
<PAIR name="mail" value="http://jboss.com/products/seam/mail-1.2.xsd"/>
<PAIR name="mail$20" value="http://jboss.com/products/seam/mail-2.0.xsd"/>
+ <PAIR name="mail$21" value="http://jboss.com/products/seam/mail-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -409,10 +410,15 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamMailSession"/>
+ <XChildEntity name="SeamMailMeldware"/>
+ <XChildEntity name="SeamMailMeldwareUser"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="Mail" group="1"
kind="list" name="Mail">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-pdf.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-pdf.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-pdf.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -11,6 +11,7 @@
<MAPPING name="SeamSchemas">
<PAIR name="pdf" value="http://jboss.com/products/seam/pdf-1.2.xsd"/>
<PAIR name="pdf$20" value="http://jboss.com/products/seam/pdf-2.0.xsd"/>
+ <PAIR name="pdf$21" value="http://jboss.com/products/seam/pdf-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -209,10 +210,14 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamPdfDocumentStore"/>
+ <XChildEntity name="SeamPdfKeyStoreConfig"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="Pdf" group="1"
kind="list" name="Pdf">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-persistence.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-persistence.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-persistence.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -10,6 +10,7 @@
</MAPPING>
<MAPPING name="SeamSchemas">
<PAIR name="persistence$20" value="http://jboss.com/products/seam/persistence-2.0.xsd"/>
+ <PAIR name="persistence$21" value="http://jboss.com/products/seam/persistence-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -858,15 +859,22 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamPersistenceManagedContext"/>
+ <XChildEntity name="SeamPersistenceEntityManagerFactory"/>
+ <XChildEntity name="SeamPersistenceFilter"/>
+ <XChildEntity name="SeamPersistenceManagedHibernateSession"/>
+ <XChildEntity name="SeamPersistenceHibernateSessionFactory"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="Persistence" group="1"
kind="list" name="Persistence">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
PROPERTIES="validator.add=true" WizardClassName="%Default%"
- displayName="Managed Persistence Context..." kind="action" name="SeamPersistenceManagedContext">
+ displayName="Managed Persistence Context..." kind="action" name="AddManagedPersistenceContext">
<EntityData EntityName="SeamPersistenceManagedContext">
<AttributeData AttributeName="name"/>
<AttributeData AttributeName="persistence-unit-jndi-name" Mandatory="no"/>
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-remoting.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-remoting.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-remoting.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -11,6 +11,7 @@
<MAPPING name="SeamSchemas">
<PAIR name="remoting" value="http://jboss.com/products/seam/remoting-1.2.xsd"/>
<PAIR name="remoting$20" value="http://jboss.com/products/seam/remoting-2.0.xsd"/>
+ <PAIR name="remoting$21" value="http://jboss.com/products/seam/remoting-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -206,10 +207,13 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamRemotingConfig20"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="Remoting" group="1"
kind="list" name="Remoting">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-theme.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-theme.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-theme.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -11,6 +11,7 @@
<MAPPING name="SeamSchemas">
<PAIR name="theme" value="http://jboss.com/products/seam/theme-1.2.xsd"/>
<PAIR name="theme$20" value="http://jboss.com/products/seam/theme-2.0.xsd"/>
+ <PAIR name="theme$21" value="http://jboss.com/products/seam/theme-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -260,10 +261,13 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamThemeSelector20"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="Theme" group="1"
kind="list" name="Theme">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-transaction.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-transaction.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-transaction.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -10,6 +10,7 @@
</MAPPING>
<MAPPING name="SeamSchemas">
<PAIR name="transaction$20" value="http://jboss.com/products/seam/transaction-2.0.xsd"/>
+ <PAIR name="transaction$21" value="http://jboss.com/products/seam/transaction-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -262,10 +263,16 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamTransactionEjb"/>
+ <XChildEntity name="SeamTransactionEntity"/>
+ <XChildEntity name="SeamTransactionHibernate"/>
+ <XChildEntity name="SeamNoTransaction"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="Transaction" group="1"
kind="list" name="Transaction">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-web.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-web.meta 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-web.meta 2008-10-07 13:47:16 UTC (rev 10710)
@@ -11,6 +11,7 @@
<MAPPING name="SeamSchemas">
<PAIR name="web" value="http://jboss.com/products/seam/web-1.2.xsd"/>
<PAIR name="web$20" value="http://jboss.com/products/seam/web-2.0.xsd"/>
+ <PAIR name="web$21" value="http://jboss.com/products/seam/web-2.1.xsd"/>
</MAPPING>
</MAPPINGS>
<ICONS>
@@ -745,10 +746,21 @@
</XActionItem>
</XActionItem>
</XEntityExtension>
- <XEntityExtension name="FileSeamComponents20_EditorActionList">
- <XChildrenEntities/>
+ <XEntityExtension name="FileSeamComponents21">
+ <XChildrenEntities>
+ <XChildEntity name="SeamWebContextFilter20"/>
+ <XChildEntity name="SeamWebExceptionFilter20"/>
+ <XChildEntity name="SeamWebMultipartFilter20"/>
+ <XChildEntity name="SeamWebRedirectFilter20"/>
+ <XChildEntity name="SeamWebAuthenticationFilter20"/>
+ <XChildEntity name="SeamWebCharacterFilter20"/>
+ <XChildEntity name="SeamWebAjaxFilter20"/>
+ <XChildEntity name="SeamWebLoggingFilter20"/>
+ <XChildEntity name="SeamWebServletSession20"/>
+ </XChildrenEntities>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
<XActionItem ICON="action.empty" displayName="Web" group="1"
kind="list" name="Web">
<XActionItem HandlerClassName="%Create%" ICON="action.empty"
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/async-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/async-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/async-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/async" xmlns:async="http://jboss.com/products/seam/async"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="timer-service-dispatcher">
+ <xs:annotation>
+ <xs:documentation></xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="components:attlist.ejbcomponent"/>
+ <xs:attributeGroup ref="async:attlist.timerServiceDispatcher"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.timerServiceDispatcher" />
+
+ <xs:element name="quartz-dispatcher">
+ <xs:annotation>
+ <xs:documentation></xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="async:attlist.quartzDispatcher"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.quartzDispatcher"> </xs:attributeGroup>
+
+ <xs:element name="thread-pool-dispatcher">
+ <xs:annotation>
+ <xs:documentation></xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="async:attlist.threadPoolDispatcher"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.threadPoolDispatcher">
+ <xs:attribute name="thread-pool-size" type="components:int"/>
+ </xs:attributeGroup>
+
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/bpm-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/bpm-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/bpm-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/bpm" xmlns:bpm="http://jboss.com/products/seam/bpm"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="actor">
+ <xs:annotation>
+ <xs:documentation>The jbpm actor id</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element minOccurs="0" maxOccurs="1" ref="bpm:id"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="bpm:group-actor-ids"/>
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="bpm:attlist.actor"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="id" type="xs:string"/>
+ <xs:element name="group-actor-ids" type="components:multiValuedProperty"/>
+ <xs:attributeGroup name="attlist.actor">
+ <xs:attribute name="group-actor-ids" type="components:string" />
+ </xs:attributeGroup>
+
+ <xs:element name="jbpm">
+ <xs:annotation>
+ <xs:documentation>Configuration for jbpm</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="process-definitions" type="components:multiValuedProperty">
+ <xs:annotation>
+ <xs:documentation>A list of jbpm process files</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="pageflow-definitions" type="components:multiValuedProperty"/>
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attributeGroup ref="bpm:attlist.jbpm" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.jbpm" />
+
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/components-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/components-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/components-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,357 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/components"
+ xmlns:components="http://jboss.com/products/seam/components">
+ <xs:annotation>
+ <xs:documentation>
+ The top-level schema for a Seam components.xml. For more information on Seam, see
+ http://www.seamframework.org.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:element name="components">
+ <xs:annotation>
+ <xs:documentation> The components tag is a the root element for a components.xml containing multiples
+ component definitions. </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="components:component"/>
+ <xs:element ref="components:factory"/>
+ <xs:element ref="components:event"/>
+ <xs:element ref="components:import"/>
+ <xs:any namespace="##other" processContents="strict"/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="component">
+ <xs:annotation>
+ <xs:documentation> The component tag defines a single Seam component. It may serve as to the root element of
+ a fine-grained *.component.xml file. </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="components:property"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="components:attlist.ejbcomponent"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="import" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ The import tag declares additional global component namespaces that will be in effect for
+ all components.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.ejbcomponent">
+ <xs:attribute name="jndi-name" type="components:string">
+ <xs:annotation>
+ <xs:documentation>
+ The JNDI name used to lookup the component. This value is only used with EJB
+ components that don't follow the global JNDI pattern.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.component">
+ <xs:attribute name="name" type="components:componentName">
+ <xs:annotation>
+ <xs:documentation>The name of component</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="class" type="components:componentName">
+ <xs:annotation>
+ <xs:documentation>The Java class of the component implementation</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="scope">
+ <xs:annotation>
+ <xs:documentation>The scope of the component</xs:documentation>
+ </xs:annotation>
+
+ <xs:simpleType>
+ <xs:union memberTypes="components:scopeType components:expressionType"></xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="precedence" default="20">
+ <xs:annotation>
+ <xs:documentation>
+ The precedence of the component, expressed as a positive integer. Higher
+ precedence components override lower precedence components. The pre-definied precedence
+ values are:
+
+ BUILT_IN = 0,
+ FRAMEWORK = 10,
+ APPLICATION = 20,
+ DEPLOYMENT = 30,
+ MOCK = 40
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:nonNegativeInteger components:precedenceType components:expressionType"></xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="installed" default="true" type="components:boolean">
+ <xs:annotation>
+ <xs:documentation>
+ The installed value indicates whether or not the component definition should be installed.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="auto-create" default="false" type="components:boolean">
+ <xs:annotation>
+ <xs:documentation>
+ Indicates whether or not a components instance should be created when
+ one doesn't exist and when the component is requested using a method that
+ would not normally instantiate a new instance. (such as basic injection)
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="startup" default="false" type="components:boolean">
+ <xs:annotation>
+ <xs:documentation>
+ Indicates that an instance of the component should be created when the
+ the component's controlling scope starts. This is only used for application and
+ session scope.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="startupDepends" type="components:string">
+ <xs:annotation>
+ <xs:documentation>
+ A list of component names that this component depends on and that should be created before
+ this component is started.
+ </xs:documentation>
+ </xs:annotation></xs:attribute>
+ </xs:attributeGroup>
+
+ <xs:element name="factory">
+ <xs:annotation>
+ <xs:documentation>
+ Factories are like a component instances except their values are
+ determined by computing a value or calling a method on another
+ component.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="components:attlist.factory"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.factory">
+ <xs:attribute name="name" use="required">
+ <xs:annotation>
+ <xs:documentation>The name of the factory component</xs:documentation>
+ </xs:annotation></xs:attribute>
+
+ <xs:attribute name="method">
+ <xs:annotation>
+ <xs:documentation>
+ The method binding used to evauluate the factory value. A factory should have either
+ a method binding or a value binding, but not both.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="value">
+ <xs:annotation>
+ <xs:documentation>
+ The value binding used to evauluate the factory value. A factory should have either
+ a method binding or a value binding, but not both.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="scope">
+ <xs:annotation>
+ <xs:documentation>The scope of the factory value</xs:documentation>
+ </xs:annotation>
+
+ <xs:simpleType>
+ <xs:union memberTypes="components:scopeType components:expressionType"></xs:union>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="auto-create" default="false" type="components:boolean">
+ <xs:annotation>
+ <xs:documentation>
+ Indicates whether or not the factory value should be created when
+ one doesn't exist and when the component is requested using a method that
+ would not normally instantiate a new instance. (such as basic injection)
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:attributeGroup>
+
+
+ <xs:element name="property">
+ <xs:annotation>
+ <xs:documentation>
+ A generic property. The body contains the value or values.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="components:key" />
+ <xs:element ref="components:value" />
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.property"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.property">
+ <xs:attribute name="name" use="required" type="components:string">
+ <xs:annotation>
+ <xs:documentation>The property name</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:attributeGroup>
+
+
+ <xs:element name="key" type="components:string">
+ <xs:annotation>
+ <xs:documentation>For map values, the key for the following value</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:element name="value" type="components:string">
+ <xs:annotation>
+ <xs:documentation>
+ For list values, the value to be added.
+ For map values, the value for the preceding key
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:complexType name="multiValuedProperty">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="components:value"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="mapProperty">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="components:key"/>
+ <xs:element ref="components:value"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="event">
+ <xs:annotation>
+ <xs:documentation>An event handler definition</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="components:action"/>
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.event"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.event">
+ <xs:attribute name="type" use="required" type="components:componentNameType" >
+ <xs:annotation>
+ <xs:documentation>The event type to handle</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:attributeGroup>
+
+ <xs:element name="action">
+ <xs:annotation>
+ <xs:documentation>The action to be taken when the event occurs</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="components:attlist.action"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.action">
+ <xs:attribute name="execute" use="required" type="components:elType">
+ <xs:annotation>
+ <xs:documentation>An EL expression to be invoked when the event is invoked</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:attributeGroup>
+
+ <xs:simpleType name="propertyType">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="@.+@"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="elType">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="\#\{.+\}"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <!-- place holder - need something more expressive -->
+ <xs:simpleType name="componentNameType">
+ <xs:restriction base="xs:string">
+ <xs:minLength value="1" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="expressionType">
+ <xs:union memberTypes="components:elType components:propertyType"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="boolean">
+ <xs:union memberTypes="xs:boolean components:expressionType"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="string">
+ <xs:union memberTypes="xs:string components:expressionType"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="int">
+ <xs:union memberTypes="xs:int components:expressionType"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="componentName">
+ <xs:union memberTypes="components:componentNameType components:expressionType" />
+ </xs:simpleType>
+
+ <xs:simpleType name="scopeType">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="stateless"/>
+ <xs:enumeration value="event"/>
+ <xs:enumeration value="page"/>
+ <xs:enumeration value="conversation"/>
+ <xs:enumeration value="session"/>
+ <xs:enumeration value="business_process"/>
+ <xs:enumeration value="application"/>
+ <xs:enumeration value="STATELESS"/>
+ <xs:enumeration value="EVENT"/>
+ <xs:enumeration value="PAGE"/>
+ <xs:enumeration value="CONVERSATION"/>
+ <xs:enumeration value="SESSION"/>
+ <xs:enumeration value="BUSINESS_PROCESS"/>
+ <xs:enumeration value="APPLICATION"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="precedenceType">
+ <xs:restriction base="xs:int">
+ <xs:enumeration value="0"/>
+ <xs:enumeration value="10"/>
+ <xs:enumeration value="20"/>
+ <xs:enumeration value="30"/>
+ <xs:enumeration value="40"/>
+ </xs:restriction>
+ </xs:simpleType>
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/core-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/core-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/core-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/core" xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:annotation>
+ <xs:documentation>The core Seam components</xs:documentation>
+ </xs:annotation>
+
+ <xs:element name="init">
+ <xs:annotation>
+ <xs:documentation>A Seam component that holds Seam configuration settings</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="interceptors" type="components:multiValuedProperty">
+ <xs:annotation>
+ <xs:documentation>A list of interceptors that should be enabled for all components. You must specify all built-in interceptors as well as any extras interceptors.
+
+These interceptors are enabled by default:
+ org.jboss.seam.core.SynchronizationInterceptor
+ org.jboss.seam.async.AsynchronousInterceptor
+ org.jboss.seam.ejb.RemoveInterceptor
+ org.jboss.seam.persistence.HibernateSessionProxyInterceptor
+ org.jboss.seam.persistence.EntityManagerProxyInterceptor
+ org.jboss.seam.core.MethodContextInterceptor
+ org.jboss.seam.core.EventInterceptor
+ org.jboss.seam.core.ConversationalInterceptor
+ org.jboss.seam.bpm.BusinessProcessInterceptor
+ org.jboss.seam.core.ConversationInterceptor
+ org.jboss.seam.core.BijectionInterceptor
+ org.jboss.seam.transaction.RollbackInterceptor
+ org.jboss.seam.transaction.TransactionInterceptor
+ org.jboss.seam.webservice.WSSecurityInterceptor
+ org.jboss.seam.security.SecurityInterceptor</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="core:attlist.init"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.init">
+ <xs:attribute name="debug" type="components:boolean" />
+ <xs:attribute name="jndi-pattern" type="components:string" />
+ <xs:attribute name="transaction-management-enabled" type="components:boolean"/>
+ <xs:attribute name="user-transaction-name" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="manager">
+ <xs:annotation>
+ <xs:documentation>The Seam conversation manager</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="core:attlist.manager"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.manager">
+ <xs:attribute name="concurrent-request-timeout" type="components:int"/>
+ <xs:attribute name="conversation-timeout" type="components:int"/>
+ <xs:attribute name="conversation-id-parameter" type="components:string"/>
+ <xs:attribute name="parent-conversation-id-parameter" type="components:string"/>
+ <xs:attribute name="uri-encoding" type="components:string" />
+ <xs:attribute name="default-flush-mode">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="MANUAL"/>
+ <xs:enumeration value="AUTO"/>
+ <xs:enumeration value="COMMIT"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+
+ <xs:element name="resource-loader">
+ <xs:annotation>
+ <xs:documentation>Access to application resources and resource bundles</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="bundle-names" type="components:multiValuedProperty">
+ <xs:annotation>
+ <xs:documentation>A list of resource bundle names</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="core:attlist.resourceLoader"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.resourceLoader">
+ <xs:attribute name="bundle-names" type="components:string" />
+ </xs:attributeGroup>
+
+ <xs:element name="pojo-cache">
+ <xs:annotation>
+ <xs:documentation>Integration with JBoss Cache</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="core:attlist.pojoCache"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.pojoCache">
+ <xs:attribute name="cfg-resource-name" type="components:string" />
+ </xs:attributeGroup>
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/drools-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/drools-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/drools-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/drools" xmlns:drools="http://jboss.com/products/seam/drools"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="rule-base">
+ <xs:annotation>
+ <xs:documentation>A drools rule base</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element minOccurs="0" maxOccurs="1" ref="drools:rule-files"/>
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="drools:attlist.RuleBase"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="rule-files" type="components:multiValuedProperty"/>
+ <xs:attributeGroup name="attlist.RuleBase">
+ <xs:attribute name="dsl-file" type="components:string"/>
+ <xs:attribute name="rule-files" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="rule-agent">
+ <xs:annotation>
+ <xs:documentation>A drools BRMS configuration</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attributeGroup ref="drools:attlist.RuleAgent" />
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.RuleAgent">
+ <xs:attribute name="configuration-file" type="components:string" />
+ <xs:attribute name="config-name" type="components:string" />
+ <xs:attribute name="new-instance" type="components:string" />
+ <xs:attribute name="files" type="components:string" />
+ <xs:attribute name="url" type="components:string" />
+ <xs:attribute name="local-cache-dir" type="components:string" />
+ <xs:attribute name="poll" type="components:string" />
+ </xs:attributeGroup>
+
+ <xs:element name="managed-working-memory">
+ <xs:annotation>
+ <xs:documentation>A working memory for rules calculations</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="drools:attlist.ManagedWorkingMemory"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.ManagedWorkingMemory">
+ <xs:attribute name="rule-base" type="components:expressionType"/>
+ </xs:attributeGroup>
+
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/framework-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/framework-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/framework-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/framework"
+ xmlns:framework="http://jboss.com/products/seam/framework"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="entity-query">
+ <xs:annotation>
+ <xs:documentation>A query controller for JPA queries</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:ejbql"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:order"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:restrictions"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:group-by"/>
+ <xs:element minOccurs="0" maxOccurs="1" name="hints" type="components:mapProperty" />
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="framework:attlist.Query"/>
+ <xs:attributeGroup ref="framework:attlist.entityQuery"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.entityQuery">
+ <xs:attribute name="entity-manager" type="xs:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="hibernate-entity-query">
+ <xs:annotation>
+ <xs:documentation>A query controller for Hibernate queries</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:ejbql"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:order"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:restrictions"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:group-by"/>
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="framework:attlist.Query"/>
+ <xs:attributeGroup ref="framework:attlist.HibernateEntityQuery"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.HibernateEntityQuery">
+ <xs:attribute name="cacheable" type="components:boolean" />
+ <xs:attribute name="cache-region" type="components:string"/>
+ <xs:attribute name="fetch-size" type="components:int"/>
+ <xs:attribute name="session" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.Query">
+ <xs:attribute name="ejbql" type="components:string">
+ <xs:annotation>
+ <xs:documentation>The base query</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="max-results" type="components:int">
+ <xs:annotation>
+ <xs:documentation>The query page size</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="order" type="components:string">
+ <xs:annotation>
+ <xs:documentation>The property to order results by</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="group-by" type="components:string">
+ <xs:annotation>
+ <xs:documentation>The group-by clause</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:attributeGroup>
+
+ <xs:element name="ejbql" type="components:string">
+ <xs:annotation>
+ <xs:documentation>The base query</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="order" type="components:string">
+ <xs:annotation>
+ <xs:documentation>The property to order results by</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="group-by" type="components:string">
+ <xs:annotation>
+ <xs:documentation>The group-by clause</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:element name="restrictions" type="components:multiValuedProperty">
+ <xs:annotation>
+ <xs:documentation>Query restrictions (the WHERE clause)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+
+
+
+ <xs:element name="entity-home">
+ <xs:annotation>
+ <xs:documentation>A home controller for JPA entities</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="id" type="xs:string"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:created-message"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:updated-message"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:deleted-message"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:new-instance"/>
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="framework:attlist.Home"/>
+ <xs:attributeGroup ref="framework:attlist.EntityHome"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.EntityHome">
+ <xs:attribute name="entity-manager" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="hibernate-entity-home">
+ <xs:annotation>
+ <xs:documentation>A home controller for Hibernate entities</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="id" type="xs:string"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:created-message"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:updated-message"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:deleted-message"/>
+ <xs:element minOccurs="0" maxOccurs="1" ref="framework:new-instance"/>
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="framework:attlist.Home"/>
+ <xs:attributeGroup ref="framework:attlist.HibernateEntityHome"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.HibernateEntityHome">
+ <xs:attribute name="session" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.Home">
+ <xs:attribute name="entity-class" type="components:string"/>
+ <xs:attribute name="new-instance" type="components:expressionType"/>
+ <xs:attribute name="created-message" type="components:string"/>
+ <xs:attribute name="updated-message" type="components:string"/>
+ <xs:attribute name="deleted-message" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="created-message" type="components:string">
+ <xs:annotation>
+ <xs:documentation>A faces message added when the home controller creates a new instance</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="updated-message" type="components:string">
+ <xs:annotation>
+ <xs:documentation>A faces message added when the home controller updates an instance</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="deleted-message" type="components:string">
+ <xs:annotation>
+ <xs:documentation>A faces message added when the home controller deletes an instance</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="new-instance" type="components:expressionType">
+ <xs:annotation>
+ <xs:documentation>The new instance managed by a home controller</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/international-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/international-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/international-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/international" xmlns:international="http://jboss.com/products/seam/international"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="locale-config">
+ <xs:annotation>
+ <xs:documentation>
+ Locale configuration component. An alternative to configuring
+ the locale in the JSF configuration file.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="1">
+ <xs:element name="supported-locales" type="components:multiValuedProperty"/>
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="international:attlist.localeConfig"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.localeConfig">
+ <xs:attribute name="default-locale" type="components:string"/>
+ <xs:attribute name="supported-locales" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="locale-selector">
+ <xs:annotation>
+ <xs:documentation>The locale selector component</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="international:attlist.localeSelector"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.localeSelector">
+ <xs:attribute name="locale-string" type="components:string" />
+ <xs:attribute name="cookie-max-age" type="components:int" />
+ <xs:attribute name="cookie-enabled" type="components:boolean" />
+ </xs:attributeGroup>
+
+ <xs:element name="time-zone-selector">
+ <xs:annotation>
+ <xs:documentation>The time zone selector component</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="international:attlist.timeZoneSelector"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.timeZoneSelector">
+ <xs:attribute name="time-zone-id" type="components:string" />
+ <xs:attribute name="cookie-max-age" type="components:int" />
+ <xs:attribute name="cookie-enabled" type="components:boolean" />
+ </xs:attributeGroup>
+
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/jms-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/jms-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/jms-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/jms" xmlns:jms="http://jboss.com/products/seam/jms"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="topic-connection">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="jms:attlist.TopicConnection"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.TopicConnection">
+ <xs:attribute name="topic-connection-factory-jndi-name" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="queue-connection">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="jms:attlist.QueueConnection"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.QueueConnection">
+ <xs:attribute name="queue-connection-factory-jndi-name" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="managed-topic-publisher">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="jms:attlist.ManagedTopicPublisher"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.ManagedTopicPublisher">
+ <xs:attribute name="topic-jndi-name" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="managed-queue-sender">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="jms:attlist.ManagedQueueSender"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.ManagedQueueSender">
+ <xs:attribute name="queue-jndi-name" type="components:string"/>
+ </xs:attributeGroup>
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/mail-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/mail-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/mail-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/mail"
+ xmlns:mail="http://jboss.com/products/seam/mail"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="mail-session">
+ <xs:annotation>
+ <xs:documentation></xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attributeGroup ref="mail:attlist.mailSession" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.mailSession">
+ <xs:attribute name="username" type="components:string"/>
+ <xs:attribute name="password" type="components:string"/>
+ <xs:attribute name="host" type="components:string" default="localhost"/>
+ <xs:attribute name="port" type="components:string" />
+ <xs:attribute name="debug" type="components:string" default="false" />
+ <xs:attribute name="ssl" type="components:boolean" default="false" />
+ <xs:attribute name="tls" type="components:boolean" default="true" />
+ <xs:attribute name="session-jndi-name" type="components:string" />
+ </xs:attributeGroup>
+
+
+ <xs:element name="meldware">
+ <xs:annotation>
+ <xs:documentation></xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="users" type="components:multiValuedProperty" />
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="meldware-user">
+ <xs:annotation>
+ <xs:documentation></xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="aliases" type="components:multiValuedProperty" />
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attributeGroup ref="mail:attlist.meldwareUser" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.meldwareUser">
+ <xs:attribute name="username" type="components:string" />
+ <xs:attribute name="password" type="components:string" />
+ <xs:attribute name="administrator" type="components:boolean" default="false"/>
+ </xs:attributeGroup>
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/navigation-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/navigation-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/navigation-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/navigation" xmlns:navigation="http://jboss.com/products/seam/navigation"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="pages">
+ <xs:annotation>
+ <xs:documentation>The pages component</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="1">
+ <xs:element name="resources" type="components:multiValuedProperty">
+ <xs:annotation>
+ <xs:documentation>
+ A list of pages configuration files. Setting this value overrides the
+ default /WEB-INF/pages.xml.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="navigation:attlist.pages"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.pages">
+ <xs:attribute name="no-conversation-view-id" type="components:string" />
+ <xs:attribute name="login-view-id" type="components:string" />
+ <xs:attribute name="http-port" type="components:int" />
+ <xs:attribute name="https-port" type="components:int" />
+ </xs:attributeGroup>
+
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/pages-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/pages-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/pages-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,613 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/pages"
+ xmlns:pages="http://jboss.com/products/seam/pages">
+
+ <xs:annotation>
+ <xs:documentation>About this format ...</xs:documentation>
+ </xs:annotation>
+
+ <xs:element name="pages">
+ <xs:annotation>
+ <xs:documentation>The root of a pages.xml file</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="pages:conversation"/>
+ <xs:element ref="pages:page"/>
+ <xs:element ref="pages:exception"/>
+ </xs:choice>
+ <xs:attributeGroup ref="pages:attlist.pages"/>
+ </xs:complexType>
+ <xs:key name="conversation-key">
+ <xs:annotation>
+ <xs:documentation><p>You can read this as:</p>
+ <p>The pages element has a bunch of conversation elements, and for each of those conversation elements, they must have a unique name within this document.</p>
+ </xs:documentation>
+ </xs:annotation>
+ <xs:selector xpath="conversation"/>
+ <xs:field xpath="name"/>
+ </xs:key>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.pages">
+ <xs:attribute name="no-conversation-view-id" type="pages:view-id" />
+ <xs:attribute name="login-view-id" type="pages:view-id"/>
+ <xs:attribute name="http-port" type="xs:unsignedLong"/>
+ <xs:attribute name="https-port" type="xs:unsignedLong"/>
+ </xs:attributeGroup>
+
+ <xs:element name="exception">
+ <xs:annotation>
+ <xs:documentation>A Seam exception handler</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="pages:end-conversation"/>
+ <xs:choice>
+ <xs:element ref="pages:http-error"/>
+ <xs:element ref="pages:redirect"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attributeGroup ref="pages:attlist.exception"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.exception">
+ <xs:attribute name="class" type="xs:token"/>
+ <xs:attribute name="log" type="pages:tf-boolean"/>
+ <xs:attribute name="logLevel" type="pages:loglevel-values"/>
+ </xs:attributeGroup>
+
+ <xs:element name="conversation">
+ <xs:annotation>
+ <xs:documentation>Natural conversation configuration</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.conversation"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.conversation">
+ <xs:attribute name="name" use="required" type="xs:token" />
+ <xs:attribute name="parameter-name" use="required" type="xs:token" />
+ <xs:attribute name="parameter-value" type="xs:token" />
+ </xs:attributeGroup>
+
+ <xs:element name="page">
+ <xs:annotation>
+ <xs:documentation>Configuration for a specific page or set up pages</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="pages:restrict"/>
+ <xs:element ref="pages:description"/>
+ <xs:element ref="pages:param"/>
+ <xs:element ref="pages:header" />
+ <xs:element ref="pages:rewrite" />
+ <xs:element ref="pages:begin-conversation"/>
+ <xs:element ref="pages:end-conversation"/>
+ <xs:element ref="pages:start-task"/>
+ <xs:element ref="pages:begin-task"/>
+ <xs:element ref="pages:end-task"/>
+ <xs:element ref="pages:create-process"/>
+ <xs:element ref="pages:resume-process"/>
+ <xs:element ref="pages:in"/>
+ <xs:element ref="pages:raise-event"/>
+ <xs:element ref="pages:action"/>
+ <xs:element ref="pages:navigation"/>
+ </xs:choice>
+ <xs:attributeGroup ref="pages:attlist.page"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.page">
+ <xs:attribute name="action" type="xs:token" />
+ <xs:attribute name="view-id" type="pages:view-id"/>
+ <xs:attribute name="switch" default="enabled" type="pages:ableness"/>
+ <xs:attribute name="no-conversation-view-id" type="pages:view-id" />
+ <xs:attribute name="conversation-required" default="false" type="pages:tf-boolean"/>
+ <xs:attribute name="login-required" default="false" type="pages:tf-boolean"/>
+ <xs:attribute name="scheme" type="pages:schemes" />
+ <xs:attribute name="timeout" type="xs:unsignedLong" />
+ <xs:attribute name="concurrent-request-timeout" type="xs:unsignedLong" >
+ <xs:annotation>
+ <xs:documentation>
+ Requests to conversations are serialized by default, and if
+ a lock cannot be acquired in time, the request will be
+ dropped. You can set the timeout on a page-by-page basis
+ here.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="bundle" type="xs:token" />
+ <xs:attribute name="conversation" type="xs:token" />
+ <xs:attribute name="expires" type="xs:unsignedLong" />
+ </xs:attributeGroup>
+
+ <xs:element name="param">
+ <xs:annotation>
+ <xs:documentation>A page parameter</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.param"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.param">
+ <xs:attribute name="name" type="xs:token" />
+ <xs:attribute name="value" type="xs:token" />
+ <xs:attribute name="converter" type="xs:token" />
+ <xs:attribute name="converterId" type="xs:token" />
+ <xs:attribute name="validator" type="xs:token" />
+ <xs:attribute name="validatorId" type="xs:token" />
+ <xs:attribute name="required" type="pages:tf-boolean"/>
+ </xs:attributeGroup>
+
+ <xs:element name="header">
+ <xs:annotation>
+ <xs:documentation>HTTP headers to be added</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.header"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.header">
+ <xs:attribute name="name" use="required" type="xs:token" />
+ <xs:attribute name="value" type="xs:token" />
+ </xs:attributeGroup>
+
+ <xs:element name="rewrite">
+ <xs:annotation>
+ <xs:documentation>URL rewriting pattern for this view</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.rewrite"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.rewrite">
+ <xs:attribute name="pattern" use="required" type="xs:token" />
+ </xs:attributeGroup>
+
+ <xs:element name="action">
+ <xs:annotation>
+ <xs:documentation>Page action</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.action"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.action">
+ <xs:attribute name="if" type="pages:boolean-value-expression" />
+ <xs:attribute name="on-postback" default="true" type="pages:tf-boolean"/>
+ <xs:attribute name="execute" use="required" type="pages:method-expression" />
+ </xs:attributeGroup>
+
+ <xs:element name="restrict" type="pages:value-expression">
+ <xs:annotation>
+ <xs:documentation>Security restrictions</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:element name="navigation">
+ <xs:annotation>
+ <xs:documentation>Page navigation</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:choice maxOccurs="2">
+ <xs:sequence>
+ <xs:choice minOccurs="0">
+ <xs:element ref="pages:begin-conversation"/>
+ <xs:element ref="pages:end-conversation"/>
+ <xs:element ref="pages:start-task"/>
+ <xs:element ref="pages:begin-task"/>
+ <xs:element ref="pages:end-task"/>
+ <xs:element ref="pages:create-process"/>
+ <xs:element ref="pages:resume-process"/>
+ </xs:choice>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="pages:out"/>
+ <xs:element minOccurs="0" ref="pages:raise-event" maxOccurs="1"/>
+ <xs:choice minOccurs="0">
+ <xs:element ref="pages:render"/>
+ <xs:element ref="pages:redirect"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="pages:rule"/>
+ </xs:choice>
+ <xs:attributeGroup ref="pages:attlist.navigation"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.navigation">
+ <xs:attribute name="from-action" type="pages:method-expression" />
+ <xs:attribute name="evaluate" type="pages:method-expression" />
+ </xs:attributeGroup>
+
+ <xs:element name="rule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:choice minOccurs="0">
+ <xs:element ref="pages:begin-conversation"/>
+ <xs:element ref="pages:end-conversation"/>
+ <xs:element ref="pages:start-task"/>
+ <xs:element ref="pages:begin-task"/>
+ <xs:element ref="pages:end-task"/>
+ <xs:element ref="pages:create-process"/>
+ <xs:element ref="pages:resume-process"/>
+ </xs:choice>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="pages:out"/>
+ <xs:element minOccurs="0" ref="pages:raise-event"/>
+ <xs:choice minOccurs="0">
+ <xs:element ref="pages:render"/>
+ <xs:element ref="pages:redirect"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attributeGroup ref="pages:attlist.rule"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.rule">
+ <xs:attribute name="if-outcome" type="pages:value-expression" />
+ <xs:attribute name="if" type="pages:boolean-value-expression" />
+ </xs:attributeGroup>
+
+ <xs:element name="raise-event">
+ <xs:annotation>
+ <xs:documentation>Event to be raised</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.raise-event"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.raise-event">
+ <xs:attribute name="type" use="required" type="xs:token" />
+ </xs:attributeGroup>
+
+ <xs:element name="begin-conversation">
+ <xs:annotation>
+ <xs:documentation>This page begins a new conversation</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.begin-conversation"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.begin-conversation">
+ <xs:attribute name="join" default="false" type="pages:tf-boolean"/>
+ <xs:attribute name="nested" default="false" type="pages:tf-boolean"/>
+ <xs:attribute name="pageflow" type="xs:token" />
+ <xs:attribute name="flush-mode" type="pages:flush-modes" />
+ <xs:attribute name="if" type="pages:boolean-value-expression" />
+ <xs:attribute name="conversation" type="xs:token" />
+ </xs:attributeGroup>
+
+ <xs:element name="end-conversation">
+ <xs:annotation>
+ <xs:documentation>This page ends a conversation</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.end-conversation"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.end-conversation">
+ <xs:attribute name="before-redirect" default="false" type="pages:tf-boolean"/>
+ <xs:attribute name="root" default="false" type="pages:tf-boolean"/>
+ <xs:attribute name="if" type="pages:boolean-value-expression" />
+ </xs:attributeGroup>
+
+ <xs:element name="begin-task">
+ <xs:annotation>
+ <xs:documentation>Begin a BPM task</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.begin-task"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.begin-task">
+ <xs:attribute name="task-id" type="xs:token" />
+ <xs:attribute name="pageflow" type="xs:token" />
+ <xs:attribute name="flush-mode" type="pages:flush-modes" />
+ </xs:attributeGroup>
+
+ <xs:element name="start-task">
+ <xs:annotation>
+ <xs:documentation>Start a BPM task</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.start-task"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.start-task">
+ <xs:attribute name="task-id" type="xs:token" />
+ <xs:attribute name="pageflow" type="xs:token" />
+ <xs:attribute name="flush-mode" type="pages:flush-modes" />
+ </xs:attributeGroup>
+
+ <xs:element name="end-task">
+ <xs:annotation>
+ <xs:documentation>Add a BPM task</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.end-task"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.end-task">
+ <xs:attribute name="transition" type="xs:token" />
+ <xs:attribute name="before-redirect" default="false" type="pages:tf-boolean" />
+ </xs:attributeGroup>
+
+ <xs:element name="create-process">
+ <xs:annotation>
+ <xs:documentation>Create a BPM process</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.create-process"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.create-process">
+ <xs:attribute name="definition" type="xs:token" />
+ </xs:attributeGroup>
+
+ <xs:element name="resume-process">
+ <xs:annotation>
+ <xs:documentation>Resume a BPM process instance</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.resume-process"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.resume-process">
+ <xs:attribute name="process-id" type="xs:token" />
+ </xs:attributeGroup>
+
+ <xs:element name="in">
+ <xs:annotation>
+ <xs:documentation>A page input</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.in"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.in">
+ <xs:attribute name="name" use="required" type="xs:token" />
+ <xs:attribute name="scope" type="pages:allowed-scopes" />
+ <xs:attribute name="value" use="required" type="xs:token" />
+ </xs:attributeGroup>
+
+ <xs:element name="out">
+ <xs:annotation>
+ <xs:documentation>A contextual output for a navigation rule</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="pages:attlist.out"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.out">
+ <xs:attribute name="name" use="required" type="xs:token" />
+ <xs:attribute name="scope" default="CONVERSATION" type="pages:allowed-scopes" />
+ <xs:attribute name="value" use="required" type="xs:token" />
+ </xs:attributeGroup>
+
+ <xs:element name="render">
+ <xs:annotation>
+ <xs:documentation>Render a view</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="pages:message"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="pages:attlist.render"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.render">
+ <xs:attribute name="view-id" type="pages:view-id" />
+ </xs:attributeGroup>
+
+ <xs:element name="redirect">
+ <xs:annotation>
+ <xs:documentation>Redirect to another view or URL</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="pages:message"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="pages:param"/>
+ </xs:sequence>
+
+ <xs:attributeGroup ref="pages:attlist.redirect"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.redirect">
+ <xs:attribute name="view-id" type="pages:view-id" />
+ <xs:attribute name="url" type="pages:url" />
+ </xs:attributeGroup>
+
+ <xs:element name="http-error">
+ <xs:annotation>
+ <xs:documentation>Send an HTTP error code</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="pages:message"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="pages:attlist.http-error"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.http-error">
+ <xs:attribute name="error-code" use="required" type="xs:unsignedLong" />
+ </xs:attributeGroup>
+
+ <xs:element name="message">
+ <xs:annotation>
+ <xs:documentation>Add a message to the faces messages</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attributeGroup ref="pages:attlist.message"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.message">
+ <xs:attribute name="for" type="xs:token"/>
+ <xs:attribute name="severity" default="INFO" type="pages:loglevel-values" />
+ </xs:attributeGroup>
+
+ <xs:element name="description" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>A page description for workflow switching</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:simpleType name="url">
+ <xs:restriction base="xs:token">
+ <xs:pattern value="http://.*|https://.*"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="schemes">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="https"/>
+ <xs:enumeration value="http"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="view-id">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="(/.*)|\*"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="ableness">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="enabled"/>
+ <xs:enumeration value="disabled"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="tf-boolean">
+ <xs:annotation>
+ <xs:documentation>
+ <p>Allows for the following values:</p>
+ <ul>
+ <li>true</li>
+ <li>false</li>
+ </ul>
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:boolean">
+ <xs:pattern value="true"/>
+ <xs:pattern value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="allowed-scopes">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="stateless"/>
+ <xs:enumeration value="event"/>
+ <xs:enumeration value="page"/>
+ <xs:enumeration value="conversation"/>
+ <xs:enumeration value="session"/>
+ <xs:enumeration value="business_process"/>
+ <xs:enumeration value="application"/>
+ <xs:enumeration value="STATELESS"/>
+ <xs:enumeration value="EVENT"/>
+ <xs:enumeration value="PAGE"/>
+ <xs:enumeration value="CONVERSATION"/>
+ <xs:enumeration value="SESSION"/>
+ <xs:enumeration value="BUSINESS_PROCESS"/>
+ <xs:enumeration value="APPLICATION"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="loglevel-values">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="info"/>
+ <xs:enumeration value="warn"/>
+ <xs:enumeration value="error"/>
+ <xs:enumeration value="fatal"/>
+ <xs:enumeration value="debug"/>
+ <xs:enumeration value="trace"/>
+ <xs:enumeration value="INFO"/>
+ <xs:enumeration value="WARN"/>
+ <xs:enumeration value="ERROR"/>
+ <xs:enumeration value="FATAL"/>
+ <xs:enumeration value="DEBUG"/>
+ <xs:enumeration value="TRACE"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="http-error-codes">
+ <xs:annotation>
+ <xs:documentation><p><b>Note:</b> These do not include the HTTP extensions.</p></xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="100"/>
+ <xs:enumeration value="101"/>
+ <xs:enumeration value="200"/>
+ <xs:enumeration value="201"/>
+ <xs:enumeration value="202"/>
+ <xs:enumeration value="203"/>
+ <xs:enumeration value="204"/>
+ <xs:enumeration value="205"/>
+ <xs:enumeration value="206"/>
+ <xs:enumeration value="300"/>
+ <xs:enumeration value="301"/>
+ <xs:enumeration value="302"/>
+ <xs:enumeration value="303"/>
+ <xs:enumeration value="304"/>
+ <xs:enumeration value="305"/>
+ <xs:enumeration value="306"/>
+ <xs:enumeration value="307"/>
+ <xs:enumeration value="400"/>
+ <xs:enumeration value="401"/>
+ <xs:enumeration value="402"/>
+ <xs:enumeration value="403"/>
+ <xs:enumeration value="404"/>
+ <xs:enumeration value="405"/>
+ <xs:enumeration value="406"/>
+ <xs:enumeration value="407"/>
+ <xs:enumeration value="408"/>
+ <xs:enumeration value="409"/>
+ <xs:enumeration value="410"/>
+ <xs:enumeration value="411"/>
+ <xs:enumeration value="412"/>
+ <xs:enumeration value="413"/>
+ <xs:enumeration value="414"/>
+ <xs:enumeration value="415"/>
+ <xs:enumeration value="416"/>
+ <xs:enumeration value="417"/>
+ <xs:enumeration value="500"/>
+ <xs:enumeration value="501"/>
+ <xs:enumeration value="502"/>
+ <xs:enumeration value="503"/>
+ <xs:enumeration value="504"/>
+ <xs:enumeration value="505"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="flush-modes">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="manual"/>
+ <xs:enumeration value="auto"/>
+ <xs:enumeration value="commit"/>
+ <xs:enumeration value="MANUAL"/>
+ <xs:enumeration value="AUTO"/>
+ <xs:enumeration value="COMMIT"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="method-expression">
+ <xs:restriction base="xs:token">
+ <xs:pattern value="#\{.*\}"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="value-expression">
+ <xs:restriction base="xs:token"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="boolean-value-expression">
+ <xs:restriction base="xs:token">
+ <xs:pattern value="true|false|#\{.*\}"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/persistence-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/persistence-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/persistence-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/persistence" xmlns:persistence="http://jboss.com/products/seam/persistence"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="managed-persistence-context">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="persistence:filters"/>
+ <xs:element ref="persistence:persistence-unit-jndi-name" />
+ </xs:choice>
+ </xs:sequence>
+ <xs:attributeGroup ref="persistence:attlist.ManagedPersistenceContext"/>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.ManagedPersistenceContext">
+ <xs:attribute name="entity-manager-factory" type="components:expressionType"/>
+ <xs:attribute name="persistence-unit-jndi-name" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="managed-hibernate-session">
+ <xs:complexType mixed="true">
+ <xs:sequence minOccurs="0" maxOccurs="1">
+ <xs:element ref="persistence:filters"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="persistence:attlist.ManagedHibernateSession"/>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.ManagedHibernateSession">
+ <xs:attribute name="session-factory"/>
+ <xs:attribute name="session-factory-jndi-name"/>
+ </xs:attributeGroup>
+
+ <xs:element name="filters" type="components:multiValuedProperty"/>
+ <xs:element name="persistence-unit-jndi-name" type="components:string" />
+
+ <xs:element name="hibernate-session-factory">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="mapping-classes" type="components:multiValuedProperty"/>
+ <xs:element name="mapping-files" type="components:multiValuedProperty"/>
+ <xs:element name="mapping-jars" type="components:multiValuedProperty"/>
+ <xs:element name="mapping-packages" type="components:multiValuedProperty"/>
+ <xs:element name="mapping-resources" type="components:multiValuedProperty"/>
+ <xs:element name="naming-strategy" type="components:expressionType"/>
+ <xs:element name="cfg-properties" type="components:mapProperty"/>
+ </xs:choice>
+ <xs:attributeGroup ref="persistence:attlist.HibernateSessionFactory"/>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.HibernateSessionFactory">
+ <xs:attribute name="cfg-resource-name" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="entity-manager-factory">
+ <xs:complexType mixed="true">
+ <xs:sequence minOccurs="0" maxOccurs="1">
+ <xs:element name="persistence-unit-properties" type="components:mapProperty"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="persistence:attlist.EntityManagerFactory"/>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.EntityManagerFactory">
+ <xs:attribute name="persistence-unit-name" type="components:string" />
+ </xs:attributeGroup>
+
+ <xs:element name="filter">
+ <xs:complexType mixed="true">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="name" type="components:string"/>
+ <xs:element minOccurs="0" name="parameters" type="components:mapProperty"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="persistence:attlist.filter"/>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.filter">
+ <xs:attribute name="enabled" type="components:boolean" />
+ </xs:attributeGroup>
+
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/remoting-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/remoting-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/remoting-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/remoting" xmlns:remoting="http://jboss.com/products/seam/remoting"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="remoting">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="remoting:attlist.remoting"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.remoting">
+ <xs:attribute name="poll-interval" type="components:int"/>
+ <xs:attribute name="poll-timeout" type="components:int" />
+ <xs:attribute name="debug" type="components:boolean" />
+ </xs:attributeGroup>
+
+</xs:schema>
\ No newline at end of file
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/security-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/security-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/security-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/security" xmlns:security="http://jboss.com/products/seam/security"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="identity">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="security:attlist.identity"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="faces-security-events">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="security:attlist.faces-security-events"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.identity">
+ <xs:attribute name="authenticate-method" type="components:expressionType"/>
+ <xs:attribute name="remember-me" type="components:boolean"/>
+ <xs:attribute name="jaas-config-name" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.faces-security-events">
+ <xs:attribute name="cookie-max-age" type="components:int"/>
+ </xs:attributeGroup>
+
+ <xs:element name="identity-manager">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="security:attlist.identity-manager"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="jpa-identity-store">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="security:attlist.jpa-identity-store"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="ldap-identity-store">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="security:attlist.ldap-identity-store"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="permission-manager">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="security:attlist.permission-manager"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="jpa-permission-store">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="security:attlist.jpa-permission-store"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="rule-based-permission-resolver">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="security:attlist.rule-based-permission-resolver"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="persistent-permission-resolver">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="security:attlist.persistent-permission-resolver"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.identity-manager">
+ <xs:attribute name="identity-store" type="components:expressionType"/>
+ <xs:attribute name="role-identity-store" type="components:expressionType"/>
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.jpa-identity-store">
+ <xs:attribute name="entity-manager" type="components:string"/>
+ <xs:attribute name="user-class" type="components:string" use="required"/>
+ <xs:attribute name="role-class" type="components:string"/>
+ <xs:attribute name="features" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.ldap-identity-store">
+ <xs:attribute name="server-address" type="components:string"/>
+ <xs:attribute name="server-port" type="components:string"/>
+ <xs:attribute name="bind-DN" type="components:string"/>
+ <xs:attribute name="bind-credentials" type="components:string"/>
+ <xs:attribute name="user-DN-prefix" type="components:string"/>
+ <xs:attribute name="user-DN-suffix" type="components:string"/>
+ <xs:attribute name="role-DN-prefix" type="components:string"/>
+ <xs:attribute name="role-DN-suffix" type="components:string"/>
+ <xs:attribute name="user-context-DN" type="components:string"/>
+ <xs:attribute name="role-context-DN" type="components:string"/>
+ <xs:attribute name="user-role-attribute" type="components:string"/>
+ <xs:attribute name="user-name-attribute" type="components:string"/>
+ <xs:attribute name="role-name-attribute" type="components:string"/>
+ <xs:attribute name="role-attribute-is-DN" type="components:boolean"/>
+ <xs:attribute name="user-object-classes" type="components:string"/>
+ <xs:attribute name="role-object-classes" type="components:string"/>
+ <xs:attribute name="enabled-attribute" type="components:string"/>
+ <xs:attribute name="search-scope" type="components:string"/>
+ <xs:attribute name="first-name-attribute" type="components:string"/>
+ <xs:attribute name="last-name-attribute" type="components:string"/>
+ <xs:attribute name="user-password-attribute" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.permission-manager">
+ <xs:attribute name="permission-store" type="components:expressionType"/>
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.jpa-permission-store">
+ <xs:attribute name="entity-manager" type="components:string"/>
+ <xs:attribute name="user-permission-class" type="components:string"/>
+ <xs:attribute name="role-permission-class" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.rule-based-permission-resolver">
+ <xs:attribute name="security-rules" type="components:expressionType"/>
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.persistent-permission-resolver">
+ <xs:attribute name="permission-store" type="components:expressionType"/>
+ </xs:attributeGroup>
+
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/theme-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/theme-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/theme-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/theme" xmlns:theme="http://jboss.com/products/seam/theme"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="theme-selector">
+ <xs:annotation>
+ <xs:documentation>Theme selector component</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="1">
+ <xs:element name="available-themes" type="components:multiValuedProperty"/>
+ </xs:choice>
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="theme:attlist.themeSelector"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.themeSelector">
+ <xs:attribute name="theme" type="components:string"/>
+ <xs:attribute name="available-themes" type="components:string"/>
+ <xs:attribute name="cookie-max-age" type="components:int"/>
+ <xs:attribute name="cookie-enabled" type="components:boolean" />
+ </xs:attributeGroup>
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/transaction-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/transaction-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/transaction-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/transaction" xmlns:transaction="http://jboss.com/products/seam/transaction"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="ejb-transaction">
+ <xs:annotation>
+ <xs:documentation></xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="components:attlist.ejbcomponent"/>
+ <xs:attributeGroup ref="transaction:attlist.transaction"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.transaction"> </xs:attributeGroup>
+
+ <xs:element name="hibernate-transaction">
+ <xs:annotation>
+ <xs:documentation></xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="transaction:attlist.HibernateTransaction"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.HibernateTransaction">
+ <xs:attribute name="session" type="components:string" use="required"/>
+ </xs:attributeGroup>
+
+ <xs:element name="entity-transaction">
+ <xs:annotation>
+ <xs:documentation></xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="transaction:attlist.EntityTransaction"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:attributeGroup name="attlist.EntityTransaction">
+ <xs:attribute name="entity-manager" type="components:string" use="required"/>
+ </xs:attributeGroup>
+
+ <xs:element name="no-transaction">
+ <xs:annotation>
+ <xs:documentation></xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/ui-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/ui-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/ui-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/ui"
+ xmlns:ui="http://jboss.com/products/seam/ui"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="jpa-entity-loader">
+ <xs:complexType>
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attribute name="entity-manager" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="hibernate-entity-loader">
+ <xs:complexType>
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attribute name="session" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="entity-converter">
+ <xs:complexType>
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attribute name="entity-loader" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/web-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/web-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/web-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/web" xmlns:web="http://jboss.com/products/seam/web"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="identity-filter">
+ <xs:annotation>
+ <xs:documentation>This filter provides integration between Servlet Security and the identity component.</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="web:attlist.filter"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="multipart-filter">
+ <xs:annotation>
+ <xs:documentation>
+ Detects multipart form requests and processes them according to the
+ multipart/form-data specification (RFC-2388).
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="web:attlist.filter"/>
+ <xs:attributeGroup ref="web:attlist.multipartFilter"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="redirect-filter">
+ <xs:annotation>
+ <xs:documentation>This filter allows Seam to propagate the conversation context across browser redirects. It intercepts any
+browser redirects and adds a request parameter that specifies the Seam conversation identifier.</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="web:attlist.filter"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="exception-filter">
+ <xs:annotation>
+ <xs:documentation>This filter provides the exception mapping functionality in pages.xml.</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="web:attlist.filter"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="context-filter">
+ <xs:annotation>
+ <xs:documentation>This filter allows custom servlets to interact with the Seam contexts. It sets up the Seam contexts at the begin-
+ning of each request, and tears them down at the end of the request.</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="web:attlist.filter"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="wicket-filter">
+ <xs:annotation>
+ <xs:documentation></xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="web:attlist.filter"/>
+ <xs:attributeGroup ref="web:attlist.wicketFilter"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="character-encoding-filter">
+ <xs:annotation>
+ <xs:documentation>Sets the character encoding of submitted form data.</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="web:attlist.filter"/>
+ <xs:attribute name="encoding" type="components:string"/>
+ <xs:attribute name="override-client" type="components:boolean"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="authentication-filter">
+ <xs:annotation>
+ <xs:documentation>Although not recommended for use unless absolutely necessary, Seam provides means for authenticating using
+either HTTP Basic or HTTP Digest (RFC 2617) methods.</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="web:attlist.filter"/>
+ <xs:attribute name="realm" type="components:string"/>
+ <xs:attribute name="key" type="components:string"/>
+ <xs:attribute name="nonce-validity-seconds" type="components:int"/>
+ <xs:attribute name="auth-type" type="components:string"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="logging-filter">
+ <xs:annotation>
+ <xs:documentation>This filter adds the authenticated user name to the log4j mapped diagnostic context so that it can be included in
+formatted log output if desired, by adding %X{username} to the pattern.</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="web:attlist.filter"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="ajax4jsf-filter">
+ <xs:annotation>
+ <xs:documentation>The ajax4jsf filter for RichFaces</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="web:attlist.filter"/>
+ <xs:attributeGroup ref="web:attlist.ajax4jsfFilter"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.filter">
+ <xs:attribute name="url-pattern" type="components:string"/>
+ <xs:attribute name="regex-url-pattern" type="components:string"/>
+ <xs:attribute name="disabled" type="components:boolean" default="false" />
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.wicketFilter">
+ <xs:attribute name="application-class" type="components:string"/>
+ <xs:attribute name="application-factory-class" type="components:string"/>
+ <xs:attribute name="detect-portlet-context" type="components:boolean" default="false" />
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.multipartFilter">
+ <xs:attribute name="create-temp-files" type="components:boolean" />
+ <xs:attribute name="max-request-size" type="components:int"/>
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="attlist.ajax4jsfFilter">
+ <xs:attribute name="enable-cache" type="components:boolean" />
+ <xs:attribute name="force-parser" type="components:boolean" />
+ <xs:attribute name="log4j-init-file" type="components:string"/>
+ </xs:attributeGroup>
+
+ <xs:element name="session">
+ <xs:complexType mixed="true">
+ <xs:attributeGroup ref="components:attlist.component"/>
+ <xs:attributeGroup ref="web:attlist.session"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.session">
+ <xs:attribute name="invalidate-on-scheme-change" type="components:boolean"/>
+ </xs:attributeGroup>
+
+</xs:schema>
Added: trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/wicket-2.1.xsd
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/wicket-2.1.xsd (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/schemas/wicket-2.1.xsd 2008-10-07 13:47:16 UTC (rev 10710)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/wicket"
+ xmlns:wicket="http://jboss.com/products/seam/wicket"
+ xmlns:components="http://jboss.com/products/seam/components" attributeFormDefault="unqualified">
+
+ <xs:import namespace="http://jboss.com/products/seam/components" schemaLocation="components-2.1.xsd"/>
+
+ <xs:element name="web-application">
+ <xs:annotation>
+ <xs:documentation></xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attributeGroup ref="components:attlist.component" />
+ <xs:attributeGroup ref="wicket:attlist.webApplication" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:attributeGroup name="attlist.webApplication">
+ <xs:attribute name="application-class" type="components:string" />
+ </xs:attributeGroup>
+
+</xs:schema>
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentConstants.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentConstants.java 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentConstants.java 2008-10-07 13:47:16 UTC (rev 10710)
@@ -15,12 +15,15 @@
public String SYSTEM_ID_11 = "http://jboss.com/products/seam/components-1.1.dtd"; //$NON-NLS-1$
public String SUFF_20 = "20"; //$NON-NLS-1$
+ public String SUFF_21 = "21"; //$NON-NLS-1$
public String ENT_SEAM_COMPONENTS = "FileSeamComponents"; //$NON-NLS-1$
public String ENT_SEAM_COMPONENTS_11 = ENT_SEAM_COMPONENTS + "11"; //$NON-NLS-1$
public String ENT_SEAM_COMPONENTS_12 = ENT_SEAM_COMPONENTS + "12"; //$NON-NLS-1$
public String ENT_SEAM_COMPONENT_12 = "FileSeamComponent" + "12"; //$NON-NLS-1$ //$NON-NLS-2$
public String ENT_SEAM_COMPONENTS_20 = ENT_SEAM_COMPONENTS + SUFF_20;
+ public String ENT_SEAM_COMPONENTS_21 = ENT_SEAM_COMPONENTS + SUFF_21;
public String ENT_SEAM_COMPONENT_FILE_20 = "FileSeamComponent" + SUFF_20; //$NON-NLS-1$
+ public String ENT_SEAM_COMPONENT_FILE_21 = "FileSeamComponent" + SUFF_21; //$NON-NLS-1$
public String ENT_SEAM_COMPONENT = "SeamComponent"; //$NON-NLS-1$
public String ENT_SEAM_COMPONENT_20 = ENT_SEAM_COMPONENT + SUFF_20;
public String ENT_SEAM_FACTORY = "SeamFactory"; //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java 2008-10-07 13:47:16 UTC (rev 10710)
@@ -55,9 +55,20 @@
//Let it work now for all 2.x versions
//If in future releases differences are essential, this should be modified
int i20 = schemaLocation.indexOf("-2."); //$NON-NLS-1$
+ int i21 = schemaLocation.indexOf("-2.1"); //$NON-NLS-1$
if(i20 >= 0) {
- if(isSingleComponent) return ENT_SEAM_COMPONENT_FILE_20;
- if(isMultiComponent(body)) return ENT_SEAM_COMPONENTS_20;
+ if(isSingleComponent) {
+ if(i21 >= 0) {
+ return ENT_SEAM_COMPONENT_FILE_21;
+ }
+ return ENT_SEAM_COMPONENT_FILE_20;
+ }
+ if(isMultiComponent(body)) {
+ if(i21 >= 0) {
+ return ENT_SEAM_COMPONENTS_21;
+ }
+ return ENT_SEAM_COMPONENTS_20;
+ }
}
return null;
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsFileLoader.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsFileLoader.java 2008-10-07 13:45:19 UTC (rev 10709)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsFileLoader.java 2008-10-07 13:47:16 UTC (rev 10710)
@@ -52,6 +52,7 @@
private String getVersionSuffix(XModelObject o) {
String entity = o.getModelEntity().getName();
if(entity.endsWith("20")) return "$20"; //$NON-NLS-1$ //$NON-NLS-2$
+ if(entity.endsWith("21")) return "$21"; //$NON-NLS-1$ //$NON-NLS-2$
return ""; //$NON-NLS-1$
}
17 years, 3 months
JBoss Tools SVN: r10709 - in trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common: model/ui/attribute/editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-07 09:45:19 -0400 (Tue, 07 Oct 2008)
New Revision: 10709
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java
Log:
JBIDE-2802
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java 2008-10-07 13:11:50 UTC (rev 10708)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java 2008-10-07 13:45:19 UTC (rev 10709)
@@ -395,7 +395,7 @@
}
public void gotoMarker(IMarker marker) {
- if(marker == null || getModelObject() == null) return;
+ if(marker == null || getModelObject() == null || !marker.exists()) return;
String path = marker.getAttribute("path", null);
if(path != null) {
XModelObject o = getModelObject().getModel().getByPath(path);
@@ -415,19 +415,12 @@
}
}
} else {
- try {
- if ("org.eclipse.search.searchmarker".equals(marker.getType())) {
- int offset = marker.getAttribute(IMarker.CHAR_START, -1);
- int length = marker.getAttribute(IMarker.CHAR_END, -1);
- if (offset > -1 && length > -1) {
- postponedTextSelection.clean();
- textEditor.gotoMarker(marker);
- }
- }
- } catch (CoreException e) {
- ModelUIPlugin.getPluginLog().logError(e);
+ int offset = marker.getAttribute(IMarker.CHAR_START, -1);
+ int length = marker.getAttribute(IMarker.CHAR_END, -1);
+ if (offset > -1 && length > -1) {
+ postponedTextSelection.clean();
+ textEditor.gotoMarker(marker);
}
-
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java 2008-10-07 13:11:50 UTC (rev 10708)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java 2008-10-07 13:45:19 UTC (rev 10709)
@@ -279,6 +279,7 @@
* In this case current value should be set to combo field.
*/
private void revalidateValue() {
+ if(valueProvider == null) return;
Object v = valueProvider.getValue();
if(v == null || !(propertyEditor.getInput() instanceof DefaultValueAdapter)) return;
String s = v.toString();
17 years, 3 months
JBoss Tools SVN: r10708 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-10-07 09:11:50 -0400 (Tue, 07 Oct 2008)
New Revision: 10708
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeElementCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelLayoutCreator.java
Log:
JBIDE-2815 bug fixed.
Wrong signatures of isRecreateAtAttrChange, getNodeForUptate and validate changed to right ones.
Code cleaning up made.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineTemplate.java 2008-10-07 13:06:58 UTC (rev 10707)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineTemplate.java 2008-10-07 13:11:50 UTC (rev 10708)
@@ -23,6 +23,7 @@
public class VpeDefineTemplate extends VpeAbstractTemplate {
+ @Override
protected void init(Element templateElement) {
children = true;
modify = true;
@@ -43,7 +44,14 @@
return sourceNode.getParentNode();
}
- public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element sourceElement, Document visualDocument, Node visualNode, Object data, String name, String value) {
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMElement, java.lang.Object, java.lang.String, java.lang.String)
+ */
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
return true;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java 2008-10-07 13:06:58 UTC (rev 10707)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java 2008-10-07 13:11:50 UTC (rev 10708)
@@ -144,14 +144,26 @@
return index;
}
- public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element sourceElement, Document visualDocument, Node visualNode, Object data, String name, String value) {
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractCreator#isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMNode, java.lang.Object, java.lang.String, java.lang.String)
+ */
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMNode visualNode, Object data, String name, String value) {
return true;
}
- public Node getNodeForUptate(VpePageContext pageContext, Node sourceNode, Node visualNode, Map visualNodeMap) {
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractCreator#getNodeForUptate(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMNode, java.util.Map)
+ */
+ @Override
+ public Node getNodeForUptate(VpePageContext pageContext, Node sourceNode,
+ nsIDOMNode visualNode, Map visualNodeMap) {
return sourceNode.getParentNode();
}
+ @Override
public void removeElement(VpePageContext pageContext, Element sourceElement, Map visualNodeMap) {
Object elements = visualNodeMap.get(this);
if (elements != null && elements instanceof VisualColumnElements) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeElementCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeElementCreator.java 2008-10-07 13:06:58 UTC (rev 10707)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeElementCreator.java 2008-10-07 13:11:50 UTC (rev 10708)
@@ -7,13 +7,12 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.vpe.editor.template;
import java.util.Map;
import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -27,6 +26,7 @@
import org.jboss.tools.vpe.editor.template.expression.VpeValue;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
public class VpeElementCreator extends VpeAbstractCreator {
private boolean caseSensitive;
@@ -36,7 +36,7 @@
this.caseSensitive = caseSensitive;
build(element, dependencyMap);
}
-
+
private void build(Element element, VpeDependencyMap dependencyMap) {
Attr nameAttr = element.getAttributeNode(VpeTemplateManager.ATTR_ELEMENT_NAME);
if (nameAttr != null) {
@@ -50,6 +50,7 @@
}
}
+ @Override
public VpeCreatorInfo create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument, nsIDOMElement visualElement, Map visualNodeMap) throws VpeExpressionException {
if (expression != null) {
visualNodeMap.put(this, visualElement);
@@ -62,7 +63,14 @@
return null;
}
- public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element sourceElement, Document visualDocument, Node visualNde, Object data, String name, String value) {
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractCreator#isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMNode, java.lang.Object, java.lang.String, java.lang.String)
+ */
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMNode visualNode, Object data, String name, String value) {
return true;
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java 2008-10-07 13:06:58 UTC (rev 10707)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java 2008-10-07 13:11:50 UTC (rev 10708)
@@ -7,7 +7,7 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.vpe.editor.template;
import java.util.Map;
@@ -19,7 +19,6 @@
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
-import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -31,12 +30,13 @@
this.caseSensitive = caseSensitive;
}
+ @Override
public VpeCreatorInfo create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument, nsIDOMElement visualElement, Map visualNodeMap) {
VpeCreatorInfo creatorInfo = null;
boolean isHeader = false;
boolean isFooter = false;
-
+
Node nameAttr = sourceNode.getAttributes().getNamedItem("name");
if (nameAttr != null) {
String name = nameAttr.getNodeValue();
@@ -55,7 +55,7 @@
nsIDOMNode header = null;
nsIDOMNode footer = null;
-
+
if (visualParent != null && visualParent.getNodeName().equalsIgnoreCase("table")) {
nsIDOMNodeList children = visualParent.getChildNodes();
long count = children != null ? children.getLength() : 0;
@@ -76,7 +76,7 @@
}
nsIDOMElement cell = null;
- int columnsCount = getColumnsCount(sourceParent);
+ int columnsCount = getColumnsCount(sourceParent);
if (isHeader) {
cell = makeCell(columnsCount, HTML.TAG_TH, visualDocument);
} else if (isFooter) {
@@ -95,7 +95,15 @@
return creatorInfo;
}
- public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element sourceElement, Document visualDocument, Node visualNode, Object data, String name, String value) {
+
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractCreator#isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMNode, java.lang.Object, java.lang.String, java.lang.String)
+ */
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMNode visualNode, Object data, String name, String value) {
return true;
}
@@ -110,7 +118,7 @@
}
}
}
-
+
private String getTableAttrValue(Node dataTableNode, String attrName) {
if (dataTableNode != null) {
Node attr = dataTableNode.getAttributes().getNamedItem(attrName);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2008-10-07 13:06:58 UTC (rev 10707)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2008-10-07 13:11:50 UTC (rev 10708)
@@ -26,8 +26,8 @@
import org.mozilla.interfaces.nsIDOMAttr;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -36,7 +36,7 @@
public class VpePanelGridCreator extends VpeAbstractCreator {
private final String REDUNDANT_TEXT_SEPARATOR = "\n\n"; //$NON-NLS-1$
-
+
private boolean caseSensitive;
private VpeExpression tableSizeExpr;
private VpeExpression captionClassExpr;
@@ -187,6 +187,7 @@
}
}
+ @Override
public VpeCreatorInfo create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument, nsIDOMElement visualElement,
Map visualNodeMap) throws VpeExpressionException {
@@ -214,7 +215,7 @@
td.appendChild(div);
tr.appendChild(td);
selectionTable.appendChild(tr);
-
+
nsIDOMElement visualTable = visualDocument
.createElement(HTML.TAG_TABLE);
@@ -225,7 +226,7 @@
VpeCreator creator = (VpeCreator) propertyCreators.get(i);
if (creator != null) {
VpeCreatorInfo info = creator.create(pageContext,
- (Element) sourceNode, visualDocument, visualTable,
+ sourceNode, visualDocument, visualTable,
visualNodeMap);
if (info != null && info.getVisualNode() != null) {
nsIDOMAttr attr = (nsIDOMAttr) info.getVisualNode();
@@ -257,10 +258,10 @@
int type = node.getNodeType();
if (type == Node.ELEMENT_NODE || type == Node.TEXT_NODE
&& node.getNodeValue().trim().length() > 0) {
-
+
/*
* Fixes http://jira.jboss.com/jira/browse/JBIDE-1944
- * author: Denis Maliarevich
+ * author: Denis Maliarevich
* Finds all unattended text nodes
*/
if (type == Node.TEXT_NODE) {
@@ -285,7 +286,7 @@
}
}
}
-
+
/*
* Fixes http://jira.jboss.com/jira/browse/JBIDE-1944
* author: Denis Maliarevich
@@ -301,7 +302,7 @@
div.appendChild(visualDocument.createTextNode(redundantText));
}
div.appendChild(visualTable);
-
+
if (childrenCount > 0) {
if (tableSize == 0) {
tableSize = childrenCount;
@@ -311,7 +312,7 @@
nsIDOMElement visualHead = null;
nsIDOMElement visualFoot = null;
nsIDOMElement visualCaption = null;
-
+
if (caption != null) {
visualCaption = visualDocument
.createElement(HTML.TAG_CAPTION);
@@ -348,16 +349,16 @@
nsIDOMElement visualBody = visualDocument
.createElement(HTML.TAG_TBODY);
visualTable.appendChild(visualBody);
-
+
List rowClasses = getClasses(rowClassesExpr, sourceNode,
pageContext);
List columnClasses = getClasses(columnClassesExpr, sourceNode,
pageContext);
-
+
int rci = 0; // index of row class
for (int i = 0; i < rowCount; i++) {
- int cci = 0; // index of column class. Reset on every new row.
-
+ int cci = 0; // index of column class. Reset on every new row.
+
nsIDOMElement visualRow = visualDocument
.createElement(HTML.TAG_TR);
if (rowClasses.size() > 0) {
@@ -404,7 +405,7 @@
VpeCreator creator = (VpeCreator) propertyCreators.get(i);
if (creator != null) {
VpeCreatorInfo info = creator.create(pageContext,
- (Element) sourceNode, visualDocument,
+ sourceNode, visualDocument,
visualTable, visualNodeMap);
if (info != null && info.getVisualNode() != null) {
nsIDOMAttr attr = (nsIDOMAttr) info.getVisualNode();
@@ -471,9 +472,14 @@
return null;
}
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractCreator#isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMNode, java.lang.Object, java.lang.String, java.lang.String)
+ */
+ @Override
public boolean isRecreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, Document visualDocument, Node visualNde,
- Object data, String name, String value) {
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMNode visualNode, Object data, String name, String value) {
return true;
}
+
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelLayoutCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelLayoutCreator.java 2008-10-07 13:06:58 UTC (rev 10707)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelLayoutCreator.java 2008-10-07 13:11:50 UTC (rev 10708)
@@ -7,7 +7,7 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.vpe.editor.template;
import java.io.IOException;
@@ -26,6 +26,7 @@
import org.jboss.tools.vpe.editor.util.FileUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -35,67 +36,67 @@
public class VpePanelLayoutCreator extends VpeAbstractCreator {
-
-
+
+
public static final String ATTR_LAYOUT_DEFAULT_VALUE = "classic";
public static final String EMPTY_ATTR_VALUE = "";
-
- public static final String CSS_CLASS_HEADER_DEFAULT = "pageHeader";
+
+ public static final String CSS_CLASS_HEADER_DEFAULT = "pageHeader";
public static final String CSS_CLASS_NAVIGATOR_DEFAULT = "pageNavigation";
public static final String CSS_CLASS_BODY_DEFAULT = "pageBody";
- public static final String CSS_CLASS_FOOTER_DEFAULT = "pageFooter";
+ public static final String CSS_CLASS_FOOTER_DEFAULT = "pageFooter";
- // layout | header | navigation | body | footer
- //==================|========|============|=======|========
- // classic (Default)| top | left | right | bottom
- // navigationRight | top | right | left | bottom
- // upsideDown | bottom | left | right | top
- public static final String ATTR_PL_LAYOUT = "layout";
-
+ // layout | header | navigation | body | footer
+ //==================|========|============|=======|========
+ // classic (Default)| top | left | right | bottom
+ // navigationRight | top | right | left | bottom
+ // upsideDown | bottom | left | right | top
+ public static final String ATTR_PL_LAYOUT = "layout";
+
public static final String ATTR_PL_CLASS = "class";
public static final String ATTR_PL_STYLE = "style";
// TAGS for layout attribute
- public static final String LAYOUT_CLASSIC_ATTR_VALUE = "classic";
+ public static final String LAYOUT_CLASSIC_ATTR_VALUE = "classic";
public static final String LAYOUT_NAVIGATION_RIGHT_ATTR_VALUE = "navigationRight";
public static final String LAYOUT_UPSIDEDOWN_VALUE = "upsideDown";
-
+
// Attributes wil mapped for body td
public static final String ATTR_PL_BODY_CLASS = "bodyClass"; // CSS class to be used for the table cell.
public static final String ATTR_PL_BODY_STYLE = "bodyStyle"; // CSS style to be used for the table cell.
-
+
public static final String[][] MAP_ATTR_TO_BODY = {
- {ATTR_PL_CLASS,ATTR_PL_BODY_CLASS,CSS_CLASS_BODY_DEFAULT},
+ {ATTR_PL_CLASS,ATTR_PL_BODY_CLASS,CSS_CLASS_BODY_DEFAULT},
{ATTR_PL_STYLE,ATTR_PL_BODY_STYLE,EMPTY_ATTR_VALUE}
};
-
- // Attributes wil mapped for footer td
+
+ // Attributes wil mapped for footer td
public static final String ATTR_PL_FOOTER_CLASS = "footerClass"; // CSS class to be used for the table cell.
public static final String ATTR_PL_FOOTER_STYLE = "footerStyle"; // CSS style to be used for the table cell.
public static final String[][] MAP_ATTR_TO_FOOTER = {
- {ATTR_PL_CLASS,ATTR_PL_FOOTER_CLASS,CSS_CLASS_FOOTER_DEFAULT},
+ {ATTR_PL_CLASS,ATTR_PL_FOOTER_CLASS,CSS_CLASS_FOOTER_DEFAULT},
{ATTR_PL_STYLE,ATTR_PL_FOOTER_STYLE,EMPTY_ATTR_VALUE}
};
-
- // Attributes wil mapped for header td
+
+ // Attributes wil mapped for header td
public static final String ATTR_PL_HEADER_CLASS = "headerClass"; // CSS class to be used for the table cell.
public static final String ATTR_PL_HEADER_STYLE = "headerStyle"; // CSS style to be used for the table cell.
-
+
public static final String[][] MAP_ATTR_TO_HEADER = {
- {ATTR_PL_CLASS,ATTR_PL_HEADER_CLASS,CSS_CLASS_HEADER_DEFAULT},
+ {ATTR_PL_CLASS,ATTR_PL_HEADER_CLASS,CSS_CLASS_HEADER_DEFAULT},
{ATTR_PL_STYLE,ATTR_PL_HEADER_STYLE,EMPTY_ATTR_VALUE}
};
-
- // Attributes wil mapped for navigation td
+
+ // Attributes wil mapped for navigation td
public static final String ATTR_PL_NAVIGATION_CLASS = "navigationClass"; // CSS class to be used for the table cell.
public static final String ATTR_PL_NAVIOGATION = "navigationStyle"; // CSS style to be used for the table cell.
public static final String[][] MAP_ATTR_TO_NAVIGATION = {
- {ATTR_PL_CLASS,ATTR_PL_NAVIGATION_CLASS,CSS_CLASS_NAVIGATOR_DEFAULT},
+ {ATTR_PL_CLASS,ATTR_PL_NAVIGATION_CLASS,CSS_CLASS_NAVIGATOR_DEFAULT},
{ATTR_PL_STYLE,ATTR_PL_NAVIOGATION,EMPTY_ATTR_VALUE}
};
-
- // Attributes will mapped to <table>
+
+ // Attributes will mapped to <table>
public static final String ATTR_PL_ID = "id"; // Every component may have an unique id. Automatically created if omitted.
public static final String ATTR_PL_DIR = "dir"; // No Description
public static final String ATTR_PL_LANG = "lang"; // No Description
@@ -105,8 +106,8 @@
public static final String ATTR_PL_BGCOLOR = "bgcolor"; // No Description
public static final String ATTR_PL_BORDER = "border"; // No Description
public static final String ATTR_PL_CELLPADDING = "cellpadding"; // No Description
- public static final String ATTR_PL_CELLSPACING = "cellspacing"; // No Description
-
+ public static final String ATTR_PL_CELLSPACING = "cellspacing"; // No Description
+
public static final String[][] MAP_ATTR_TO_TABLE = {
{ATTR_PL_ID,ATTR_PL_ID,EMPTY_ATTR_VALUE},
{ATTR_PL_DIR,ATTR_PL_DIR,EMPTY_ATTR_VALUE},
@@ -120,8 +121,8 @@
{ATTR_PL_CELLPADDING,ATTR_PL_CELLPADDING,EMPTY_ATTR_VALUE},
{ATTR_PL_CELLSPACING,ATTR_PL_CELLSPACING,EMPTY_ATTR_VALUE}
};
-
- // Not Mapped Attributes
+
+ // Not Mapped Attributes
// event is never mapped
public static final String ATTR_PL_ONCLICK = "onclick"; // No Description
public static final String ATTR_PL_ONDBCLICK = "ondblclick"; // No Description
@@ -135,7 +136,7 @@
public static final String ATTR_PL_ONMOUSEUP = "onmouseup"; // No Description
public static final String ATTR_PL_RENDERED = "rendered"; // If false, this component will not be rendered.
// Unknown attributes
- public static final String ATTR_PL_FRAME = "frame"; // No Description
+ public static final String ATTR_PL_FRAME = "frame"; // No Description
public static final String ATTR_PL_RULES = "rules"; // No Description
public static final String ATTR_PL_SUMMARY = "summary"; // No Description
public static final String ATTR_PL_TITLE = "title"; // No Description
@@ -153,75 +154,80 @@
build(panelLayout, dependencyMap);
}
- public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element sourceElement, Document visualDocument, Node visualNde, Object data, String name, String value) {
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractCreator#isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMNode, java.lang.Object, java.lang.String, java.lang.String)
+ */
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMNode visualNode, Object data, String name, String value) {
Map visualNodeMap = (Map)data;
if(name.equals(ATTR_PL_LAYOUT)) {
String layoutName = (String)visualNodeMap.get(ATTR_PL_LAYOUT);
- if(!value.equals(this.LAYOUT_NAVIGATION_RIGHT_ATTR_VALUE)
- && !value.equals(this.LAYOUT_UPSIDEDOWN_VALUE)) {
+ if(!value.equals(VpePanelLayoutCreator.LAYOUT_NAVIGATION_RIGHT_ATTR_VALUE)
+ && !value.equals(VpePanelLayoutCreator.LAYOUT_UPSIDEDOWN_VALUE)) {
value = LAYOUT_CLASSIC_ATTR_VALUE;
}
return !layoutName.equals(value);
} return false;
}
-
-
+ @Override
public VpeCreatorInfo create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument, nsIDOMElement visualElement, Map visualNodeMap) {
VpePanelLayoutElements layoutElements = new VpePanelLayoutElements(sourceNode, pageContext);
visualNodeMap.put(ATTR_PL_LAYOUT, layoutElements.getLayoutName());
PanelLayoutTable layout = new PanelLayoutTable(visualDocument,sourceNode);
visualNodeMap.put(this,layout);
-
+
if(LAYOUT_NAVIGATION_RIGHT_ATTR_VALUE.equals(layoutElements.getLayoutName())) {
layout.setTop(layoutElements.getHeaderFacet(),MAP_ATTR_TO_HEADER);
layout.setRight(layoutElements.getNavigationFacet(),MAP_ATTR_TO_NAVIGATION);
layout.setLeft(layoutElements.getBodyFacet(),MAP_ATTR_TO_BODY);
- layout.setBottom(layoutElements.getFooterFacet(),MAP_ATTR_TO_FOOTER);
+ layout.setBottom(layoutElements.getFooterFacet(),MAP_ATTR_TO_FOOTER);
} else if(LAYOUT_UPSIDEDOWN_VALUE.equals(layoutElements.getLayoutName())) {
layout.setBottom(layoutElements.getHeaderFacet(),MAP_ATTR_TO_HEADER);
layout.setLeft(layoutElements.getNavigationFacet(),MAP_ATTR_TO_NAVIGATION);
layout.setRight(layoutElements.getBodyFacet(),MAP_ATTR_TO_BODY);
- layout.setTop(layoutElements.getFooterFacet(),MAP_ATTR_TO_FOOTER);
+ layout.setTop(layoutElements.getFooterFacet(),MAP_ATTR_TO_FOOTER);
} else { // LAYOUT_CLASSIC_ATTR_VALUE
layout.setTop(layoutElements.getHeaderFacet(),MAP_ATTR_TO_HEADER);
layout.setLeft(layoutElements.getNavigationFacet(),MAP_ATTR_TO_NAVIGATION);
layout.setRight(layoutElements.getBodyFacet(),MAP_ATTR_TO_BODY);
- layout.setBottom(layoutElements.getFooterFacet(),MAP_ATTR_TO_FOOTER);
+ layout.setBottom(layoutElements.getFooterFacet(),MAP_ATTR_TO_FOOTER);
}
return layout.getVpeCreatorInfo();
}
public static class VpePanelLayoutElements {
-
+
Node layout = null;
Node header = null;
- Node footer = null;
+ Node footer = null;
Node navigation = null;
Node body = null;
VpePageContext pageContext = null;
-
+
public VpePanelLayoutElements(Node source,VpePageContext context) {
pageContext = context;
init(source);
layout = source;
-
+
}
-
+
public Node getLayoutNode() {
return layout;
}
-
+
public String getLayoutName() {
String name = getAttributeValue(layout,ATTR_PL_LAYOUT, ATTR_LAYOUT_DEFAULT_VALUE);
- if(name.equals(LAYOUT_NAVIGATION_RIGHT_ATTR_VALUE)
+ if(name.equals(LAYOUT_NAVIGATION_RIGHT_ATTR_VALUE)
|| name.equals(LAYOUT_UPSIDEDOWN_VALUE)) {
return name;
}
return LAYOUT_CLASSIC_ATTR_VALUE;
}
-
+
private void init(Node source){
init(source, null);
}
@@ -236,7 +242,7 @@
boolean isFacet = node.getNodeName().indexOf(":facet") > 0;
boolean isInclude = node.getNodeName().indexOf("jsp:include") >=0 || node.getNodeName().indexOf("jsp:directive.include")>=0;
Node attrName = node.getAttributes().getNamedItem("name");
- if(isFacet && attrName!=null) {
+ if(isFacet && attrName!=null) {
String nodeValue = attrName.getNodeValue();
if("header".equals(nodeValue)) {
if(include != null) header = include;
@@ -247,7 +253,7 @@
} else if("body".equals(nodeValue)) {
if(include != null) body = include;
else body = node;
- } else if("footer".equals(nodeValue)) {
+ } else if("footer".equals(nodeValue)) {
if(include != null) footer = include;
else footer = node;
}
@@ -257,17 +263,17 @@
if (page == null) {
page = ((Element)node).getAttributeNode("file");
}
-
-
+
+
if(page != null){
String pageName = page.getNodeValue();
IEditorInput input = pageContext.getEditPart().getEditorInput();
IFile resource = FileUtil.getFile(input, pageName);
- if(resource != null && ((IFile)resource).exists()){
+ if(resource != null && (resource).exists()){
try{
wtpModel = (IDOMModel)StructuredModelManager.getModelManager().getModelForRead(resource);
if(wtpModel != null){
- init(wtpModel.getDocument(), node);
+ init(wtpModel.getDocument(), node);
}
} catch(IOException ex) {
VpePlugin.reportProblem(ex);
@@ -279,17 +285,17 @@
}
}
- }
+ }
}
}
}
}
}
-
+
public Node getHeaderFacet() {
return header;
}
-
+
public Node getFooterFacet() {
return footer;
}
@@ -297,15 +303,15 @@
public Node getNavigationFacet() {
return navigation;
}
-
+
public Node getBodyFacet() {
return body;
}
-
+
public String getPanelLayoutAttribute(String nodeName, String defaultValue) {
return VpePanelLayoutElements.getAttributeValue(this.layout,nodeName,defaultValue);
}
-
+
// TODO Move to Util Class
static String getAttributeValue(Node node, String attributeName, String defaultValue) {
NamedNodeMap attrs = node.getAttributes();
@@ -316,120 +322,120 @@
return defaultValue;
}
public static int DEST=0, SOURCE=1, DEFAULT =2;
-
+
static void mapAttributes(nsIDOMElement dest, Node source, String[][] map) {
for (int i = 0;i<map.length;i++) {
dest.setAttribute(map[i][DEST],getAttributeValue(source,map[i][SOURCE],map[i][DEFAULT]));
}
}
}
-
+
public class PanelLayoutTable {
-
+
public static final String TABLE = "table";
public static final String TR = "tr";
public static final String TD = "td";
- public static final String CLASS_ATTR = "class";
- public static final String STYLE_ATTR = "style";
-
+ public static final String CLASS_ATTR = "class";
+ public static final String STYLE_ATTR = "style";
+
Table table;
Td top;
Td bottom;
Td left;
Td right;
-
+
VpeChildrenInfo topInfo;
VpeChildrenInfo bottomInfo;
VpeChildrenInfo rightInfo;
- VpeChildrenInfo leftInfo;
+ VpeChildrenInfo leftInfo;
VpeCreatorInfo creatorInfo;
-
+
Document sourceDocument;
-
-
+
+
public PanelLayoutTable(nsIDOMDocument visualDocument, Node source) {
table = new Table(visualDocument, source);
- creatorInfo = new VpeCreatorInfo(table.getDomElement());
+ creatorInfo = new VpeCreatorInfo(table.getDomElement());
Tr tr = table.crateRow();
top = tr.createCell(2);
tr = table.crateRow();
left = tr.createCell();
- right = tr.createCell();
+ right = tr.createCell();
tr = table.crateRow();
bottom = tr.createCell(2);
sourceDocument = source.getOwnerDocument();
}
-
+
public void setTop(Node node, String[][] styleMap) {
if(node==null) return;
- topInfo = new VpeChildrenInfo(top.getDomElement());
+ topInfo = new VpeChildrenInfo(top.getDomElement());
addVpeCreatorInfoChild(topInfo,top,node,styleMap);
}
-
+
public void setBottom(Node node,String[][] styleMap) {
- if(node==null) return;
- bottomInfo = new VpeChildrenInfo(bottom.getDomElement());
- addVpeCreatorInfoChild(bottomInfo,bottom,node,styleMap);
+ if(node==null) return;
+ bottomInfo = new VpeChildrenInfo(bottom.getDomElement());
+ addVpeCreatorInfoChild(bottomInfo,bottom,node,styleMap);
}
-
+
public void setLeft(Node node, String[][] styleMap) {
- if(node==null) return;
- leftInfo = new VpeChildrenInfo(left.getDomElement());
- addVpeCreatorInfoChild(leftInfo,left,node,styleMap);
+ if(node==null) return;
+ leftInfo = new VpeChildrenInfo(left.getDomElement());
+ addVpeCreatorInfoChild(leftInfo,left,node,styleMap);
}
-
+
public void setRight(Node node, String[][] styleMap) {
- if(node==null) return;
- rightInfo = new VpeChildrenInfo(right.getDomElement());
+ if(node==null) return;
+ rightInfo = new VpeChildrenInfo(right.getDomElement());
addVpeCreatorInfoChild(rightInfo,right,node,styleMap);
}
-
+
public void updateTop(Node node, String[][] styleMap) {
if(node==null) return;
VpePanelLayoutElements.mapAttributes(top.getDomElement(),node,styleMap);
}
-
+
public void updateBottom(Node node,String[][] styleMap) {
- if(node==null) return;
- VpePanelLayoutElements.mapAttributes(bottom.getDomElement(),node,styleMap);
+ if(node==null) return;
+ VpePanelLayoutElements.mapAttributes(bottom.getDomElement(),node,styleMap);
}
-
+
public void updateLeft(Node node, String[][] styleMap) {
- if(node==null) return;
- VpePanelLayoutElements.mapAttributes(left.getDomElement(),node,styleMap);
+ if(node==null) return;
+ VpePanelLayoutElements.mapAttributes(left.getDomElement(),node,styleMap);
}
-
+
public void updateRight(Node node, String[][] styleMap) {
- if(node==null) return;
+ if(node==null) return;
VpePanelLayoutElements.mapAttributes(right.getDomElement(),node,styleMap);
- }
-
+ }
+
public void update(Node node, String[][] styleMap) {
- VpePanelLayoutElements.mapAttributes(table.getDomElement(),node,styleMap);
+ VpePanelLayoutElements.mapAttributes(table.getDomElement(),node,styleMap);
}
-
+
public VpeCreatorInfo getVpeCreatorInfo() {
return creatorInfo;
}
-
+
private void addVpeCreatorInfoChild(VpeChildrenInfo info,Td td, Node source, String[][] styleMap) {
info.addSourceChild(source);
VpePanelLayoutElements.mapAttributes(td.getDomElement(),source,styleMap);
creatorInfo.addChildrenInfo(info);
}
}
-
+
public interface ElementWrapper {
public nsIDOMElement getDomElement();
- public nsIDOMDocument getOwnerDocument();
+ public nsIDOMDocument getOwnerDocument();
public void setAttributeValue(String name, String value);
}
-
+
public class DefaultNodeWrapper implements ElementWrapper {
-
+
protected nsIDOMElement element;
-
+
public DefaultNodeWrapper(nsIDOMElement element) {
this.element = element;
}
@@ -437,7 +443,7 @@
public nsIDOMElement getDomElement() {
return element;
}
-
+
public nsIDOMDocument getOwnerDocument() {
return element.getOwnerDocument();
}
@@ -445,11 +451,11 @@
public void setAttributeValue(String name, String value) {
getDomElement().setAttribute(name,value);
}
-
+
}
-
+
public class Table extends DefaultNodeWrapper {
-
+
public Table(nsIDOMDocument visualDocument,Node source ) {
super(visualDocument.createElement(PanelLayoutTable.TABLE));
VpePanelLayoutElements.mapAttributes(
@@ -458,76 +464,84 @@
MAP_ATTR_TO_TABLE
);
}
-
+
public Tr crateRow() {
nsIDOMElement tr = getOwnerDocument().createElement(PanelLayoutTable.TR);
getDomElement().appendChild(tr);
return new Tr(tr);
}
-
+
}
-
+
public class Tr extends DefaultNodeWrapper {
public Tr(nsIDOMElement rowNode) {
super(rowNode);
}
-
+
public Td createCell() {
nsIDOMElement tr = getOwnerDocument().createElement(PanelLayoutTable.TD);
getDomElement().appendChild(tr);
return new Td(tr);
}
-
+
public Td createCell(int colspanNumber) {
Td td = createCell();
td.setAttributeValue("colspan",""+colspanNumber);
return td;
}
-
+
}
-
+
public class Td extends DefaultNodeWrapper {
nsIDOMElement cell = null;
-
+
public Td(nsIDOMElement cellNode) {
super(cellNode);
cell = cellNode;
}
}
-
+
private void build(Element element, VpeDependencyMap dependencyMap) {
Set attrs = new HashSet();
for(int i=0;i<MAP_ATTR_TO_TABLE.length;i++) {
attrs.add(VpeExpressionBuilder.attrSignature(MAP_ATTR_TO_TABLE[i][0],caseSensitive));
}
- dependencyMap.setCreator(this, attrs);
+ dependencyMap.setCreator(this, attrs);
}
-
+
+ @Override
public void setAttribute(VpePageContext pageContext, Element sourceElement, Map visualNodeMap, String name, String value) {
PanelLayoutTable layout = (PanelLayoutTable)visualNodeMap.get(this);
- VpePanelLayoutElements layoutElements = new VpePanelLayoutElements(sourceElement, pageContext);
+ VpePanelLayoutElements layoutElements = new VpePanelLayoutElements(sourceElement, pageContext);
layout.update(sourceElement,MAP_ATTR_TO_TABLE);
if(LAYOUT_NAVIGATION_RIGHT_ATTR_VALUE.equals(layoutElements.getLayoutName())) {
layout.updateTop(layoutElements.getHeaderFacet(),MAP_ATTR_TO_HEADER);
layout.updateLeft(layoutElements.getNavigationFacet(),MAP_ATTR_TO_NAVIGATION);
layout.updateRight(layoutElements.getBodyFacet(),MAP_ATTR_TO_BODY);
- layout.updateBottom(layoutElements.getFooterFacet(),MAP_ATTR_TO_FOOTER);
+ layout.updateBottom(layoutElements.getFooterFacet(),MAP_ATTR_TO_FOOTER);
} else if(LAYOUT_UPSIDEDOWN_VALUE.equals(layoutElements.getLayoutName())) {
layout.updateBottom(layoutElements.getHeaderFacet(),MAP_ATTR_TO_HEADER);
layout.updateLeft(layoutElements.getNavigationFacet(),MAP_ATTR_TO_NAVIGATION);
layout.updateRight(layoutElements.getBodyFacet(),MAP_ATTR_TO_BODY);
- layout.updateTop(layoutElements.getFooterFacet(),MAP_ATTR_TO_FOOTER);
+ layout.updateTop(layoutElements.getFooterFacet(),MAP_ATTR_TO_FOOTER);
} else { // LAYOUT_CLASSIC_ATTR_VALUE
layout.updateTop(layoutElements.getHeaderFacet(),MAP_ATTR_TO_HEADER);
layout.updateLeft(layoutElements.getNavigationFacet(),MAP_ATTR_TO_NAVIGATION);
layout.updateRight(layoutElements.getBodyFacet(),MAP_ATTR_TO_BODY);
- layout.updateBottom(layoutElements.getFooterFacet(),MAP_ATTR_TO_FOOTER);
+ layout.updateBottom(layoutElements.getFooterFacet(),MAP_ATTR_TO_FOOTER);
}
}
- public void validate(VpePageContext pageContext, Element sourceElement, Document visualDocument, Element visualParent, Element visualElement, Map visualNodeMap) {
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractCreator#validate(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMElement, org.mozilla.interfaces.nsIDOMElement, java.util.Map)
+ */
+ @Override
+ public void validate(VpePageContext pageContext, Element sourceElement,
+ nsIDOMDocument visualDocument, nsIDOMElement visualParent,
+ nsIDOMElement visualElement, Map visualNodeMap) {
}
-
+
+ @Override
public void removeAttribute(VpePageContext pageContext, Element sourceElement, Map visualNodeMap, String name) {
}
}
17 years, 3 months
JBoss Tools SVN: r10707 - trunk/birt/docs/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-07 09:06:58 -0400 (Tue, 07 Oct 2008)
New Revision: 10707
Modified:
trunk/birt/docs/en/modules/birt_support.xml
Log:
the chapter is finished
Modified: trunk/birt/docs/en/modules/birt_support.xml
===================================================================
--- trunk/birt/docs/en/modules/birt_support.xml 2008-10-07 11:58:59 UTC (rev 10706)
+++ trunk/birt/docs/en/modules/birt_support.xml 2008-10-07 13:06:58 UTC (rev 10707)
@@ -255,7 +255,7 @@
<section><title>Create Report Layout</title>
- <para>After the Data source and Data set are specified you can continue with the report layout.</para>
+ <para>After the Data source and Data set are specified you can continue with the report layout. Please see the <xref linkend="birt_designer"/> chapter to learn more about BIRT Report Designer.</para>
</section>
17 years, 3 months
JBoss Tools SVN: r10706 - trunk/birt/docs/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-07 07:58:59 -0400 (Tue, 07 Oct 2008)
New Revision: 10706
Modified:
trunk/birt/docs/en/modules/birt_support.xml
Log:
text adjusted
Modified: trunk/birt/docs/en/modules/birt_support.xml
===================================================================
--- trunk/birt/docs/en/modules/birt_support.xml 2008-10-07 10:47:22 UTC (rev 10705)
+++ trunk/birt/docs/en/modules/birt_support.xml 2008-10-07 11:58:59 UTC (rev 10706)
@@ -227,7 +227,7 @@
</figure>
- <para>Click on the <emphasis><property>Finish</property></emphasis> button. The Edit Data Set window opens where you can change Data Source, Settings, Parameters and other details for the Data Set created. If switched to the Query page you can check the schemas within this database, you can expand them to see the list of tables with their columns. Switch to the Preview page to test your query and verify whether the list of customers appears. </para>
+ <para>Click on the <emphasis><property>Finish</property></emphasis> button. The Edit Data Set window opens where you can change Data Source, Settings, Parameters and other details for the Data Set created. If switched to the Query page you can check the schemas within this database, you can expand them to see the list of tables with their columns:</para>
<figure>
@@ -239,6 +239,7 @@
</mediaobject>
</figure>
+ <para>Switch to the Preview page to test your query and verify whether the list of customers appears:</para>
<figure>
<title>Test the Query</title>
17 years, 3 months
JBoss Tools SVN: r10705 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-07 06:47:22 -0400 (Tue, 07 Oct 2008)
New Revision: 10705
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLModelObjectFinder.java
Log:
Algorithm for finding XModel object at offset in text is improved.
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLModelObjectFinder.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLModelObjectFinder.java 2008-10-07 10:45:32 UTC (rev 10704)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLModelObjectFinder.java 2008-10-07 10:47:22 UTC (rev 10705)
@@ -60,7 +60,11 @@
String childEntity = getChildEntity(chain.name, o);
if(childEntity != null) {
XModelObject[] cs = o.getChildren();
- if(cs.length <= chain.index) return o;
+ if(cs.length <= chain.index) {
+ XModelObject c = findModelObject(chain.child, o);
+ if(c != null) return c;
+ return o;
+ }
int index = -1;
for (int i = 0; i < cs.length; i++) {
if(chain.name != null && chain.name.equals(cs[i].getModelEntity().getXMLSubPath())) {
@@ -70,6 +74,8 @@
}
}
}
+ XModelObject c = findModelObject(chain.child, o);
+ if(c != null) return c;
return o;
} else {
XModelObject[] cs = o.getChildren();
17 years, 3 months
JBoss Tools SVN: r10704 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/multipage.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-07 06:45:32 -0400 (Tue, 07 Oct 2008)
New Revision: 10704
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/multipage/DefaultMultipageEditor.java
Log:
Tree selection synchronized to text selection on changing tab to Tree.
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/multipage/DefaultMultipageEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/multipage/DefaultMultipageEditor.java 2008-10-07 08:46:38 UTC (rev 10703)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/multipage/DefaultMultipageEditor.java 2008-10-07 10:45:32 UTC (rev 10704)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.common.model.ui.editors.multipage;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.jboss.tools.common.model.ui.texteditors.*;
import org.jboss.tools.common.model.*;
import org.jboss.tools.common.editor.*;
@@ -93,6 +95,12 @@
} else {
if (treeFormPage != null) {
selectionProvider.setHost(treeFormPage.getSelectionProvider());
+ if(getTextSelectionProvider() == null) return;
+ ISelection s = getTextSelectionProvider().getSelection();
+ if(s == null || s.isEmpty() || !(s instanceof IStructuredSelection)) return;
+ Object o = ((IStructuredSelection)s).getFirstElement();
+ if(!(o instanceof XModelObject) || o == getModelObject()) return;
+ treeFormPage.getSelectionProvider().setSelection(s);
}
}
}
17 years, 3 months
JBoss Tools SVN: r10703 - in trunk/esb/plugins: org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-10-07 04:46:38 -0400 (Tue, 07 Oct 2008)
New Revision: 10703
Added:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectConstant.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java
Removed:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectUtilities.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/messages/
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/IJBossESBFacetDataModelProperties.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossClassPathCommand.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetDataModelProvider.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages/JBossFacetCore.properties
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages/JBossFacetCoreMessages.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDelegate.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntime.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeListConverter.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeManager.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/BaseFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ButtonFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/CompositeEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossESBRuntimePreferencePage.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/TextFieldEditor.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/ESBProjectWizard.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java
Log:
JBIDE-2864: Add the support of getting ESB runtime from the project target runtime
Copied: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectConstant.java (from rev 10017, trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectUtilities.java)
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectConstant.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectConstant.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -0,0 +1,13 @@
+package org.jboss.tools.esb.core;
+
+public class ESBProjectConstant {
+
+ public final static String ESB_PROJECT_FACET = "jst.jboss.esb";
+ public final static String ESB_PROJECT_FACET_TEMPLATE = "template.jst.jboss.esb";
+ public final static String BUILD_CLASSES = "build/classes";
+ public final static String META_INF = "META-INF";
+
+ public final static String ESB_DEPLOYMENT_FILE_NAME = "META-INF/deployment.xml";
+
+ public final static String ESB_PROJECT_NATURE = "org.jboss.tools.esb.project.ESBNature";
+}
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectUtilities.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectUtilities.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectUtilities.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -1,10 +0,0 @@
-package org.jboss.tools.esb.core;
-
-public class ESBProjectUtilities {
-
- public final static String ESB_PROJECT_FACET = "jst.jboss.esb";
- public final static String ESB_PROJECT_FACET_TEMPLATE = "template.jst.jboss.esb";
- public final static String BUILD_CLASSES = "build/classes";
-
- public final static String ESB_PROJECT_NATURE = "org.jboss.tools.esb.project.ESBNature";
-}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/IJBossESBFacetDataModelProperties.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/IJBossESBFacetDataModelProperties.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/IJBossESBFacetDataModelProperties.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -1,9 +1,9 @@
package org.jboss.tools.esb.core.facet;
import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-public interface IJBossESBFacetDataModelProperties extends IFacetProjectCreationDataModelProperties {
+public interface IJBossESBFacetDataModelProperties extends IFacetDataModelProperties {
public static final String USER_DEFINED_LOCATION = "IProjectCreationPropertiesNew.USER_DEFINED_LOCATION"; //$NON-NLS-1$
public static final String DEFAULT_LOCATION = "IProjectCreationPropertiesNew.DEFAULT_LOCATION"; //$NON-NLS-1$
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossClassPathCommand.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossClassPathCommand.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossClassPathCommand.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -15,6 +15,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -27,17 +28,21 @@
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
import org.jboss.tools.esb.core.StatusUtils;
import org.jboss.tools.esb.core.messages.JBossFacetCoreMessages;
import org.jboss.tools.esb.core.runtime.JBossRuntimeClassPathInitializer;
/**
- * @author Grid Qian
+ * @author Denny Xu
*/
public class JBossClassPathCommand extends AbstractDataModelOperation {
IProject project;
private IDataModel model;
+ private String serverRuntimeId;
public JBossClassPathCommand(IProject project, IDataModel model) {
this.project = project;
@@ -54,43 +59,58 @@
try {
// store runtime name and runtime location to the project
-
- String runtimeName = model
- .getStringProperty(IJBossESBFacetDataModelProperties.RUNTIME_ID);
- String runtimeLocation = model
- .getStringProperty(IJBossESBFacetDataModelProperties.RUNTIME_HOME);
- String esbcontentFolder = model.getStringProperty(IJBossESBFacetDataModelProperties.ESB_CONTENT_FOLDER);
- project
- .setPersistentProperty(
- IJBossESBFacetDataModelProperties.PERSISTENCE_PROPERTY_QNAME_RUNTIME_NAME,
- runtimeName);
- project
- .setPersistentProperty(
- IJBossESBFacetDataModelProperties.PERSISTENCE_PROPERTY_RNTIME_LOCATION,
- runtimeLocation);
- project.setPersistentProperty(IJBossESBFacetDataModelProperties.QNAME_ESB_CONTENT_FOLDER, esbcontentFolder);
- status = addClassPath(project, runtimeName);
+ boolean isServerSupplied = model.getBooleanProperty(IJBossESBFacetDataModelProperties.RUNTIME_IS_SERVER_SUPPLIED);
+ if(isServerSupplied){
+ serverRuntimeId = getProjectTargetRuntimeID(project);
+ String[] segments = new String[]{JBossRuntimeClassPathInitializer.JBOSS_ESB_RUNTIME_CLASSPATH_SERVER_SUPPLIED,
+ serverRuntimeId};
+ status = addClassPath(project, segments);
+ }else{
+ String runtimeName = model
+ .getStringProperty(IJBossESBFacetDataModelProperties.RUNTIME_ID);
+ String runtimeLocation = model
+ .getStringProperty(IJBossESBFacetDataModelProperties.RUNTIME_HOME);
+ String esbcontentFolder = model.getStringProperty(IJBossESBFacetDataModelProperties.ESB_CONTENT_FOLDER);
+ project
+ .setPersistentProperty(
+ IJBossESBFacetDataModelProperties.PERSISTENCE_PROPERTY_QNAME_RUNTIME_NAME,
+ runtimeName);
+ project
+ .setPersistentProperty(
+ IJBossESBFacetDataModelProperties.PERSISTENCE_PROPERTY_RNTIME_LOCATION,
+ runtimeLocation);
+ project.setPersistentProperty(IJBossESBFacetDataModelProperties.QNAME_ESB_CONTENT_FOLDER, esbcontentFolder);
+ status = addClassPath(project, new String[]{runtimeName});
+ }
+
} catch (CoreException e) {
status = StatusUtils.errorStatus(
- JBossFacetCoreMessages.Error_Add_Facet_JBossWS, e);
+ JBossFacetCoreMessages.Error_Add_Facet_JBossESB, e);
}
return status;
}
- public IStatus addClassPath(IProject project, String segment) {
+ private String getProjectTargetRuntimeID(IProject project) throws CoreException{
+ IFacetedProject fp = ProjectFacetsManager.create(project);
+ IRuntime runtime = fp.getPrimaryRuntime();
+ return runtime.getProperty("id");
+
+ }
+
+ public IStatus addClassPath(IProject project, String[] segments) {
IStatus status = Status.OK_STATUS;
try {
IClasspathEntry newClasspath;
IJavaProject javaProject = JavaCore.create(project);
+ IPath path = new Path(JBossRuntimeClassPathInitializer.JBOSS_ESB_RUNTIME_CLASSPATH_CONTAINER_ID);
+ for(String segment: segments ){
+ path = path.append(segment);
+ }
+ newClasspath = JavaCore.newContainerEntry(path);
- newClasspath = JavaCore
- .newContainerEntry(new Path(
- JBossRuntimeClassPathInitializer.JBOSS_ESB_RUNTIME_CLASSPATH_CONTAINER_ID)
- .append(segment));
-
IClasspathEntry[] oldClasspathEntries = javaProject
.readRawClasspath();
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetDataModelProvider.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetDataModelProvider.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetDataModelProvider.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -19,6 +19,7 @@
names.add(IJBossESBFacetDataModelProperties.ESB_SOURCE_FOLDER);
names.add(RUNTIME_ID);
names.add(RUNTIME_HOME);
+ names.add(RUNTIME_IS_SERVER_SUPPLIED);
return names;
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -63,13 +63,11 @@
String runtimeId = model
.getStringProperty(IJBossESBFacetDataModelProperties.RUNTIME_ID);
- if (runtimeId != null && !runtimeId.equals("")) {
- JBossClassPathCommand command = new JBossClassPathCommand(project,
+ JBossClassPathCommand command = new JBossClassPathCommand(project,
model);
- IStatus status = command.executeOverride(monitor);
- if (!status.equals(Status.OK_STATUS)) {
- throw new CoreException(status);
- }
+ IStatus status = command.executeOverride(monitor);
+ if (!status.equals(Status.OK_STATUS)) {
+ throw new CoreException(status);
}
ClasspathHelper.removeClasspathEntries(project, fv);
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages/JBossFacetCore.properties
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages/JBossFacetCore.properties 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages/JBossFacetCore.properties 2008-10-07 08:46:38 UTC (rev 10703)
@@ -6,9 +6,9 @@
Dir_Web_Content=WebContent
Error_Copy=Exception while copy runtime jars
ESB_Location=jbossesbruntimelocation
-JBossWS_Runtime=JBoss ESB Runtime
+JBoss_Runtime=JBoss ESB Runtime
JBossAS=JBOSS
Error_WS_Location=The JBoss ESB Runtime Location is NULL
Error_WS_Classpath=A error comes up when create JBoss ESB runtime Classpath
-Error_Add_Facet_JBossWS=Exception while install JBoss ESB facet
+Error_Add_Facet_JBossESB=Exception while install JBoss ESB facet
Error_Remove_Facet_JBossWS=Exception while uninstall JBoss ESB facet
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages/JBossFacetCoreMessages.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages/JBossFacetCoreMessages.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages/JBossFacetCoreMessages.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -32,11 +32,11 @@
public static String Dir_Web_Content;
public static String Error_Copy;
public static String ESB_Location;
- public static String JBossWS_Runtime;
+ public static String JBoss_Runtime;
public static String JBossAS;
public static String Error_WS_Location;
public static String Error_WS_Classpath;
- public static String Error_Add_Facet_JBossWS;
+ public static String Error_Add_Facet_JBossESB;
public static String Error_Remove_Facet_JBossWS;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -9,13 +9,11 @@
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IModuleType;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.internal.ModuleFactory;
import org.eclipse.wst.server.core.internal.ModuleType;
import org.eclipse.wst.server.core.model.ModuleDelegate;
import org.eclipse.wst.server.core.model.ModuleFactoryDelegate;
-import org.jboss.tools.esb.core.ESBProjectUtilities;
+import org.jboss.tools.esb.core.ESBProjectConstant;
+import org.jboss.tools.esb.core.ESBProjectCorePlugin;
public class JBossESBModule implements IModule{
@@ -29,7 +27,6 @@
}
public Object getAdapter(Class adapter) {
- // TODO Auto-generated method stub
return null;
}
@@ -44,11 +41,11 @@
if (facetPrj == null) {
return null;
}
- final IProjectFacet esbfacet = ProjectFacetsManager.getProjectFacet(ESBProjectUtilities.ESB_PROJECT_FACET);
+ final IProjectFacet esbfacet = ProjectFacetsManager.getProjectFacet(ESBProjectConstant.ESB_PROJECT_FACET);
final IProjectFacetVersion fv = facetPrj.getInstalledVersion(esbfacet);
return ModuleType.getModuleType(esbfacet.getId(), fv.getVersionString());
} catch (CoreException e) {
- e.printStackTrace();
+ ESBProjectCorePlugin.getDefault().getLog().log(e.getStatus());
}
return null;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDelegate.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDelegate.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDelegate.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -14,11 +14,8 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.internal.core.JavaProject;
import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.internal.ModuleResourceDelta;
import org.eclipse.wst.server.core.model.IModuleResource;
-import org.eclipse.wst.server.core.model.ModuleDelegate;
import org.eclipse.wst.server.core.util.ModuleFile;
import org.eclipse.wst.server.core.util.ModuleFolder;
import org.eclipse.wst.server.core.util.ProjectModule;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -7,9 +7,9 @@
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.model.ModuleDelegate;
-import org.eclipse.wst.server.core.util.ProjectModule;
import org.eclipse.wst.server.core.util.ProjectModuleFactoryDelegate;
-import org.jboss.tools.esb.core.ESBProjectUtilities;
+import org.jboss.tools.esb.core.ESBProjectConstant;
+import org.jboss.tools.esb.core.ESBProjectCorePlugin;
public class JBossESBModuleFactory extends ProjectModuleFactoryDelegate {
@@ -32,13 +32,14 @@
if (facetProject == null) {
return null;
}
- IProjectFacet esbFacet = ProjectFacetsManager.getProjectFacet(ESBProjectUtilities.ESB_PROJECT_FACET);
+ IProjectFacet esbFacet = ProjectFacetsManager.getProjectFacet(ESBProjectConstant.ESB_PROJECT_FACET);
+
if(facetProject.hasProjectFacet(esbFacet)){
JBossESBModule module = new JBossESBModule(project, this, this.getId());
return new IModule[]{ module };
}
} catch (CoreException e) {
- e.printStackTrace();
+ ESBProjectCorePlugin.getDefault().getLog().log(e.getStatus());
}
return null;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntime.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntime.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntime.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -15,7 +15,7 @@
import java.util.List;
/**
- * @author Grid Qian
+ * @author Denny Xu
*/
public class JBossRuntime {
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -16,6 +16,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.ClasspathContainerInitializer;
import org.eclipse.jdt.core.IClasspathContainer;
@@ -23,50 +24,70 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.tools.esb.core.ESBProjectCorePlugin;
+import org.jboss.tools.esb.core.StatusUtils;
import org.jboss.tools.esb.core.messages.JBossFacetCoreMessages;
/**
- * @author Grid Qian
+ * @author Denny Xu
*/
public class JBossRuntimeClassPathInitializer extends
ClasspathContainerInitializer {
public final static String JBOSS_ESB_RUNTIME_CLASSPATH_CONTAINER_ID = "org.jboss.esb.runtime.classpath";
+ public final static String JBOSS_ESB_RUNTIME_CLASSPATH_SERVER_SUPPLIED = "server.supplied";
public JBossRuntimeClassPathInitializer() {
}
private String segment;
+ private boolean isServerSupplied = false;
+ private IJavaProject javaProject;
@Override
public void initialize(IPath containerPath, IJavaProject project)
throws CoreException {
-
+ this.javaProject = project;
if (containerPath.segment(0).equals(
JBOSS_ESB_RUNTIME_CLASSPATH_CONTAINER_ID)) {
+ if(containerPath.segmentCount() == 3
+ && containerPath.segment(1).equals(JBOSS_ESB_RUNTIME_CLASSPATH_SERVER_SUPPLIED)){
+ segment = containerPath.segment(2);
+ isServerSupplied = true;
+ }else{
+ segment = containerPath.segment(1);
+ isServerSupplied = false;
+ }
+
JBossRuntimeClasspathContainer container = new JBossRuntimeClasspathContainer(
- containerPath);
- segment = containerPath.segment(1);
+ containerPath, project, isServerSupplied);
JavaCore.setClasspathContainer(containerPath,
new IJavaProject[] { project },
- new IClasspathContainer[] { container }, null);
+ new IClasspathContainer[] { container }, null);
}
}
public IClasspathEntry[] getEntries(IPath path) {
- return new JBossRuntimeClasspathContainer(path).getClasspathEntries();
+ return new JBossRuntimeClasspathContainer(path, javaProject, isServerSupplied).getClasspathEntries();
}
public class JBossRuntimeClasspathContainer implements
IClasspathContainer {
private IPath path;
+ private boolean isFromServer = false;
private IClasspathEntry[] entries = null;
+ private IJavaProject jproject;
+ private List<String> jars;
- public JBossRuntimeClasspathContainer(IPath path) {
+ public JBossRuntimeClasspathContainer(IPath path, IJavaProject project, boolean isFromServer) {
this.path = path;
+ this.isFromServer = isFromServer;
+ this.jproject = project;
}
public String getDescription() {
- return JBossFacetCoreMessages.JBossWS_Runtime;
+ return JBossFacetCoreMessages.JBoss_Runtime;
}
public int getKind() {
@@ -80,18 +101,35 @@
public IClasspathEntry[] getClasspathEntries() {
if (entries == null) {
ArrayList<IClasspathEntry> entryList = new ArrayList<IClasspathEntry>();
- JBossRuntime jbws = JBossRuntimeManager.getInstance()
- .findRuntimeByName(segment);
- if (jbws != null) {
-
- List<String> jars = JBossRuntimeManager.getInstance().getAllRuntimeJars(jbws);
- for (String jar : jars) {
- entryList.add(getEntry(new Path(jar)));
+ if (isFromServer) {
+ IRuntime serverRuntime = ServerCore.findRuntime(segment);
+
+ if(serverRuntime == null){
+ IStatus status = StatusUtils.errorStatus("Can not find the runtime: "+ segment);
+ ESBProjectCorePlugin.getDefault().getLog().log(status);
+ }
+ String runtimeLocation = serverRuntime.getLocation().toOSString();
+ jars = JBossRuntimeManager.getInstance().getAllRuntimeJars(runtimeLocation);
+
+ } else {
+
+ JBossRuntime jbws = JBossRuntimeManager.getInstance()
+ .findRuntimeByName(segment);
+ if (jbws != null) {
+ jars = JBossRuntimeManager.getInstance()
+ .getAllRuntimeJars(jbws);
}
- entries = entryList.toArray(new IClasspathEntry[entryList.size()]);
- if (entries == null)
- return new IClasspathEntry[0];
}
+
+ if(jars == null) return new IClasspathEntry[0];
+
+ for (String jar : jars) {
+ entryList.add(getEntry(new Path(jar)));
+ }
+ entries = entryList.toArray(new IClasspathEntry[entryList
+ .size()]);
+ if (entries == null)
+ return new IClasspathEntry[0];
}
return entries;
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeListConverter.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeListConverter.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeListConverter.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -10,7 +10,7 @@
/**
*
- * @author Grid Qian
+ * @author Denny Xu
*
*/
public class JBossRuntimeListConverter {
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeManager.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeManager.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeManager.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -34,7 +34,7 @@
import org.jboss.tools.esb.core.messages.JBossFacetCoreMessages;
/**
- * @author Grid Qian
+ * @author Denny Xu
*/
public class JBossRuntimeManager {
@@ -158,36 +158,42 @@
} else {
- IPath rtHome = new Path(rt.getHomeDir());
- IPath deployPath = rtHome.append("server").append("default").append("deploy");
-
- IPath esbPath = deployPath.append(JBOSSESB_ESB);
- IPath sarPath = deployPath.append(JBOSSESB_SAR);
-
- IPath libPath = rtHome.append("lib");
-
- if (!esbPath.toFile().exists() || !sarPath.toFile().exists()) {
- esbPath = libPath.append(JBOSSESB_ESB);
- sarPath = libPath.append(JBOSSESB_SAR);
-
- }
-
- List<File> esblibs = getJarsOfFolder(esbPath.toFile());
- IPath sarLibPath = sarPath.append("lib");
- List<File> sarJars = getJarsOfFolder(sarLibPath.toFile());
- ///List<File> commonLibs = getJarsOfFolder(libPath.toFile());
- //List<File> tmpLibs = mergeTwoFileList(esblibs, sarJars);
- //libs.addAll(commonLibs);
-
- jarList = mergeTwoList(esblibs, sarJars);
-
+ jarList = getAllRuntimeJars(rt.getHomeDir());
}
}
return jarList;
}
+ public List<String> getAllRuntimeJars(String runtimeLocation) {
+ List<String> jarList = new ArrayList<String>();
+ IPath rtHome = new Path(runtimeLocation);
+ IPath deployPath = rtHome.append("server").append("default").append(
+ "deploy");
+
+ IPath esbPath = deployPath.append(JBOSSESB_ESB);
+ IPath sarPath = deployPath.append(JBOSSESB_SAR);
+
+ IPath libPath = rtHome.append("lib");
+
+ if (!esbPath.toFile().exists() || !sarPath.toFile().exists()) {
+ esbPath = libPath.append(JBOSSESB_ESB);
+ sarPath = libPath.append(JBOSSESB_SAR);
+
+ }
+
+ List<File> esblibs = getJarsOfFolder(esbPath.toFile());
+ IPath sarLibPath = sarPath.append("lib");
+ List<File> sarJars = getJarsOfFolder(sarLibPath.toFile());
+ // /List<File> commonLibs = getJarsOfFolder(libPath.toFile());
+ // List<File> tmpLibs = mergeTwoFileList(esblibs, sarJars);
+ // libs.addAll(commonLibs);
+
+ jarList = mergeTwoList(esblibs, sarJars);
+
+ return jarList;
+ }
private List<File> getJarsOfFolder(File folder){
List<File> jars = new ArrayList<File>();
@@ -376,8 +382,7 @@
try {
facetedProjects = ProjectFacetsManager.getFacetedProjects(facet);
} catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ return false;
}
for (IFacetedProject facetedProject : facetedProjects) {
QualifiedName qRuntimeName = IJBossESBFacetDataModelProperties.PERSISTENCE_PROPERTY_QNAME_RUNTIME_NAME;
@@ -402,5 +407,42 @@
runtimes = converter.getMap(runtimeListString);
}
+
+ public static boolean isValidESBServer(String path){
+ IPath serverLocation = new Path(path);
+
+ String esbLcoationSeg = "server" + File.separator + "default"
+ + File.separator + "deploy" + File.separator
+ + "jbossesb.esb";
+ String sarLocationSeg = "server" + File.separator + "default"
+ + File.separator + "deploy" + File.separator
+ + "jbossesb.sar";
+ IPath esbLocation = serverLocation.append(esbLcoationSeg);
+ IPath sarLocation = serverLocation.append(sarLocationSeg);
+
+ if(!esbLocation.toFile().isDirectory()){
+ return false;
+ }
+ if(!sarLocation.toFile().isDirectory()){
+ return false;
+ }
+
+
+ return true;
+ }
+
+ public static boolean isValidESBStandaloneRuntimeDir(String path) {
+ IPath location = new Path(path);
+ IPath esblocation = location.append("lib").append("jbossesb.esb");
+ IPath sarLocation = location.append("lib").append("jbossesb.sar");
+ if (!esblocation.toFile().isDirectory()) {
+ return false;
+ }
+ if (!sarLocation.toFile().isDirectory()) {
+ return false;
+ }
+ return true;
+ }
+
}
\ No newline at end of file
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/plugin.xml 2008-10-07 08:46:38 UTC (rev 10703)
@@ -1,21 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
- <extension-point id="org.jboss.tools.esb.project.ui.template" name="ESB Template" schema="schema/org.jboss.tools.esb.project.ui.template.exsd"/>
<extension
point="org.eclipse.ui.newWizards">
<wizard
- category="org.jboss.tools.esb.category1"
+ category="org.jboss.tools.esb.ui"
class="org.jboss.tools.esb.project.ui.wizards.ESBProjectWizard"
icon="$nl$/icons/wizards/esb.gif"
id="JBoss.ESB.Project.Wizard"
- name="ESB Project Wizard"
+ name="ESB Project"
project="true">
</wizard>
- <category
- id="org.jboss.tools.esb.category1"
- name="ESB Wizard">
- </category>
</extension>
<extension
Copied: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages (from rev 10374, trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/messages)
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/messages/JBossESBUI.properties 2008-09-19 05:42:06 UTC (rev 10374)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties 2008-10-07 08:46:38 UTC (rev 10703)
@@ -1,32 +0,0 @@
-Label_JBoss_Runtime_Load_Error=Error occurred while loading JBoss ESB runtime. Please select a correct JBoss ESB runtime or JBoss ESB server location
-
-Error_JBoss_Basic_Editor_Composite=Parent control should be Composite
-Error_JBoss_Basic_Editor_Support=Editor supports only grid layout
-Error_JBoss_Basic_Editor_Different=Parent for label is different
-JBoss_Runtime_List_Field_Editor_Name=Name
-JBoss_Runtime_List_Field_Editor_Version=Version
-JBoss_Runtime_List_Field_Editor_Path=Path
-JBoss_Runtime_List_Field_Editor_Inputelement_Must_Be=inputElement must be
-JBoss_Runtime_List_Field_Editor_An_Instance_Of_List=an instance of List<JBossRuntime>.
-JBoss_Runtime_Delete_Confirm_Title=Confirm Runtime Delete
-JBoss_Runtime_Delete_Used_Confirm=Runtime ''{0}'' is used by JBoss ESB projects. Are you sure you want to delete it?
-JBoss_Runtime_Delete_Not_Used_Confirm=Are you sure you want to delete runtime ''{0}''?
-JBoss_Runtime_List_Field_Editor_Edit_Runtime=Edit JBoss ESB Runtime
-JBoss_Runtime_List_Field_Editor_Modify_Runtime=Input new values
-JBoss_Runtime_List_Field_Editor_New_Runtime=New JBoss ESB Runtime
-Error_JBoss_Runtime_List_Field_Editor_Path_To_Home_Diretory_Cannot_Be_Empty=Path to JBoss ESB runtime home directory cannot be empty
-JBoss_Runtime_List_Field_Editor_Already_Exists=' already exists
-JBoss_Runtime_List_Field_Editor_Runtime=JBoss ESB Runtime
-Error_JBoss_Runtime_List_Field_Editor_Runtime_Name_Is_Not_Correct=Runtime name is not correct
-Error_JBoss_Runtime_List_Field_Editor_Name_Cannot_Be_Empty=Name cannot be empty
-Error_JBoss_Runtime_List_Field_Editor_Version_Cannot_Be_Empty=Version cannot be empty
-JBoss_Runtime_List_Field_Editor_Create_A_Runtime=Create a JBoss ESB Runtime
-JBoss_Runtime_List_Field_Editor_Home_Folder=Home Folder:
-JBoss_Composite_Editor_This_Method_Can_Be_Invoked=This metod can be invoked after getEditorControls(parent) only
-JBoss_Button_Field_Editor_Browse=Browse...
-Error_JBoss_Button_Field_Editor_Not_Implemented_Yet=Not implemented yet. Please setup real acion for editor.
-JBoss_SWT_Field_Editor_Factory_Browse=Browse...
-JBoss_SWT_Field_Editor_Factory_Select_Home_Folder=Select JBoss ESB runtime Home Folder
-JBoss_Runtime_List_Field_Editor_Name2=Name:
-JBoss_Runtime_Check_Field_Default_Classpath=Customize JBoss ESB runtime jars
-JBoss_Preference_Page_Runtimes=JBoss ESB Runtimes
\ No newline at end of file
Copied: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties (from rev 10702, trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/messages/JBossESBUI.properties)
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUI.properties 2008-10-07 08:46:38 UTC (rev 10703)
@@ -0,0 +1,56 @@
+Label_JBoss_Runtime_Load_Error=Error occurred while loading JBoss ESB runtime. Please select a correct JBoss ESB runtime or JBoss ESB server location
+
+Error_JBoss_Basic_Editor_Composite=Parent control should be Composite
+Error_JBoss_Basic_Editor_Support=Editor supports only grid layout
+Error_JBoss_Basic_Editor_Different=Parent for label is different
+JBoss_Runtime_List_Field_Editor_Name=Name
+JBoss_Runtime_List_Field_Editor_Version=Version
+JBoss_Runtime_List_Field_Editor_Path=Path
+JBoss_Runtime_List_Field_Editor_Inputelement_Must_Be=inputElement must be
+JBoss_Runtime_List_Field_Editor_An_Instance_Of_List=an instance of List<JBossRuntime>.
+JBoss_Runtime_Delete_Confirm_Title=Confirm Runtime Delete
+JBoss_Runtime_Delete_Used_Confirm=Runtime ''{0}'' is used by JBoss ESB projects. Are you sure you want to delete it?
+JBoss_Runtime_Delete_Not_Used_Confirm=Are you sure you want to delete runtime ''{0}''?
+JBoss_Runtime_List_Field_Editor_Edit_Runtime=Edit JBoss ESB Runtime
+JBoss_Runtime_List_Field_Editor_Modify_Runtime=Input new values
+JBoss_Runtime_List_Field_Editor_New_Runtime=New JBoss ESB Runtime
+Error_JBoss_Runtime_List_Field_Editor_Path_To_Home_Diretory_Cannot_Be_Empty=Path to JBoss ESB runtime home directory cannot be empty
+JBoss_Runtime_List_Field_Editor_Already_Exists=' already exists
+JBoss_Runtime_List_Field_Editor_Runtime=JBoss ESB Runtime
+Error_JBoss_Runtime_List_Field_Editor_Runtime_Name_Is_Not_Correct=Runtime name is not correct
+Error_JBoss_Runtime_List_Field_Editor_Name_Cannot_Be_Empty=Name cannot be empty
+Error_JBoss_Runtime_List_Field_Editor_Version_Cannot_Be_Empty=Version cannot be empty
+JBoss_Runtime_List_Field_Editor_Create_A_Runtime=Create a JBoss ESB Runtime
+JBoss_Runtime_List_Field_Editor_Home_Folder=Home Folder:
+JBoss_Composite_Editor_This_Method_Can_Be_Invoked=This method can be invoked after getEditorControls(parent) only
+JBoss_Button_Field_Editor_Browse=Browse...
+Error_JBoss_Button_Field_Editor_Not_Implemented_Yet=Not implemented yet. Please setup real acion for editor.
+JBoss_SWT_Field_Editor_Factory_Browse=Browse...
+JBoss_SWT_Field_Editor_Factory_Select_Home_Folder=Select JBoss ESB runtime Home Folder
+JBoss_Runtime_List_Field_Editor_Name2=Name:
+JBoss_Runtime_Check_Field_Default_Classpath=Customize JBoss ESB runtime jars
+JBoss_Preference_Page_Runtimes=JBoss ESB Runtimes
+
+
+ESBFacetInstallationPage_Button_Text_New=New
+ESBFacetInstallationPage_Default_SRC_Folder=src
+ESBFacetInstallationPage_Description=Configure project structure and classpath
+ESBFacetInstallationPage_Error_Message_Have_Not_Set_Target_Runtime=Please specify Target Runtime at the first wizard page.
+ESBFacetInstallationPage_Error_Message_Invalid_ESB_Runtime=The specified target runtime does not contain a valid ESB runtime.
+ESBFacetInstallationPage_Error_Message_No_Target_Runtime=No target runtime was specified.
+ESBFacetInstallationPage_Error_Message_Specify_Content_Folder=Please specify a valid content folder.
+ESBFacetInstallationPage_Error_Message_Specify_ESB_Runtime=Please specify a ESB runtime
+ESBFacetInstallationPage_Error_Message_Specify_Source_Folder=Please specify a valid source folder.
+ESBFacetInstallationPage_Group_Runtime_Text=JBoss ESB Runtime
+ESBFacetInstallationPage_Group_Text_Folder=Project Folders
+ESBFacetInstallationPage_Label_Content_Directory=Content Directory
+ESBFacetInstallationPage_Label_Server_Supplied_Runtime=Server supplied ESB Runtime
+ESBFacetInstallationPage_Label_Source_Directory=Java Source Directory
+ESBFacetInstallationPage_Title=Install ESB Facet
+
+
+ESBProjectFirstPage_Description=Create a new JBoss ESB project.
+ESBProjectFirstPage_Title=JBoss ESB Project
+
+
+ESBProjectWizard_Title=New ESB Project Wizard
Deleted: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/messages/JBossESBUIMessages.java 2008-09-19 05:42:06 UTC (rev 10374)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.esb.project.ui.preference.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author Grid Qian
- */
-public final class JBossESBUIMessages extends NLS {
-
- private static final String BUNDLE_NAME =
- "org.jboss.tools.esb.project.ui.preference.messages.JBossESBUI"; //$NON-NLS-1$
-
- private JBossESBUIMessages() {
- // Do not instantiate
- }
-
- public static String Label_JBoss_Runtime_Load_Error;
-
- public static String Error_JBoss_Basic_Editor_Composite;
- public static String Error_JBoss_Basic_Editor_Support;
- public static String Error_JBoss_Basic_Editor_Different;
- public static String JBoss_Runtime_List_Field_Editor_Name;
- public static String JBoss_Runtime_List_Field_Editor_Version;
- public static String JBoss_Runtime_List_Field_Editor_Path;
- public static String JBoss_Runtime_List_Field_Editor_Inputelement_Must_Be;
- public static String JBoss_Runtime_List_Field_Editor_An_Instance_Of_List;
- public static String JBoss_Runtime_Delete_Confirm_Title;
- public static String JBoss_Runtime_Delete_Used_Confirm;
- public static String JBoss_Runtime_Delete_Not_Used_Confirm;
- public static String JBoss_Runtime_List_Field_Editor_Edit_Runtime;
- public static String JBoss_Runtime_List_Field_Editor_Modify_Runtime;
- public static String JBoss_Runtime_List_Field_Editor_New_Runtime;
- public static String Error_JBoss_Runtime_List_Field_Editor_Path_To_Home_Diretory_Cannot_Be_Empty;
- public static String JBoss_Runtime_List_Field_Editor_Already_Exists;
- public static String JBoss_Runtime_List_Field_Editor_Runtime;
- public static String Error_JBoss_Runtime_List_Field_Editor_Runtime_Name_Is_Not_Correct;
- public static String Error_JBoss_Runtime_List_Field_Editor_Name_Cannot_Be_Empty;
- public static String Error_JBoss_Runtime_List_Field_Editor_Version_Cannot_Be_Empty;
- public static String JBoss_Runtime_List_Field_Editor_Create_A_Runtime;
- public static String JBoss_Runtime_List_Field_Editor_Home_Folder;
- public static String JBoss_Composite_Editor_This_Method_Can_Be_Invoked;
- public static String JBoss_Button_Field_Editor_Browse;
- public static String Error_JBoss_Button_Field_Editor_Not_Implemented_Yet;
- public static String JBoss_SWT_Field_Editor_Factory_Browse;
- public static String JBoss_SWT_Field_Editor_Factory_Select_Home_Folder;
- public static String JBoss_Runtime_List_Field_Editor_Name2;
- public static String JBoss_Runtime_Check_Field_Default_Classpath;
- public static String JBoss_Preference_Page_Runtimes;
-
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, JBossESBUIMessages.class);
- }
-}
Copied: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java (from rev 10702, trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/messages/JBossESBUIMessages.java)
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/messages/JBossESBUIMessages.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.esb.project.ui.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Grid Qian
+ */
+public final class JBossESBUIMessages extends NLS {
+
+ private static final String BUNDLE_NAME =
+ "org.jboss.tools.esb.project.ui.messages.JBossESBUI"; //$NON-NLS-1$
+
+ private JBossESBUIMessages() {
+ // Do not instantiate
+ }
+
+ public static String Label_JBoss_Runtime_Load_Error;
+
+ public static String Error_JBoss_Basic_Editor_Composite;
+ public static String Error_JBoss_Basic_Editor_Support;
+ public static String Error_JBoss_Basic_Editor_Different;
+ public static String JBoss_Runtime_List_Field_Editor_Name;
+ public static String JBoss_Runtime_List_Field_Editor_Version;
+ public static String JBoss_Runtime_List_Field_Editor_Path;
+ public static String JBoss_Runtime_List_Field_Editor_Inputelement_Must_Be;
+ public static String JBoss_Runtime_List_Field_Editor_An_Instance_Of_List;
+ public static String JBoss_Runtime_Delete_Confirm_Title;
+ public static String JBoss_Runtime_Delete_Used_Confirm;
+ public static String JBoss_Runtime_Delete_Not_Used_Confirm;
+ public static String JBoss_Runtime_List_Field_Editor_Edit_Runtime;
+ public static String JBoss_Runtime_List_Field_Editor_Modify_Runtime;
+ public static String JBoss_Runtime_List_Field_Editor_New_Runtime;
+ public static String Error_JBoss_Runtime_List_Field_Editor_Path_To_Home_Diretory_Cannot_Be_Empty;
+ public static String JBoss_Runtime_List_Field_Editor_Already_Exists;
+ public static String JBoss_Runtime_List_Field_Editor_Runtime;
+ public static String Error_JBoss_Runtime_List_Field_Editor_Runtime_Name_Is_Not_Correct;
+ public static String Error_JBoss_Runtime_List_Field_Editor_Name_Cannot_Be_Empty;
+ public static String Error_JBoss_Runtime_List_Field_Editor_Version_Cannot_Be_Empty;
+ public static String JBoss_Runtime_List_Field_Editor_Create_A_Runtime;
+ public static String JBoss_Runtime_List_Field_Editor_Home_Folder;
+ public static String JBoss_Composite_Editor_This_Method_Can_Be_Invoked;
+ public static String JBoss_Button_Field_Editor_Browse;
+ public static String Error_JBoss_Button_Field_Editor_Not_Implemented_Yet;
+ public static String JBoss_SWT_Field_Editor_Factory_Browse;
+ public static String JBoss_SWT_Field_Editor_Factory_Select_Home_Folder;
+ public static String JBoss_Runtime_List_Field_Editor_Name2;
+ public static String JBoss_Runtime_Check_Field_Default_Classpath;
+ public static String JBoss_Preference_Page_Runtimes;
+
+
+ //esb facet messages
+ public static String ESBFacetInstallationPage_Button_Text_New;
+
+ public static String ESBFacetInstallationPage_Default_SRC_Folder;
+
+ public static String ESBFacetInstallationPage_Description;
+
+ public static String ESBFacetInstallationPage_Error_Message_Have_Not_Set_Target_Runtime;
+
+ public static String ESBFacetInstallationPage_Error_Message_Invalid_ESB_Runtime;
+
+ public static String ESBFacetInstallationPage_Error_Message_No_Target_Runtime;
+
+ public static String ESBFacetInstallationPage_Error_Message_Specify_Content_Folder;
+
+ public static String ESBFacetInstallationPage_Error_Message_Specify_ESB_Runtime;
+
+ public static String ESBFacetInstallationPage_Error_Message_Specify_Source_Folder;
+
+ public static String ESBFacetInstallationPage_Group_Runtime_Text;
+
+ public static String ESBFacetInstallationPage_Group_Text_Folder;
+
+ public static String ESBFacetInstallationPage_Label_Content_Directory;
+
+ public static String ESBFacetInstallationPage_Label_Server_Supplied_Runtime;
+
+ public static String ESBFacetInstallationPage_Label_Source_Directory;
+
+ public static String ESBFacetInstallationPage_Title;
+
+
+
+
+ public static String ESBProjectFirstPage_Description;
+
+ public static String ESBProjectFirstPage_Title;
+
+ public static String ESBProjectWizard_Title;
+
+
+
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, JBossESBUIMessages.class);
+ }
+}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/BaseFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/BaseFieldEditor.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/BaseFieldEditor.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -26,7 +26,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
-import org.jboss.tools.esb.project.ui.preference.messages.JBossESBUIMessages;
+import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
/**
* @author Grid Qian
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ButtonFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ButtonFieldEditor.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/ButtonFieldEditor.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -16,7 +16,7 @@
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.jboss.tools.esb.project.ui.preference.messages.JBossESBUIMessages;
+import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
/**
* @author Grid Qian
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/CompositeEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/CompositeEditor.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/CompositeEditor.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -27,7 +27,7 @@
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.jboss.tools.esb.project.ui.preference.messages.JBossESBUIMessages;
+import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
/**
* @author Grid Qian
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossESBRuntimePreferencePage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossESBRuntimePreferencePage.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossESBRuntimePreferencePage.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -24,7 +24,7 @@
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.jboss.tools.esb.core.runtime.JBossRuntime;
import org.jboss.tools.esb.core.runtime.JBossRuntimeManager;
-import org.jboss.tools.esb.project.ui.preference.messages.JBossESBUIMessages;
+import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
/**
* @author Grid Qian
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossLibraryListFieldEditor.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -49,8 +49,8 @@
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Group;
import org.jboss.tools.esb.core.runtime.JBossRuntime;
+import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
import org.jboss.tools.esb.project.ui.preference.JBossESBUIPlugin;
-import org.jboss.tools.esb.project.ui.preference.messages.JBossESBUIMessages;
/**
* @author Grid Qian
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -60,10 +60,10 @@
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.jboss.tools.esb.core.ESBProjectUtilities;
+import org.jboss.tools.esb.core.ESBProjectConstant;
import org.jboss.tools.esb.core.runtime.JBossRuntime;
import org.jboss.tools.esb.core.runtime.JBossRuntimeManager;
-import org.jboss.tools.esb.project.ui.preference.messages.JBossESBUIMessages;
+import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
/**
* @author Grid Qian
@@ -578,7 +578,7 @@
private List<String> getESBFacetVersions(){
List<String> versions = new ArrayList<String>();
- IProjectFacet esbfacet = ProjectFacetsManager.getProjectFacet(ESBProjectUtilities.ESB_PROJECT_FACET);
+ IProjectFacet esbfacet = ProjectFacetsManager.getProjectFacet(ESBProjectConstant.ESB_PROJECT_FACET);
for(IProjectFacetVersion version: esbfacet.getVersions()){
versions.add(version.getVersionString());
}
@@ -661,8 +661,8 @@
if (!jbosswsHomeDir.isDirectory())
return false;
- if(!isValidESBStandaloneRuntimeDir(path)
- && !isValidESBServer(path)){
+ if(!JBossRuntimeManager.isValidESBStandaloneRuntimeDir(path)
+ && !JBossRuntimeManager.isValidESBServer(path)){
return false;
}
@@ -670,42 +670,7 @@
return true;
}
- private boolean isValidESBStandaloneRuntimeDir(String path) {
- IPath location = new Path(path);
- IPath esblocation = location.append("lib").append("jbossesb.esb");
- IPath sarLocation = location.append("lib").append("jbossesb.sar");
- if (!esblocation.toFile().isDirectory()) {
- return false;
- }
- if (!sarLocation.toFile().isDirectory()) {
- return false;
- }
-
- return true;
- }
- private boolean isValidESBServer(String path){
- IPath serverLocation = new Path(path);
-
- String esbLcoationSeg = "server" + File.separator + "default"
- + File.separator + "deploy" + File.separator
- + "jbossesb.esb";
- String sarLocationSeg = "server" + File.separator + "default"
- + File.separator + "deploy" + File.separator
- + "jbossesb.sar";
- IPath esbLocation = serverLocation.append(esbLcoationSeg);
- IPath sarLocation = serverLocation.append(sarLocationSeg);
-
- if(!esbLocation.toFile().isDirectory()){
- return false;
- }
- if(!sarLocation.toFile().isDirectory()){
- return false;
- }
-
-
- return true;
- }
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/TextFieldEditor.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/TextFieldEditor.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/TextFieldEditor.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -22,7 +22,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
-import org.jboss.tools.esb.project.ui.preference.messages.JBossESBUIMessages;
+import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
/**
*
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/ESBProjectWizard.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/ESBProjectWizard.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/ESBProjectWizard.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -9,20 +9,21 @@
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
import org.jboss.tools.common.model.ui.ModelUIImages;
-import org.jboss.tools.esb.core.ESBProjectUtilities;
+import org.jboss.tools.esb.core.ESBProjectConstant;
+import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
import org.jboss.tools.esb.project.ui.wizards.pages.ESBProjectFirstPage;
public class ESBProjectWizard extends NewProjectDataModelFacetWizard implements
INewWizard {
public ESBProjectWizard() {
- setWindowTitle("New ESB Project Wizard");
+ setWindowTitle(JBossESBUIMessages.ESBProjectWizard_Title);
setDefaultPageImageDescriptor(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_NEW_PROJECT));
}
public ESBProjectWizard(IDataModel model) {
super(model);
- setWindowTitle("New ESB Project Wizard");
+ setWindowTitle(JBossESBUIMessages.ESBProjectWizard_Title);
setDefaultPageImageDescriptor(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_NEW_PROJECT));
}
@@ -34,7 +35,7 @@
@Override
protected IWizardPage createFirstPage() {
- return new ESBProjectFirstPage(model, "first.page");
+ return new ESBProjectFirstPage(model, "first.page"); //$NON-NLS-1$
}
@Override
@@ -44,7 +45,7 @@
@Override
protected IFacetedProjectTemplate getTemplate() {
- return ProjectFacetsManager.getTemplate(ESBProjectUtilities.ESB_PROJECT_FACET_TEMPLATE);
+ return ProjectFacetsManager.getTemplate(ESBProjectConstant.ESB_PROJECT_FACET_TEMPLATE);
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -2,8 +2,11 @@
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.EventObject;
import java.util.List;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
@@ -14,6 +17,8 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
@@ -34,12 +39,16 @@
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;
+import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
-import org.jboss.tools.esb.core.ESBProjectUtilities;
+import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.tools.esb.core.ESBProjectConstant;
import org.jboss.tools.esb.core.facet.IJBossESBFacetDataModelProperties;
import org.jboss.tools.esb.core.runtime.JBossRuntime;
import org.jboss.tools.esb.core.runtime.JBossRuntimeManager;
+import org.jboss.tools.esb.project.ui.ESBProjectPlugin;
+import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
import org.jboss.tools.esb.project.ui.preference.controls.JBossRuntimeListFieldEditor;
public class ESBFacetInstallationPage extends AbstractFacetWizardPage implements IFacetWizardPage, IJBossESBFacetDataModelProperties {
@@ -51,20 +60,23 @@
private IDataModel model;
private boolean hasValidContentFolder = true;
private boolean hasValidSrc = true;
- private boolean hasRuntime = true;
+ private boolean hasRuntime = false;
private Combo cmbRuntimes;
+ private Button btnUserSupplied;
+ private Button btnServerSupplied;
+ private Button btnNew;
public ESBFacetInstallationPage() {
super( "esb.facet.install.page"); //$NON-NLS-1$
- setTitle("Install ESB Facet");
- setDescription("Configure project structure and classpath");
+ setTitle(JBossESBUIMessages.ESBFacetInstallationPage_Title);
+ setDescription(JBossESBUIMessages.ESBFacetInstallationPage_Description);
}
private void setDefaultOutputFolder(){
JavaFacetInstallConfig cfg = findJavaFacetInstallConfig();
if(cfg != null){
- cfg.setDefaultOutputFolder(new Path(ESBProjectUtilities.BUILD_CLASSES));
+ cfg.setDefaultOutputFolder(new Path(ESBProjectConstant.BUILD_CLASSES));
}
}
@@ -75,7 +87,7 @@
createProjectGroup(composite);
createRuntimeGroup(composite);
-
+ setPageComplete(false);
setDefaultOutputFolder();
//synchHelper.synchText(configFolder, CONTENT_DIR, null);
@@ -86,7 +98,7 @@
fpwc.addListener(new IFacetedProjectListener(){
public void handleEvent(IFacetedProjectEvent event) {
- IProjectFacet facet = ProjectFacetsManager.getProjectFacet(ESBProjectUtilities.ESB_PROJECT_FACET);
+ IProjectFacet facet = ProjectFacetsManager.getProjectFacet(ESBProjectConstant.ESB_PROJECT_FACET);
final IProjectFacetVersion version = fpwc.getProjectFacetVersion(facet);
Display.getDefault().syncExec(new Runnable() {
@@ -109,13 +121,13 @@
private void createProjectGroup(Composite parent){
Group prjGroup = new Group(parent, SWT.BORDER);
- prjGroup.setText("Project Folders");
+ prjGroup.setText(JBossESBUIMessages.ESBFacetInstallationPage_Group_Text_Folder);
prjGroup.setLayout(new GridLayout(1, false));
prjGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
this.contextRootLabel = new Label(prjGroup, SWT.NONE);
- this.contextRootLabel.setText("Content Directory");
+ this.contextRootLabel.setText(JBossESBUIMessages.ESBFacetInstallationPage_Label_Content_Directory);
this.contextRootLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
this.contentFolder = new Text(prjGroup, SWT.BORDER);
@@ -125,7 +137,7 @@
contentFolder.addModifyListener(new ModifyListener(){
public void modifyText(ModifyEvent e){
String content = contentFolder.getText();
- if(content != null && !content.equals("")){
+ if(content != null && !content.equals("")){ //$NON-NLS-1$
model.setProperty(ESB_CONTENT_FOLDER, content);
}
changePageStatus();
@@ -133,17 +145,17 @@
});
configFolderLabel = new Label(prjGroup, SWT.NONE);
- configFolderLabel.setText("Java Source Directory");
+ configFolderLabel.setText(JBossESBUIMessages.ESBFacetInstallationPage_Label_Source_Directory);
configFolderLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
configFolder = new Text(prjGroup, SWT.BORDER);
configFolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
configFolder.setData("label", configFolderLabel); //$NON-NLS-1$
- configFolder.setText("src");
+ configFolder.setText(JBossESBUIMessages.ESBFacetInstallationPage_Default_SRC_Folder);
configFolder.addModifyListener(new ModifyListener(){
public void modifyText(ModifyEvent e){
String srcFolder = configFolder.getText();
- if(srcFolder != null && !srcFolder.equals("")){
+ if(srcFolder != null && !srcFolder.equals("")){ //$NON-NLS-1$
model.setProperty(ESB_SOURCE_FOLDER, srcFolder);
setConfigFolder(srcFolder);
}
@@ -197,26 +209,40 @@
private void createRuntimeGroup(Composite parent){
Group runtimeGroup = new Group(parent, SWT.BORDER);
- runtimeGroup.setText("JBoss ESB Runtime");
- runtimeGroup.setLayout(new GridLayout(2, false));
+ runtimeGroup.setText(JBossESBUIMessages.ESBFacetInstallationPage_Group_Runtime_Text);
+ runtimeGroup.setLayout(new GridLayout(3, false));
runtimeGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- /* Button btnServerSupplied = new Button(runtimeGroup, SWT.RADIO);
-
+ btnServerSupplied = new Button(runtimeGroup, SWT.RADIO);
+ btnServerSupplied.addMouseListener(new MouseAdapter(){
+ public void mouseDown(MouseEvent e) {
+ setServerSuppliedSelection(e);
+ }
+ });
GridData gd = new GridData();
gd.horizontalSpan = 1;
- btnServerSupplied.setLayoutData(gd);*/
+ btnServerSupplied.setLayoutData(gd);
- /*Label lblServerSupplied = new Label(runtimeGroup, SWT.NONE);
+ Label lblServerSupplied = new Label(runtimeGroup, SWT.NONE);
+ lblServerSupplied.addMouseListener(new MouseAdapter(){
+ public void mouseDown(MouseEvent e) {
+ btnServerSupplied.setSelection(true);
+ setServerSuppliedSelection(e);
+ }
+ });
- lblServerSupplied.setText("Server supplied ESB Runtime");
+ lblServerSupplied.setText(JBossESBUIMessages.ESBFacetInstallationPage_Label_Server_Supplied_Runtime);
gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 3;
+ gd.horizontalSpan = 2;
lblServerSupplied.setLayoutData(gd);
- Button btnUserSupplied = new Button(runtimeGroup, SWT.RADIO);*/
-
+ btnUserSupplied = new Button(runtimeGroup, SWT.RADIO);
+ btnUserSupplied.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ setUserSuppliedSelection(e);
+ }
+ });
cmbRuntimes = new Combo(runtimeGroup, SWT.READ_ONLY);
cmbRuntimes.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -225,50 +251,129 @@
String runtimeName = cmbRuntimes.getText();
JBossRuntime jr = (JBossRuntime) cmbRuntimes
.getData(runtimeName);
- saveJBosswsRuntimeToModel(jr);
+ saveJBossESBRuntimeToModel(jr);
+ changePageStatus();
}
});
initializeRuntimesCombo(cmbRuntimes, null);
- Button btnNew = new Button(runtimeGroup, SWT.NONE);
- btnNew.setText("New");
+ btnNew = new Button(runtimeGroup, SWT.NONE);
+ btnNew.setText(JBossESBUIMessages.ESBFacetInstallationPage_Button_Text_New);
btnNew.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- newJBossWSRuntime();
+ newJBossRuntime();
changePageStatus();
}
});
- if("".equals(cmbRuntimes.getText())){
+ if("".equals(cmbRuntimes.getText())){ //$NON-NLS-1$
hasRuntime = false;
}
- /*Composite chkcom = new Composite(runtimeGroup, SWT.NONE);
- chkcom.setLayout(new GridLayout(3, true));
- chkcom.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- Button jbpm = new Button(chkcom, SWT.CHECK);
- jbpm.setText("Depends on jbpm.esb");
- Button smooks = new Button(chkcom, SWT.CHECK);
- smooks.setText("Depends on Smooks.esb");
-
- Button jbrules = new Button(chkcom, SWT.CHECK);
- jbrules.setText("Depends on jrules.esb");
+ }
+
+ protected void setServerSuppliedSelection(EventObject e) {
+ btnServerSupplied.setSelection(true);
+ btnUserSupplied.setSelection(false);
+ model
+ .setBooleanProperty(
+ IJBossESBFacetDataModelProperties.RUNTIME_IS_SERVER_SUPPLIED,
+ true);
+ //remove user supplied properties
+ model.setStringProperty(
+ IJBossESBFacetDataModelProperties.RUNTIME_ID, null);
+ model.setStringProperty(
+ IJBossESBFacetDataModelProperties.RUNTIME_HOME, null);
+ enableUserSupplied(false);
+ //checkServerSuppliedESBRuntime();
+ changePageStatus();
- Button spring = new Button(chkcom, SWT.CHECK);
- spring.setText("Depends on spring.esb");
+ }
+
+ protected void setUserSuppliedSelection(EventObject e) {
+ btnServerSupplied.setSelection(false);
+ btnUserSupplied.setSelection(true);
+ model
+ .setBooleanProperty(
+ IJBossESBFacetDataModelProperties.RUNTIME_IS_SERVER_SUPPLIED,
+ false);
+ String runtimename = cmbRuntimes.getText();
+ if(runtimename == null || runtimename.equals("")){ //$NON-NLS-1$
+ hasRuntime = false;
+ }
+ JBossRuntime jbRuntime = JBossRuntimeManager.getInstance().findRuntimeByName(runtimename);
- Button soap = new Button(chkcom, SWT.CHECK);
- soap.setText("Depends on soap.esb");*/
+ if (jbRuntime != null) {
+ saveJBossESBRuntimeToModel(jbRuntime);
+ }
+ enableUserSupplied(true);
+ changePageStatus();
+
}
-
+
+ private void checkServerSuppliedESBRuntime() {
+ String prjname = model.getStringProperty(FACET_PROJECT_NAME);
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(
+ prjname);
+ try {
+ IFacetedProject fp = ProjectFacetsManager.create(project);
+ if (fp != null) {
+ IRuntime runtime = fp.getPrimaryRuntime();
+ if (runtime == null) {
+ setErrorMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_No_Target_Runtime);
+ hasRuntime = false;
+ setPageComplete(isPageComplete());
+ return;
+ }
+ org.eclipse.wst.server.core.IRuntime serverRuntime = ServerCore
+ .findRuntime(runtime.getProperty("id"));
+ if (!JBossRuntimeManager.isValidESBServer(serverRuntime
+ .getLocation().toOSString())) {
+ setErrorMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Invalid_ESB_Runtime);
+ hasRuntime = false;
+ setPageComplete(isPageComplete());
+ return;
+ }
+ } else {
+ IFacetedProjectWorkingCopy ifpwc = getFacetedProjectWorkingCopy();
+ IRuntime runtime = ifpwc.getPrimaryRuntime();
+ if (runtime == null) {
+ setErrorMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Have_Not_Set_Target_Runtime);
+ hasRuntime = false;
+ setPageComplete(isPageComplete());
+ return;
+ }
+
+ org.eclipse.wst.server.core.IRuntime serverRuntime = ServerCore
+ .findRuntime(runtime.getProperty("id")); //$NON-NLS-1$
+ if (!JBossRuntimeManager.isValidESBServer(serverRuntime
+ .getLocation().toOSString())) {
+ hasRuntime = false;
+ setErrorMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Invalid_ESB_Runtime);
+ setPageComplete(isPageComplete());
+ return;
+ }
+ }
+
+ } catch (CoreException e) {
+ ESBProjectPlugin.getDefault().getLog().log(e.getStatus());
+ }
+
+ }
+
+
+ private void enableUserSupplied(boolean enabled){
+ cmbRuntimes.setEnabled(enabled);
+ btnNew.setEnabled(enabled);
+ }
/*
- * create a new jbossws runtime and set user supplied runtime to the new one
+ * create a new jboss ESB runtime and set user supplied runtime to the new one
*/
- protected void newJBossWSRuntime() {
+ protected void newJBossRuntime() {
List<JBossRuntime> exists = new ArrayList<JBossRuntime>(Arrays.asList(JBossRuntimeManager.getInstance().getRuntimes()));
List<JBossRuntime> added = new ArrayList<JBossRuntime>();
@@ -291,13 +396,13 @@
}
protected void initializeRuntimesCombo(Combo cmRuntime, String runtimeName, String version) {
- JBossRuntime selectedJbws = null;
+ JBossRuntime selectedJbRuntime = null;
JBossRuntime defaultJbws = null;
int selectIndex = 0;
int defaultIndex = 0;
cmRuntime.removeAll();
- if(runtimeName == null || "".equals(runtimeName)){
+ if(runtimeName == null || "".equals(runtimeName)){ //$NON-NLS-1$
runtimeName = model.getStringProperty(IJBossESBFacetDataModelProperties.RUNTIME_ID);
}
JBossRuntime[] runtimes = JBossRuntimeManager.getInstance()
@@ -308,7 +413,7 @@
cmRuntime.setData(jr.getName(), jr);
if(jr.getName().equals(runtimeName)){
- selectedJbws = jr;
+ selectedJbRuntime = jr;
selectIndex = i;
}
// get default jbossws runtime
@@ -318,12 +423,12 @@
}
}
- if(selectedJbws != null){
+ if(selectedJbRuntime != null){
cmRuntime.select(selectIndex);
- saveJBosswsRuntimeToModel(selectedJbws);
+ saveJBossESBRuntimeToModel(selectedJbRuntime);
}else if(defaultJbws != null){
cmRuntime.select(defaultIndex);
- saveJBosswsRuntimeToModel(defaultJbws);
+ saveJBossESBRuntimeToModel(defaultJbws);
}
}
@@ -334,13 +439,13 @@
initializeRuntimesCombo(cmbRuntimes, null, version.getVersionString());
}else{
- initializeRuntimesCombo(cmbRuntimes, null, "");
+ initializeRuntimesCombo(cmbRuntimes, null, ""); //$NON-NLS-1$
}
}
private IProjectFacetVersion getSelectedESBVersion(){
IFacetedProjectWorkingCopy fpwc = getFacetedProjectWorkingCopy();
- IProjectFacet facet = ProjectFacetsManager.getProjectFacet(ESBProjectUtilities.ESB_PROJECT_FACET);
+ IProjectFacet facet = ProjectFacetsManager.getProjectFacet(ESBProjectConstant.ESB_PROJECT_FACET);
if(fpwc != null){
return fpwc.getProjectFacetVersion(facet);
}else{
@@ -349,14 +454,8 @@
}
- protected void saveJBosswsRuntimeToModel(JBossRuntime jbws) {
- /* String duplicateMsg = "";
- try {
- duplicateMsg = ESBProjectUtil.getDuplicateJars(model, jbws.getName());
- } catch (JavaModelException e1) {
- JBossESBPlugin.getDefault().getLog().log(
- StatusUtils.errorStatus(e1));
- }*/
+ protected void saveJBossESBRuntimeToModel(JBossRuntime jbws) {
+
if (jbws != null) {
model.setStringProperty(
IJBossESBFacetDataModelProperties.RUNTIME_HOME,
@@ -385,18 +484,20 @@
StatusUtils.errorStatus(e1));
}*/
- if(contentFolder.getText().trim().equals("")){
- setErrorMessage("Please specify a valid content folder.");
+ if(contentFolder.getText().trim().equals("")){ //$NON-NLS-1$
+ setErrorMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Specify_Content_Folder);
hasValidContentFolder = false;
setPageComplete(isPageComplete());
}
- else if(configFolder.getText().trim().equals("")){
- setErrorMessage("Please specify a valid source folder.");
+ else if(configFolder.getText().trim().equals("")){ //$NON-NLS-1$
+ setErrorMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Specify_Source_Folder);
hasValidSrc = false;
setPageComplete(isPageComplete());
- }else if(!hasRuntime){
- setErrorMessage("Please specify a ESB runtime");
+ }else if(btnUserSupplied.getSelection() && !hasRuntime){
+ setErrorMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Specify_ESB_Runtime);
setPageComplete(isPageComplete());
+ }else if(btnServerSupplied.getSelection()){
+ checkServerSuppliedESBRuntime();
}
/* else if (!duplicateMsg.equals("")) {
setErrorMessage("Duplicated jar on classpath:" + duplicateMsg);
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java 2008-10-07 07:18:37 UTC (rev 10702)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java 2008-10-07 08:46:38 UTC (rev 10703)
@@ -6,18 +6,19 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetCreationWizardPage;
-import org.jboss.tools.esb.core.ESBProjectUtilities;
+import org.jboss.tools.esb.core.ESBProjectConstant;
+import org.jboss.tools.esb.project.ui.messages.JBossESBUIMessages;
public class ESBProjectFirstPage extends DataModelFacetCreationWizardPage {
public ESBProjectFirstPage(IDataModel dataModel, String pageName) {
super(dataModel, pageName);
- setTitle("JBoss ESB Project");
- setDescription("Create a new JBoss ESB project.");
+ setTitle(JBossESBUIMessages.ESBProjectFirstPage_Title);
+ setDescription(JBossESBUIMessages.ESBProjectFirstPage_Description);
}
protected String getModuleTypeID() {
- return ESBProjectUtilities.ESB_PROJECT_FACET;
+ return ESBProjectConstant.ESB_PROJECT_FACET;
}
protected void createPresetPanel(Composite top) {
17 years, 3 months
JBoss Tools SVN: r10702 - in trunk/smooks/plugins: org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-10-07 03:18:37 -0400 (Tue, 07 Oct 2008)
New Revision: 10702
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/ChangeConstraintCommand.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateConnectionCommand.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/DeleteConnectionCommand.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataEditPart.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ExpandableGraphNodeContentFigure.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GroupFigure.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataConnectionModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/DataObjectContainerModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/IConnectableModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/RootModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataContentModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/TreeItemRelationModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/LeftSourceAnchor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/editparts/InteractorHelper.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/ContainerLayout.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/FillLayout.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/IConnectedFigure.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Interactor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Placeholder.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/modelparser/SmooksConfigurationFileGenerateContext.java
Log:
JBIDE-2833
If the root nodes don't connect , when user want to save the file , there will open a question dialog to ask user to connect them.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -20,19 +20,19 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CommandStack;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.ExtendedMetaData;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.xml.type.AnyType;
-import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.smooks.analyzer.IMappingAnalyzer;
import org.jboss.tools.smooks.analyzer.ISourceModelAnalyzer;
import org.jboss.tools.smooks.analyzer.ITargetModelAnalyzer;
@@ -47,7 +47,6 @@
import org.jboss.tools.smooks.model.ResourceConfigType;
import org.jboss.tools.smooks.model.ResourceType;
import org.jboss.tools.smooks.model.SmooksFactory;
-import org.jboss.tools.smooks.model.SmooksPackage;
import org.jboss.tools.smooks.model.SmooksResourceListType;
import org.jboss.tools.smooks.model.provider.SmooksItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.util.SmooksModelUtils;
@@ -150,8 +149,7 @@
* @param parentResourceConfigType
* @param beanId
*/
- protected void analyzeStructuredDataModel(
- List resourceList,
+ protected void analyzeStructuredDataModel(List resourceList,
AbstractStructuredDataModel root,
AbstractStructuredDataModel dataModel,
ResourceConfigType parentResourceConfigType, String beanId) {
@@ -187,14 +185,14 @@
ResourceConfigType resourceConfig = SmooksFactory.eINSTANCE
.createResourceConfigType();
resourceList.add(resourceConfig);
-// Command addResourceConfigCommand = AddCommand
-// .create(
-// editingDomain,
-// resourceList,
-// SmooksPackage.eINSTANCE
-// .getSmooksResourceListType_AbstractResourceConfig(),
-// resourceConfig);
-// addResourceConfigCommand.execute();
+ // Command addResourceConfigCommand = AddCommand
+ // .create(
+ // editingDomain,
+ // resourceList,
+ // SmooksPackage.eINSTANCE
+ // .getSmooksResourceListType_AbstractResourceConfig(),
+ // resourceConfig);
+ // addResourceConfigCommand.execute();
// resouceConfig.
resourceConfig
.setSelector(getSourceBeanSelectorString((AbstractStructuredDataModel) source));
@@ -351,10 +349,91 @@
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.smooks.analyzer.IMappingAnalyzer#analyzeMappingGraphModel(org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext)
+ */
public void analyzeMappingGraphModel(
SmooksConfigurationFileGenerateContext context)
throws SmooksAnalyzerException {
GraphRootModel root = context.getDataMappingRootModel();
+ List sourceList = root.loadSourceModelList();
+ List targetList = root.loadTargetModelList();
+
+ JavaBeanModel rootSource = null;
+ JavaBeanModel rootTarget = null;
+
+ boolean needCheck = false;
+
+ for (Iterator iterator = sourceList.iterator(); iterator.hasNext();) {
+ AbstractStructuredDataModel sourcegm = (AbstractStructuredDataModel) iterator
+ .next();
+ if (sourcegm instanceof IConnectableModel) {
+ if (!((IConnectableModel) sourcegm).getModelSourceConnections()
+ .isEmpty()
+ || !((IConnectableModel) sourcegm)
+ .getModelTargetConnections().isEmpty()) {
+ needCheck = true;
+ break;
+ }
+ }
+ }
+
+ if (needCheck) {
+ for (Iterator iterator = sourceList.iterator(); iterator.hasNext();) {
+ AbstractStructuredDataModel sourceGraphModel = (AbstractStructuredDataModel) iterator
+ .next();
+ JavaBeanModel source = (JavaBeanModel) sourceGraphModel
+ .getReferenceEntityModel();
+ if (source.isRoot()) {
+ rootSource = source;
+ break;
+ }
+ }
+
+ for (Iterator iterator = targetList.iterator(); iterator.hasNext();) {
+ AbstractStructuredDataModel targetGraphModel = (AbstractStructuredDataModel) iterator
+ .next();
+ JavaBeanModel target = (JavaBeanModel) targetGraphModel
+ .getReferenceEntityModel();
+ if (target.isRoot()) {
+ rootTarget = target;
+ break;
+ }
+ }
+ if (rootSource != null && rootTarget != null) {
+ AbstractStructuredDataModel rootSourceGraphModel = UIUtils
+ .findGraphModel(root, rootSource);
+ AbstractStructuredDataModel rootTargetGraphModel = UIUtils
+ .findGraphModel(root, rootTarget);
+ if (rootSourceGraphModel instanceof IConnectableModel
+ && rootTargetGraphModel instanceof IConnectableModel) {
+ if (((IConnectableModel) rootSourceGraphModel)
+ .isSourceConnectWith((IConnectableModel) rootTargetGraphModel)) {
+ // do nothing
+ } else {
+ // ask user if they want to connect the root model
+ Shell displayParent = context.getShell();
+ boolean connectAuto = MessageDialog
+ .openQuestion(
+ displayParent,
+ "Connection Question",
+ "The root models don't be connected , maybe it will make some errors with the generation config file contents.\nDo you wan to connect them?");
+ if (connectAuto) {
+ // connect root model
+ LineConnectionModel connectionModel = new LineConnectionModel();
+ connectionModel
+ .setSource((IConnectableModel) rootSourceGraphModel);
+ connectionModel
+ .setTarget((IConnectableModel) rootTargetGraphModel);
+ connectionModel.connect();
+ }
+ }
+ }
+ }
+ }
+
SmooksResourceListType listType = context.getSmooksResourceListModel();
this.analyzeGraphicalModel(root, context.getGeneratorResourceList());
}
@@ -511,7 +590,8 @@
if (ar instanceof ResourceConfigType) {
ResourceConfigType rc = (ResourceConfigType) ar;
ResourceType resourceType = rc.getResource();
- if(resourceType == null) continue;
+ if (resourceType == null)
+ continue;
String resource = resourceType.getValue();
if (BEANPOPULATOR.equals(resource)) {
// create root beanmodel
@@ -591,7 +671,8 @@
if (ar instanceof ResourceConfigType) {
ResourceConfigType rc = (ResourceConfigType) ar;
ResourceType resourceType = rc.getResource();
- if(resourceType == null) continue;
+ if (resourceType == null)
+ continue;
String resource = resourceType.getValue();
if (BEANPOPULATOR.equals(resource)) {
// create root beanmodel
@@ -600,7 +681,8 @@
}
}
}
- if(current == null) return null;
+ if (current == null)
+ return null;
Class rootClass = null;
rootClassName = SmooksModelUtils.getParmaText("beanClass", current);
if (rootClassName != null && loader != null) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -700,6 +700,7 @@
context.setDataMappingRootModel(this.rootModel);
context.setSmooksConfigFile(((IFileEditorInput) getEditorInput())
.getFile());
+ context.setShell(getSite().getShell());
}
protected Composite createUISectionContainer(Composite parent, int columns) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/ChangeConstraintCommand.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/ChangeConstraintCommand.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/ChangeConstraintCommand.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -15,6 +15,7 @@
import org.jboss.tools.smooks.ui.gef.model.IGraphicalModel;
/**
+ * @deprecated
* @author Dart Peng
*
*/
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateConnectionCommand.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateConnectionCommand.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateConnectionCommand.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -1,43 +1,29 @@
package org.jboss.tools.smooks.ui.gef.commands;
-import java.util.HashMap;
-import java.util.Map;
-
import org.eclipse.gef.commands.Command;
import org.jboss.tools.smooks.ui.gef.model.IConnectableModel;
import org.jboss.tools.smooks.ui.gef.model.LineConnectionModel;
/**
- * l�ߴ�������
- *
- * @author wangpeng created 2007-4-5 14:51:00
*
*/
public class CreateConnectionCommand extends Command {
-
- /**
- * ÿһ����϶�����Դ��ݶ���ڵ��Ŀ����ݶ���ڵ���ɵ�.
- * ��}��ڵ�����Ͷ���List��
- */
- public static Map listComponents = new HashMap();
+
+
private IConnectableModel source;
private IConnectableModel target;
/**
- * t���
*/
private LineConnectionModel connection;
/**
- * �����ж��Ƿ��ܹ�ִ��l��
*/
public boolean canExecute() {
-
if ( !validate() ) {
return false;
}
-
return true;
}
@@ -66,29 +52,18 @@
}
/**
- * ��֤l�ӵ�Դ��Ŀ���Ƿ���Խ���l��
- * <p>
- * ��֤����
- * <ul>
- * <li>1��
- * </ul>
- * </p>
- *
- * @see com.tongtech.ti.tisd.project.converter.ui.util.validity.Validator#validate()
*/
public boolean validate() {
return true;
}
/**
- * @return ���� source��
*/
public IConnectableModel getSource() {
return source;
}
/**
- * @return ���� target��
*/
public IConnectableModel getTarget() {
return target;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/DeleteConnectionCommand.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/DeleteConnectionCommand.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/DeleteConnectionCommand.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -5,10 +5,7 @@
import org.jboss.tools.smooks.ui.gef.model.IConnectableModel;
/**
- * l��ɾ������
*
- * @author wangpeng created 2007-4-5 14:51:58
- *
*/
public class DeleteConnectionCommand extends Command {
@@ -28,15 +25,12 @@
}
/**
- * @return ���� connectionModel��
*/
public AbstractStructuredDataConnectionModel getConnectionModel() {
return connectionModel;
}
/**
- * @param connectionModel
- * Ҫ���õ� connectionModel��
*/
public void setConnectionModel(
AbstractStructuredDataConnectionModel connectionModel) {
@@ -44,30 +38,24 @@
}
/**
- * @return ���� sourceNode��
*/
public IConnectableModel getSourceNode() {
return sourceNode;
}
/**
- * @param sourceNode
- * Ҫ���õ� sourceNode��
*/
public void setSourceNode(IConnectableModel sourceNode) {
this.sourceNode = sourceNode;
}
/**
- * @return ���� targetNode��
*/
public IConnectableModel getTargetNode() {
return targetNode;
}
/**
- * @param targetNode
- * Ҫ���õ� targetNode��
*/
public void setTargetNode(IConnectableModel targetNode) {
this.targetNode = targetNode;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataEditPart.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataEditPart.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/editparts/StructuredDataEditPart.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -40,10 +40,7 @@
import org.jboss.tools.smooks.ui.gef.util.figures.FillLayout;
/**
- * ������ṹ��EditPart
*
- * @author wangpeng 2007-3-20 15:53:37
- *
*/
public class StructuredDataEditPart extends AbstractStructuredDataEditPart
implements GraphicsConstants, IConnectableEditPart {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ExpandableGraphNodeContentFigure.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ExpandableGraphNodeContentFigure.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/ExpandableGraphNodeContentFigure.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -65,7 +65,6 @@
}
/**
- * @param interactor Ҫ���õ� interactor��
*/
public void setInteractor(IFigure interactor) {
this.interactor = interactor;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GroupFigure.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GroupFigure.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/figures/GroupFigure.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -145,7 +145,6 @@
}
/**
- * ���ظ�Group��
* @return
*/
public String getTextName() {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataConnectionModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataConnectionModel.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataConnectionModel.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -35,7 +35,6 @@
}
/**
- * t�ӵ���ʼ����ӵ�source
*/
public void attachSource() {
if (!source.getModelSourceConnections().contains(this)) {
@@ -44,7 +43,6 @@
}
/**
- * t�ӵ�β����ӵ�target
*/
public void attachTarget() {
if (!target.getModelTargetConnections().contains(this)) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataModel.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/AbstractStructuredDataModel.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -130,79 +130,34 @@
return typeString;
}
- /**
- * ���ýڵ��Java���͡��������Ҫ������ȫ�����ᅣ1�7code>java.lang.String</code>
- * ���������Ǹ������ͣ�������Ϊ<code>null</code>��
- *
- * @param typeString
- * �ڵ��Java����
- */
public void setTypeString(String typeString) {
this.typeString = typeString;
}
/**
- * ����Ԫ�ض����Ӵ�
*/
protected List children = new ArrayList();
private AbstractStructuredDataModel parent = null;
- /**
- * ��ģ�������ü������ģ�ͷ���ı�ʱ����������Ѹı�֪ͨEditPart��
- * EditPart��Ҫʵ��PropertyChangeListener�ӿ�
- * �����������ʱ�����PropertyChangeListener�ӿ��е�peopertyChange����4��ɴ����ᅣ1�7
- */
private PropertyChangeSupport listeners = new PropertyChangeSupport(this);
- /**
- * Ϊģ����Ӽ����ᅣ1�7
- *
- * @param listener
- * PropertyChangeSupport ������
- */
public void addPropertyChangeListener(PropertyChangeListener listener) {
listeners.addPropertyChangeListener(listener);
}
- /**
- * ɾ��ģ�͵ļ�����
- *
- * @param listener
- * PropertyChangeSupport ������
- */
public void removePropertyChangeListener(PropertyChangeListener listener) {
listeners.removePropertyChangeListener(listener);
}
- /**
- * ��ģ�ͷ���仯ʱ��Ҫ�������ᅣ1�7����������
- *
- * @param propName
- * �ı�����ᅣ1�7
- * @param oldValue
- * @param newValue
- */
public void firePropertyChange(String propName, Object oldValue,
Object newValue) {
listeners.firePropertyChange(propName, oldValue, newValue);
}
- /**
- * ���ص�ǰģ�����е���Ԫ�ء����ǰģ��û����Ԫ�ᅣ1�7
- *
- * @return ��ǰģ�����е���Ԫ��
- */
public List getChildren() {
return children;
}
-
- /**
- * �����Ԫ�أ���֪ͨģ����Ԫ�ط���ı�
- *
- * @param child
- * ��Ԫ��
- */
public void addChild(Object child) {
if (child == null)
return;
@@ -249,10 +204,6 @@
}
/**
- * ɾ����Ԫ�أ���֪ͨģ����Ԫ�ط���ıᅣ1�7
- *
- * @param child
- * ��Ԫ��
*/
public void removeChild(Object child) {
if (child == null || children == null)
@@ -271,9 +222,6 @@
* @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
*/
public Object getEditableValue() {
-
- // ����ģ��������Ϊ�ɱ༭������ֵ
- //
return this;
}
@@ -284,8 +232,6 @@
*/
public IPropertyDescriptor[] getPropertyDescriptors() {
- // ��Ϊ�ڳ���ģ���з���null������쳣��������ﷵ��һ��0���ȵ�����
- //
return new IPropertyDescriptor[0];
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/DataObjectContainerModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/DataObjectContainerModel.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/DataObjectContainerModel.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -3,87 +3,38 @@
import org.eclipse.draw2d.geometry.Rectangle;
/**
- * �����ݶ��������ģ�ͣ��������������ݶ���
* @deprecated
- * @author wangpeng 2007-3-21 13:53:30
*
*/
public class DataObjectContainerModel extends AbstractStructuredDataModel {
- /**
- * Դ��ݶ�������
- */
public static final int SOURCE_DATA_OBJECT_CONTAINER = 1;
- /**
- * Ŀ����ݶ�������
- */
public static final int TARGET_DATA_OBJECT_CIBTAUBER = 2;
- /**
- * ��ݶ�����������
- */
private String name;
- /**
- * �����ϵ�λ��
- */
private Rectangle constraint;
- /**
- * ��ݶ����������͡���}�����͵���ݶ�������
- * Դ��ݶ�������{@link DataObjectContainerModel#SOURCE_DATA_OBJECT_CONTAINER }
- * ��Ŀ����ݶ�������{@link DataObjectContainerModel#TARGET_DATA_OBJECT_CIBTAUBER }
- */
private int category = -1;
- /**
- * ������ݶ������������
- *
- * @return ��ݶ������������
- */
public int getCategory() {
return category;
}
- /**
- * ������ݶ������������
- * Դ��ݶ�������{@link DataObjectContainerModel#SOURCE_DATA_OBJECT_CONTAINER }
- * ��Ŀ����ݶ�������{@link DataObjectContainerModel#TARGET_DATA_OBJECT_CIBTAUBER }
- *
- * @param category ��ݶ�����������
- */
public void setCategory(int category) {
this.category = category;
}
- /**
- * ���������ڻ����ϵ�λ��
- *
- * @return �����ڻ����ϵ�λ��
- */
public Rectangle getConstraint() {
return constraint;
}
- /**
- * ���������ڻ����ϵ�λ��
- *
- * @param constraint �����ڻ����ϵ�λ��
- */
public void setConstraint(Rectangle constraint) {
this.constraint = constraint;
}
- /**
- * ������������
- * @return ��������
- */
public String getName() {
return name;
}
- /**
- * ������������
- * @param name ��������
- */
public void setName(String name) {
this.name = name;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/IConnectableModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/IConnectableModel.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/IConnectableModel.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -34,4 +34,8 @@
public void removeSourceConnection(Object connx);
public void removeTargetConnection(Object connx);
+
+ public boolean isSourceConnectWith(IConnectableModel target);
+
+ public boolean isTargetConnectWith(IConnectableModel source);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/RootModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/RootModel.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/RootModel.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -1,10 +1,7 @@
package org.jboss.tools.smooks.ui.gef.model;
/**
- * ͼ�ν���Ĭ�ϵĸ�����
- *
- * @author wangpeng 2007-3-20 16:35:20
- *
+ *@deprecated
*/
public class RootModel extends AbstractStructuredDataModel {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataContentModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataContentModel.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataContentModel.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -5,137 +5,54 @@
import org.eclipse.draw2d.geometry.Rectangle;
-/**
- * ��ݶ��������ڽ����е�ģ�͡�
- * <p>
- * ��ģ�Ϳ���������ݶ����еļ������ԣ���(���Ե����֡�Java���͵���Ϣ������������û��Java�
- * ��͵ġ�<br>
- * ���ң����ڼ������ͣ�ֻ֧�����顣������Ϊֻ���������ȷ�е�������Ϣ�������JDK1.4�����������
- * �List�ȼ������ͣ�<br>
- * ��Ϊû��ȷ�е����ͣ����Բ���֧�֡�<br>
- * </p>
- *
- * @author wangpeng 2007-3-21 15:09:11
- */
public class StructuredDataContentModel extends AbstractStructuredDataModel
implements IConnectableModel {
public static final int DATA_OBJECT_NODE_CATEGORY_SOURCE = 1;
public static final int DATA_OBJECT_NODE_CATEGORY_TARGET = 2;
- /**
- * �ڵ��� - ������ݶ������Ե�����
- */
private String name;
- /**
- * �ڵ����� - ���Ǹ����Ե�Java���͡��������Ҫ������ȫ������
- * <code>java.lang.String</code> ���������Ǹ������ͣ�������Ϊ<code>null</code>
- * ��
- */
private String javaType;
- /**
- * �ڵ�����������Ǽ����ͻ��Ǹ������͡�complexTypeΪ<code>true</code>
- * ����ʾ�ڵ��Ǹ������ͣ� complexTypeΪ<code>false</code>����ʾ�ڵ��Ǽ����͡�
- */
private boolean isComplexType;
- /**
- * ����ڵ��Ǹ�ڵ㻹����ͨ�ڵ�
- */
private boolean isRootNode;
- /**
- * ����ڵ��Ƿ�Ϊ��������
- */
private boolean isListType;
- /**
- * ����ڵ��Ƿ�Ϊ��������
- */
private boolean isObject;
- /**
- * �����ϵ�λ��
- */
private Rectangle constraint;
- /**
- * ��ݶ���ڵ�ķ��࣬Ŀǰ�ķ�����Դ��ݶ���ڵ��Ŀ����ݶ���ڵ�
- *
- * @see #DATA_OBJECT_NODE_CATEGORY_SOURCE
- * @see #DATA_OBJECT_NODE_CATEGORY_TARGET
- */
private int nodeCategory = -1;
- /**
- * Դl�Ӽ�
- */
private List sourceConnections = new ArrayList();
- /**
- * Ŀ��l�Ӽ�
- */
private List targetConnections = new ArrayList();
- /**
- * ����ģ���ڻ����ϵ�λ��
- *
- * @return ģ���ڻ����ϵ�λ��
- */
public Rectangle getConstraint() {
return constraint;
}
- /**
- * ����ģ���ڻ����ϵ�λ��
- *
- * @param constraint
- * �����ϵ�λ��
- */
public void setConstraint(Rectangle constraint) {
this.constraint = constraint;
}
- /**
- * �жϽڵ��Ǹ������ͻ��Ǽ����͡�<code>true</code>����ʾ�ڵ��Ǹ������ͣ�
- * <code>false</code>����ʾ�ڵ��Ǽ����͡�
- *
- * @return �ڵ��Ǹ������ͻ��Ǽ����͡�
- */
public boolean isComplexType() {
return isComplexType;
}
- /**
- * ���ýڵ��Ǽ����ͻ��Ǹ������͡�<code>true</code>����ʾ�ڵ��Ǹ������ͣ�
- * <code>false</code>����ʾ�ڵ��Ǽ����͡�
- *
- * @param complexType
- * �ڵ��Ǹ��ӽڵ㻹�Ǽڵ㡣
- */
public void setComplexType(boolean complexType) {
this.isComplexType = complexType;
}
- /**
- * ���ؽڵ���
- *
- * @return �ڵ���
- */
public String getName() {
return name;
}
- /**
- * ���ýڵ���
- *
- * @param name
- * �ڵ���
- */
public void setName(String name) {
this.name = name;
}
@@ -157,38 +74,30 @@
}
/**
- * @return ���� isObject��
*/
public boolean isObject() {
return isObject;
}
/**
- * @param isObject
- * Ҫ���õ� isObject��
*/
public void setObject(boolean isObject) {
this.isObject = isObject;
}
/**
- * @return ���� nodeCategory��
*/
public int getNodeCategory() {
return nodeCategory;
}
/**
- * @param nodeCategory
- * Ҫ���õ� nodeCategory��
*/
public void setNodeCategory(int nodeCategory) {
this.nodeCategory = nodeCategory;
}
/**
- * ���Դl��
- *
* @param connx
*/
public void addSourceConnection(Object connx) {
@@ -198,8 +107,6 @@
}
/**
- * ���Ŀ��l��
- *
* @param connx
*/
public void addTargetConnection(Object connx) {
@@ -208,74 +115,35 @@
firePropertyChange(P_TARGET_CONNECTION, null, connx);
}
- /**
- * ����Դl��ģ��
- *
- * @return Դl��ģ��
- */
public List getModelSourceConnections() {
return sourceConnections;
}
- /**
- * ����Ŀ��l��ģ��
- *
- * @return Ŀ��l��ģ��
- */
public List getModelTargetConnections() {
return targetConnections;
}
- /**
- * �Ƴ�Դl��
- *
- * @param connx
- */
public void removeSourceConnection(Object connx) {
sourceConnections.remove(connx);
firePropertyChange(P_SOURCE_CONNECTION, connx, null);
}
- /**
- * �Ƴ�Ŀ��l��
- *
- * @param connx
- */
public void removeTargetConnection(Object connx) {
targetConnections.remove(connx);
firePropertyChange(P_TARGET_CONNECTION, connx, null);
}
- /**
- * �Ƚ�ͬһ�����ϵ�}��ڵ��Ƿ���ͬ
- */
public boolean equals(Object node) {
return super.equals(node);
- // // ��node����DataObjectNodeModel��ʵ��ؼ�
- // //
- // if ( !(node instanceof StructuredDataContentModel) ) {
- // return false;
- // }
- //
- // StructuredDataContentModel nodeModel =
- // (StructuredDataContentModel)node;
- //
- // if ( nodeModel.getName().equals(this.getName())
- // && nodeModel.isListType() == this.isListType()
- // && nodeModel.isComplexType() == this.isComplexType()
- // && nodeModel.getNodeCategory() == this.getNodeCategory()
- // && (
- // // ��˫�����и����Ҹ�����ͬ������˫����û�и������Ϊ�棬����Ϊ��
- // //
- // (nodeModel.getParent() != null && this.getParent() != null) &&
- // nodeModel.getParent().equals(this.getParent())
- // || (nodeModel.getParent() == null && this.getParent() == null)
- // ) ) {
- // return true;
- // }
- //
- // return false;
}
+
+ public boolean isSourceConnectWith(IConnectableModel target) {
+ throw new RuntimeException("Don't support this method currently");
+ }
+
+ public boolean isTargetConnectWith(IConnectableModel source) {
+ throw new RuntimeException("Don't support this method currently");
+ }
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataModel.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/StructuredDataModel.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -98,4 +98,12 @@
public void setModelTargetConnections(List modelTargetConnections) {
this.modelTargetConnections = modelTargetConnections;
}
+
+ public boolean isSourceConnectWith(IConnectableModel target) {
+ throw new RuntimeException("Don't support this method currently");
+ }
+
+ public boolean isTargetConnectWith(IConnectableModel source) {
+ throw new RuntimeException("Don't support this method currently");
+ }
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/TreeItemRelationModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/TreeItemRelationModel.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/TreeItemRelationModel.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -11,6 +11,7 @@
package org.jboss.tools.smooks.ui.gef.model;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import org.eclipse.swt.widgets.TreeItem;
@@ -19,23 +20,25 @@
* @author Dart Peng
* @Date Jul 31, 2008
*/
-public class TreeItemRelationModel extends AbstractStructuredDataModel implements IConnectableModel {
-
+public class TreeItemRelationModel extends AbstractStructuredDataModel
+ implements IConnectableModel {
+
public static final String PRO_TREE_ITEM_SELECTION_STATUS = "__pro_treeitem_selection_status";
-
+
public static final String PRO_TREE_REPAINT = "__pro_tree_repaint";
-
+
TreeItem treeItem = null;
List<Object> modelSourceConnections = new ArrayList<Object>();
List<Object> modelTargetConnections = new ArrayList<Object>();
+
public TreeItem getTreeItem() {
return treeItem;
}
-
- public boolean isCollapse(){
+
+ public boolean isCollapse() {
TreeItem item = getTreeItem();
int y = Integer.MAX_VALUE;
- if(item != null){
+ if (item != null) {
y = item.getBounds().y;
}
return (y == 0);
@@ -55,7 +58,6 @@
this.firePropertyChange(P_TARGET_CONNECTION, null, connx);
}
-
public void removeSourceConnection(Object connx) {
this.getModelSourceConnections().remove(connx);
this.firePropertyChange(P_SOURCE_CONNECTION, connx, null);
@@ -82,4 +84,28 @@
this.modelTargetConnections = modelTargetConnections;
}
+ public boolean isSourceConnectWith(IConnectableModel target) {
+ List list = this.getModelSourceConnections();
+ for (Iterator iterator = list.iterator(); iterator.hasNext();) {
+ LineConnectionModel connection = (LineConnectionModel) iterator
+ .next();
+ if (connection.getTarget() == target) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean isTargetConnectWith(IConnectableModel source) {
+ List list = this.getModelTargetConnections();
+ for (Iterator iterator = list.iterator(); iterator.hasNext();) {
+ LineConnectionModel connection = (LineConnectionModel) iterator
+ .next();
+ if (connection.getSource() == source) {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -15,6 +15,13 @@
import org.jboss.tools.smooks.ui.gef.commands.ICommandMappingFactory;
import org.jboss.tools.smooks.ui.gef.model.IGraphicalModel;
+
+
+/**
+ * @deprecated
+ * @author Dart
+ *
+ */
public class RootGraphicsXYLayoutEditPolicy extends XYLayoutEditPolicy {
private ICommandMappingFactory mappingFactory = null;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/LeftSourceAnchor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/LeftSourceAnchor.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/LeftSourceAnchor.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -8,7 +8,7 @@
import org.eclipse.draw2d.geometry.Point;
/**
- * @author Administrator
+ * @author Dart
*
*/
public class LeftSourceAnchor extends ChopboxAnchor {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/editparts/InteractorHelper.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/editparts/InteractorHelper.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/editparts/InteractorHelper.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -13,8 +13,10 @@
import org.jboss.tools.smooks.ui.gef.figures.IExpandable;
import org.jboss.tools.smooks.ui.gef.util.figures.Interactor;
-//hooks up an interactor with an edit part and the figure that needs to be expanded and collapsed
-//
+/**
+ * @deprecated
+ *
+ */
public class InteractorHelper implements MouseListener {
protected boolean needToPerformDefaultExpansion = true;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/ContainerLayout.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/ContainerLayout.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/ContainerLayout.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -10,7 +10,9 @@
import org.eclipse.draw2d.geometry.Rectangle;
import org.jboss.tools.smooks.ui.gef.figures.IExpandable;
import org.jboss.tools.smooks.ui.gef.figures.SpacingFigure;
-
+/**
+ * @deprecated
+ */
public class ContainerLayout extends AbstractLayout {
protected boolean isHorizontal;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/FillLayout.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/FillLayout.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/FillLayout.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -8,6 +8,11 @@
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Rectangle;
+/**
+ * @deprecated
+ * @author dart
+ *
+ */
public class FillLayout extends AbstractLayout {
protected boolean isHorizontal = false;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/IConnectedFigure.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/IConnectedFigure.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/IConnectedFigure.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -1,7 +1,10 @@
package org.jboss.tools.smooks.ui.gef.util.figures;
import org.eclipse.draw2d.IFigure;
-
+/**
+ * @deprecated
+ *
+ */
public interface IConnectedFigure extends IFigure {
public IFigure getConnectionFigure();
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Interactor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Interactor.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Interactor.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -6,7 +6,7 @@
import org.eclipse.draw2d.geometry.Rectangle;
/**
- * Interactor the +/- control commonly found in trees
+ * @deprecated
*/
public class Interactor extends RectangleFigure {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Placeholder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Placeholder.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/util/figures/Placeholder.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -3,6 +3,10 @@
import org.eclipse.draw2d.RectangleFigure;
import org.eclipse.draw2d.geometry.Dimension;
+/**
+ * @deprecated
+ *
+ */
public class Placeholder extends RectangleFigure {
public Placeholder() {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/modelparser/SmooksConfigurationFileGenerateContext.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/modelparser/SmooksConfigurationFileGenerateContext.java 2008-10-07 05:19:09 UTC (rev 10701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/modelparser/SmooksConfigurationFileGenerateContext.java 2008-10-07 07:18:37 UTC (rev 10702)
@@ -17,6 +17,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.smooks.graphical.Param;
import org.jboss.tools.smooks.model.SmooksResourceListType;
import org.jboss.tools.smooks.ui.gef.model.GraphRootModel;
@@ -37,6 +38,8 @@
protected IFile smooksConfigFile = null;
protected EditingDomain domain;
+ private Shell shell;
+
protected String smooksType = null;
/**
* @return the sourceDataTypeID
@@ -143,5 +146,11 @@
this.properties.put(key, properties.get(key));
}
}
+ public Shell getShell() {
+ return shell;
+ }
+ public void setShell(Shell shell) {
+ this.shell = shell;
+ }
}
17 years, 3 months
JBoss Tools SVN: r10701 - trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-10-07 01:19:09 -0400 (Tue, 07 Oct 2008)
New Revision: 10701
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSPropertyPage.java
Log:
JBIDE-2794: Fix the ws runtime property page and preference error
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSPropertyPage.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSPropertyPage.java 2008-10-07 03:26:52 UTC (rev 10700)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/src/org/jboss/tools/ws/creation/ui/project/facet/JBossWSPropertyPage.java 2008-10-07 05:19:09 UTC (rev 10701)
@@ -2,6 +2,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.dialogs.PropertyPage;
@@ -26,7 +27,13 @@
@Override
protected Control createContents(Composite parent) {
- project = (IProject)this.getElement();
+ if(this.getElement() instanceof IJavaProject){
+ IJavaProject javaProject = (IJavaProject)this.getElement();
+ project = javaProject.getProject();
+ }else if(this.getElement() instanceof IProject){
+ project = (IProject)this.getElement();
+ }
+
model = (IDataModel)new JBossWSFacetInstallDataModelProvider().create();
try {
String isDeploy = project.getPersistentProperty(IJBossWSFacetDataModelProperties.PERSISTENCE_PROPERTY_ISDEPLOYED);
17 years, 3 months
JBoss Tools SVN: r10700 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-10-06 23:26:52 -0400 (Mon, 06 Oct 2008)
New Revision: 10700
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalInformationSaver.java
Log:
For fixing JBIDE-2831 ( .graph file out of synch with Eclipse workspace )
make the file to refresh after saving complete
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalInformationSaver.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalInformationSaver.java 2008-10-06 22:53:41 UTC (rev 10699)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalInformationSaver.java 2008-10-07 03:26:52 UTC (rev 10700)
@@ -18,6 +18,7 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
@@ -41,6 +42,8 @@
private IEditorInput input;
protected Resource graphicalFileResource;
+
+ private IFile file = null;
/**
* Create the instance during init step
@@ -66,6 +69,7 @@
e.printStackTrace();
}
}
+ setFile(gfile);
String osString = gfile.getLocation().toOSString();
graphicalFileResource = new XMLResourceFactoryImpl()
.createResource(URI.createFileURI(osString));
@@ -89,6 +93,7 @@
e.printStackTrace();
}
}
+ setFile(gfile);
String osString = gfile.getLocation().toOSString();
graphicalFileResource = new XMLResourceFactoryImpl()
.createResource(URI.createFileURI(osString));
@@ -108,7 +113,7 @@
}
public void doSave(IProgressMonitor monitor, String sourceid,
- String targetid) throws IOException {
+ String targetid) throws IOException, CoreException {
GraphInformations graph = null;
if (graphicalFileResource != null) {
if (graphicalFileResource.getContents().isEmpty()) {
@@ -122,6 +127,7 @@
initMappingTypes(graph, sourceid, targetid);
}
graphicalFileResource.save(Collections.EMPTY_MAP);
+ if(this.file != null) file.refreshLocal(IResource.DEPTH_ONE, monitor);
}
}
@@ -146,6 +152,7 @@
initParams(params, context);
}
graphicalFileResource.save(Collections.EMPTY_MAP);
+ if(this.file != null) file.refreshLocal(IResource.DEPTH_ONE, monitor);
}
}
@@ -175,4 +182,12 @@
mapping.setTargetTypeID(targetID);
}
+ public IFile getFile() {
+ return file;
+ }
+
+ public void setFile(IFile file) {
+ this.file = file;
+ }
+
}
17 years, 3 months
JBoss Tools SVN: r10699 - trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-06 18:53:41 -0400 (Mon, 06 Oct 2008)
New Revision: 10699
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/Messages.java
Log:
JBIDE-2861 - NLS error. good catch
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/Messages.java 2008-10-06 20:30:06 UTC (rev 10698)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/Messages.java 2008-10-06 22:53:41 UTC (rev 10699)
@@ -1,7 +1,6 @@
package org.jboss.ide.eclipse.archives.webtools;
import org.eclipse.osgi.util.NLS;
-import org.jboss.ide.eclipse.archives.core.ArchivesCoreMessages;
public class Messages extends NLS {
@@ -50,6 +49,6 @@
static {
- initializeMessages("org.jboss.ide.eclipse.archives.webtools.Messages", ArchivesCoreMessages.class); //$NON-NLS-1$
+ initializeMessages("org.jboss.ide.eclipse.archives.webtools.Messages", Messages.class); //$NON-NLS-1$
}
}
17 years, 3 months
JBoss Tools SVN: r10698 - trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-06 16:30:06 -0400 (Mon, 06 Oct 2008)
New Revision: 10698
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesContentProviderDelegate.java
Log:
JBIDE-2862 - weird archives UI bug
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesContentProviderDelegate.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesContentProviderDelegate.java 2008-10-06 18:27:51 UTC (rev 10697)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/providers/ArchivesContentProviderDelegate.java 2008-10-06 20:30:06 UTC (rev 10698)
@@ -42,7 +42,9 @@
public static final int CATEGORY = 2;
private IProject element;
private int type;
- public WrappedProject(IProject element, int type) { this.element = element; this.type = type;}
+ public WrappedProject(IProject element, int type) {
+ this.element = element; this.type = type;
+ }
public IProject getElement() { return element; }
public int getType() { return type; }
public boolean equals(Object otherObject) {
@@ -50,8 +52,9 @@
return true;
return false;
}
+ public String toString() { return element.toString() + "," + type;} //$NON-NLS-1$
public int hashCode() {
- return element.hashCode();
+ return element.hashCode() + type;
}
}
@@ -69,6 +72,9 @@
public int hashCode() {
return wProject.hashCode() + 15;
}
+ public String toString() {
+ return wProject.toString();
+ }
}
private int type;
17 years, 3 months
JBoss Tools SVN: r10697 - in trunk/archives: tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-06 14:27:51 -0400 (Mon, 06 Oct 2008)
New Revision: 10697
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelCreationTest.java
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTest.java
Log:
JBIDE-2849 - since the AntArchiveAction was removed (as per max telling me months ago they were pretty much unnecessary), their tests have been commented out and the extension point removed until such time as a more likely 'action' appear necessary.
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml 2008-10-06 17:13:47 UTC (rev 10696)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/plugin.xml 2008-10-06 18:27:51 UTC (rev 10697)
@@ -45,14 +45,6 @@
</file-association>
</extension>
<extension
- point="org.jboss.ide.eclipse.archives.core.actionTypes">
- <actionType
- class="org.jboss.ide.eclipse.archives.core.model.types.AntActionType"
- id="org.jboss.ide.eclipse.archives.core.antActionType"
- label="Ant Task">
- </actionType>
- </extension>
- <extension
point="org.eclipse.core.variables.dynamicVariables">
<variable
description="The project an archives node is declared in."
Modified: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelCreationTest.java
===================================================================
--- trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelCreationTest.java 2008-10-06 17:13:47 UTC (rev 10696)
+++ trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelCreationTest.java 2008-10-06 18:27:51 UTC (rev 10697)
@@ -93,14 +93,14 @@
fail();
}
- public void testAddActionToModel() {
- try {
- createEmptyModelNode().addChild(createAction());;
- } catch( ArchivesModelException ame ) {
- return;
- }
- fail();
- }
+// public void testAddActionToModel() {
+// try {
+// createEmptyModelNode().addChild(createAction());;
+// } catch( ArchivesModelException ame ) {
+// return;
+// }
+// fail();
+// }
public void testAddArchiveToModel() {
try {
@@ -146,16 +146,16 @@
}
}
- public void testAddActionToArchive() {
- try {
- IArchive archive = createArchive("someName.war", "test");
- IArchiveAction action = createAction();
- archive.addChild(action);
- createEmptyModelNode().addChild(archive);
- } catch( ArchivesModelException ame ) {
- fail();
- }
- }
+// public void testAddActionToArchive() {
+// try {
+// IArchive archive = createArchive("someName.war", "test");
+// IArchiveAction action = createAction();
+// archive.addChild(action);
+// createEmptyModelNode().addChild(archive);
+// } catch( ArchivesModelException ame ) {
+// fail();
+// }
+// }
@@ -200,22 +200,22 @@
fail();
}
}
+//
+// public void testAddActionToInnerArchive() {
+// try {
+// IArchive archive = createArchive("someName.war", "test");
+// IArchive archive2 = createArchive("someName.war2", "test2");
+// IArchiveAction action = createAction();
+//
+// archive.addChild(archive2);
+// archive2.addChild(action);
+// createEmptyModelNode().addChild(archive);
+// } catch( ArchivesModelException ame ) {
+// return;
+// }
+// fail();
+// }
- public void testAddActionToInnerArchive() {
- try {
- IArchive archive = createArchive("someName.war", "test");
- IArchive archive2 = createArchive("someName.war2", "test2");
- IArchiveAction action = createAction();
-
- archive.addChild(archive2);
- archive2.addChild(action);
- createEmptyModelNode().addChild(archive);
- } catch( ArchivesModelException ame ) {
- return;
- }
- fail();
- }
-
// Add all to INNER-folder
@@ -265,79 +265,79 @@
}
- public void testAddActionToInnerFolder() {
- try {
- IArchive archive = createArchive("someName.war", "test");
- IArchiveFolder folder = createFolder("folder");
- IArchiveAction action = createAction();
-
- archive.addChild(folder);
- folder.addChild(action);
- createEmptyModelNode().addChild(archive);
- } catch( ArchivesModelException ame ) {
- return;
- }
- fail();
- }
+// public void testAddActionToInnerFolder() {
+// try {
+// IArchive archive = createArchive("someName.war", "test");
+// IArchiveFolder folder = createFolder("folder");
+// IArchiveAction action = createAction();
+//
+// archive.addChild(folder);
+// folder.addChild(action);
+// createEmptyModelNode().addChild(archive);
+// } catch( ArchivesModelException ame ) {
+// return;
+// }
+// fail();
+// }
+//
+// // add all to action
+// public void testAddArchiveToAction() {
+// try {
+// IArchive archive = createArchive("someName.war", "test");
+// IArchiveAction action = createAction();
+// IArchiveNode child = createArchive("someName2.war", "test2");
+// archive.addChild(action);
+// action.addChild(child);
+// createEmptyModelNode().addChild(archive);
+// } catch( ArchivesModelException ame ) {
+// return;
+// }
+// fail();
+// }
+//
+// public void testAddFolderToAction() {
+// try {
+// IArchive archive = createArchive("someName.war", "test");
+// IArchiveAction action = createAction();
+// IArchiveNode child = createFolder("test");
+// archive.addChild(action);
+// action.addChild(child);
+// createEmptyModelNode().addChild(archive);
+// } catch( ArchivesModelException ame ) {
+// return;
+// }
+// fail();
+// }
+//
+// public void testAddFilesetToAction() {
+// try {
+// IArchive archive = createArchive("someName.war", "test");
+// IArchiveAction action = createAction();
+// IArchiveNode child = createFileSet("*", "path");
+// archive.addChild(action);
+// action.addChild(child);
+// createEmptyModelNode().addChild(archive);
+// } catch( ArchivesModelException ame ) {
+// return;
+// }
+// fail();
+// }
+//
+//
+// public void testAddActionToAction() {
+// try {
+// IArchive archive = createArchive("someName.war", "test");
+// IArchiveAction action = createAction();
+// IArchiveNode child = createAction();
+// archive.addChild(action);
+// action.addChild(child);
+// createEmptyModelNode().addChild(archive);
+// } catch( ArchivesModelException ame ) {
+// return;
+// }
+// fail();
+// }
- // add all to action
- public void testAddArchiveToAction() {
- try {
- IArchive archive = createArchive("someName.war", "test");
- IArchiveAction action = createAction();
- IArchiveNode child = createArchive("someName2.war", "test2");
- archive.addChild(action);
- action.addChild(child);
- createEmptyModelNode().addChild(archive);
- } catch( ArchivesModelException ame ) {
- return;
- }
- fail();
- }
-
- public void testAddFolderToAction() {
- try {
- IArchive archive = createArchive("someName.war", "test");
- IArchiveAction action = createAction();
- IArchiveNode child = createFolder("test");
- archive.addChild(action);
- action.addChild(child);
- createEmptyModelNode().addChild(archive);
- } catch( ArchivesModelException ame ) {
- return;
- }
- fail();
- }
-
- public void testAddFilesetToAction() {
- try {
- IArchive archive = createArchive("someName.war", "test");
- IArchiveAction action = createAction();
- IArchiveNode child = createFileSet("*", "path");
- archive.addChild(action);
- action.addChild(child);
- createEmptyModelNode().addChild(archive);
- } catch( ArchivesModelException ame ) {
- return;
- }
- fail();
- }
-
-
- public void testAddActionToAction() {
- try {
- IArchive archive = createArchive("someName.war", "test");
- IArchiveAction action = createAction();
- IArchiveNode child = createAction();
- archive.addChild(action);
- action.addChild(child);
- createEmptyModelNode().addChild(archive);
- } catch( ArchivesModelException ame ) {
- return;
- }
- fail();
- }
-
// add all to fileset
public void testAddArchiveToFileset() {
try {
@@ -381,19 +381,19 @@
fail();
}
- public void testAddActionToFileset() {
- try {
- IArchive archive = createArchive("someName.war", "test");
- IArchiveFileSet fs = createFileSet("*", "path");
- IArchiveNode child = createAction();
- archive.addChild(fs);
- fs.addChild(child);
- createEmptyModelNode().addChild(archive);
- } catch( ArchivesModelException ame ) {
- return;
- }
- fail();
- }
+// public void testAddActionToFileset() {
+// try {
+// IArchive archive = createArchive("someName.war", "test");
+// IArchiveFileSet fs = createFileSet("*", "path");
+// IArchiveNode child = createAction();
+// archive.addChild(fs);
+// fs.addChild(child);
+// createEmptyModelNode().addChild(archive);
+// } catch( ArchivesModelException ame ) {
+// return;
+// }
+// fail();
+// }
Modified: trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTest.java
===================================================================
--- trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTest.java 2008-10-06 17:13:47 UTC (rev 10696)
+++ trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/ModelTest.java 2008-10-06 18:27:51 UTC (rev 10697)
@@ -51,12 +51,12 @@
return fs;
}
- protected IArchiveAction createAction() {
- IArchiveAction action = ArchiveNodeFactory.createAction();
- action.setTime(IArchiveAction.POST_BUILD);
- action.setType("ant");
- return action;
- }
+// protected IArchiveAction createAction() {
+// IArchiveAction action = ArchiveNodeFactory.createAction();
+// action.setTime(IArchiveAction.POST_BUILD);
+// action.setType("ant");
+// return action;
+// }
protected IArchive createArchive(String name, String dest) {
IArchive archive = ArchiveNodeFactory.createArchive();
17 years, 3 months
JBoss Tools SVN: r10696 - trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-06 13:13:47 -0400 (Mon, 06 Oct 2008)
New Revision: 10696
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java
Log:
JBIDE-2859 NPE when deleting an ESB project
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java 2008-10-06 15:44:23 UTC (rev 10695)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java 2008-10-06 17:13:47 UTC (rev 10696)
@@ -41,6 +41,9 @@
IFacetedProject facetPrj;
try {
facetPrj = ProjectFacetsManager.create(project);
+ if (facetPrj == null) {
+ return null;
+ }
final IProjectFacet esbfacet = ProjectFacetsManager.getProjectFacet(ESBProjectUtilities.ESB_PROJECT_FACET);
final IProjectFacetVersion fv = facetPrj.getInstalledVersion(esbfacet);
return ModuleType.getModuleType(esbfacet.getId(), fv.getVersionString());
17 years, 3 months
JBoss Tools SVN: r10695 - in trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common: model/ui and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-06 11:44:23 -0400 (Mon, 06 Oct 2008)
New Revision: 10695
Removed:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/AllTypesCache.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/TypeInfoRequestor.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/IAttributeErrorProvider.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/XAttributePropertyDescription.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/DefaultValueAdapter.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxCellEditorEx.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ExtendedFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/IPropertyEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListSelectionFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListStructuredFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/MultipleChoiceFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/NoteFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringFieldEditorEx.java
Log:
JBIDE-2802
Deleted: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/AllTypesCache.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/AllTypesCache.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/AllTypesCache.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.common.core.jdt;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Comparator;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IElementChangedListener;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaElementDelta;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.search.IJavaSearchConstants;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-import org.eclipse.jdt.core.search.SearchEngine;
-import org.eclipse.jdt.core.search.SearchPattern;
-import org.eclipse.jdt.core.search.TypeNameMatch;
-
-public class AllTypesCache {
-
- private static TypeNameMatch[] cache = null;
- private static int fgSizeHint= 2000;
-
- private static int fgNumberOfCacheFlushes= 0;
-
- private static class TypeNameComparator implements Comparator {
- public int compare(Object o1, Object o2) {
- return ((TypeNameMatch)o1).getSimpleTypeName().compareTo(((TypeNameMatch)o2).getSimpleTypeName());
- }
- }
-
- private static Comparator fgTypeNameComparator= new TypeNameComparator();
-
- /**
- * Returns all types in the given scope.
- * @param kind IJavaSearchConstants.CLASS, IJavaSearchConstants.INTERFACE
- * or IJavaSearchConstants.TYPE
- * @param typesFound The resulting <code>TypeNameMatch</code> elements are added to this collection
- */
- public static void getTypes(IJavaSearchScope scope, int kind, IProgressMonitor monitor, Collection typesFound) throws JavaModelException {
- TypeNameMatch[] ts = getAllTypes(monitor);
- for (int i = 0; i < ts.length; i++) {
- TypeNameMatch info = (TypeNameMatch) cache[i];
- checkType(info, scope, kind, monitor, typesFound);
- }
- }
- private static void checkType(TypeNameMatch info, IJavaSearchScope scope, int kind, IProgressMonitor monitor, Collection typesFound) throws JavaModelException {
- if (scope.equals(SearchEngine.createWorkspaceScope()) || scope.encloses(info.getType())) {
- if (kind == IJavaSearchConstants.TYPE || (kind == IJavaSearchConstants.INTERFACE == info.getType().isInterface())) {
- typesFound.add(info);
- }
- }
- }
-
-
- /**
- * Returns all types in the workspace. The returned array must not be
- * modified. The elements in the array are sorted by simple type name.
- */
- public static synchronized TypeNameMatch[] getAllTypes(IProgressMonitor monitor) throws JavaModelException {
- if (cache == null) {
- int r = loadCache(monitor);
- if(r < 0) return null; else monitor = null;
- }
- if (monitor != null) {
- monitor.done();
- }
- return cache;
- }
- private static int loadCache(IProgressMonitor monitor) throws JavaModelException {
- ArrayList searchResult = new ArrayList(fgSizeHint);
- doSearchTypes(SearchEngine.createWorkspaceScope(), IJavaSearchConstants.TYPE, monitor, searchResult);
- if (monitor != null && monitor.isCanceled()) {
- return -1;
- }
- cache = (TypeNameMatch[]) searchResult.toArray(new TypeNameMatch[searchResult.size()]);
- Arrays.sort(cache, getTypeNameComperator());
- fgSizeHint= cache.length;
-
- JavaCore.addElementChangedListener(new TypeCacheDeltaListener());
- return 0;
- }
-
- /**
- * Returns true if the type cache is up to date.
- */
- public static boolean isCacheUpToDate() {
- return cache != null;
- }
-
- /**
- * Returns a compartor that compares the simple type names
- */
- public static Comparator getTypeNameComperator() {
- return fgTypeNameComparator;
- }
-
- private static void doSearchTypes(IJavaSearchScope scope, int style, IProgressMonitor monitor, Collection typesFound) throws JavaModelException {
- new SearchEngine().searchAllTypeNames(
- null,
- null,
- SearchPattern.R_PATTERN_MATCH,
- style,
- scope,
- new TypeInfoRequestor(typesFound),
- IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
- monitor);
- }
-
- private static class TypeCacheDeltaListener implements IElementChangedListener {
-
- /*
- * @see IElementChangedListener#elementChanged
- */
- public void elementChanged(ElementChangedEvent event) {
- boolean needsFlushing= processDelta(event.getDelta());
- if (needsFlushing) {
- cache= null;
- fgNumberOfCacheFlushes++;
- JavaCore.removeElementChangedListener(this); // it's ok to remove listener while delta processing
- }
- }
-
- /*
- * returns true if the cache needs to be flushed
- */
- private boolean processDelta(IJavaElementDelta delta) {
- IJavaElement elem= delta.getElement();
- boolean isAddedOrRemoved= (delta.getKind() != IJavaElementDelta.CHANGED)
- || (delta.getFlags() & (IJavaElementDelta.F_ADDED_TO_CLASSPATH | IJavaElementDelta.F_REMOVED_FROM_CLASSPATH)) != 0;
-
- switch (elem.getElementType()) {
- case IJavaElement.JAVA_MODEL:
- case IJavaElement.JAVA_PROJECT:
- case IJavaElement.PACKAGE_FRAGMENT_ROOT:
- case IJavaElement.PACKAGE_FRAGMENT:
- case IJavaElement.CLASS_FILE:
- case IJavaElement.TYPE: // type children can be inner classes
- if (isAddedOrRemoved) {
- return true;
- }
- return processChildrenDelta(delta);
- case IJavaElement.COMPILATION_UNIT: // content change means refresh from local
- if (((ICompilationUnit) elem).isWorkingCopy()) {
- return false;
- }
- if (isAddedOrRemoved || isPossibleStructuralChange(delta.getFlags())) {
- return true;
- }
- return processChildrenDelta(delta);
- default:
- // fields, methods, imports ect
- return false;
- }
- }
-
- private boolean isPossibleStructuralChange(int flags) {
- return (flags & (IJavaElementDelta.F_CONTENT | IJavaElementDelta.F_FINE_GRAINED)) == IJavaElementDelta.F_CONTENT;
- }
-
- private boolean processChildrenDelta(IJavaElementDelta delta) {
- IJavaElementDelta[] children= delta.getAffectedChildren();
- for (int i= 0; i < children.length; i++) {
- if (processDelta(children[i])) {
- return true;
- }
- }
- return false;
- }
- }
-
-
-}
Deleted: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/TypeInfoRequestor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/TypeInfoRequestor.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/jdt/TypeInfoRequestor.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.common.core.jdt;
-
-import java.util.Collection;
-
-import org.eclipse.jdt.core.search.TypeNameRequestor;
-
-
-public class TypeInfoRequestor extends TypeNameRequestor {
-
- public TypeInfoRequestor(Collection typesFound) {
- super(); // TODO-3.3: why is constructor taking typesFound as argument ? If API in 3.3 change why is the constructor here not changed ?
- }
-
- protected boolean inScope(char[] packageName, char[] typeName) {
- return true;
- }
-
-}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/IAttributeErrorProvider.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/IAttributeErrorProvider.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/IAttributeErrorProvider.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.common.model.ui;
+import java.beans.PropertyChangeListener;
+
public interface IAttributeErrorProvider {
public boolean hasErrors();
public String getError();
+ public void addErrorStateListener(PropertyChangeListener l);
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/XAttributePropertyDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/XAttributePropertyDescription.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/XAttributePropertyDescription.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.model.ui.attribute;
+import org.jboss.tools.common.model.impl.XModelImpl;
import org.jboss.tools.common.model.ui.*;
import org.jboss.tools.common.model.ui.attribute.adapter.*;
import org.jboss.tools.common.model.ui.attribute.editor.*;
@@ -56,7 +57,21 @@
// CellEditor
public CellEditor createPropertyEditor(Composite parent) {
- return (!isEditable()) ? null : propertyEditor.getCellEditor(parent);
+ if(!isEditable()) {
+ return null;
+ }
+ CellEditor editor = propertyEditor.getCellEditor(parent);
+ if(editor != null) {
+ editor.setValidator(new ICellEditorValidator() {
+ public String isValid(Object value) {
+ if(modelObject == null) return null;
+ String error = ((XModelImpl)modelObject.getModel()).getError(modelObject, attribute.getName(), value == null ? "" : value.toString());
+ return error;
+ }
+
+ });
+ }
+ return (!isEditable()) ? null : editor;
}
// FieldEditor
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/DefaultValueAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/DefaultValueAdapter.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/DefaultValueAdapter.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -25,12 +25,14 @@
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.impl.XModelImpl;
import org.jboss.tools.common.model.markers.XMarkerManager;
public class DefaultValueAdapter implements IModelPropertyEditorAdapter, IAdaptable {
protected Object value = "";
protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
+ protected PropertyChangeSupport pcs2 = new PropertyChangeSupport(this);
protected XModel model;
protected XAttribute attribute;
@@ -45,6 +47,10 @@
protected boolean autoStore = true;
protected boolean storeLocked = false;
+ protected String invalidValue = null;
+ protected String lastCorrectValue = null;
+ protected String currentError = null;
+
public DefaultValueAdapter() {}
public void store() {
@@ -54,6 +60,26 @@
if(v != null && attribute.isTrimmable()) v = v.trim();
String n = attribute.getName();
if(modelObject.isActive()) {
+
+ currentError = ((XModelImpl)modelObject.getModel()).getError(modelObject, n, v);
+
+ if(currentError != null) {
+ invalidValue = getStringValue(true);
+ lastCorrectValue = modelObject.getAttributeValue(n);
+ if(pcs2 != null) {
+ pcs2.firePropertyChange(IPropertyEditor.ERROR, Boolean.FALSE, Boolean.TRUE);
+ }
+ fireValueChange(v, v);
+ return;
+ } else {
+ boolean changed = invalidValue != null;
+ invalidValue = null;
+ lastCorrectValue = null;
+ if(changed && pcs2 != null) {
+ pcs2.firePropertyChange(IPropertyEditor.ERROR, Boolean.TRUE, Boolean.FALSE);
+ }
+ }
+
try {
modelObject.getModel().editObjectAttribute(modelObject, n, v);
} catch (XModelException e) {
@@ -75,7 +101,13 @@
public void load() {
if (MODELOBJECT_TARGET == storeTarget) {
- this.setValue(modelObject.getAttributeValue(attribute.getName()));
+ String value = modelObject.getAttributeValue(attribute.getName());
+ if(currentError != null && invalidValue != null) {
+ if(value != null && value.equals(lastCorrectValue)) {
+ return;
+ }
+ }
+ this.setValue(value);
} else {
this.setValue(attributeData.getValue());
}
@@ -103,6 +135,10 @@
public void removeValueChangeListener(PropertyChangeListener l) {
if (pcs!=null) pcs.removePropertyChangeListener(l);
}
+
+ public void addErrorStateListener(PropertyChangeListener l) {
+ if (pcs2!=null) pcs2.addPropertyChangeListener(l);
+ }
// IValueChangeListener
public void valueChange(PropertyChangeEvent event) {
@@ -186,11 +222,19 @@
public boolean hasErrors() {
if(ATTRIBUTEDATA_TARGET == storeTarget) return false;
+ if(invalidValue != null && currentError != null) {
+ return true;
+ }
return attribute != null && XMarkerManager.getInstance().hasErrors(modelObject, attribute.getName());
}
public String getError() {
if(modelObject == null || attribute == null) return null;
+ if(ATTRIBUTEDATA_TARGET != storeTarget) {
+ if(invalidValue != null && currentError != null) {
+ return currentError;
+ }
+ }
return XMarkerManager.getInstance().getError(modelObject, attribute.getName());
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -817,4 +817,9 @@
public String getError() {
return null;
}
+
+ public void addErrorStateListener(PropertyChangeListener l) {
+ // TODO Auto-generated method stub
+ }
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxCellEditorEx.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxCellEditorEx.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxCellEditorEx.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -116,7 +116,7 @@
combo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- valueChanged(true, true);
+ check();
}
});
@@ -125,6 +125,27 @@
return combo;
}
+ protected boolean check() {
+ String value = combo.getText();
+ if (value == null) {
+ value = "";//$NON-NLS-1$
+ }
+ Object typedValue = value;
+ boolean oldValidState = isValueValid();
+ boolean newValidState = isCorrect(typedValue);
+ if (typedValue == null && newValidState) {
+ Assert.isTrue(false,
+ "Validator isn't limiting the cell editor's type range");//$NON-NLS-1$
+ }
+ if (!newValidState) {
+ // try to insert the current value into the error message.
+ setErrorMessage(MessageFormat.format(getErrorMessage(),
+ new Object[] { value }));
+ }
+ valueChanged(oldValidState, newValidState);
+ return newValidState;
+ }
+
protected Object doGetValue() {
return this.value;
}
@@ -134,8 +155,10 @@
}
public void focusLost() {
- value = combo.getText();
- valueChanged(true, true);
+ if(check()) {
+ value = combo.getText();
+ }
+// valueChanged(true, true);
this.fireApplyEditorValue();
super.focusLost();
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ComboBoxFieldEditor.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -391,6 +391,7 @@
// PropertyChangeListener
public void propertyChange(PropertyChangeEvent evt) {
+ super.propertyChange(evt);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
Object v = evt.getNewValue();
valueProvider.removeValueChangeListener(this);
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ExtendedFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ExtendedFieldEditor.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ExtendedFieldEditor.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.common.model.ui.attribute.editor;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
import org.jboss.tools.common.model.ui.IAttributeErrorProvider;
import org.jboss.tools.common.model.ui.navigator.LabelDecoratorImpl;
import org.eclipse.jface.dialogs.IDialogConstants;
@@ -206,6 +209,9 @@
public void setErrorProvider(IAttributeErrorProvider errorProvider) {
this.errorProvider = errorProvider;
+ if(this instanceof PropertyChangeListener) {
+ errorProvider.addErrorStateListener((PropertyChangeListener)this);
+ }
}
public IAttributeErrorProvider getErrorProvider() {
@@ -279,12 +285,19 @@
} else {
image = LabelDecoratorImpl.emptyImage;
}
- if(errorStateImage != image) {
+ if(errorStateImage != image ||
+ (image != null && errorSymbolLabel != null && tooltip != null && !tooltip.equals(errorSymbolLabel.getToolTipText()) )) {
errorSymbolLabel.setImage(errorStateImage = image);
errorSymbolLabel.setToolTipText(tooltip);
}
}
}
+ public void propertyChange(PropertyChangeEvent evt) {
+ if (IPropertyEditor.ERROR.equals(evt.getPropertyName())) {
+ updateErrorState();
+ }
+ }
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/IPropertyEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/IPropertyEditor.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/IPropertyEditor.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -15,6 +15,7 @@
import org.eclipse.swt.widgets.Composite;
public interface IPropertyEditor extends IAdaptable {
+ public static final String ERROR = "IPropertyEditor.error";
public static final String VALUE = "IPropertyEditor.value";
public static final String LIST_CONTENT = "IPropertyEditor.listContent";
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListSelectionFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListSelectionFieldEditor.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListSelectionFieldEditor.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -200,6 +200,7 @@
}
public void propertyChange(java.beans.PropertyChangeEvent evt) {
+ super.propertyChange(evt);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
Object v = evt.getNewValue();
valueProvider.removeValueChangeListener(this);
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListStructuredFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListStructuredFieldEditor.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/ListStructuredFieldEditor.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -422,6 +422,7 @@
}
public void propertyChange(PropertyChangeEvent evt) {
+ super.propertyChange(evt);
valueProvider.removeValueChangeListener(this);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
elements = null;
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/MultipleChoiceFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/MultipleChoiceFieldEditor.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/MultipleChoiceFieldEditor.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -164,6 +164,7 @@
boolean propertyChangeEnabled = true;
public void propertyChange(PropertyChangeEvent evt) {
if(!propertyChangeEnabled) return;
+ super.propertyChange(evt);
valueProvider.removeValueChangeListener(this);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
updateChoices();
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/NoteFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/NoteFieldEditor.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/NoteFieldEditor.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -418,6 +418,7 @@
}
public void propertyChange(PropertyChangeEvent evt) {
+ super.propertyChange(evt);
valueProvider.removeValueChangeListener(this);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
setStringValue(valueProvider.getStringValue(true));
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringButtonFieldEditorEx.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -316,6 +316,7 @@
}
public void propertyChange(java.beans.PropertyChangeEvent evt) {
+ super.propertyChange(evt);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
Object v = evt.getNewValue();
valueProvider.removeValueChangeListener(this);
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringFieldEditorEx.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringFieldEditorEx.java 2008-10-06 15:37:26 UTC (rev 10694)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/StringFieldEditorEx.java 2008-10-06 15:44:23 UTC (rev 10695)
@@ -72,6 +72,7 @@
// PropertyChangeListener
public void propertyChange(PropertyChangeEvent evt) {
+ super.propertyChange(evt);
valueProvider.removeValueChangeListener(this);
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())) {
Object v = evt.getNewValue();
17 years, 3 months
JBoss Tools SVN: r10694 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-06 11:37:26 -0400 (Mon, 06 Oct 2008)
New Revision: 10694
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java
Log:
JBIDE-2802
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java 2008-10-06 15:17:55 UTC (rev 10693)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java 2008-10-06 15:37:26 UTC (rev 10694)
@@ -286,7 +286,6 @@
if(a.isTrimmable() && value != null) value = value.trim();
String ov = object.getAttributeValue(attributeName);
ov = (ov == null) ? "" : ov;
- if(!isDifferent(ov, value)) return null;
if(value.length() == 0 && "true".equals(a.getProperty("required"))) {
String mes = "Attribute " + a.getName() + " is required.";
return mes;
17 years, 3 months
JBoss Tools SVN: r10693 - trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-06 11:17:55 -0400 (Mon, 06 Oct 2008)
New Revision: 10693
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlink.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2858 fixed
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlink.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlink.java 2008-10-06 15:12:06 UTC (rev 10692)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlink.java 2008-10-06 15:17:55 UTC (rev 10693)
@@ -34,6 +34,7 @@
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.ide.IDE;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMText;
import org.jboss.tools.common.text.ext.ExtensionsPlugin;
import org.jboss.tools.common.text.ext.hyperlink.jsp.JSPRootHyperlinkPartitioner;
@@ -306,16 +307,17 @@
private List<Node> findStyleLinks (NodeList list) {
List<Node> styleLinks = new ArrayList<Node>();
for (int i = 0; list != null && i < list.getLength(); i++) {
- IDOMElement element = (IDOMElement)list.item(i);
+
+ IDOMNode element = (IDOMNode)list.item(i);
String axis = JSPRootHyperlinkPartitioner.computeAxis(getDocument(), element.getStartOffset());
axis = axis.toLowerCase();
if (axis.endsWith("/link")) {
- Attr relAttr = element.getAttributeNode("rel");
+ Node relAttr = element.getAttributes().getNamedItem("rel");
if (relAttr != null) {
String val = relAttr.getNodeValue().toLowerCase();
if ("stylesheet".equalsIgnoreCase(val) || "\"stylesheet\"".equalsIgnoreCase(val)) {
- Attr hrefAttr = element.getAttributeNode("href");
+ Node hrefAttr = element.getAttributes().getNamedItem("href");
if (hrefAttr != null) {
styleLinks.add(hrefAttr);
}
17 years, 3 months
JBoss Tools SVN: r10692 - in trunk/as/docs/reference/en/images: perspective and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-06 11:12:06 -0400 (Mon, 06 Oct 2008)
New Revision: 10692
Modified:
trunk/as/docs/reference/en/images/modules/modules_4.png
trunk/as/docs/reference/en/images/perspective/perspective_1.png
trunk/as/docs/reference/en/images/perspective/perspective_17.png
trunk/as/docs/reference/en/images/perspective/perspective_18.png
trunk/as/docs/reference/en/images/perspective/perspective_2.png
trunk/as/docs/reference/en/images/perspective/perspective_21.png
trunk/as/docs/reference/en/images/perspective/perspective_3.png
trunk/as/docs/reference/en/images/perspective/perspective_4.png
trunk/as/docs/reference/en/images/perspective/perspective_5.png
trunk/as/docs/reference/en/images/perspective/perspective_6.png
trunk/as/docs/reference/en/images/perspective/perspective_7.png
trunk/as/docs/reference/en/images/perspective/perspective_8.png
trunk/as/docs/reference/en/images/perspective/perspective_9.png
trunk/as/docs/reference/en/images/quick_start/quick_start_2.png
trunk/as/docs/reference/en/images/quick_start/quick_start_5.png
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_1.png
trunk/as/docs/reference/en/images/tptp_support/tptp_support_1.png
Log:
https://jira.jboss.org/jira/browse/JBDS-431 - updating screens;
Modified: trunk/as/docs/reference/en/images/modules/modules_4.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_1.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_17.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_18.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_2.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_21.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_3.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_4.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_5.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_6.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_7.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_8.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_9.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/quick_start/quick_start_2.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/quick_start/quick_start_5.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_1.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/tptp_support/tptp_support_1.png
===================================================================
(Binary files differ)
17 years, 3 months
JBoss Tools SVN: r10691 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-06 11:06:28 -0400 (Mon, 06 Oct 2008)
New Revision: 10691
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2731
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-10-06 15:03:27 UTC (rev 10690)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-10-06 15:06:28 UTC (rev 10691)
@@ -47,6 +47,7 @@
import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;
import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
+import org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard;
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
import org.hibernate.eclipse.console.utils.DriverClassHelpers;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -357,10 +358,8 @@
new ProjectNamesDuplicationValidator(
IFacetDataModelProperties.FACET_PROJECT_NAME));
validatorDelegate.addValidatorForProperty(
- ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
- new DeploymentTypeValidator(
- ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
- ((NewProjectDataModelFacetWizard)getWizard()).getDataModel()));
+ ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
+ getDeploymentTypeValidator(getWizard()));
}
jBossHibernateDbTypeEditor
@@ -540,6 +539,20 @@
}
}
+ IValidator getDeploymentTypeValidator(IWizard wizard) {
+ if(wizard instanceof NewProjectDataModelFacetWizard) {
+ return new DeploymentTypeValidator(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, ((NewProjectDataModelFacetWizard)wizard).getDataModel());
+ } else if(wizard instanceof ModifyFacetedProjectWizard) {
+ ModifyFacetedProjectWizard mfpw = (ModifyFacetedProjectWizard)wizard;
+ }
+ return new IValidator() {
+ public Map<String, String> validate(Object value, Object context) {
+ SeamInstallWizardPage.this.validate();
+ return ValidatorFactory.NO_ERRORS;
+ }
+ };
+ }
+
static class DeploymentTypeValidator implements IValidator {
String propertyName;
@@ -556,7 +569,7 @@
/**
*/
- public DeploymentTypeValidator (String propertyName, IDataModel model) {
+ public DeploymentTypeValidator(String propertyName, IDataModel model) {
this.propertyName = propertyName;
this.model = model;
}
@@ -565,7 +578,6 @@
* @see IValidator#validate(Object, Object)
*/
public Map<String, String> validate(Object value, Object context) {
-
final String deploymentType = value.toString();
if(!ISeamFacetDataModelProperties.DEPLOY_AS_WAR.equals(deploymentType)) {
Object runtimeName = model.getProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME);
17 years, 3 months
JBoss Tools SVN: r10690 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-06 11:03:27 -0400 (Mon, 06 Oct 2008)
New Revision: 10690
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2731
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-10-06 14:58:09 UTC (rev 10689)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-10-06 15:03:27 UTC (rev 10690)
@@ -78,10 +78,34 @@
public static String DROOLS_LIB_SEAM_RELATED_PATH = "lib"; //$NON-NLS-1$
- public void doExecute(final IProject project, IProjectFacetVersion fv,
- Object config, IProgressMonitor monitor) throws CoreException {
- final IDataModel model = (IDataModel)config;
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#doExecuteForEar(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, org.eclipse.wst.common.frameworks.datamodel.IDataModel, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected void doExecuteForEar(final IProject project, IProjectFacetVersion fv,
+ IDataModel model, IProgressMonitor monitor) throws CoreException {
+ // TODO
+ }
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#doExecuteForEjb(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, org.eclipse.wst.common.frameworks.datamodel.IDataModel, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected void doExecuteForEjb(final IProject project, IProjectFacetVersion fv,
+ IDataModel model, IProgressMonitor monitor) throws CoreException {
+ // TODO
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#doExecuteForWar(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, org.eclipse.wst.common.frameworks.datamodel.IDataModel, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected void doExecuteForWar(final IProject project, IProjectFacetVersion fv,
+ IDataModel model, IProgressMonitor monitor) throws CoreException {
+
// get WebContents folder path from DWP model
IVirtualComponent component = ComponentCore.createComponent(project);
IVirtualFolder webRootVirtFolder = component.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-10-06 14:58:09 UTC (rev 10689)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-10-06 15:03:27 UTC (rev 10690)
@@ -35,6 +35,7 @@
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jst.j2ee.model.IModelProvider;
import org.eclipse.jst.j2ee.model.ModelProviderManager;
+import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
import org.eclipse.jst.javaee.core.DisplayName;
import org.eclipse.jst.javaee.core.JavaeeFactory;
import org.eclipse.jst.javaee.core.Listener;
@@ -55,7 +56,9 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.seam.core.SeamCoreMessages;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.osgi.service.prefs.BackingStoreException;
@@ -239,14 +242,59 @@
*
* @param project
* @param fv
+ * @param model
+ * @param monitor
+ * @throws CoreException
+ */
+ protected abstract void doExecuteForWar(IProject project, IProjectFacetVersion fv,
+ IDataModel model, IProgressMonitor monitor) throws CoreException;
+
+ /**
+ *
+ * @param project
+ * @param fv
+ * @param model
+ * @param monitor
+ * @throws CoreException
+ */
+ protected abstract void doExecuteForEar(IProject project, IProjectFacetVersion fv,
+ IDataModel model, IProgressMonitor monitor) throws CoreException;
+
+ /**
+ *
+ * @param project
+ * @param fv
+ * @param model
+ * @param monitor
+ * @throws CoreException
+ */
+ protected abstract void doExecuteForEjb(IProject project, IProjectFacetVersion fv,
+ IDataModel model, IProgressMonitor monitor) throws CoreException;
+
+ /**
+ *
+ * @param project
+ * @param fv
* @param config
* @param monitor
* @throws CoreException
*/
- protected abstract void doExecute(IProject project, IProjectFacetVersion fv,
- Object config, IProgressMonitor monitor) throws CoreException;
+ public void doExecute(final IProject project, IProjectFacetVersion fv,
+ Object config, IProgressMonitor monitor) throws CoreException {
+ final IDataModel model = (IDataModel)config;
+ IFacetedProject facetedProject = ProjectFacetsManager.create(project);
+ IProjectFacetVersion ejbVersion = facetedProject.getProjectFacetVersion(IJ2EEFacetConstants.EJB_FACET);
+ IProjectFacetVersion webVersion = facetedProject.getProjectFacetVersion(IJ2EEFacetConstants.DYNAMIC_WEB_FACET);
+ IProjectFacetVersion earVersion = facetedProject.getProjectFacetVersion(IJ2EEFacetConstants.ENTERPRISE_APPLICATION_FACET);
+ if(ejbVersion!=null) {
+ doExecuteForEjb(project, fv, model, monitor);
+ } else if(webVersion!=null) {
+ doExecuteForWar(project, fv, model, monitor);
+ } else if(earVersion!=null) {
+ doExecuteForEar(project, fv, model, monitor);
+ }
+ }
-
/**
*
*/
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-10-06 14:58:09 UTC (rev 10689)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-10-06 15:03:27 UTC (rev 10690)
@@ -22,6 +22,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.jst.common.project.facet.core.ClasspathHelper;
+import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
import org.eclipse.jst.javaee.core.DisplayName;
import org.eclipse.jst.javaee.core.JavaeeFactory;
import org.eclipse.jst.javaee.web.Filter;
@@ -30,14 +31,16 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
/**
- * Install delegate for seam faset version 1.2
+ * Install delegate for seam facet version 1.2
*
* @author eskimo
*/
@@ -108,9 +111,34 @@
public static String DROOLS_LIB_SEAM_RELATED_PATH = "drools/lib"; //$NON-NLS-1$
- private void doExecuteForWar(final IProject project, IProjectFacetVersion fv,
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#doExecuteForEar(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, org.eclipse.wst.common.frameworks.datamodel.IDataModel, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected void doExecuteForEar(final IProject project, IProjectFacetVersion fv,
IDataModel model, IProgressMonitor monitor) throws CoreException {
+ // TODO
+ }
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#doExecuteForEjb(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, org.eclipse.wst.common.frameworks.datamodel.IDataModel, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected void doExecuteForEjb(final IProject project, IProjectFacetVersion fv,
+ IDataModel model, IProgressMonitor monitor) throws CoreException {
+ // TODO
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#doExecuteForWar(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, org.eclipse.wst.common.frameworks.datamodel.IDataModel, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected void doExecuteForWar(final IProject project, IProjectFacetVersion fv,
+ IDataModel model, IProgressMonitor monitor) throws CoreException {
+
// get WebContents folder path from DWP model
IVirtualComponent component = ComponentCore.createComponent(project);
IVirtualFolder webRootVirtFolder = component.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
@@ -280,17 +308,6 @@
/*
* (non-Javadoc)
- * @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#doExecute(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void doExecute(final IProject project, IProjectFacetVersion fv,
- Object config, IProgressMonitor monitor) throws CoreException {
- final IDataModel model = (IDataModel)config;
-
- doExecuteForWar(project, fv, model, monitor);
- }
-
- /*
- * (non-Javadoc)
* @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#configure(org.eclipse.jst.javaee.web.WebApp)
*/
@Override
17 years, 3 months
JBoss Tools SVN: r10689 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-06 10:58:09 -0400 (Mon, 06 Oct 2008)
New Revision: 10689
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java
Log:
JBIDE-2802
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java 2008-10-06 14:02:52 UTC (rev 10688)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java 2008-10-06 14:58:09 UTC (rev 10689)
@@ -270,7 +270,42 @@
public void changeObjectAttribute(XModelObject object, String attributeName, String value) throws XModelException {
changeObjectAttribute(object, attributeName, value, false);
}
-
+
+ /**
+ * Returns validation error.
+ * @param object
+ * @param attributeName
+ * @param value
+ * @return
+ */
+ public String getError(XModelObject object, String attributeName, String value) {
+ if(object == null || object.getPath() == null) return null;
+ XModelEntity ent = object.getModelEntity();
+ XAttribute a = ent.getAttribute(attributeName);
+ if(a == null) return null;
+ if(a.isTrimmable() && value != null) value = value.trim();
+ String ov = object.getAttributeValue(attributeName);
+ ov = (ov == null) ? "" : ov;
+ if(!isDifferent(ov, value)) return null;
+ if(value.length() == 0 && "true".equals(a.getProperty("required"))) {
+ String mes = "Attribute " + a.getName() + " is required.";
+ return mes;
+ }
+ XAttributeConstraint c = a.getConstraint();
+ if(c != null && service != null) {
+ String error = (c instanceof XAttributeConstraintV)
+ ? ((XAttributeConstraintV)c).getError(value, object)
+ : c.getError(value);
+ if(error != null) {
+ String mes = XBundle.getInstance().getMessage("model",
+ "SET_ATTRIBUTE_FAILURE",
+ new Object[]{attributeName, value, error});
+ return mes;
+ }
+ }
+ return null;
+ }
+
void changeObjectAttribute(XModelObject object, String attributeName, String value, boolean edit) throws XModelException {
if(object == null || object.getPath() == null) return;
XModelEntity ent = object.getModelEntity();
17 years, 3 months
JBoss Tools SVN: r10688 - trunk/as/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-06 10:02:52 -0400 (Mon, 06 Oct 2008)
New Revision: 10688
Modified:
trunk/as/docs/reference/en/modules/perspective.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-433 - adding a note;
Modified: trunk/as/docs/reference/en/modules/perspective.xml
===================================================================
--- trunk/as/docs/reference/en/modules/perspective.xml 2008-10-06 12:55:31 UTC (rev 10687)
+++ trunk/as/docs/reference/en/modules/perspective.xml 2008-10-06 14:02:52 UTC (rev 10688)
@@ -72,8 +72,8 @@
incremental publish if it turns out that the module in question is capable of doing one.</para>
<para>Now, let's get to know with both of the <property>JBoss Server
- View</property> parts.</para>
-
+ View</property> parts.</para>
+
<section role="updated">
<title>Top Part of the JBoss Server View</title>
<para>In the top part of the <property>JBoss Server View</property> all declared servers
@@ -164,12 +164,16 @@
port settings are configurable.</para>
<para>The settings relating to <emphasis>
- <property>Publishing</property></emphasis>, <emphasis>
- <property>Timeouts</property></emphasis> or <emphasis>
- <property>Server Polling</property></emphasis> can also be adjusted here.</para>
+ <property>Publishing</property>
+ </emphasis>, <emphasis>
+ <property>Timeouts</property>
+ </emphasis> or <emphasis>
+ <property>Server Polling</property>
+ </emphasis> can also be adjusted here.</para>
- <para id="com_line_arg">In the <property>Server editor</property> it's possible to modify the server's
- launch configuration as well. It's just after clicking <emphasis>
+ <para id="com_line_arg">In the <property>Server editor</property> it's possible
+ to modify the server's launch configuration as well. It's just
+ after clicking <emphasis>
<property>Open launch configuration</property>
</emphasis> link. In the open window there are the tabs for setting command line
arguments and other things that are relevant to launching the server.</para>
@@ -625,6 +629,15 @@
</imageobject>
</mediaobject>
</figure>
+
+ <note>
+ <title>Note:</title>
+ <para>If you see only JAR from the list of available archive types, you should
+ verify whether AS Tools plugins/features are in place. EAR, EJB JAR and WAR options are
+ contributed by the AS Tools independently from webtools and the virtual
+ project model. Thus, without them only JAR will show up.</para>
+ </note>
+
<para><property>JAR</property> is the standard archive type, and does very little
configuration, leaving most of the work up to you. You can customize the name, add
folders, filesets, and inner jars to it.</para>
17 years, 3 months
JBoss Tools SVN: r10687 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-10-06 08:55:31 -0400 (Mon, 06 Oct 2008)
New Revision: 10687
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
Log:
Issue JBIDE-2800 resolved.
Now if columnClasses are specified, every cell from a column has the same style.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2008-10-06 11:58:08 UTC (rev 10686)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2008-10-06 12:55:31 UTC (rev 10687)
@@ -353,8 +353,11 @@
pageContext);
List columnClasses = getClasses(columnClassesExpr, sourceNode,
pageContext);
- int rci = 0, cci = 0;
+
+ int rci = 0; // index of row class
for (int i = 0; i < rowCount; i++) {
+ int cci = 0; // index of column class. Reset on every new row.
+
nsIDOMElement visualRow = visualDocument
.createElement(HTML.TAG_TR);
if (rowClasses.size() > 0) {
17 years, 3 months
JBoss Tools SVN: r10686 - trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-06 07:58:08 -0400 (Mon, 06 Oct 2008)
New Revision: 10686
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java
Log:
JBIDE-2853 Invalid thread access when adding a new runtime within ESB Project Wizard
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2008-10-06 11:17:13 UTC (rev 10685)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2008-10-06 11:58:08 UTC (rev 10686)
@@ -87,12 +87,18 @@
public void handleEvent(IFacetedProjectEvent event) {
IProjectFacet facet = ProjectFacetsManager.getProjectFacet(ESBProjectUtilities.ESB_PROJECT_FACET);
- IProjectFacetVersion version = fpwc.getProjectFacetVersion(facet);
- if(version != null){
- initializeRuntimesCombo(cmbRuntimes, null, version.getVersionString());
- }else{
- initializeRuntimesCombo(cmbRuntimes, null);
- }
+ final IProjectFacetVersion version = fpwc.getProjectFacetVersion(facet);
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ if(version != null){
+ initializeRuntimesCombo(cmbRuntimes, null, version.getVersionString());
+ }else{
+ initializeRuntimesCombo(cmbRuntimes, null);
+ }
+ }
+
+ });
}
}, IFacetedProjectEvent.Type.PROJECT_FACETS_CHANGED);
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java 2008-10-06 11:17:13 UTC (rev 10685)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java 2008-10-06 11:58:08 UTC (rev 10686)
@@ -2,6 +2,7 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetCreationWizardPage;
@@ -22,5 +23,17 @@
protected void createPresetPanel(Composite top) {
new Label(top, SWT.NONE);
}
+
+ @Override
+ protected void validatePage() {
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ validatePage(true);
+ }
+
+ });
+
+ }
}
17 years, 3 months
JBoss Tools SVN: r10685 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-10-06 07:17:13 -0400 (Mon, 06 Oct 2008)
New Revision: 10685
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/Constants.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2810
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/Constants.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/Constants.java 2008-10-06 10:57:10 UTC (rev 10684)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/Constants.java 2008-10-06 11:17:13 UTC (rev 10685)
@@ -19,4 +19,9 @@
public static final String WHITE_SPACE = " "; //$NON-NLS-1$
public static final String YES_STRING = "yes"; //$NON-NLS-1$
public static final String JSP_FILE_EXTENSION = "jsp"; //$NON-NLS-1$
+ public static final String SEMICOLON = ";"; //$NON-NLS-1$
+ public static final String COLON = ":"; //$NON-NLS-1$
+ public static final String PIXEL = "px"; //$NON-NLS-1$
+ public static final String PERCENT = "%"; //$NON-NLS-1$
+ public static final String COMMA = ","; //$NON-NLS-1$
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-10-06 10:57:10 UTC (rev 10684)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-10-06 11:17:13 UTC (rev 10685)
@@ -84,13 +84,16 @@
public static final String ATTR_ROWS = "rows"; //$NON-NLS-1$
public static final String ATTR_COLS = "cols"; //$NON-NLS-1$
public static final String ATTR_VALIGN = "valign"; //$NON-NLS-1$
+ public static final String ATTR_ALIGN = "align"; //$NON-NLS-1$
public static final String ATTR_SRC = "src"; //$NON-NLS-1$
public static final String ATTR_ALT = "alt"; //$NON-NLS-1$
public static final String ATTR_JSFC = "jsfc"; //$NON-NLS-1$
public static final String ATTR_DISPLAY = "display"; //$NON-NLS-1$
public static final String ATTR_READONLY = "readonly"; //$NON-NLS-1$
+ public static final String ATTR_SCOPE = "scope"; //$NON-NLS-1$
public static final String VALUE_TOP_ALIGN = "top"; //$NON-NLS-1$
+ public static final String VALUE_RIGHT_ALIGN = "right"; //$NON-NLS-1$
public static final String VALUE_MIDDLE_ALIGN = "middle"; //$NON-NLS-1$
public static final String VALUE_TEXT_TYPE = "text"; //$NON-NLS-1$
public static final String VALUE_PASSWORD_TYPE = "password"; //$NON-NLS-1$
@@ -99,5 +102,9 @@
public static final String VALUE_CHECKBOX_TYPE = "checkbox"; //$NON-NLS-1$
public static final String VALUE_HIDDEN_TYPE = "hidden"; //$NON-NLS-1$
public static final String VALUE_BUTTON_TYPE = "button"; //$NON-NLS-1$
+ public static final String VALUE_ALIGN_CENTER= "center"; //$NON-NLS-1$
+
+ public static final String STYLE_PARAMETER_WIDTH = "width"; //$NON-NLS-1$
+ public static final String STYLE_PARAMETER_HEIGHT = "height"; //$NON-NLS-1$
}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r10684 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-10-06 06:57:10 -0400 (Mon, 06 Oct 2008)
New Revision: 10684
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
Log:
Now h:body tag works.
isRecreateAtAttrChange method deleted from class org.jboss.tools.jsf.vpe.jsf.template.JsfBodyTemplate.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2008-10-06 10:49:27 UTC (rev 10683)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2008-10-06 10:57:10 UTC (rev 10684)
@@ -13,18 +13,14 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
-//import org.jboss.tools.vpe.html.template.HtmlBodyTemplate;
+import org.jboss.tools.vpe.html.template.HtmlBodyTemplate;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
-
/**
- * TODO There was code which didn't compile . It was commented .
- */
-/**
* A wrapper of VpeAbstractTemplate. Does the same, but ignores all attributes except id.
* @author yradtsevich
* @see HtmlBodyTemplate
@@ -32,11 +28,11 @@
public class JsfBodyTemplate extends VpeAbstractTemplate {
public static final String ID_ID = "id"; //$NON-NLS-1$
-// private final HtmlBodyTemplate htmlBodyTemplate = new HtmlBodyTemplate();
+ private final HtmlBodyTemplate htmlBodyTemplate = new HtmlBodyTemplate();
-// /**
-// * @see org.jboss.tools.vpe.html.template.HtmlBodyTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
-// */
+ /**
+ * @see org.jboss.tools.vpe.html.template.HtmlBodyTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+ */
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
sourceNode = sourceNode.cloneNode(true);
@@ -50,22 +46,6 @@
}
}
-// return htmlBodyTemplate.create(pageContext, sourceNode, visualDocument);
- return null;
+ return htmlBodyTemplate.create(pageContext, sourceNode, visualDocument);
}
-
- // TODO: change to default implementation (remove)
- /* (non-Javadoc)
- * @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMElement, java.lang.Object, java.lang.String, java.lang.String)
- */
- @Override
- public boolean isRecreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- // TODO: change to false
- return true;
- }
-
-
-
}
17 years, 3 months
JBoss Tools SVN: r10683 - in trunk/jsf: plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-10-06 06:49:27 -0400 (Mon, 06 Oct 2008)
New Revision: 10683
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataScroller.xhtml
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataFilterSliderTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/contextMenu.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2810
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java 2008-10-06 10:49:27 UTC (rev 10683)
@@ -13,6 +13,8 @@
/**
* Util class which contains basic html tags.
*
+ * @deprecated use org.jboss.tools.vpe.editor.util.HTML and
+ * org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces
* @author Max Areshkau
*
*/
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCalendarTemplate.java 2008-10-06 10:49:27 UTC (rev 10683)
@@ -20,7 +20,7 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeSourceDomBuilder;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
@@ -66,7 +66,6 @@
final static int CALENDAR_IMAGE_WIDTH = 20;
final static int CALENDAR_CUSTOM_IMAGE_WIDTH = 40;
final static int CALENDAR_BUTTON_WIDTH = 80;
- final static String ATTRIBUTE_TEXT = "text"; //$NON-NLS-1$
static final String DEFAULT_DATE_PATTERN = "MMMM, yyyy"; //$NON-NLS-1$
static final String HEADER = "header"; //$NON-NLS-1$
@@ -76,17 +75,13 @@
/*rich:calendar attributes*/
static final String BUTTON_LABEL = "buttonLabel"; //$NON-NLS-1$
static final String BUTTON_ICON = "buttonIcon"; //$NON-NLS-1$
- static final String DIRECTION = "direction"; //$NON-NLS-1$
static final String ENABLE_MANUAL_INPUT = "enableManualInput"; //$NON-NLS-1$
static final String CELL_HEIGHT = "cellHeight"; //$NON-NLS-1$
static final String CELL_WIDTH = "cellWidth"; //$NON-NLS-1$
static final String DATE_PATTERN = "datePattern"; //$NON-NLS-1$
- static final String VALUE = "value"; //$NON-NLS-1$
- static final String DISABLED = "disabled"; //$NON-NLS-1$
static final String HORIZONTAL_OFFSET = "horizontalOffset"; //$NON-NLS-1$
static final String VERTICAL_OFFSET = "verticalOffset"; //$NON-NLS-1$
static final String LOCALE = "locale"; //$NON-NLS-1$
- static final String POPUP = "popup"; //$NON-NLS-1$
static final String SHOW_APPLY_BUTTON = "showApplyButton"; //$NON-NLS-1$
static final String SHOW_INPUT = "showInput"; //$NON-NLS-1$
static final String SHOW_SHOW_WEEKS_DAY_BAR = "showWeekDaysBar"; //$NON-NLS-1$
@@ -204,14 +199,14 @@
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "calendar"); //$NON-NLS-1$
nsIDOMElement div = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ .createElement(HTML.TAG_DIV);
nsIDOMElement resultTable = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ .createElement(HTML.TAG_TABLE);
nsIDOMElement resultTD = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
nsIDOMElement resultTR = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
resultTD.appendChild(div);
resultTR.appendChild(resultTD);
@@ -222,10 +217,10 @@
nsIDOMElement calendar;
nsIDOMElement calendarWithPopup;
- if ("false".equalsIgnoreCase(popup)) { //$NON-NLS-1$
- if ("true".equalsIgnoreCase(disabled)) { //$NON-NLS-1$
+ if (Constants.FALSE.equalsIgnoreCase(popup)) {
+ if (Constants.TRUE.equalsIgnoreCase(disabled)) {
calendar = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ .createElement(HTML.TAG_DIV);
} else {
calendar = createCalendar(visualDocument, creationData, source);
}
@@ -237,19 +232,19 @@
if (showPopupCalendar) {
if (attrPresents(direction) && directions.keySet().contains(direction)) {
nsIDOMElement table = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ .createElement(HTML.TAG_TABLE);
nsIDOMElement top_tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
nsIDOMElement bottom_tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
nsIDOMElement top_left_td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
nsIDOMElement top_right_td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
nsIDOMElement bottom_left_td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
nsIDOMElement bottom_right_td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
top_tr.appendChild(top_left_td);
top_tr.appendChild(top_right_td);
@@ -259,10 +254,10 @@
table.appendChild(bottom_tr);
div.appendChild(table);
- top_left_td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, STYLE_TOP_LEFT);
- top_right_td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, STYLE_TOP_RIGHT);
- bottom_left_td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, STYLE_BOTTOM_LEFT);
- bottom_right_td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, STYLE_BOTTOM_RIGHT);
+ top_left_td.setAttribute(HTML.ATTR_STYLE, STYLE_TOP_LEFT);
+ top_right_td.setAttribute(HTML.ATTR_STYLE, STYLE_TOP_RIGHT);
+ bottom_left_td.setAttribute(HTML.ATTR_STYLE, STYLE_BOTTOM_LEFT);
+ bottom_right_td.setAttribute(HTML.ATTR_STYLE, STYLE_BOTTOM_RIGHT);
switch (directions.get(direction)) {
case DIRECTIONS_BOTTOM_RIGHT_INT:
@@ -296,13 +291,13 @@
div.appendChild(calendarWithPopup);
// hide unparsed facets
nsIDOMElement hiddenDiv = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- hiddenDiv.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : " + CALENDAR_WIDTH //$NON-NLS-1$
+ .createElement(HTML.TAG_DIV);
+ hiddenDiv.setAttribute(HTML.ATTR_STYLE,
+ HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + CALENDAR_WIDTH
+ "px; overflow: hidden; display: none;"); //$NON-NLS-1$
nsIDOMElement hiddenTable = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ .createElement(HTML.TAG_TABLE);
Element headerFacet = ComponentUtil.getFacet(source, HEADER);
nsIDOMElement optionalHeader = null;
@@ -331,22 +326,22 @@
private nsIDOMElement createCalendarWithPopup(
nsIDOMDocument visualDocument, Element source) {
nsIDOMElement table = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ .createElement(HTML.TAG_TABLE);
nsIDOMElement tr1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
nsIDOMElement td1_1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
nsIDOMElement td1_2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
nsIDOMElement tr2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
nsIDOMElement td2_1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
- table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : 100%"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_STYLE,
+ HTML.STYLE_PARAMETER_WIDTH + " : 100%"); //$NON-NLS-1$
tr1.appendChild(td1_1);
tr1.appendChild(td1_2);
@@ -356,17 +351,17 @@
table.appendChild(tr2);
nsIDOMElement div = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ .createElement(HTML.TAG_DIV);
int divWidth = CALENDAR_WIDTH + CALENDAR_IMAGE_WIDTH;
div.appendChild(table);
if (!Constants.FALSE.equalsIgnoreCase(showInput)) {
nsIDOMElement input = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_INPUT);
- input.setAttribute(HtmlComponentUtil.HTML_TYPE_ATTR, ATTRIBUTE_TEXT);
- input.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_R_C_INPUT);
- input.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : " //$NON-NLS-1$
+ .createElement(HTML.TAG_INPUT);
+ input.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TEXT_TYPE);
+ input.setAttribute(HTML.ATTR_CLASS, CSS_R_C_INPUT);
+ input.setAttribute(HTML.ATTR_STYLE,
+ HTML.STYLE_PARAMETER_WIDTH + Constants.COLON
+ CALENDAR_INPUT_WIDTH + "px;"); //$NON-NLS-1$
if (Constants.TRUE.equals(enableManualInput)) {
@@ -377,7 +372,7 @@
}
if (attrPresents(value)) {
- input.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, value);
+ input.setAttribute(HTML.ATTR_VALUE, value);
}
td1_1.appendChild(input);
@@ -386,34 +381,34 @@
if (attrPresents(buttonLabel)) {
nsIDOMElement button = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_INPUT);
- button.setAttribute(HtmlComponentUtil.HTML_TYPE_ATTR,
- HtmlComponentUtil.HTML_TAG_BUTTON);
- button.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, buttonLabel);
- button.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_R_C_BUTTON);
- if ("true".equalsIgnoreCase(disabled)) { //$NON-NLS-1$
- button.setAttribute(HtmlComponentUtil.HTML_ATTR_DISABLED, "true"); //$NON-NLS-1$
+ .createElement(HTML.TAG_INPUT);
+ button.setAttribute(HTML.ATTR_TYPE,
+ HTML.VALUE_BUTTON_TYPE);
+ button.setAttribute(HTML.ATTR_VALUE, buttonLabel);
+ button.setAttribute(HTML.ATTR_CLASS, CSS_R_C_BUTTON);
+ if (Constants.TRUE.equalsIgnoreCase(disabled)) {
+ button.setAttribute(HTML.ATTR_DISABLED, Constants.TRUE);
}
- button.setAttribute(VPE_USER_TOGGLE_ID_ATTR, ""+showPopupCalendar); //$NON-NLS-1$
+ button.setAttribute(VPE_USER_TOGGLE_ID_ATTR, Constants.EMPTY+showPopupCalendar);
td1_2.appendChild(button);
divWidth = CALENDAR_WIDTH + CALENDAR_BUTTON_WIDTH;
} else {
nsIDOMElement image = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_IMG);
- image.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ .createElement(HTML.TAG_IMG);
+ image.setAttribute(HTML.ATTR_CLASS,
CSS_R_C_BUTTON);
if (attrPresents(buttonIcon)) {
- image.setAttribute(HtmlComponentUtil.HTML_ATR_SRC, buttonIcon);
+ image.setAttribute(HTML.ATTR_SRC, buttonIcon);
divWidth = CALENDAR_WIDTH + CALENDAR_CUSTOM_IMAGE_WIDTH;
} else {
ComponentUtil.setImg(image, BUTTON_IMG);
divWidth = CALENDAR_WIDTH + CALENDAR_IMAGE_WIDTH;
}
- image.setAttribute(VPE_USER_TOGGLE_ID_ATTR, ""+showPopupCalendar); //$NON-NLS-1$
+ image.setAttribute(VPE_USER_TOGGLE_ID_ATTR, Constants.EMPTY+showPopupCalendar);
td1_2.appendChild(image);
}
- div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : " //$NON-NLS-1$
+ div.setAttribute(HTML.ATTR_STYLE,
+ HTML.STYLE_PARAMETER_WIDTH + Constants.COLON
+ divWidth + "px; overflow: hidden;"); //$NON-NLS-1$
return div;
}
@@ -452,21 +447,21 @@
*/
private nsIDOMElement createCalendar(nsIDOMDocument visualDocument, VpeCreationData creationData, Element sourceElement) {
nsIDOMElement div = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : " + CALENDAR_WIDTH //$NON-NLS-1$
+ .createElement(HTML.TAG_DIV);
+ div.setAttribute(HTML.ATTR_STYLE,
+ HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + CALENDAR_WIDTH
+ "px; overflow: hidden;"); //$NON-NLS-1$
nsIDOMElement table = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0"); //$NON-NLS-1$
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0"); //$NON-NLS-1$
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0"); //$NON-NLS-1$
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ .createElement(HTML.TAG_TABLE);
+ table.setAttribute(HTML.ATTR_CELLPADDING, "0"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_BORDER, "0"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_CELLSPACING, "0"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_CLASS,
CSS_R_C_EXTERIOR);
nsIDOMElement tbody = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
+ .createElement(HTML.TAG_TBODY);
Element headerFacet = ComponentUtil.getFacet(sourceElement, HEADER);
nsIDOMElement optionalHeader = null;
if (null != headerFacet) {
@@ -481,10 +476,10 @@
nsIDOMElement calendarBody = createCalendarBody(visualDocument);
nsIDOMElement footer = null;
- if (!"false".equals(showHeader)) { //$NON-NLS-1$
+ if (!Constants.FALSE.equals(showHeader)) {
header = createCalendarHeader(visualDocument);
}
- if (!"false".equals(showFooter)) { //$NON-NLS-1$
+ if (!Constants.FALSE.equals(showFooter)) {
footer = createCalendarFooter(visualDocument);
}
@@ -521,16 +516,16 @@
private nsIDOMElement createCalendarOptionalHeaderOrFooter(
nsIDOMDocument visualDocument, VpeCreationData creationData, Element facetBody, boolean isHeader) {
nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
nsIDOMElement td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN); //$NON-NLS-1$
+ .createElement(HTML.TAG_TD);
+ td.setAttribute(HTML.ATTR_COLSPAN, Constants.EMPTY + COLUMN);
tr.appendChild(td);
if (isHeader) {
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_R_C_HEADER_OPTIONAL);
+ td.setAttribute(HTML.ATTR_CLASS, CSS_R_C_HEADER_OPTIONAL);
} else {
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_R_C_FOOTER_OPTIONAL);
+ td.setAttribute(HTML.ATTR_CLASS, CSS_R_C_FOOTER_OPTIONAL);
}
VpeChildrenInfo child = new VpeChildrenInfo(td);
@@ -546,13 +541,13 @@
*/
private nsIDOMElement createCalendarHeader(nsIDOMDocument visualDocument) {
nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
nsIDOMElement td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN); //$NON-NLS-1$
+ .createElement(HTML.TAG_TD);
+ td.setAttribute(HTML.ATTR_COLSPAN, Constants.EMPTY + COLUMN);
String[] array;
- if ("false".equalsIgnoreCase(popup)) { //$NON-NLS-1$
+ if (Constants.FALSE.equalsIgnoreCase(popup)) {
array = HEADER_CONTENT;
} else {
array = HEADER_CONTENT_ON_POPUP;
@@ -572,30 +567,30 @@
array[2] = sdf.format(date);
nsIDOMElement table = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0"); //$NON-NLS-1$
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0"); //$NON-NLS-1$
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0"); //$NON-NLS-1$
- table.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
+ .createElement(HTML.TAG_TABLE);
+ table.setAttribute(HTML.ATTR_CELLPADDING, "0"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_CELLSPACING, "0"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_BORDER, "0"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_WIDTH, FILL_WIDTH);
nsIDOMElement tbody = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
+ .createElement(HTML.TAG_TBODY);
nsIDOMElement tr1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- tr1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ .createElement(HTML.TAG_TR);
+ tr1.setAttribute(HTML.ATTR_CLASS,
CSS_R_C_HEADER);
for (int i = 0; i < array.length; i++) {
nsIDOMElement td1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ .createElement(HTML.TAG_TD);
+ td1.setAttribute(HTML.ATTR_CLASS,
i == 2 ? CSS_R_C_MONTH : CSS_R_C_TOOL);
// close tool
if (i == 5) {
td1.setAttribute(VPE_USER_TOGGLE_ID_ATTR, "0"); //$NON-NLS-1$
- td1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "cursor: pointer;"); //$NON-NLS-1$
+ td1.setAttribute(HTML.ATTR_STYLE, "cursor: pointer;"); //$NON-NLS-1$
}
nsIDOMText text1 = visualDocument.createTextNode(array[i]);
@@ -619,25 +614,25 @@
*/
private nsIDOMElement createCalendarFooter(nsIDOMDocument visualDocument) {
nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
nsIDOMElement td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, "" + COLUMN); //$NON-NLS-1$
+ .createElement(HTML.TAG_TD);
+ td.setAttribute(HTML.ATTR_COLSPAN, Constants.EMPTY + COLUMN);
nsIDOMElement table = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0"); //$NON-NLS-1$
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0"); //$NON-NLS-1$
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0"); //$NON-NLS-1$
- table.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
+ .createElement(HTML.TAG_TABLE);
+ table.setAttribute(HTML.ATTR_CELLSPACING, "0"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_CELLPADDING, "0"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_BORDER, "0"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_WIDTH, FILL_WIDTH);
nsIDOMElement tr1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- tr1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ .createElement(HTML.TAG_TR);
+ tr1.setAttribute(HTML.ATTR_CLASS,
CSS_R_C_FOOTER);
nsIDOMElement td1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ .createElement(HTML.TAG_TD);
+ td1.setAttribute(HTML.ATTR_CLASS,
CSS_R_C_TOOLFOOTER);
SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); //$NON-NLS-1$
@@ -649,22 +644,22 @@
tr1.appendChild(td1);
nsIDOMElement td2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- td2.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
+ .createElement(HTML.TAG_TD);
+ td2.setAttribute(HTML.ATTR_WIDTH, FILL_WIDTH);
tr1.appendChild(td2);
nsIDOMElement td3 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- td3.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, FILL_WIDTH);
- td3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ .createElement(HTML.TAG_TD);
+ td3.setAttribute(HTML.ATTR_WIDTH, FILL_WIDTH);
+ td3.setAttribute(HTML.ATTR_CLASS,
CSS_R_C_TOOLFOOTER);
- td3.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR,
- HtmlComponentUtil.HTML_ALIGN_RIGHT_VALUE);
+ td3.setAttribute(HTML.ATTR_ALIGN,
+ HTML.VALUE_RIGHT_ALIGN);
String nodeText;
- if ("false".equalsIgnoreCase(showApplyButton)) { //$NON-NLS-1$
+ if (Constants.FALSE.equalsIgnoreCase(showApplyButton)) {
if ("hidden".equalsIgnoreCase(todayControlMode)) { //$NON-NLS-1$
- nodeText = ""; //$NON-NLS-1$
+ nodeText = Constants.EMPTY;
} else {
nodeText = TODAY;
}
@@ -695,36 +690,36 @@
private nsIDOMElement createCalendarBody(nsIDOMDocument visualDocument) {
nsIDOMElement tbody = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
+ .createElement(HTML.TAG_TBODY);
nsIDOMElement bodyTR = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
Calendar cal1 = getCalendarWithLocale();
cal1.set(Calendar.WEEK_OF_MONTH, Calendar.SATURDAY);
// Create week days row
- if (!"false".equalsIgnoreCase(showWeekDaysBar)) { //$NON-NLS-1$
+ if (!Constants.FALSE.equalsIgnoreCase(showWeekDaysBar)) {
for (int i = 0; i < COLUMN; i++) {
nsIDOMElement td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- if ((i == 0) && (!"false".equalsIgnoreCase(showWeeksBar))) { //$NON-NLS-1$
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ .createElement(HTML.TAG_TD);
+ if ((i == 0) && (!Constants.FALSE.equalsIgnoreCase(showWeeksBar))) {
+ td.setAttribute(HTML.ATTR_CLASS,
WEEK_DAY_HTML_CLASS_ATTR);
nsIDOMElement br = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_BR);
+ .createElement(HTML.TAG_BR);
td.appendChild(br);
bodyTR.appendChild(td);
} else if ( i > 0) {
if (holidays.contains(weeks[i - 1])) {
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ td.setAttribute(HTML.ATTR_CLASS,
HOL_WEEK_DAY_HTML_CLASS_ATTR);
} else {
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ td.setAttribute(HTML.ATTR_CLASS,
WEEK_DAY_HTML_CLASS_ATTR);
}
- nsIDOMText text = visualDocument.createTextNode(i == 0 ? "" //$NON-NLS-1$
+ nsIDOMText text = visualDocument.createTextNode(i == 0 ? Constants.EMPTY
: weeks[i - 1]);
td.appendChild(text);
bodyTR.appendChild(td);
@@ -750,15 +745,15 @@
for (int i = NUM_WEEK_ON_PAGE; i > 0; i--) {
nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
- if (!"false".equalsIgnoreCase(showWeeksBar)) { //$NON-NLS-1$
+ if (!Constants.FALSE.equalsIgnoreCase(showWeeksBar)) {
// Week in year
nsIDOMElement weekTD = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- weekTD.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ .createElement(HTML.TAG_TD);
+ weekTD.setAttribute(HTML.ATTR_CLASS,
CSS_R_C_WEEK);
- nsIDOMText weekText = visualDocument.createTextNode("" //$NON-NLS-1$
+ nsIDOMText weekText = visualDocument.createTextNode(Constants.EMPTY
+ cal.get(Calendar.WEEK_OF_YEAR));
weekTD.appendChild(weekText);
tr.appendChild(weekTD);
@@ -769,9 +764,9 @@
for (int j = NUM_DAYS_IN_WEEK; j > 0; j--) {
nsIDOMElement td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
- String currentAttr = ""; //$NON-NLS-1$
+ String currentAttr = Constants.EMPTY;
int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
@@ -803,21 +798,21 @@
}
}
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, currentAttr);
+ td.setAttribute(HTML.ATTR_CLASS, currentAttr);
if (attrPresents(cellWidth) && attrPresents(cellHeight)) {
- td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH + ":" + cellWidth //$NON-NLS-1$
- + "px;" + HtmlComponentUtil.HTML_ATR_HEIGHT //$NON-NLS-1$
- + ":" + cellHeight + "px;"); //$NON-NLS-1$ //$NON-NLS-2$
+ td.setAttribute(HTML.ATTR_STYLE,
+ HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + cellWidth
+ + "px;" + HTML.STYLE_PARAMETER_HEIGHT //$NON-NLS-1$
+ + Constants.COLON + cellHeight + "px;"); //$NON-NLS-1$
} else if (attrPresents(cellWidth)) {
- td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_WIDTH +":" + cellWidth + "px;"); //$NON-NLS-1$ //$NON-NLS-2$
+ td.setAttribute(HTML.ATTR_STYLE,
+ HTML.STYLE_PARAMETER_WIDTH +Constants.COLON + cellWidth + "px;"); //$NON-NLS-1$
} else if (attrPresents(cellHeight)) {
- td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_ATR_HEIGHT+":" + cellHeight + "px;"); //$NON-NLS-1$ //$NON-NLS-2$
+ td.setAttribute(HTML.ATTR_STYLE,
+ HTML.STYLE_PARAMETER_HEIGHT+Constants.COLON + cellHeight + "px;"); //$NON-NLS-1$
}
- nsIDOMText text = visualDocument.createTextNode("" //$NON-NLS-1$
+ nsIDOMText text = visualDocument.createTextNode(Constants.EMPTY
+ cal.get(Calendar.DAY_OF_MONTH));
td.appendChild(text);
tr.appendChild(td);
@@ -839,9 +834,9 @@
String name, String value) {
super.setAttribute(pageContext, sourceElement, visualDocument,
visualNode, data, name, value);
- if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_VALUE_ATTR)) {
- String popup = sourceElement.getAttribute(POPUP);
- if (popup != null && popup.equalsIgnoreCase("false")) //$NON-NLS-1$
+ if (name.equalsIgnoreCase(RichFaces.ATTR_VALUE)) {
+ String popup = sourceElement.getAttribute(RichFaces.ATTR_POPUP);
+ if (popup != null && popup.equalsIgnoreCase(Constants.FALSE))
return;
nsIDOMElement element = (nsIDOMElement) visualNode
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
@@ -849,7 +844,7 @@
nsIDOMNode tableNode = list.item(0);
nsIDOMElement input = (nsIDOMElement) tableNode
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- input.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, value);
+ input.setAttribute(HTML.ATTR_VALUE, value);
}
}
@@ -863,9 +858,9 @@
nsIDOMNode visualNode, Object data, String name) {
super.removeAttribute(pageContext, sourceElement, visualDocument,
visualNode, data, name);
- if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_VALUE_ATTR)) {
- String popup = sourceElement.getAttribute(POPUP);
- if (popup != null && popup.equalsIgnoreCase("false")) //$NON-NLS-1$
+ if (name.equalsIgnoreCase(RichFaces.ATTR_VALUE)) {
+ String popup = sourceElement.getAttribute(RichFaces.ATTR_POPUP);
+ if (popup != null && popup.equalsIgnoreCase(Constants.FALSE))
return;
nsIDOMElement element = (nsIDOMElement) visualNode
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
@@ -873,7 +868,7 @@
nsIDOMNode tableNode = list.item(0);
nsIDOMElement input = (nsIDOMElement) tableNode
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- input.removeAttribute(HtmlComponentUtil.HTML_VALUE_ATTR);
+ input.removeAttribute(HTML.ATTR_VALUE);
}
}
@@ -886,17 +881,17 @@
Element source = (Element) sourceNode;
buttonLabel = source.getAttribute(BUTTON_LABEL);
buttonIcon = source.getAttribute(BUTTON_ICON);
- direction = source.getAttribute(DIRECTION);
+ direction = source.getAttribute(RichFaces.ATTR_DIRECTION);
cellHeight = source.getAttribute(CELL_HEIGHT);
cellWidth = source.getAttribute(CELL_WIDTH);
datePattern = source.getAttribute(DATE_PATTERN);
- value = source.getAttribute(VALUE);
- disabled = source.getAttribute(DISABLED);
+ value = source.getAttribute(RichFaces.ATTR_VALUE);
+ disabled = source.getAttribute(RichFaces.ATTR_DISABLED);
enableManualInput = source.getAttribute(ENABLE_MANUAL_INPUT);
horizontalOffset = source.getAttribute(HORIZONTAL_OFFSET);
verticalOffset = source.getAttribute(VERTICAL_OFFSET);
locale = source.getAttribute(LOCALE);
- popup = source.getAttribute(POPUP);
+ popup = source.getAttribute(RichFaces.ATTR_POPUP);
showApplyButton = source.getAttribute(SHOW_APPLY_BUTTON);
showInput = source.getAttribute(SHOW_INPUT);
showWeekDaysBar = source.getAttribute(SHOW_SHOW_WEEKS_DAY_BAR);
@@ -915,7 +910,7 @@
* @return true, if successful
*/
private boolean attrPresents(String attr) {
- return ((null != attr) && (!"".equals(attr))); //$NON-NLS-1$
+ return ((null != attr) && (attr.length()!=0));
}
/**
@@ -930,7 +925,7 @@
}
SimpleDateFormat sdf = new SimpleDateFormat("EE"); //$NON-NLS-1$
- String dayOfWeek = ""; //$NON-NLS-1$
+ String dayOfWeek = Constants.EMPTY;
for (int i = 0; i < NUM_DAYS_IN_WEEK; i++) {
dayOfWeek = sdf.format(cal.getTime());
weeks[i] = dayOfWeek;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-10-06 10:49:27 UTC (rev 10683)
@@ -1,12 +1,12 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
@@ -19,7 +19,6 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
@@ -27,8 +26,8 @@
import org.jboss.tools.vpe.editor.mapping.VpeElementData;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
+import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -181,12 +180,12 @@
final Element source = (Element) sourceNode;
prepareData(source);
- final nsIDOMElement rootDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ final nsIDOMElement rootDiv = visualDocument.createElement(HTML.TAG_DIV);
//Fix https://jira.jboss.org/jira/browse/JBIDE-2430 issue with resizement.
- rootDiv.setAttribute("style", "width : "+sourceWidth); //$NON-NLS-1$ //$NON-NLS-2$
- final nsIDOMElement secondDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- secondDiv.setAttribute("align", this.sourceAlign); //$NON-NLS-1$
+ rootDiv.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_WIDTH+Constants.COLON+sourceWidth);
+ final nsIDOMElement secondDiv = visualDocument.createElement(HTML.TAG_DIV);
+ secondDiv.setAttribute(HTML.ATTR_ALIGN, this.sourceAlign);
secondDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("secondDiv")); //$NON-NLS-1$
String secondDivSubStyle = "; position: {0}; z-index: {1} ;"; //$NON-NLS-1$
if (isToggle) {
@@ -195,18 +194,18 @@
secondDivSubStyle = MessageFormat.format(secondDivSubStyle, "static", "0"); //$NON-NLS-1$ //$NON-NLS-2$
}
// TODO add ATTR_STYLE.
- secondDiv.setAttribute(HTML.ATTR_STYLE, VpeStyleUtil.PARAMETER_WIDTH + VpeStyleUtil.COLON_STRING + this.sourceListWidth
- + VpeStyleUtil.SEMICOLON_STRING + secondDivSubStyle + sourceStyle);
- final nsIDOMElement thirdDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ secondDiv.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + this.sourceListWidth
+ + Constants.SEMICOLON + secondDivSubStyle + sourceStyle);
+ final nsIDOMElement thirdDiv = visualDocument.createElement(HTML.TAG_DIV);
thirdDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("thirdDiv")); //$NON-NLS-1$
- thirdDiv.setAttribute(HTML.ATTR_STYLE, VpeStyleUtil.PARAMETER_WIDTH + VpeStyleUtil.COLON_STRING + this.sourceWidth
+ thirdDiv.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + this.sourceWidth
+ "; z-index: 1;"); //$NON-NLS-1$
- final nsIDOMElement firstInput = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_INPUT);
- firstInput.setAttribute(HTML.ATTR_TYPE, "text"); //$NON-NLS-1$
+ final nsIDOMElement firstInput = visualDocument.createElement(HTML.TAG_INPUT);
+ firstInput.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TEXT_TYPE);
;
- firstInput.setAttribute(HTML.ATTR_CLASS, styleClasess.get("firstInput") + " " + sourceInputClass); //$NON-NLS-1$ //$NON-NLS-2$
+ firstInput.setAttribute(HTML.ATTR_CLASS, styleClasess.get("firstInput") + Constants.WHITE_SPACE + sourceInputClass); //$NON-NLS-1$
firstInput.setAttribute("autocomplete", "off"); //$NON-NLS-1$ //$NON-NLS-2$
- firstInput.setAttribute(HTML.ATTR_STYLE, "width: " + calculateWithForDiv(this.sourceWidth, 17) + VpeStyleUtil.SEMICOLON_STRING //$NON-NLS-1$
+ firstInput.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_WIDTH+ Constants.COLON + calculateWithForDiv(this.sourceWidth, 17) + Constants.SEMICOLON
+ sourceInputStyle);
String value = null;
if (ComponentUtil.isNotBlank(this.sourceDefaultLabel)) {
@@ -218,21 +217,21 @@
if (value != null) {
firstInput.setAttribute(RichFaces.ATTR_VALUE, value);
}
- final nsIDOMElement secondInput = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_INPUT);
- secondInput.setAttribute(HTML.ATTR_TYPE, "text"); //$NON-NLS-1$
+ final nsIDOMElement secondInput = visualDocument.createElement(HTML.TAG_INPUT);
+ secondInput.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TEXT_TYPE);
;
secondInput.setAttribute(HTML.ATTR_CLASS, styleClasess.get(SECOND_INPUT));
- secondInput.setAttribute("readonly", String.valueOf(Boolean.TRUE)); //$NON-NLS-1$
+ secondInput.setAttribute(HTML.ATTR_READONLY, Constants.TRUE);
secondInput.setAttribute(RichFacesAbstractInplaceTemplate.VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
if (this.sourceButtonStyle != null) {
secondInput.setAttribute(HTML.ATTR_STYLE, sourceButtonStyle);
}
//
- final nsIDOMElement thirdInput = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_INPUT);
- thirdInput.setAttribute(HTML.ATTR_TYPE, "text"); //$NON-NLS-1$
+ final nsIDOMElement thirdInput = visualDocument.createElement(HTML.TAG_INPUT);
+ thirdInput.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TEXT_TYPE);
;
thirdInput.setAttribute(HTML.ATTR_CLASS, styleClasess.get("thirdInput")); //$NON-NLS-1$
- thirdInput.setAttribute("readonly", String.valueOf(Boolean.TRUE)); //$NON-NLS-1$
+ thirdInput.setAttribute(HTML.ATTR_READONLY, Constants.TRUE);
thirdInput.setAttribute(RichFacesAbstractInplaceTemplate.VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
if (this.sourceButtonStyle != null) {
thirdInput.setAttribute(HTML.ATTR_STYLE, sourceButtonStyle);
@@ -243,9 +242,9 @@
// thirdInput.setAttribute(HTML.ATTR_STYLE, thirdInput.getAttribute(HTML.ATTR_STYLE) + " ; background-image: url("
// + this.sourceButtonIcon + ")");
// }
- final nsIDOMElement forthEmptyDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ final nsIDOMElement forthEmptyDiv = visualDocument.createElement(HTML.TAG_DIV);
forthEmptyDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("forthEmptyDiv")); //$NON-NLS-1$
- forthEmptyDiv.setAttribute(HTML.ATTR_STYLE, VpeStyleUtil.PARAMETER_WIDTH + VpeStyleUtil.COLON_STRING
+ forthEmptyDiv.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_WIDTH + Constants.COLON
+ calculateWithForDiv(this.sourceWidth, 10));
forthEmptyDiv.appendChild(visualDocument.createTextNode("Struts")); //$NON-NLS-1$
@@ -278,26 +277,26 @@
*/
private nsIDOMNode createToogleDiv(VpePageContext pageContext, Element source, nsIDOMDocument visualDocument) {
- final nsIDOMElement thirdEmptyDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ final nsIDOMElement thirdEmptyDiv = visualDocument.createElement(HTML.TAG_DIV);
- thirdEmptyDiv.setAttribute(HTML.ATTR_STYLE, this.sourceListStyle + VpeStyleUtil.SEMICOLON_STRING
+ thirdEmptyDiv.setAttribute(HTML.ATTR_STYLE, this.sourceListStyle + Constants.SEMICOLON
+ " z-index: 3; position: absolute; visibility: visible; top: 16px; left: 0px;"); //$NON-NLS-1$
thirdEmptyDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("thirdEmptyDiv") + " " + this.sourceListClass); //$NON-NLS-1$ //$NON-NLS-2$
thirdEmptyDiv.setAttribute(HTML.ATTR_STYLE, "z-index: 3; position: absolute; visibility: visible; top: 16px; left: 0px;"); //$NON-NLS-1$
- final nsIDOMElement shadovDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ final nsIDOMElement shadovDiv = visualDocument.createElement(HTML.TAG_DIV);
- final nsIDOMElement positionDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ final nsIDOMElement positionDiv = visualDocument.createElement(HTML.TAG_DIV);
positionDiv.setAttribute(HTML.ATTR_CLASS, "rich-combobox-list-position"); //$NON-NLS-1$
- final nsIDOMElement decorationDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ final nsIDOMElement decorationDiv = visualDocument.createElement(HTML.TAG_DIV);
decorationDiv.setAttribute(HTML.ATTR_CLASS, "rich-combobox-list-decoration"); //$NON-NLS-1$
// decorationDiv.setAttribute(HTML.ATTR_STYLE,
// "height: 54px; width: 208px;");
- final nsIDOMElement scrollDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ final nsIDOMElement scrollDiv = visualDocument.createElement(HTML.TAG_DIV);
scrollDiv.setAttribute(HTML.ATTR_CLASS, "rich-combobox-list-scroll"); //$NON-NLS-1$
final List<Element> items = ComponentUtil.getSelectItems(source.getChildNodes());
int defaultHeight = LIST_ITEM_HEIGHT_DEFAULT_VALUE;
@@ -308,7 +307,10 @@
final String listHeight = ComponentUtil.isNotBlank(this.sourceListHeight) ? this.sourceListHeight : String.valueOf(defaultHeight)
+ "px"; //$NON-NLS-1$
- scrollDiv.setAttribute(HTML.ATTR_STYLE, "height: "+listHeight+"; width: " + calculateWithForDiv(sourceListWidth, 2)); //$NON-NLS-1$ //$NON-NLS-2$
+ scrollDiv.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_HEIGHT
+ + Constants.COLON + listHeight + Constants.SEMICOLON
+ + HTML.STYLE_PARAMETER_WIDTH + Constants.COLON
+ + calculateWithForDiv(sourceListWidth, 2));
final List<Element> selectItems = ComponentUtil.getSelectItems(source.getChildNodes());
@@ -320,11 +322,11 @@
shadovDiv.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow"); //$NON-NLS-1$
- final nsIDOMElement table = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ final nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
table.setAttribute(HTML.ATTR_CELLPADDING, "0"); //$NON-NLS-1$
table.setAttribute(HTML.ATTR_CELLSPACING, "0"); //$NON-NLS-1$
table.setAttribute(HTML.ATTR_BORDER, "0"); //$NON-NLS-1$
- String width = ""; //$NON-NLS-1$
+ String width = Constants.EMPTY;
try {
int w = ComponentUtil.parseWidthHeightValue(sourceListWidth);
@@ -333,22 +335,25 @@
} catch (ParseException e) {
width = "217"; //$NON-NLS-1$
}
- table.setAttribute(HTML.ATTR_STYLE, "width: " + width + "px ; height: 63px;"); //$NON-NLS-1$ //$NON-NLS-2$
+ table.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_WIDTH
+ + Constants.COLON + width + Constants.PIXEL
+ + Constants.SEMICOLON + HTML.STYLE_PARAMETER_HEIGHT
+ + Constants.COLON + "63px;"); //$NON-NLS-1$
- final nsIDOMElement tr1 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
- final nsIDOMElement tr2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
+ final nsIDOMElement tr1 = visualDocument.createElement(HTML.TAG_TR);
+ final nsIDOMElement tr2 = visualDocument.createElement(HTML.TAG_TR);
- final nsIDOMElement tr1_td1 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
- final nsIDOMElement tr1_td2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ final nsIDOMElement tr1_td1 = visualDocument.createElement(HTML.TAG_TD);
+ final nsIDOMElement tr1_td2 = visualDocument.createElement(HTML.TAG_TD);
- final nsIDOMElement tr2_td1 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
- final nsIDOMElement tr2_td2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ final nsIDOMElement tr2_td1 = visualDocument.createElement(HTML.TAG_TD);
+ final nsIDOMElement tr2_td2 = visualDocument.createElement(HTML.TAG_TD);
- final nsIDOMElement tr1_td1_img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
- final nsIDOMElement tr1_td2_img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ final nsIDOMElement tr1_td1_img = visualDocument.createElement(HTML.TAG_IMG);
+ final nsIDOMElement tr1_td2_img = visualDocument.createElement(HTML.TAG_IMG);
- final nsIDOMElement tr2_td1_img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
- final nsIDOMElement tr2_td2_img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ final nsIDOMElement tr2_td1_img = visualDocument.createElement(HTML.TAG_IMG);
+ final nsIDOMElement tr2_td2_img = visualDocument.createElement(HTML.TAG_IMG);
tr1_td1.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow-tl"); //$NON-NLS-1$
tr1_td2.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow-tr"); //$NON-NLS-1$
@@ -376,16 +381,16 @@
tr2.appendChild(tr2_td2);
tr1_td1.appendChild(tr1_td1_img);
- tr1_td1.appendChild(visualDocument.createElement(HtmlComponentUtil.HTML_TAG_BR));
+ tr1_td1.appendChild(visualDocument.createElement(HTML.TAG_BR));
tr1_td2.appendChild(tr1_td2_img);
- tr1_td2.appendChild(visualDocument.createElement(HtmlComponentUtil.HTML_TAG_BR));
+ tr1_td2.appendChild(visualDocument.createElement(HTML.TAG_BR));
tr2_td1.appendChild(tr2_td1_img);
- tr2_td1.appendChild(visualDocument.createElement(HtmlComponentUtil.HTML_TAG_BR));
+ tr2_td1.appendChild(visualDocument.createElement(HTML.TAG_BR));
tr2_td2.appendChild(tr2_td2_img);
- tr2_td2.appendChild(visualDocument.createElement(HtmlComponentUtil.HTML_TAG_BR));
+ tr2_td2.appendChild(visualDocument.createElement(HTML.TAG_BR));
return thirdEmptyDiv;
}
@@ -399,7 +404,7 @@
* @return the ns IDOM node
*/
private nsIDOMNode createSelectItem(Element e, nsIDOMDocument visualDocument) {
- final nsIDOMElement item = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+ final nsIDOMElement item = visualDocument.createElement(HTML.TAG_SPAN);
item.setAttribute(HTML.ATTR_CLASS, "rich-combobox-item " + sourceItemClass); //$NON-NLS-1$
item.appendChild(visualDocument.createTextNode(ComponentUtil.getSelectItemValue(e)));
@@ -498,7 +503,7 @@
String returnValue = getDefaultInputClass();
String tmp = getAttribute(sourceElement, RichFaces.ATTR_INPUT_CLASS);
if (tmp.length() != 0) {
- returnValue = new StringBuffer().append(returnValue).append(" ") //$NON-NLS-1$
+ returnValue = new StringBuffer().append(returnValue).append(Constants.WHITE_SPACE)
.append(tmp).toString();
}
return returnValue;
@@ -591,19 +596,19 @@
* @param source the source
*/
private void prepareData(Element source) {
- this.sourceAlign = source.getAttribute("align"); //$NON-NLS-1$
+ this.sourceAlign = source.getAttribute(RichFaces.ATTR_ALIGN);
if (ComponentUtil.isBlank(this.sourceAlign)) {
this.sourceAlign = DEFAULT_ALIGN;
}
- this.sourceListWidth = source.getAttribute("listWidth"); //$NON-NLS-1$
+ this.sourceListWidth = source.getAttribute(RichFaces.ATTR_LIST_WIDTH);
if (ComponentUtil.isBlank(this.sourceListWidth)) {
this.sourceListWidth = DEFAULT_LIST_WIDTH;
}
- this.sourceListHeight = source.getAttribute("listHeight"); //$NON-NLS-1$
+ this.sourceListHeight = source.getAttribute(RichFaces.ATTR_LIST_HEIGHT);
- this.sourceWidth = source.getAttribute("width"); //$NON-NLS-1$
+ this.sourceWidth = source.getAttribute(RichFaces.ATTR_WIDTH);
if (ComponentUtil.isBlank(this.sourceWidth)) {
this.sourceWidth = DEFAULT_LIST_WIDTH;
@@ -612,10 +617,10 @@
}
if (ComponentUtil.isNotBlank(this.sourceWidth) && (this.sourceWidth != DEFAULT_LIST_WIDTH)) {
- if(!this.sourceWidth.endsWith("px")){ //$NON-NLS-1$
+ if(!this.sourceWidth.endsWith(Constants.PIXEL)){
try {
int intValue = Integer.parseInt(this.sourceWidth);
- this.sourceWidth = String.valueOf(intValue)+"px"; //$NON-NLS-1$
+ this.sourceWidth = String.valueOf(intValue)+Constants.PIXEL;
} catch (NumberFormatException e) {
this.sourceListWidth = DEFAULT_LIST_WIDTH;
}
@@ -623,7 +628,7 @@
}
this.sourceDefaultLabel = ComponentUtil.getAttribute(source, "defaultLabel"); //$NON-NLS-1$
- this.sourceValue = ComponentUtil.getAttribute(source, "value"); //$NON-NLS-1$
+ this.sourceValue = ComponentUtil.getAttribute(source, RichFaces.ATTR_VALUE);
this.sourceButtonStyle = ComponentUtil.getAttribute(source, "buttonStyle"); //$NON-NLS-1$
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataFilterSliderTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataFilterSliderTemplate.java 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataFilterSliderTemplate.java 2008-10-06 10:49:27 UTC (rev 10683)
@@ -11,9 +11,11 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -28,11 +30,11 @@
public class RichFacesDataFilterSliderTemplate extends AbstractRichFacesTemplate {
/** IMAGE_SPACER */
- final static String IMAGE_SPACER = "/common/spacer.gif";
+ final static String IMAGE_SPACER = "/common/spacer.gif"; //$NON-NLS-1$
- final static String CENTER_SLIDER = "/dataFilterSlider/pos.gif";
+ final static String CENTER_SLIDER = "/dataFilterSlider/pos.gif"; //$NON-NLS-1$
- final static String STYLE_PATH = "/dataFilterSlider/dataFilterSlider.css";
+ final static String STYLE_PATH = "/dataFilterSlider/dataFilterSlider.css"; //$NON-NLS-1$
final static int DEFAULT_WIDTH = 260;
@@ -41,28 +43,24 @@
final static int DEFAULT_HEIGHT = 20;
- final static String DEFAULT_SLIDER_POSITION = "left: -38px; width: 114px;";
+ final static String DEFAULT_SLIDER_POSITION = "left: -38px; width: 114px;"; //$NON-NLS-1$
- final static String DEFAULT_SLIDER_WIDTH = "7px";
+ final static String DEFAULT_SLIDER_WIDTH = "7px"; //$NON-NLS-1$
- final static String DEFAULT_SLIDER_HEIGHT = "8px";
+ final static String DEFAULT_SLIDER_HEIGHT = "8px"; //$NON-NLS-1$
- final static String DEFAULT_SLIDER_BORDER = "0px";
+ final static String DEFAULT_SLIDER_BORDER = "0px"; //$NON-NLS-1$
- final static String PIXEL_PREFIX = "px";
+ final static String FIELD_STYLE_CLASS_ATR = "fieldStyleClass"; //$NON-NLS-1$
- final static String PERCENT_PREFIX = "%";
+ final static String HANDLE_STYLE_CLASS_ATR = "handleStyleClass"; //$NON-NLS-1$
- final static String FIELD_STYLE_CLASS_ATR = "fieldStyleClass";
+ final static String RANGE_STYLE_CLASS_ATR = "rangeStyleClass"; //$NON-NLS-1$
- final static String HANDLE_STYLE_CLASS_ATR = "handleStyleClass";
+ final static String TRACK_STYLE_CLASS_ATR = "trackStyleClass"; //$NON-NLS-1$
- final static String RANGE_STYLE_CLASS_ATR = "rangeStyleClass";
+ final static String TRAILER_STYLE_CLASS_ATR = "trailerStyleClass"; //$NON-NLS-1$
- final static String TRACK_STYLE_CLASS_ATR = "trackStyleClass";
-
- final static String TRAILER_STYLE_CLASS_ATR = "trailerStyleClass";
-
/**
* Constructor.
*/
@@ -85,10 +83,11 @@
*/
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
int numWidth = 0;
- ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "richFacesDataFilterSlider");
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "richFacesDataFilterSlider"); //$NON-NLS-1$
Element sourceElement = (Element) sourceNode;
- String style = ComponentUtil.getAttribute(sourceElement, HtmlComponentUtil.HTML_STYLE_ATTR);
- String width = sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_WIDTH);
+ String style = ComponentUtil.getAttribute(sourceElement,
+ RichFaces.ATTR_STYLE);
+ String width = sourceElement.getAttribute(RichFaces.ATTR_WIDTH);
if (width != null) {
numWidth = getSize(width);
if (numWidth < DEFAULT_WIDTH) {
@@ -97,34 +96,34 @@
} else {
numWidth = DEFAULT_WIDTH;
}
- String defaultStyle = style + ";" + HtmlComponentUtil.HTML_ATR_WIDTH + " : " + numWidth + "px ; ";
- nsIDOMElement parentDiv = createDIV(visualDocument, "slider-container", defaultStyle);
+ String defaultStyle = style + Constants.SEMICOLON + HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + numWidth + "px ; "; //$NON-NLS-1$
+ nsIDOMElement parentDiv = createDIV(visualDocument, "slider-container", defaultStyle); //$NON-NLS-1$
String rangeStyleClass = ComponentUtil.getAttribute(sourceElement, RANGE_STYLE_CLASS_ATR);
- nsIDOMElement rangeDiv = createDIV(visualDocument, "range " + rangeStyleClass,
- HtmlComponentUtil.HTML_ATR_WIDTH + " : " + (numWidth - DEFAULT_PARAGRAPH) + "px;");
- nsIDOMElement rangeDecorDiv = createDIV(visualDocument, "range-decor", null);
+ nsIDOMElement rangeDiv = createDIV(visualDocument, "range " + rangeStyleClass, //$NON-NLS-1$
+ HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + (numWidth - DEFAULT_PARAGRAPH) + "px;"); //$NON-NLS-1$
+ nsIDOMElement rangeDecorDiv = createDIV(visualDocument, "range-decor", null); //$NON-NLS-1$
String trailerStyleClass = ComponentUtil.getAttribute(sourceElement,
TRAILER_STYLE_CLASS_ATR);
- nsIDOMElement trailerDiv = createDIV(visualDocument, "trailer "
+ nsIDOMElement trailerDiv = createDIV(visualDocument, "trailer " //$NON-NLS-1$
+ trailerStyleClass, DEFAULT_SLIDER_POSITION);
String trackStyleClass = ComponentUtil.getAttribute(sourceElement,
TRACK_STYLE_CLASS_ATR);
nsIDOMElement trackDiv = createDIV(visualDocument,
- "track " + trackStyleClass, HtmlComponentUtil.HTML_ATR_WIDTH
- + " : " + (numWidth - DEFAULT_PARAGRAPH) + "px;");
+ "track " + trackStyleClass, HTML.STYLE_PARAMETER_WIDTH //$NON-NLS-1$
+ + Constants.COLON + (numWidth - DEFAULT_PARAGRAPH) + "px;"); //$NON-NLS-1$
String handleStyleClass = ComponentUtil.getAttribute(sourceElement,HANDLE_STYLE_CLASS_ATR);
- nsIDOMElement handleDiv = createDIV(visualDocument, "handle " + handleStyleClass, null);
+ nsIDOMElement handleDiv = createDIV(visualDocument, "handle " + handleStyleClass, null); //$NON-NLS-1$
- nsIDOMElement img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
ComponentUtil.setImg(img, CENTER_SLIDER);
- img.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, DEFAULT_SLIDER_WIDTH);
- img.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR,DEFAULT_SLIDER_BORDER);
- img.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT, DEFAULT_SLIDER_HEIGHT);
+ img.setAttribute(HTML.ATTR_WIDTH, DEFAULT_SLIDER_WIDTH);
+ img.setAttribute(HTML.ATTR_BORDER,DEFAULT_SLIDER_BORDER);
+ img.setAttribute(HTML.ATTR_HEIGHT, DEFAULT_SLIDER_HEIGHT);
/* Set input component */
- nsIDOMElement input = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_INPUT);
- input.setAttribute(HtmlComponentUtil.HTML_TYPE_ATTR, "text");
+ nsIDOMElement input = visualDocument.createElement(HTML.TAG_INPUT);
+ input.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TEXT_TYPE);
setAttributesToInputElement(input, sourceElement);
@@ -136,24 +135,24 @@
trackDiv.appendChild(handleDiv);
handleDiv.appendChild(img);
- nsIDOMElement tableSpacer2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- tableSpacer2.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0px");
- tableSpacer2.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0px");
- tableSpacer2.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0px");
- tableSpacer2.setAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR, "100%" );
- tableSpacer2.setAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR, "100%" );
+ nsIDOMElement tableSpacer2 = visualDocument.createElement(HTML.TAG_TABLE);
+ tableSpacer2.setAttribute(HTML.ATTR_CELLSPACING, "0px"); //$NON-NLS-1$
+ tableSpacer2.setAttribute(HTML.ATTR_CELLPADDING, "0px"); //$NON-NLS-1$
+ tableSpacer2.setAttribute(HTML.ATTR_BORDER, "0px"); //$NON-NLS-1$
+ tableSpacer2.setAttribute(HTML.ATTR_WIDTH, "100%" ); //$NON-NLS-1$
+ tableSpacer2.setAttribute(HTML.ATTR_HEIGHT, "100%" ); //$NON-NLS-1$
- nsIDOMElement trSpacer2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
+ nsIDOMElement trSpacer2 = visualDocument.createElement(HTML.TAG_TR);
- nsIDOMElement tdSpacer2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
- tdSpacer2.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR, "right");
- tdSpacer2.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,"font-family: Arial, Verdana, sans-serif; font-size: 5px; color: white;");
+ nsIDOMElement tdSpacer2 = visualDocument.createElement(HTML.TAG_TD);
+ tdSpacer2.setAttribute(HTML.ATTR_ALIGN, HTML.VALUE_RIGHT_ALIGN);
+ tdSpacer2.setAttribute(HTML.ATTR_STYLE,"font-family: Arial, Verdana, sans-serif; font-size: 5px; color: white;"); //$NON-NLS-1$
trSpacer2.appendChild(tdSpacer2);
- nsIDOMElement imageSpacer2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ nsIDOMElement imageSpacer2 = visualDocument.createElement(HTML.TAG_IMG);
ComponentUtil.setImg(imageSpacer2, IMAGE_SPACER);
- imageSpacer2.setAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR, "100%");
- imageSpacer2.setAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR, "100%");
+ imageSpacer2.setAttribute(HTML.ATTR_WIDTH, "100%"); //$NON-NLS-1$
+ imageSpacer2.setAttribute(HTML.ATTR_HEIGHT, "100%"); //$NON-NLS-1$
tdSpacer2.appendChild(imageSpacer2);
tableSpacer2.appendChild(trSpacer2);
@@ -186,38 +185,38 @@
if (name.equalsIgnoreCase(RANGE_STYLE_CLASS_ATR)) {
nsIDOMElement range = getRangeElement(element);
- range.removeAttribute(HtmlComponentUtil.HTML_CLASS_ATTR);
- range.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "range");
+ range.removeAttribute(HTML.ATTR_CLASS);
+ range.setAttribute(HTML.ATTR_CLASS, "range"); //$NON-NLS-1$
} else if (name.equalsIgnoreCase(TRAILER_STYLE_CLASS_ATR)) {
nsIDOMElement trailer = getTrailerElement(element);
- trailer.removeAttribute(HtmlComponentUtil.HTML_CLASS_ATTR);
- trailer.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "trailer");
+ trailer.removeAttribute(HTML.ATTR_CLASS);
+ trailer.setAttribute(HTML.ATTR_CLASS, "trailer"); //$NON-NLS-1$
} else if (name.equalsIgnoreCase(TRACK_STYLE_CLASS_ATR)) {
nsIDOMElement track = getTrackElement(element);
- track.removeAttribute(HtmlComponentUtil.HTML_CLASS_ATTR);
- track.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "track");
+ track.removeAttribute(HTML.ATTR_CLASS);
+ track.setAttribute(HTML.ATTR_CLASS, "track"); //$NON-NLS-1$
} else if (name.equalsIgnoreCase(HANDLE_STYLE_CLASS_ATR)) {
nsIDOMElement handle = getHandleElement(element);
- handle.removeAttribute(HtmlComponentUtil.HTML_CLASS_ATTR);
- handle.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "handle");
+ handle.removeAttribute(HTML.ATTR_CLASS);
+ handle.setAttribute(HTML.ATTR_CLASS, "handle"); //$NON-NLS-1$
} else if (name.equalsIgnoreCase(FIELD_STYLE_CLASS_ATR)) {
nsIDOMElement field = getInputElement(element);
setAttributesToInputElement( field, sourceElement );
- } else if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_ATR_WIDTH)) {
+ } else if (name.equalsIgnoreCase(RichFaces.ATTR_WIDTH)) {
nsIDOMElement range = getRangeElement(element);
String style = ComponentUtil.getAttribute(sourceElement,
- HtmlComponentUtil.HTML_STYLE_ATTR);
- element.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style + ";"
- + HtmlComponentUtil.HTML_ATR_WIDTH + " : " + DEFAULT_WIDTH
- + "px ; ");
+ RichFaces.ATTR_STYLE);
+ element.setAttribute(HTML.ATTR_STYLE, style + Constants.SEMICOLON
+ + HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + DEFAULT_WIDTH
+ + "px ; "); //$NON-NLS-1$
String rangeStyle = ComponentUtil.getAttribute(range,
- HtmlComponentUtil.HTML_STYLE_ATTR);
- range.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, rangeStyle
- + ";" + HtmlComponentUtil.HTML_ATR_WIDTH + " : "
- + (DEFAULT_WIDTH - DEFAULT_PARAGRAPH) + "px;");
- } else if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_STYLE_ATTR)) {
+ HTML.ATTR_STYLE);
+ range.setAttribute(HTML.ATTR_STYLE, rangeStyle
+ + Constants.SEMICOLON + HTML.STYLE_PARAMETER_WIDTH + Constants.COLON
+ + (DEFAULT_WIDTH - DEFAULT_PARAGRAPH) + "px;"); //$NON-NLS-1$
+ } else if (name.equalsIgnoreCase(RichFaces.ATTR_STYLE)) {
String width = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_ATR_WIDTH);
+ .getAttribute(RichFaces.ATTR_WIDTH);
if (width != null) {
numWidth = getSize(width);
if (numWidth < DEFAULT_WIDTH) {
@@ -226,9 +225,9 @@
} else {
numWidth = DEFAULT_WIDTH;
}
- String style = HtmlComponentUtil.HTML_ATR_WIDTH + " : " + numWidth
- + "px ; ";
- element.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ String style = HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + numWidth
+ + "px ; "; //$NON-NLS-1$
+ element.setAttribute(HTML.ATTR_STYLE, style);
} else {
element.removeAttribute(name);
}
@@ -254,7 +253,7 @@
int numWidth = 0;
- if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_ATR_WIDTH)) {
+ if (name.equalsIgnoreCase(RichFaces.ATTR_WIDTH)) {
int size = getSize(value);
if (size < DEFAULT_WIDTH) {
size = DEFAULT_WIDTH;
@@ -263,41 +262,41 @@
nsIDOMElement trackDiv = getTrackElement(parentDiv);
String style = ComponentUtil.getAttribute(parentDiv,
- HtmlComponentUtil.HTML_STYLE_ATTR);
- style = style + HtmlComponentUtil.HTML_ATR_WIDTH + " : " + size
- + PIXEL_PREFIX + ";";
- parentDiv.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ HTML.ATTR_STYLE);
+ style = style + HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + size
+ + Constants.PIXEL + Constants.SEMICOLON;
+ parentDiv.setAttribute(HTML.ATTR_STYLE, style);
String rangeStyle = ComponentUtil.getAttribute(rangeDiv,
- HtmlComponentUtil.HTML_STYLE_ATTR);
- rangeDiv.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, rangeStyle
- + HtmlComponentUtil.HTML_ATR_WIDTH + " : "
- + (size - DEFAULT_PARAGRAPH) + "px;");
+ HTML.ATTR_STYLE);
+ rangeDiv.setAttribute(HTML.ATTR_STYLE, rangeStyle
+ + Constants.SEMICOLON + HTML.STYLE_PARAMETER_WIDTH + Constants.COLON
+ + (size - DEFAULT_PARAGRAPH) + "px;"); //$NON-NLS-1$
String trackStyle = ComponentUtil.getAttribute(trackDiv,
- HtmlComponentUtil.HTML_STYLE_ATTR);
- trackDiv.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, trackStyle
- + HtmlComponentUtil.HTML_ATR_WIDTH + " : "
- + (size - DEFAULT_PARAGRAPH) + "px;");
+ HTML.ATTR_STYLE);
+ trackDiv.setAttribute(HTML.ATTR_STYLE, trackStyle
+ + Constants.SEMICOLON + HTML.STYLE_PARAMETER_WIDTH+ Constants.COLON
+ + +(size - DEFAULT_PARAGRAPH) + "px;"); //$NON-NLS-1$
} else if (name.equalsIgnoreCase(RANGE_STYLE_CLASS_ATR)) {
nsIDOMElement range = getRangeElement(parentDiv);
- range.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "range "
+ range.setAttribute(HTML.ATTR_CLASS, "range " //$NON-NLS-1$
+ value);
} else if (name.equalsIgnoreCase(TRACK_STYLE_CLASS_ATR)) {
nsIDOMElement track = getTrackElement(parentDiv);
- track.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "track "
+ track.setAttribute(HTML.ATTR_CLASS, "track " //$NON-NLS-1$
+ value);
} else if (name.equalsIgnoreCase(TRAILER_STYLE_CLASS_ATR)) {
nsIDOMElement trailer = getTrailerElement(parentDiv);
- trailer.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "trailer "
+ trailer.setAttribute(HTML.ATTR_CLASS, "trailer " //$NON-NLS-1$
+ value);
} else if (name.equalsIgnoreCase(HANDLE_STYLE_CLASS_ATR)) {
nsIDOMElement handle = getHandleElement(parentDiv);
- handle.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "handle "
+ handle.setAttribute(HTML.ATTR_CLASS, "handle " //$NON-NLS-1$
+ value);
} else if (name.equalsIgnoreCase(FIELD_STYLE_CLASS_ATR)) {
- } else if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_STYLE_ATTR)) {
+ } else if (name.equalsIgnoreCase(RichFaces.ATTR_STYLE)) {
String width = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_ATR_WIDTH);
+ .getAttribute(RichFaces.ATTR_WIDTH);
if (width != null) {
numWidth = getSize(width);
if (numWidth < DEFAULT_WIDTH) {
@@ -306,9 +305,9 @@
} else {
numWidth = DEFAULT_WIDTH;
}
- String style = HtmlComponentUtil.HTML_ATR_WIDTH + " : " + numWidth
- + "px ; " + value;
- parentDiv.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ String style = HTML.STYLE_PARAMETER_WIDTH + Constants.COLON + numWidth
+ + "px ; " + value; //$NON-NLS-1$
+ parentDiv.setAttribute(HTML.ATTR_STYLE, style);
} else {
parentDiv.setAttribute(name, value);
}
@@ -322,12 +321,12 @@
* @param style
*/
private nsIDOMElement createDIV(nsIDOMDocument visualDocument, String styleClass, String style) {
- nsIDOMElement div = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
if (styleClass != null) {
- div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ div.setAttribute(HTML.ATTR_CLASS, styleClass);
}
if (style != null) {
- div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ div.setAttribute(HTML.ATTR_STYLE, style);
}
return div;
}
@@ -340,11 +339,11 @@
*/
private int getSize(String size) {
String num = size;
- int pos = num.indexOf(PIXEL_PREFIX);
+ int pos = num.indexOf(Constants.PIXEL);
if (pos != -1) {
num = num.substring(0, pos);
}
- pos = num.indexOf(PERCENT_PREFIX);
+ pos = num.indexOf(Constants.PERCENT);
if (pos != -1) {
num = num.substring(0, pos);
}
@@ -479,19 +478,19 @@
private void setAttributesToInputElement( nsIDOMElement inputElement, Element sourceElement) {
String styleClass = getAttribute(FIELD_STYLE_CLASS_ATR, sourceElement);
- String value = getAttribute("handleValue", sourceElement);
+ String value = getAttribute("handleValue", sourceElement); //$NON-NLS-1$
if ( value.length() == 0 ) {
- value = "N/A";
+ value = "N/A"; //$NON-NLS-1$
}
inputElement.setAttribute(
- HtmlComponentUtil.HTML_CLASS_ATTR,
- new StringBuffer().append("slider-input-field").append(" ").append(styleClass).toString()
+ HTML.ATTR_CLASS,
+ new StringBuffer().append("slider-input-field").append(Constants.WHITE_SPACE).append(styleClass).toString() //$NON-NLS-1$
);
inputElement.setAttribute(
- HtmlComponentUtil.HTML_VALUE_ATTR,
+ HTML.ATTR_VALUE,
value
);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java 2008-10-06 10:49:27 UTC (rev 10683)
@@ -11,10 +11,12 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -34,35 +36,33 @@
final static int SCROLL_CELL = 3;
- final static String STYLE_PATH = "dataTableScroller/dataTableScroller.css";
+ final static String STYLE_PATH = "dataTableScroller/dataTableScroller.css"; //$NON-NLS-1$
/**
* Default size component This parameter need for calculate default number
* of cells
*/
- final static String DEFAULT_STYLE_WIDTH = "width : 400px;";
+ final static String DEFAULT_STYLE_WIDTH = "width : 400px;"; //$NON-NLS-1$
/**
* Minimal size component This parameter need for calculate minimal number
* of cells
*/
- final static String MIN_STYLE_WIDTH = "width : 225px;";
+ final static String MIN_STYLE_WIDTH = "width : 225px;"; //$NON-NLS-1$
- final static String RIGHT_DOUBLE_SCROLL_SYMBOL = ">>";
+ final static String RIGHT_DOUBLE_SCROLL_SYMBOL = ">>"; //$NON-NLS-1$
- final static String RIGHT_SINGLE_SCROLL_SYMBOL = ">";
+ final static String RIGHT_SINGLE_SCROLL_SYMBOL = ">"; //$NON-NLS-1$
- final static String LEFT_DOUBLE_SCROLL_SYMBOL = "<<";
+ final static String LEFT_DOUBLE_SCROLL_SYMBOL = "<<"; //$NON-NLS-1$
- final static String LEFT_SINGLE_SCROLL_SYMBOL = "<";
+ final static String LEFT_SINGLE_SCROLL_SYMBOL = "<"; //$NON-NLS-1$
/**
* Minimal cells in datascroller
*/
final static int MIN_NUM_CELLS = 9;
- final static String PIXEL_PREFIX = "px";
-
/**
*
* Constructor.
@@ -87,22 +87,22 @@
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
Element source = (Element) sourceNode;
ComponentUtil.setCSSLink(pageContext, STYLE_PATH,
- "richFacesDataScrollerTable");
- nsIDOMElement div = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- String style = source.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- div.setAttribute("class", "dr-div-heigth");
+ "richFacesDataScrollerTable"); //$NON-NLS-1$
+ nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
+ String style = source.getAttribute(RichFaces.ATTR_STYLE);
+ div.setAttribute(HTML.ATTR_CLASS, "dr-div-heigth"); //$NON-NLS-1$
if (style == null) {
style = DEFAULT_STYLE_WIDTH;
}
- nsIDOMElement table = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-dscr-t dr-tbpnl-cntnt");
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "1");
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
- nsIDOMElement tbody = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TBODY);
- nsIDOMElement tr = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
+ nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
+ table.setAttribute(HTML.ATTR_CLASS,
+ "dr-dscr-t dr-tbpnl-cntnt"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_CELLSPACING, "1"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_CELLPADDING, "0"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_BORDER, "0"); //$NON-NLS-1$
+ nsIDOMElement tbody = visualDocument.createElement(HTML.TAG_TBODY);
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
tbody.appendChild(tr);
table.appendChild(tbody);
@@ -111,7 +111,7 @@
nsIDOMElement child1 = createCell(visualDocument, false, LEFT_DOUBLE_SCROLL_SYMBOL, SCROLL_CELL);
nsIDOMElement child2 = createCell(visualDocument, false, LEFT_SINGLE_SCROLL_SYMBOL, SCROLL_CELL);
/* Add empty cells */
- nsIDOMElement child3 = createCell(visualDocument, false, "", EMPTY_CELL);
+ nsIDOMElement child3 = createCell(visualDocument, false, Constants.EMPTY, EMPTY_CELL);
tr.appendChild(child1);
tr.appendChild(child2);
tr.appendChild(child3);
@@ -127,11 +127,11 @@
size /= (minSize / MIN_NUM_CELLS);
/* Add number cells in datascroller */
for (int i = 0; i < (size - 6); i++) {
- nsIDOMElement child = createCell(visualDocument, (i == 0 ? true : false), "" + (i + 1), NUM_CELL);
+ nsIDOMElement child = createCell(visualDocument, (i == 0 ? true : false), Constants.EMPTY + (i + 1), NUM_CELL);
tr.appendChild(child);
}
/* Add empty cell */
- child1 = createCell(visualDocument, false, "", EMPTY_CELL);
+ child1 = createCell(visualDocument, false, Constants.EMPTY, EMPTY_CELL);
/* Add scroll cells */
child2 = createCell(visualDocument, false, RIGHT_SINGLE_SCROLL_SYMBOL,
SCROLL_CELL);
@@ -141,7 +141,7 @@
tr.appendChild(child2);
tr.appendChild(child3);
- div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ div.setAttribute(HTML.ATTR_STYLE, style);
div.appendChild(table);
return creationData;
}
@@ -158,21 +158,21 @@
* @return Element
*/
private nsIDOMElement createCell(nsIDOMDocument visualDocument, boolean active, String text, int sellType) {
- nsIDOMElement td = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
- td.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR, "center");
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
+ td.setAttribute(HTML.ATTR_ALIGN, HTML.VALUE_ALIGN_CENTER);
nsIDOMText d = visualDocument.createTextNode(text);
if (sellType == NUM_CELL) {
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- (active ? "dr-dscr-act" : "dr-dscr-inact"));
+ td.setAttribute(HTML.ATTR_CLASS,
+ (active ? "dr-dscr-act" : "dr-dscr-inact")); //$NON-NLS-1$ //$NON-NLS-2$
td.appendChild(d);
} else if (sellType == EMPTY_CELL) {
td
- .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-dscr-button");
+ .setAttribute(HTML.ATTR_CLASS,
+ "dr-dscr-button"); //$NON-NLS-1$
} else {
td
- .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-dscr-button");
+ .setAttribute(HTML.ATTR_CLASS,
+ "dr-dscr-button"); //$NON-NLS-1$
td.appendChild(d);
}
return td;
@@ -201,7 +201,7 @@
nsIDOMElement element = (nsIDOMElement) visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
int size = 45;
- if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_STYLE_ATTR)) {
+ if (name.equalsIgnoreCase(RichFaces.ATTR_STYLE)) {
String str = getWidth(value);
size = getSize(str);
int minSize = getSize(getWidth(MIN_STYLE_WIDTH));
@@ -226,10 +226,10 @@
}
// Add cells in datascroller
for (int i = 0; i < (size - nodesLength); i++) {
- nsIDOMElement cell = createCell(visualDocument, false, "" + (nodesLength - 5 + i), NUM_CELL);
+ nsIDOMElement cell = createCell(visualDocument, false,Constants.EMPTY + (nodesLength - 5 + i), NUM_CELL);
tr.appendChild(cell);
}
- nsIDOMElement child1 = createCell(visualDocument, false, "", EMPTY_CELL);
+ nsIDOMElement child1 = createCell(visualDocument, false, Constants.EMPTY, EMPTY_CELL);
nsIDOMElement child2 = createCell(visualDocument, false,RIGHT_SINGLE_SCROLL_SYMBOL, SCROLL_CELL);
nsIDOMElement child3 = createCell(visualDocument, false, RIGHT_DOUBLE_SCROLL_SYMBOL, SCROLL_CELL);
tr.appendChild(child1);
@@ -249,14 +249,14 @@
* @return size
*/
private String getWidth(String style) {
- String[] sub = style.split(";");
+ String[] sub = style.split(Constants.SEMICOLON);
for (int i = 0; i < sub.length; i++) {
sub[i] = sub[i].trim();
sub[i] = sub[i].toLowerCase();
- int pos = sub[i].indexOf(HtmlComponentUtil.HTML_ATR_WIDTH);
+ int pos = sub[i].indexOf(HTML.STYLE_PARAMETER_WIDTH);
if (pos != -1) {
if (pos == 0 || sub[i].charAt(pos - 1) != '-') {
- pos = sub[i].indexOf(":");
+ pos = sub[i].indexOf(Constants.COLON);
return sub[i].substring(pos + 1);
}
}
@@ -275,7 +275,7 @@
return 0;
}
String num = size;
- int pos = size.indexOf(PIXEL_PREFIX);
+ int pos = size.indexOf(Constants.PIXEL);
if (pos != -1) {
num = size.substring(0, pos);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2008-10-06 10:49:27 UTC (rev 10683)
@@ -14,10 +14,13 @@
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -27,33 +30,34 @@
public class RichFacesDataTableTemplate extends VpeAbstractTemplate {
-
+ private static final String ATTR_BREAK_BEFORE = "breakBefore"; //$NON-NLS-1$
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
Element sourceElement = (Element)sourceNode;
- nsIDOMElement table = visualDocument.createElement("table");
+ nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
ComponentUtil.copyAttributes(sourceNode, table);
VpeCreationData creationData = new VpeCreationData(table);
- ComponentUtil.setCSSLink(pageContext, "dataTable/dataTable.css", "richFacesDataTable");
- String tableClass = sourceElement.getAttribute("styleClass");
- table.setAttribute("class", "dr-table rich-table " + (tableClass==null?"":tableClass));
+ ComponentUtil.setCSSLink(pageContext, "dataTable/dataTable.css", "richFacesDataTable"); //$NON-NLS-1$ //$NON-NLS-2$
+ String tableClass = sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS);
+ table.setAttribute(HTML.ATTR_CLASS, "dr-table rich-table " + (tableClass==null?Constants.EMPTY:tableClass)); //$NON-NLS-1$
// Encode colgroup definition.
ArrayList<Element> columns = getColumns(sourceElement);
int columnsLength = getColumnsCount(sourceElement, columns);
- nsIDOMElement colgroup = visualDocument.createElement("colgroup");
- colgroup.setAttribute("span", String.valueOf(columnsLength));
+ nsIDOMElement colgroup = visualDocument.createElement(HTML.TAG_COLGROUP);
+ colgroup.setAttribute(HTML.TAG_SPAN, String.valueOf(columnsLength));
table.appendChild(colgroup);
- String columnsWidth = sourceElement.getAttribute("columnsWidth");
+ String columnsWidth = sourceElement.getAttribute(RichFaces.ATTR_COLUMNS_WIDTH);
if (null != columnsWidth) {
- String[] widths = columnsWidth.split(",");
+ String[] widths = columnsWidth.split(Constants.COMMA);
for (int i = 0; i < widths.length; i++) {
- nsIDOMElement col = visualDocument.createElement("col");
- col.setAttribute("width", widths[i]);
+ nsIDOMElement col = visualDocument.createElement(HTML.TAG_COL);
+ col.setAttribute(HTML.ATTR_WIDTH, widths[i]);
colgroup.appendChild(col);
}
}
@@ -62,60 +66,60 @@
encodeCaption(creationData, sourceElement, visualDocument, table);
// Encode Header
- Node header = ComponentUtil.getFacet((Element)sourceElement, "header",true);
- ArrayList<Element> columnsHeaders = getColumnsWithFacet(columns, "header");
+ Node header = ComponentUtil.getFacet((Element)sourceElement, RichFaces.NAME_FACET_HEADER,true);
+ ArrayList<Element> columnsHeaders = getColumnsWithFacet(columns, RichFaces.NAME_FACET_HEADER);
if(header!=null || !columnsHeaders.isEmpty()) {
- nsIDOMElement thead = visualDocument.createElement("thead");
+ nsIDOMElement thead = visualDocument.createElement(HTML.TAG_THEAD);
table.appendChild(thead);
- String headerClass = (String) sourceElement.getAttribute("headerClass");
+ String headerClass = (String) sourceElement.getAttribute(RichFaces.ATTR_HEADER_CLASS);
if(header != null) {
encodeTableHeaderOrFooterFacet(creationData, thead, columnsLength, visualDocument, header,
- "dr-table-header rich-table-header",
- "dr-table-header-continue rich-table-header-continue",
- "dr-table-headercell rich-table-headercell",
- headerClass, "td");
+ "dr-table-header rich-table-header", //$NON-NLS-1$
+ "dr-table-header-continue rich-table-header-continue", //$NON-NLS-1$
+ "dr-table-headercell rich-table-headercell", //$NON-NLS-1$
+ headerClass, HTML.TAG_TD);
}
if(!columnsHeaders.isEmpty()) {
- nsIDOMElement tr = visualDocument.createElement("tr");
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
thead.appendChild(tr);
- String styleClass = encodeStyleClass(null, "dr-table-subheader rich-table-subheader", null, headerClass);
+ String styleClass = encodeStyleClass(null, "dr-table-subheader rich-table-subheader", null, headerClass); //$NON-NLS-1$
if(styleClass!=null) {
- tr.setAttribute("class", styleClass);
+ tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
encodeHeaderOrFooterFacets(creationData, tr, visualDocument, columnsHeaders,
- "dr-table-subheadercell rich-table-subheadercell",
- headerClass, "header", "td");
+ "dr-table-subheadercell rich-table-subheadercell", //$NON-NLS-1$
+ headerClass, RichFaces.NAME_FACET_HEADER, HTML.TAG_TD);
}
}
// Encode Footer
- Element footer = ComponentUtil.getFacet(sourceElement, "footer");
- ArrayList<Element> columnsFooters = getColumnsWithFacet(columns, "footer");
+ Element footer = ComponentUtil.getFacet(sourceElement, RichFaces.NAME_FACET_FOOTER);
+ ArrayList<Element> columnsFooters = getColumnsWithFacet(columns, RichFaces.NAME_FACET_FOOTER);
if (footer != null || !columnsFooters.isEmpty()) {
- nsIDOMElement tfoot = visualDocument.createElement("tfoot");
+ nsIDOMElement tfoot = visualDocument.createElement(HTML.TAG_TFOOT);
table.appendChild(tfoot);
- String footerClass = (String) sourceElement.getAttribute("footerClass");
+ String footerClass = (String) sourceElement.getAttribute(RichFaces.ATTR_FOOTER_CLASS);
if(!columnsFooters.isEmpty()) {
- nsIDOMElement tr = visualDocument.createElement("tr");
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
tfoot.appendChild(tr);
- String styleClass = encodeStyleClass(null, "dr-table-subfooter rich-table-subfooter", null, footerClass);
+ String styleClass = encodeStyleClass(null, "dr-table-subfooter rich-table-subfooter", null, footerClass); //$NON-NLS-1$
if(styleClass!=null) {
- tr.setAttribute("class", styleClass);
+ tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
encodeHeaderOrFooterFacets(creationData, tr, visualDocument, columnsFooters,
- "dr-table-subfootercell rich-table-subfootercell",
- footerClass, "footer", "td");
+ "dr-table-subfootercell rich-table-subfootercell", //$NON-NLS-1$
+ footerClass, RichFaces.NAME_FACET_FOOTER, HTML.TAG_TD);
}
if (footer != null) {
encodeTableHeaderOrFooterFacet(creationData, tfoot, columnsLength, visualDocument, footer,
- "dr-table-footer rich-table-footer",
- "dr-table-footer-continue rich-table-footer-continue",
- "dr-table-footercell rich-table-footercell",
- footerClass, "td");
+ "dr-table-footer rich-table-footer", //$NON-NLS-1$
+ "dr-table-footer-continue rich-table-footer-continue", //$NON-NLS-1$
+ "dr-table-footercell rich-table-footercell", //$NON-NLS-1$
+ footerClass,HTML.TAG_TD);
}
}
- nsIDOMElement tbody = visualDocument.createElement("tbody");
+ nsIDOMElement tbody = visualDocument.createElement(HTML.TAG_TBODY);
table.appendChild(tbody);
// Create mapping to Encode body
@@ -124,18 +128,18 @@
nsIDOMElement tr = null;
VpeChildrenInfo trInfo = null;
for (Node child : children) {
- if(child.getNodeName().endsWith(":column")) {
- String breakBefore = ((Element)child).getAttribute("breakBefore");
- if(breakBefore!=null && breakBefore.equalsIgnoreCase("true")) {
+ if(child.getNodeName().endsWith(RichFaces.TAG_COLUMN)) {
+ String breakBefore = ((Element)child).getAttribute(ATTR_BREAK_BEFORE);
+ if(breakBefore!=null && breakBefore.equalsIgnoreCase(Constants.TRUE)) {
tr = null;
}
if(tr==null) {
- tr = visualDocument.createElement("tr");
+ tr = visualDocument.createElement(HTML.TAG_TR);
if(firstRow) {
- tr.setAttribute("class", "dr-table-firstrow rich-table-firstrow");
+ tr.setAttribute(HTML.ATTR_CLASS, "dr-table-firstrow rich-table-firstrow"); //$NON-NLS-1$
firstRow = false;
} else {
- tr.setAttribute("class", "dr-table-row rich-table-row");
+ tr.setAttribute(HTML.ATTR_CLASS, "dr-table-row rich-table-row"); //$NON-NLS-1$
}
trInfo = new VpeChildrenInfo(tr);
tbody.appendChild(tr);
@@ -143,10 +147,10 @@
}
trInfo.addSourceChild(child);
- } else if(child.getNodeName().endsWith(":columnGroup")) {
+ } else if(child.getNodeName().endsWith(RichFaces.TAG_COLUMN_GROUP)) {
RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData, (Element)child, visualDocument, tbody);
tr = null;
- } else if(child.getNodeName().endsWith(":subTable")) {
+ } else if(child.getNodeName().endsWith(RichFaces.TAG_SUB_TABLE)) {
RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData, (Element)child, visualDocument, tbody);
tr = null;
} else {
@@ -162,21 +166,21 @@
protected void encodeCaption(VpeCreationData creationData, Element sourceElement, nsIDOMDocument visualDocument, nsIDOMElement table) {
//Encode caption
- Element captionFromFacet = ComponentUtil.getFacet(sourceElement, "caption");
+ Element captionFromFacet = ComponentUtil.getFacet(sourceElement, RichFaces.NAME_FACET_CAPTION);
if (captionFromFacet != null) {
- String captionClass = (String) table.getAttribute("captionClass");
- String captionStyle = (String) table.getAttribute("captionStyle");
+ String captionClass = (String) table.getAttribute(RichFaces.ATTR_CAPTION_CLASS);
+ String captionStyle = (String) table.getAttribute(RichFaces.ATTR_CAPTION_STYLE);
- nsIDOMElement caption = visualDocument.createElement("caption");
+ nsIDOMElement caption = visualDocument.createElement(HTML.TAG_CAPTION);
table.appendChild(caption);
if (captionClass != null && captionClass.length()>0) {
- captionClass = "dr-table-caption rich-table-caption " + captionClass;
+ captionClass = "dr-table-caption rich-table-caption " + captionClass; //$NON-NLS-1$
} else {
- captionClass = "dr-table-caption rich-table-caption";
+ captionClass = "dr-table-caption rich-table-caption"; //$NON-NLS-1$
}
- caption.setAttribute("class", captionClass);
+ caption.setAttribute(HTML.ATTR_CLASS, captionClass);
if (captionStyle != null && captionStyle.length()>0) {
- caption.setAttribute("style", captionStyle);
+ caption.setAttribute(HTML.ATTR_STYLE, captionStyle);
}
VpeChildrenInfo cap = new VpeChildrenInfo(caption);
@@ -188,16 +192,16 @@
public static void encodeHeaderOrFooterFacets(VpeCreationData creationData, nsIDOMElement parentTr, nsIDOMDocument visualDocument, ArrayList<Element> headersOrFooters, String skinCellClass, String headerClass, String facetName, String element) {
for (Element column : headersOrFooters) {
- String classAttribute = facetName + "Class";
+ String classAttribute = facetName + "Class"; //$NON-NLS-1$
String columnHeaderClass = column.getAttribute(classAttribute);
nsIDOMElement td = visualDocument.createElement(element);
parentTr.appendChild(td);
String styleClass = encodeStyleClass(null, skinCellClass, headerClass, columnHeaderClass);
- td.setAttribute("class", styleClass);
- td.setAttribute("scop", "col");
- String colspan = column.getAttribute("colspan");
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
+ td.setAttribute(HTML.ATTR_SCOPE, "col"); //$NON-NLS-1$
+ String colspan = column.getAttribute("colspan"); //$NON-NLS-1$
if(colspan!=null && colspan.length()>0) {
- td.setAttribute("colspan", colspan);
+ td.setAttribute(HTML.ATTR_COLSPAN, colspan);
}
Node facetBody = ComponentUtil.getFacet(column, facetName,true);
@@ -208,35 +212,35 @@
}
protected void encodeTableHeaderOrFooterFacet(VpeCreationData creationData, nsIDOMElement parentTheadOrTfood, int columns, nsIDOMDocument visualDocument, Node facetBody, String skinFirstRowClass, String skinRowClass, String skinCellClass, String facetBodyClass, String element) {
- boolean isColumnGroup = facetBody.getNodeName().endsWith(":columnGroup");
- boolean isSubTable = facetBody.getNodeName().endsWith(":subTable");
+ boolean isColumnGroup = facetBody.getNodeName().endsWith(RichFaces.TAG_COLUMN_GROUP);
+ boolean isSubTable = facetBody.getNodeName().endsWith(RichFaces.TAG_SUB_TABLE);
if(isColumnGroup) {
RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData, (Element)facetBody, visualDocument, parentTheadOrTfood);
} else if(isSubTable) {
RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData, (Element)facetBody, visualDocument, parentTheadOrTfood);
} else {
- nsIDOMElement tr = visualDocument.createElement("tr");
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
parentTheadOrTfood.appendChild(tr);
String styleClass = encodeStyleClass(null, skinFirstRowClass, facetBodyClass, null);
if(styleClass!=null) {
- tr.setAttribute("class", styleClass);
+ tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
String style = ComponentUtil.getHeaderBackgoundImgStyle();
- tr.setAttribute("style", style);
+ tr.setAttribute(HTML.ATTR_STYLE, style);
nsIDOMElement td = visualDocument.createElement(element);
tr.appendChild(td);
styleClass = encodeStyleClass(null, skinCellClass, facetBodyClass, null);
if(styleClass!=null) {
- td.setAttribute("class", styleClass);
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
}
if (columns>0) {
- td.setAttribute("colspan", String.valueOf(columns));
+ td.setAttribute(HTML.ATTR_COLSPAN, String.valueOf(columns));
}
- td.setAttribute("scope", "colgroup");
+ td.setAttribute(HTML.ATTR_SCOPE, "colgroup"); //$NON-NLS-1$
VpeChildrenInfo child = new VpeChildrenInfo(td);
child.addSourceChild(facetBody);
@@ -249,7 +253,7 @@
NodeList children = parentSourceElement.getChildNodes();
for(int i=0; i<children.getLength(); i++) {
Node child = children.item(i);
- if((child instanceof Element) && child.getNodeName().endsWith(":column")) {
+ if((child instanceof Element) && child.getNodeName().endsWith(RichFaces.TAG_COLUMN)) {
columns.add((Element)child);
}
}
@@ -271,13 +275,13 @@
StringBuffer styleClass = new StringBuffer();
// Construct predefined classes
if (null != parentPredefined) {
- styleClass.append(parentPredefined).append(" ");
+ styleClass.append(parentPredefined).append(Constants.WHITE_SPACE);
} else if (null != predefined) {
- styleClass.append(predefined).append(" ");
+ styleClass.append(predefined).append(Constants.WHITE_SPACE);
}
// Append class from parent component.
if (null != parent) {
- styleClass.append(parent).append(" ");
+ styleClass.append(parent).append(Constants.WHITE_SPACE);
}
if (null != custom) {
styleClass.append(custom);
@@ -292,7 +296,7 @@
int count = 0;
// check for exact value in component
try {
- count = Integer.parseInt(sourceElement.getAttribute("columns"));
+ count = Integer.parseInt(sourceElement.getAttribute(RichFaces.ATTR_COLUMNS));
} catch (NumberFormatException e) {
count = calculateRowColumns(sourceElement, columns);
}
@@ -308,7 +312,7 @@
int currentLength = 0;
for (Element column : columns) {
if (ComponentUtil.isRendered(column)) {
- if (column.getNodeName().endsWith(":columnGroup")) {
+ if (column.getNodeName().endsWith(RichFaces.TAG_COLUMN_GROUP)) {
// Store max calculated value of previous rows.
count = Math.max(currentLength,count);
// Calculate number of columns in row.
@@ -316,20 +320,20 @@
// Store max calculated value
count = Math.max(currentLength,count);
currentLength = 0;
- } else if (column.getNodeName().equals(sourceElement.getPrefix() + ":column")) {
+ } else if (column.getNodeName().equals(sourceElement.getPrefix() + Constants.COLON + RichFaces.TAG_COLUMN)) {
// For new row, save length of previous.
- if (Boolean.getBoolean(column.getAttribute("breakBefore"))) {
+ if (Boolean.getBoolean(column.getAttribute(ATTR_BREAK_BEFORE))) {
count = Math.max(currentLength,count);
currentLength = 0;
}
- String colspanStr = column.getAttribute("colspan");
+ String colspanStr = column.getAttribute("colspan"); //$NON-NLS-1$
Integer colspan = null;
try {
currentLength += Integer.parseInt(colspanStr);
} catch (NumberFormatException e) {
currentLength++;
}
- } else if (column.getNodeName().endsWith(":column")) {
+ } else if (column.getNodeName().endsWith(RichFaces.TAG_COLUMN)) {
// UIColumn always have colspan == 1.
currentLength++;
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2008-10-06 10:49:27 UTC (rev 10683)
@@ -9,10 +9,8 @@
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
-
package org.jboss.tools.jsf.vpe.richfaces.template.util;
-
/**
* contain rich faces tags and general attributes.
*
@@ -20,62 +18,64 @@
*/
public class RichFaces {
- /**
- * The Constructor.
- */
- private RichFaces() {
- }
+ /**
+ * The Constructor.
+ */
+ private RichFaces() {
+ }
- /** jsf tags which are used with richFaces. */
- public static final String TAG_COLUMN = "column"; //$NON-NLS-1$
+ /** jsf tags which are used with richFaces. */
+ public static final String TAG_COLUMN = "column"; //$NON-NLS-1$
+ /** The Constant TAG_FACET. */
+ public static final String TAG_FACET = "facet"; //$NON-NLS-1$
+ public static final String TAG_COLUMN_GROUP = "columnGroup"; //$NON-NLS-1$
+ public static final String TAG_SUB_TABLE = "subTable"; //$NON-NLS-1$
- /** The Constant TAG_FACET. */
- public static final String TAG_FACET = "facet"; //$NON-NLS-1$
+ /** The Constant ATTR_NAME. */
+ public static final String ATTR_NAME = "name"; //$NON-NLS-1$
+ /** The Constant ATTR_STYLE. */
+ public static final String ATTR_STYLE = "style"; //$NON-NLS-1$
+ /** The Constant ATTR_WIDTH. */
+ public static final String ATTR_WIDTH = "width"; //$NON-NLS-1$
+ /** The Constant ATTR_VALUE. */
+ public static final String ATTR_VALUE = "value"; //$NON-NLS-1$
+ /** The Constant ATTR_INPUT_SIZE. */
+ public static final String ATTR_INPUT_SIZE = "inputSize"; //$NON-NLS-1$
+ /** The Constant ATTR_INPUT_CLASS. */
+ public static final String ATTR_INPUT_CLASS = "inputClass"; //$NON-NLS-1$
+ /** The Constant ATTR_INPUT_STYLE. */
+ public static final String ATTR_INPUT_STYLE = "inputStyle"; //$NON-NLS-1$
+ /** The Constant ATTR_ROW_CLASSES. */
+ public static final String ATTR_ROW_CLASSES = "rowClasses"; //$NON-NLS-1$
+ /** The Constant ATTR_COLUMN_CLASSES. */
+ public static final String ATTR_COLUMN_CLASSES = "columnClasses"; //$NON-NLS-1$
+ /** The Constant ATTR_CONTROLS_TYPE. */
+ public static final String ATTR_CONTROLS_TYPE = "controlsType"; //$NON-NLS-1$
+ /** The Constant ATTR_SHOW_BUTTON_LABELS. */
+ public static final String ATTR_SHOW_BUTTON_LABELS = "showButtonLabels"; //$NON-NLS-1$
+ /** The Constant ATTR_DEFAULT_LABEL. */
+ public static final String ATTR_DEFAULT_LABEL = "defaultLabel"; //$NON-NLS-1$
+ /** The Constant ATTR_ADD_CONTROL_LABEL. */
+ public static final String ATTR_ADD_CONTROL_LABEL = "addControlLabel"; //$NON-NLS-1$
+ /** The Constant ATTR_STYLE_CLASS. */
+ public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
+ public static final String ATTR_SELECT_ITEM_LABEL = "itemLabel"; //$NON-NLS-1$
+ public static final String ATTR_SELECT_ITEM_VALUE = "itemValue"; //$NON-NLS-1$
+ public static final String ATTR_DISABLED = "disabled";//$NON-NLS-1$
+ public static final String ATTR_POPUP = "popup";//$NON-NLS-1$
+ public static final String ATTR_DIRECTION = "direction"; //$NON-NLS-1$
+ public static final String ATTR_ALIGN = "align"; //$NON-NLS-1$
+ public static final String ATTR_LIST_WIDTH = "listWidth"; //$NON-NLS-1$
+ public static final String ATTR_LIST_HEIGHT = "listHeight"; //$NON-NLS-1$
+ public static final String ATTR_COLUMNS_WIDTH = "columnsWidth"; //$NON-NLS-1$
+ public static final String ATTR_HEADER_CLASS = "headerClass"; //$NON-NLS-1$
+ public static final String ATTR_FOOTER_CLASS = "footerClass"; //$NON-NLS-1$
+ public static final String ATTR_CAPTION_CLASS = "captionClass"; //$NON-NLS-1$
+ public static final String ATTR_CAPTION_STYLE = "captionStyle"; //$NON-NLS-1$
+ public static final String ATTR_COLUMNS = "columns"; //$NON-NLS-1$
- /** The Constant ATTR_NAME. */
- public static final String ATTR_NAME = "name"; //$NON-NLS-1$
+ public static final String NAME_FACET_HEADER = "header"; //$NON-NLS-1$
+ public static final String NAME_FACET_FOOTER = "footer"; //$NON-NLS-1$
+ public static final String NAME_FACET_CAPTION = "caption"; //$NON-NLS-1$
- /** The Constant ATTR_STYLE. */
- public static final String ATTR_STYLE = "style"; //$NON-NLS-1$
-
- /** The Constant ATTR_WIDTH. */
- public static final String ATTR_WIDTH = "width"; //$NON-NLS-1$
-
- /** The Constant ATTR_VALUE. */
- public static final String ATTR_VALUE = "value"; //$NON-NLS-1$
-
- /** The Constant ATTR_INPUT_SIZE. */
- public static final String ATTR_INPUT_SIZE = "inputSize"; //$NON-NLS-1$
-
- /** The Constant ATTR_INPUT_CLASS. */
- public static final String ATTR_INPUT_CLASS = "inputClass"; //$NON-NLS-1$
-
- /** The Constant ATTR_INPUT_STYLE. */
- public static final String ATTR_INPUT_STYLE = "inputStyle"; //$NON-NLS-1$
-
- /** The Constant ATTR_ROW_CLASSES. */
- public static final String ATTR_ROW_CLASSES = "rowClasses"; //$NON-NLS-1$
-
- /** The Constant ATTR_COLUMN_CLASSES. */
- public static final String ATTR_COLUMN_CLASSES = "columnClasses"; //$NON-NLS-1$
-
- /** The Constant ATTR_CONTROLS_TYPE. */
- public static final String ATTR_CONTROLS_TYPE = "controlsType"; //$NON-NLS-1$
-
- /** The Constant ATTR_SHOW_BUTTON_LABELS. */
- public static final String ATTR_SHOW_BUTTON_LABELS = "showButtonLabels"; //$NON-NLS-1$
-
- /** The Constant ATTR_DEFAULT_LABEL. */
- public static final String ATTR_DEFAULT_LABEL = "defaultLabel"; //$NON-NLS-1$
-
- /** The Constant ATTR_ADD_CONTROL_LABEL. */
- public static final String ATTR_ADD_CONTROL_LABEL = "addControlLabel"; //$NON-NLS-1$
-
- /** The Constant ATTR_STYLE_CLASS. */
- public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
-
- public static final String ATTR_SELECT_ITEM_LABEL = "itemLabel"; //$NON-NLS-1$
-
- public static final String ATTR_SELECT_ITEM_VALUE = "itemValue"; //$NON-NLS-1$
-
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/contextMenu.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/contextMenu.xhtml 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/contextMenu.xhtml 2008-10-06 10:49:27 UTC (rev 10683)
@@ -10,7 +10,7 @@
</head>
<body>
<rich:contextMenu event="oncontextmenu" attached="true"
- submitMode="none">
+ submitMode="none" id="contextMenu">
<rich:menuItem value="Zoom In" onclick="enlarge();" id="zin"></rich:menuItem>
<rich:menuItem value="Zoom Out" onclick="decrease();" id="zout"></rich:menuItem>
</rich:contextMenu>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml 2008-10-06 10:49:27 UTC (rev 10683)
@@ -10,6 +10,6 @@
</head>
<body>
<!-- Data Filter Slider -->
- <rich:dataFilterSlider startRange="1" endRange="1000" increment="100" trailer="false" />
+ <rich:dataFilterSlider startRange="1" endRange="1000" increment="100" trailer="false" id="dataFilterSlider"/>
</body>
</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml.xml 2008-10-06 10:49:27 UTC (rev 10683)
@@ -0,0 +1,27 @@
+<tests>
+ <test id="dataFilterSlider">
+ <DIV CLASS="slider-container" STYLE="width: 260px;">
+ <DIV CLASS="range" STYLE="width: 200px;">
+ <DIV CLASS="range-decor">
+ <DIV CLASS="trailer" STYLE="left: -38px; width: 114px;">
+ <DIV CLASS="track" STYLE="width: 200px;">
+ <DIV CLASS="handle">
+ <IMG WIDTH="7" HEIGHT="8" BORDER="0" />
+ </DIV>
+ <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING="0"
+ CELLPADDING="0" BORDER="0">
+ <TR>
+ <TD ALIGN="right"
+ STYLE="font-family: Arial,Verdana,sans-serif; font-size: 5px; color: white;">
+ <IMG WIDTH="100%" HEIGHT="100%" />
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ <INPUT TYPE="text" CLASS="slider-input-field" VALUE="N/A" />
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataScroller.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataScroller.xhtml 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataScroller.xhtml 2008-10-06 10:49:27 UTC (rev 10683)
@@ -1,16 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
-
-<head>
-</head>
-<body>
- <!-- Data Scroller -->
- <rich:datascroller>
- </rich:datascroller>
-</body>
-</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml 2008-10-06 10:49:27 UTC (rev 10683)
@@ -9,72 +9,71 @@
<head>
</head>
<body>
- <!-- Data Table -->
- <rich:dataTable onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
- onRowMouseOut="this.style.backgroundColor='#F2F2F2'" cellpadding="0"
- cellspacing="0" width="700" border="0" value="table">
+<h1>dataTable</h1>
- <f:facet name="header">
- <rich:columnGroup>
- <rich:column rowspan="2">
- <rich:spacer />
- </rich:column>
- <rich:column colspan="3">
- <h:outputText value="Expenses" />
- </rich:column>
- <rich:column rowspan="2">
- <h:outputText value="subtotals" />
- </rich:column>
- <rich:column breakBefore="true">
- <h:outputText value="Meals" />
- </rich:column>
- <rich:column>
- <h:outputText value="Hotels" />
- </rich:column>
- <rich:column>
- <h:outputText value="Transport" />
- </rich:column>
- </rich:columnGroup>
- </f:facet>
- <rich:column colspan="5">
- <h:outputText value="Minsk" />
- </rich:column>
+<rich:dataTable cellpadding="0" cellspacing="0" width="700" border="0"
+ var="row" value="#{bean.dtList}" rowKeyVar="rowKey" id="dataTable">
- <rich:subTable onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
- onRowMouseOut="this.style.backgroundColor='F9F9F9'" value="SubTable">
+ <f:facet name="header">
+ <rich:columnGroup>
+ <rich:column rowspan="2">
+ <rich:spacer />
+ </rich:column>
+ <rich:column colspan="3">
+ <h:outputText value="FIELDS" />
+ </rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="field1" />
+ </rich:column>
<rich:column>
- <h:outputText value="25-Aug-97"></h:outputText>
+ <h:outputText value="field2" />
</rich:column>
<rich:column>
- <h:outputText value="30"></h:outputText>
+ <h:outputText value="field3" />
</rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="#{rowKey}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row.field1}">
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row.field2}">
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row.field3}">
+ </h:outputText>
+ </rich:column>
+
+ </rich:columnGroup>
+
+
+
+ <f:facet name="footer">
+
+ <rich:columnGroup>
+ <rich:column></rich:column>
<rich:column>
- <h:outputText value="30"></h:outputText>
+ <h:outputText value="footer1" />
</rich:column>
<rich:column>
- <h:outputText value="100"></h:outputText>
+ <h:outputText value="footer2" />
</rich:column>
<rich:column>
- <h:outputText value="20"></h:outputText>
+ <h:outputText value="footer3" />
</rich:column>
- </rich:subTable>
- <f:facet name="footer">
- <rich:columnGroup>
- <rich:column><h:outputText value="Totals"></h:outputText></rich:column>
- <rich:column>
- <h:outputText value="30"></h:outputText>
- </rich:column>
- <rich:column>
- <h:outputText value="50"></h:outputText>
- </rich:column>
- <rich:column>
- <h:outputText value="10"></h:outputText>
- </rich:column>
- <rich:column>
- <h:outputText value="20"></h:outputText>
- </rich:column>
- </rich:columnGroup>
- </f:facet>
- </rich:dataTable>
+
+ </rich:columnGroup>
+ </f:facet>
+
+</rich:dataTable>
+
</body>
</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml 2008-10-06 10:49:27 UTC (rev 10683)
@@ -0,0 +1,64 @@
+<tests>
+ <test id="dataTable">
+ <TABLE WIDTH="700" CELLSPACING="0" CELLPADDING="0" BORDER="0"
+ VAR="row" VALUE="#{bean.dtList}" ROWKEYVAR="rowKey" ID="dataTable"
+ CLASS="dr-table rich-table">
+ <COLGROUP SPAN="1">
+ </COLGROUP>
+ <THEAD>
+ <TR CLASS="dr-table-header rich-table-header">
+ <TD CLASS="dr-table-headercell rich-table-headercell" ROWSPAN="2">
+ <IMG WIDTH="1" HEIGHT="1" />
+ </TD>
+ <TD CLASS="dr-table-headercell rich-table-headercell" COLSPAN="3">
+ <SPAN> FIELDS</SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-header-continue rich-table-header-continue">
+ <TD CLASS="dr-table-headercell rich-table-headercell"
+ BREAKBEFORE="true">
+ <SPAN> field1</SPAN>
+ </TD>
+ <TD CLASS="dr-table-headercell rich-table-headercell">
+ <SPAN> field2</SPAN>
+ </TD>
+ <TD CLASS="dr-table-headercell rich-table-headercell">
+ <SPAN> field3</SPAN>
+ </TD>
+ </TR>
+ </THEAD>
+ <TFOOT>
+ <TR CLASS="dr-table-footer rich-table-footer">
+ <TD CLASS="dr-table-footercell rich-table-footercell">
+ <BR />
+ </TD>
+ <TD CLASS="dr-table-footercell rich-table-footercell">
+ <SPAN> footer1</SPAN>
+ </TD>
+ <TD CLASS="dr-table-footercell rich-table-footercell">
+ <SPAN> footer2</SPAN>
+ </TD>
+ <TD CLASS="dr-table-footercell rich-table-footercell">
+ <SPAN> footer3</SPAN>
+ </TD>
+ </TR>
+ </TFOOT>
+ <TBODY>
+ <TR CLASS="dr-table-cell rich-table-cell">
+ <TD CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{rowKey}</SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{row.field1}</SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{row.field2}</SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{row.field3}</SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </test>
+</tests>
\ No newline at end of file
Copied: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml (from rev 10675, trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataScroller.xhtml)
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml 2008-10-06 10:49:27 UTC (rev 10683)
@@ -0,0 +1,83 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<h:form>
+ <h1>datascroller</h1>
+ <rich:datascroller id="datascroller" for="dataTable" align="top" >
+ </rich:datascroller>
+
+ <rich:dataTable cellpadding="0" cellspacing="0" width="700" border="0"
+ var="row" value="#{bean.dtList}" rowKeyVar="rowKey" id="dataTable"
+ rows="2">
+
+ <f:facet name="header">
+ <rich:columnGroup>
+ <rich:column rowspan="2">
+ <rich:spacer />
+ </rich:column>
+ <rich:column colspan="3">
+ <h:outputText value="FIELDS" />
+ </rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="field1" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="field2" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="field3" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="#{rowKey}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row.field1}">
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row.field2}">
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row.field3}">
+ </h:outputText>
+ </rich:column>
+
+ </rich:columnGroup>
+
+
+
+ <f:facet name="footer">
+
+ <rich:columnGroup>
+ <rich:column></rich:column>
+ <rich:column>
+ <h:outputText value="footer1" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="footer2" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="footer3" />
+ </rich:column>
+
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+</h:form>
+</body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml 2008-10-06 10:49:27 UTC (rev 10683)
@@ -0,0 +1,31 @@
+<tests>
+ <test id="datascroller">
+ <DIV CLASS="dr-div-heigth" STYLE="width: 400px;">
+ <TABLE CELLSPACING="1" CELLPADDING="0" BORDER="0"
+ CLASS="dr-dscr-t dr-tbpnl-cntnt">
+ <TBODY>
+ <TR>
+ <TD ALIGN="center" CLASS="dr-dscr-button"><<</TD>
+ <TD ALIGN="center" CLASS="dr-dscr-button"><</TD>
+ <TD ALIGN="center" CLASS="dr-dscr-button"><BR />
+ </TD>
+ <TD ALIGN="center" CLASS="dr-dscr-act">1</TD>
+ <TD ALIGN="center" CLASS="dr-dscr-inact">2</TD>
+ <TD ALIGN="center" CLASS="dr-dscr-inact">3</TD>
+ <TD ALIGN="center" CLASS="dr-dscr-inact">4</TD>
+ <TD ALIGN="center" CLASS="dr-dscr-inact">5</TD>
+ <TD ALIGN="center" CLASS="dr-dscr-inact">6</TD>
+ <TD ALIGN="center" CLASS="dr-dscr-inact">7</TD>
+ <TD ALIGN="center" CLASS="dr-dscr-inact">8</TD>
+ <TD ALIGN="center" CLASS="dr-dscr-inact">9</TD>
+ <TD ALIGN="center" CLASS="dr-dscr-inact">10</TD>
+ <TD ALIGN="center" CLASS="dr-dscr-button"><BR />
+ </TD>
+ <TD ALIGN="center" CLASS="dr-dscr-button">></TD>
+ <TD ALIGN="center" CLASS="dr-dscr-button">>></TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-06 10:49:27 UTC (rev 10683)
@@ -54,15 +54,16 @@
}
public void testContextMenu() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/contextMenu.xhtml", "contextMenu");//$NON-NLS-1$ //$NON-NLS-2$
}
public void testDataFilterSlider() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/dataFilterSlider.xhtml");//$NON-NLS-1$
}
public void testDatascroller() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+
+ performContentTest("components/datascroller.xhtml");//$NON-NLS-1$
}
public void testColumns() throws Throwable {
@@ -93,8 +94,9 @@
assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
}
- public void testDataTable() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ public void _testDataTable() throws Throwable {
+ performContentTest("components/dataTable.xhtml");//$NON-NLS-1$
+
}
public void testSubTable() throws Throwable {
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-10-06 10:31:41 UTC (rev 10682)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-10-06 10:49:27 UTC (rev 10683)
@@ -66,7 +66,7 @@
public void testDataScroller() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/dataScroller.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/datascroller.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME)); //$NON-NLS-1$
}
public void testDataTable() throws PartInitException, Throwable {
17 years, 3 months
JBoss Tools SVN: r10682 - trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-06 06:31:41 -0400 (Mon, 06 Oct 2008)
New Revision: 10682
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
Log:
JBID-2811 ESB Project wizard doesn't work at all.
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2008-10-06 10:03:45 UTC (rev 10681)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2008-10-06 10:31:41 UTC (rev 10682)
@@ -25,6 +25,7 @@
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
@@ -155,7 +156,7 @@
private IFacetedProjectWorkingCopy getFacetedProjectWorkingCopy(){
- Object obj = model.getProperty(FACETED_PROJECT_WORKING_COPY);
+ Object obj = model.getProperty(IFacetDataModelProperties.FACETED_PROJECT_WORKING_COPY);
if(obj instanceof IFacetedProjectWorkingCopy){
return (IFacetedProjectWorkingCopy)obj;
}
17 years, 3 months
JBoss Tools SVN: r10681 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core: src/org/jboss/tools/hibernate/jpt/core/internal and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-10-06 06:03:45 -0400 (Mon, 06 Oct 2008)
New Revision: 10681
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnitProperties.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/PersistenceUnitProperties.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/PersistenceUnitPropertyListListener.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/BasicHibernateProperties.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/HibernateBasic.java
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernatePlatform.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateJpaProperties.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateProperties.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2818
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2008-10-06 10:02:22 UTC (rev 10680)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2008-10-06 10:03:45 UTC (rev 10681)
@@ -7,11 +7,11 @@
org.eclipse.core.runtime,
org.eclipse.jpt.core,
org.eclipse.wst.validation,
- org.eclipse.jpt.eclipselink.core;bundle-version="1.0.0",
org.eclipse.jpt.utility;bundle-version="1.2.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: Hibernate Team
Export-Package: org.jboss.tools.hibernate.jpt.core.internal,
- org.jboss.tools.hibernate.jpt.core.internal.context
+ org.jboss.tools.hibernate.jpt.core.internal.context,
+ org.jboss.tools.hibernate.jpt.core.internal.context.basic
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernatePlatform.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernatePlatform.java 2008-10-06 10:02:22 UTC (rev 10680)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernatePlatform.java 2008-10-06 10:03:45 UTC (rev 10681)
@@ -27,9 +27,8 @@
return ID;
}
- /* use GenericJpaPlatform's methods while under progress
@Override
protected JpaFactory buildJpaFactory() {
return new HibernateFactory();
- }*/
+ }
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateJpaProperties.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateJpaProperties.java 2008-10-06 10:02:22 UTC (rev 10680)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateJpaProperties.java 2008-10-06 10:03:45 UTC (rev 10681)
@@ -10,11 +10,20 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.core.internal.context;
+import java.util.ListIterator;
+
import org.eclipse.jpt.core.JpaProject;
import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
import org.eclipse.jpt.core.context.persistence.Property;
import org.eclipse.jpt.utility.internal.model.AbstractModel;
+import org.eclipse.jpt.utility.internal.model.value.ItemPropertyListValueModelAdapter;
+import org.eclipse.jpt.utility.internal.model.value.ListAspectAdapter;
+import org.eclipse.jpt.utility.internal.model.value.SimplePropertyValueModel;
import org.eclipse.jpt.utility.model.event.PropertyChangeEvent;
+import org.eclipse.jpt.utility.model.value.ListValueModel;
+import org.eclipse.jpt.utility.model.value.PropertyValueModel;
+import org.jboss.tools.hibernate.jpt.core.internal.context.basic.BasicHibernateProperties;
+import org.jboss.tools.hibernate.jpt.core.internal.context.basic.HibernateBasic;
/**
* @author Dmitry Geraskov
@@ -25,48 +34,75 @@
private PersistenceUnit persistenceUnit;
+ private BasicHibernateProperties basicHibernateProperties;
+
+ private ListValueModel<Property> propertiesAdapter;
+ private ListValueModel<Property> propertyListAdapter;
+
public HibernateJpaProperties(PersistenceUnit parent) {
super();
this.initialize(parent);
}
+
+ protected void initialize(PersistenceUnit parent) {
+ this.persistenceUnit = parent;
+ PropertyValueModel<PersistenceUnit> persistenceUnitHolder =
+ new SimplePropertyValueModel<PersistenceUnit>(this.persistenceUnit);
+
+ this.propertiesAdapter = this.buildPropertiesAdapter(persistenceUnitHolder);
+ this.propertyListAdapter = this.buildPropertyListAdapter(this.propertiesAdapter);
+
+ this.basicHibernateProperties = this.buildBasicProperties();
+ }
+
+ private ListValueModel<Property> buildPropertyListAdapter(ListValueModel<Property> propertiesAdapter) {
+ return new ItemPropertyListValueModelAdapter<Property>(propertiesAdapter, Property.VALUE_PROPERTY);
+ }
+
+ private ListValueModel<Property> buildPropertiesAdapter(PropertyValueModel<PersistenceUnit> subjectHolder) {
+ return new ListAspectAdapter<PersistenceUnit, Property>(subjectHolder, PersistenceUnit.PROPERTIES_LIST) {
+ @Override
+ protected ListIterator<Property> listIterator_() {
+ return this.subject.properties();
+ }
- /* (non-Javadoc)
- * @see org.eclipse.jpt.eclipselink.core.internal.context.PersistenceUnitProperties#getJpaProject()
- */
- public JpaProject getJpaProject() {
- return this.persistenceUnit.getJpaProject();
+ @Override
+ protected int size_() {
+ return this.subject.propertiesSize();
+ }
+ };
}
+
+ // ******** Behavior *********
+ public BasicHibernateProperties getBasicHibernate() {
+ return this.basicHibernateProperties;
+ }
+
+ private BasicHibernateProperties buildBasicProperties() {
+ return new HibernateBasic(this.persistenceUnit(), this.propertyListAdapter());
+ }
- /* (non-Javadoc)
- * @see org.eclipse.jpt.eclipselink.core.internal.context.PersistenceUnitProperties#itemIsProperty(org.eclipse.jpt.core.context.persistence.Property)
- */
- public boolean itemIsProperty(Property item) {
- throw new UnsupportedOperationException();
+ public ListValueModel<Property> propertyListAdapter() {
+ return this.propertyListAdapter;
}
- /* (non-Javadoc)
- * @see org.eclipse.jpt.eclipselink.core.internal.context.PersistenceUnitProperties#persistenceUnit()
- */
public PersistenceUnit persistenceUnit() {
return this.persistenceUnit;
}
+
+ public JpaProject getJpaProject() {
+ return this.persistenceUnit.getJpaProject();
+ }
- /* (non-Javadoc)
- * @see org.eclipse.jpt.eclipselink.core.internal.context.PersistenceUnitProperties#propertyIdFor(org.eclipse.jpt.core.context.persistence.Property)
- */
- public String propertyIdFor(Property property) {
+ public boolean itemIsProperty(Property item) {
throw new UnsupportedOperationException();
}
- /* (non-Javadoc)
- * @see org.eclipse.jpt.utility.model.listener.PropertyChangeListener#propertyChanged(org.eclipse.jpt.utility.model.event.PropertyChangeEvent)
- */
public void propertyChanged(PropertyChangeEvent event) {
throw new UnsupportedOperationException();
}
-
- protected void initialize(PersistenceUnit parent) {
- this.persistenceUnit = parent;
+
+ public String propertyIdFor(Property property) {
+ throw new UnsupportedOperationException();
}
-
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java 2008-10-06 10:02:22 UTC (rev 10680)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java 2008-10-06 10:03:45 UTC (rev 10681)
@@ -13,6 +13,7 @@
import org.eclipse.jpt.core.context.persistence.Persistence;
import org.eclipse.jpt.core.internal.context.persistence.GenericPersistenceUnit;
import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
+import org.jboss.tools.hibernate.jpt.core.internal.context.basic.BasicHibernateProperties;
/**
* @author Dmitry Geraskov
@@ -36,9 +37,9 @@
this.hibernateProperties = new HibernateJpaProperties(this);
}
- /*
- * put getters for specific properties here
- *
- */
+ // ******** Behavior *********
+ public BasicHibernateProperties getBasicProperties() {
+ return this.hibernateProperties.getBasicHibernate();
+ }
}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnitProperties.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnitProperties.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnitProperties.java 2008-10-06 10:03:45 UTC (rev 10681)
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.hibernate.jpt.core.internal.context;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.Property;
+import org.eclipse.jpt.utility.internal.model.AbstractModel;
+import org.eclipse.jpt.utility.model.value.ListValueModel;
+
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public abstract class HibernatePersistenceUnitProperties extends AbstractModel implements PersistenceUnitProperties {
+
+ private PersistenceUnit persistenceUnit;
+
+ private PersistenceUnitPropertyListListener propertyListListener;
+
+ private Map<String, String> propertyNames;
+
+ protected HibernatePersistenceUnitProperties(
+ PersistenceUnit parent,
+ ListValueModel<Property> propertyListAdapter) {
+ super();
+ this.initialize(parent, propertyListAdapter);
+ }
+
+ protected void initialize(
+ PersistenceUnit parent,
+ ListValueModel<Property> propertyListAdapter) {
+ this.persistenceUnit = parent;
+
+ this.propertyListListener = new PersistenceUnitPropertyListListener(this);
+ propertyListAdapter.addListChangeListener(ListValueModel.LIST_VALUES, this.propertyListListener);
+
+ this.initializePropertyNames();
+ this.initializeProperties();
+ }
+
+ protected void initializePropertyNames() {
+ this.propertyNames = new HashMap<String, String>();
+ this.addPropertyNames(this.propertyNames);
+ }
+
+ /**
+ * Initializes properties with values from the persistence unit.
+ */
+ protected abstract void initializeProperties();
+
+ // ********** behavior **********
+ public PersistenceUnit persistenceUnit() {
+ return this.persistenceUnit;
+ }
+
+ public JpaProject getJpaProject() {
+ return this.persistenceUnit.getJpaProject();
+ }
+
+ public PersistenceUnitPropertyListListener propertyListListener() {
+ return this.propertyListListener;
+ }
+
+ private Map<String, String> propertyNames() {
+ return this.propertyNames;
+ }
+
+ /**
+ * Adds property names key/value pairs, used by the methods: itemIsProperty
+ * and propertyIdFor.
+ *
+ * key = EclipseLink property key; value = property id
+ */
+ protected abstract void addPropertyNames(Map<String, String> propertyNames);
+
+ /**
+ * Method used for identifying the given property.
+ */
+ public boolean itemIsProperty(Property item) {
+ if (item == null) {
+ throw new IllegalArgumentException("Property is null");
+ }
+ return this.propertyNames().keySet().contains(item.getName());
+ }
+
+ /**
+ * Returns the property name used for change notification of the given
+ * property.
+ */
+ public String propertyIdFor(Property property) {
+ String propertyId = this.propertyNames().get(property.getName());
+ if (propertyId == null) {
+ throw new IllegalArgumentException("Illegal property: " + property.toString());
+ }
+ return propertyId;
+ }
+
+ protected String hibernateKeyFor(String propertyId) {
+ for (String hibernateKey : this.propertyNames().keySet()) {
+ if (this.propertyNames().get(hibernateKey).equals(propertyId)) {
+ return hibernateKey;
+ }
+ }
+ throw new IllegalArgumentException("Illegal property: " + propertyId);
+ }
+
+ // ****** get/set String convenience methods *******
+ /**
+ * Returns the String value of the given Property from the PersistenceXml.
+ */
+ protected String getStringValue(String key) {
+ return this.getStringValue(key, null);
+ }
+
+ protected String getStringValue(String key, String keySuffix) {
+ String elKey = (keySuffix == null) ? key : key + keySuffix;
+ if (this.persistenceUnit().containsProperty(elKey)) {
+ // TOREVIEW - handle incorrect String in persistence.xml
+ return this.persistenceUnit().getProperty(elKey).getValue();
+ }
+ return null;
+ }
+
+ /**
+ * Put the given String value into the PersistenceXml.
+ * @param key
+ * EclipseLink Key
+ * @param keySuffix
+ * e.g. entity name
+ * @param newValue
+ * value to be associated with the key
+ * @param allowDuplicate
+ */
+ protected void putStringValue(String key, String keySuffix, String newValue, boolean allowDuplicate) {
+ String elKey = (keySuffix == null) ? key : key + keySuffix;
+ if (newValue == null) {
+ this.persistenceUnit().removeProperty(elKey);
+ }
+ else {
+ this.persistenceUnit().putProperty(elKey, newValue, allowDuplicate);
+ }
+ }
+
+ // ******** Convenience methods ********
+ /**
+ * Put into persistenceUnit properties.
+ *
+ * @param key -
+ * property name
+ * @param value -
+ * property value
+ */
+ @SuppressWarnings("unchecked")
+ protected void putProperty(String key, Object value) {
+ String elKey = this.hibernateKeyFor(key);
+ if (value == null)
+ this.removeProperty(elKey);
+ else
+ this.putProperty_(elKey, value);
+ }
+
+ private void putProperty_(String key, Object value) {
+ this.persistenceUnit().putProperty(key, value.toString(), false);
+ }
+
+ /**
+ * Removes a property with the given key.
+ */
+ protected void removeProperty(String key) {
+ this.persistenceUnit().removeProperty(key);
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnitProperties.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateProperties.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateProperties.java 2008-10-06 10:02:22 UTC (rev 10680)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateProperties.java 2008-10-06 10:03:45 UTC (rev 10681)
@@ -10,7 +10,7 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.core.internal.context;
-import org.eclipse.jpt.eclipselink.core.internal.context.PersistenceUnitProperties;
+import org.jboss.tools.hibernate.jpt.core.internal.context.basic.BasicHibernateProperties;
/**
* @author Dmitry Geraskov
@@ -18,6 +18,6 @@
*/
public interface HibernateProperties extends PersistenceUnitProperties {
- // put getters for specific properties here
+ BasicHibernateProperties getBasicHibernate();
}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/PersistenceUnitProperties.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/PersistenceUnitProperties.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/PersistenceUnitProperties.java 2008-10-06 10:03:45 UTC (rev 10681)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.hibernate.jpt.core.internal.context;
+
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.Property;
+import org.eclipse.jpt.utility.model.Model;
+import org.eclipse.jpt.utility.model.listener.PropertyChangeListener;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface PersistenceUnitProperties extends Model, PropertyChangeListener {
+
+ /**
+ * Method used for identifying the given property.
+ */
+ boolean itemIsProperty(Property item);
+
+ /**
+ * Returns the property name used for change notification of the given property.
+ */
+ String propertyIdFor(Property property);
+
+ /**
+ * Return the PersistenceUnit of this Properties.
+ */
+ PersistenceUnit persistenceUnit();
+
+ /**
+ * Return the JPA project the PersistenceUnit belongs to.
+ */
+ JpaProject getJpaProject();
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/PersistenceUnitProperties.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/PersistenceUnitPropertyListListener.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/PersistenceUnitPropertyListListener.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/PersistenceUnitPropertyListListener.java 2008-10-06 10:03:45 UTC (rev 10681)
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.hibernate.jpt.core.internal.context;
+
+import java.util.Iterator;
+
+import org.eclipse.jpt.core.context.persistence.Property;
+import org.eclipse.jpt.utility.model.Model;
+import org.eclipse.jpt.utility.model.event.ListChangeEvent;
+import org.eclipse.jpt.utility.model.event.PropertyChangeEvent;
+import org.eclipse.jpt.utility.model.listener.ListChangeListener;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class PersistenceUnitPropertyListListener implements ListChangeListener
+{
+ private PersistenceUnitProperties parent;
+
+ // ********** constructors / initialization **********
+ public PersistenceUnitPropertyListListener(PersistenceUnitProperties parent) {
+ this.parent = parent;
+ }
+
+ // ********** Behavior **********
+ protected boolean add(Property newItem, Model source) {
+ if (this.model().itemIsProperty(newItem)) {
+ String propertyName = this.model().propertyIdFor(newItem);
+ this.model().propertyChanged(
+ new PropertyChangeEvent(source, propertyName, null, newItem));
+ return true;
+ }
+ return false;
+ }
+
+ protected boolean remove(Property item, Model source) {
+ if (this.model().itemIsProperty(item)) {
+ String propertyName = this.model().propertyIdFor(item);
+ this.model().propertyChanged(
+ new PropertyChangeEvent(source, propertyName, item, null)); // oldItem is the removed property
+ return true;
+ }
+ return false;
+ }
+
+ // replace
+ protected Property set(Property newItem, Model source) {
+ if (this.model().itemIsProperty(newItem)) {
+ String propertyName = this.model().propertyIdFor(newItem);
+ this.model().propertyChanged(
+ new PropertyChangeEvent(source, propertyName, null, newItem)); // oldItem unknown
+ return newItem;
+ }
+ return null;
+ }
+
+ // ********** ListChangeListener implementation **********
+ public void itemsAdded(ListChangeEvent e) {
+ for (Iterator<Property> stream = this.items(e); stream.hasNext();) {
+ this.add(stream.next(), e.getSource());
+ }
+ }
+
+ public void itemsRemoved(ListChangeEvent e) {
+ for (Iterator<Property> stream = this.items(e); stream.hasNext();) {
+ this.remove(stream.next(), e.getSource());
+ }
+ }
+
+ public void itemsReplaced(ListChangeEvent e) {
+ // ItemAspectListValueModelAdapter(270) does not provide old value
+ for (Iterator<Property> newStream = this.items(e); newStream.hasNext();) {
+ this.set(newStream.next(), e.getSource());
+ }
+ }
+
+ public void itemsMoved(ListChangeEvent e) {
+ throw new UnsupportedOperationException("source: " + e.getSource() + " - aspect: " + e.getAspectName());
+ }
+
+ public void listCleared(ListChangeEvent e) {
+ throw new UnsupportedOperationException("source: " + e.getSource() + " - aspect: " + e.getAspectName());
+ }
+
+ public void listChanged(ListChangeEvent e) {
+ throw new UnsupportedOperationException("source: " + e.getSource() + " - aspect: " + e.getAspectName());
+ }
+
+ // ********** internal methods **********
+ private PersistenceUnitProperties model() {
+ return this.parent;
+ }
+
+ @SuppressWarnings("unchecked")
+ private Iterator<Property> items(ListChangeEvent event) {
+ return (Iterator<Property>) event.items();
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/PersistenceUnitPropertyListListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/BasicHibernateProperties.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/BasicHibernateProperties.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/BasicHibernateProperties.java 2008-10-06 10:03:45 UTC (rev 10681)
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.hibernate.jpt.core.internal.context.basic;
+
+import org.eclipse.jpt.utility.model.Model;
+import org.eclipse.jpt.utility.model.listener.PropertyChangeListener;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface BasicHibernateProperties extends Model, PropertyChangeListener {
+
+ String getDefaultConfigurationFile();
+ String getConfigurationFile();
+ void setConfigurationFile(String newConfigFile);
+ static final String CONFIG_FILE_PROPERTY = "confFileProperty";
+ // Hibernate key string
+ static final String HIBERNATE_CONFIG_FILE = "hibernate.ejb.cfgfile";
+ static final String DEFAULT_CONFIG_FILE = "";
+
+ String getDefaultDialect();
+ String getDialect();
+ void setDialect(String newDialect);
+ static final String DIALECT_PROPERTY = "dialectProperty";
+ // Hibernate key string
+ static final String HIBERNATE_DIALECT = "hibernate.dialect";
+ static final String DEFAULT_DIALECT = "";
+
+ String getDefaultDriver();
+ String getDriver();
+ void setDriver(String newDriver);
+ static final String DRIVER_PROPERTY = "driverProperty";
+ // Hibernate key string
+ static final String HIBERNATE_DRIVER = "hibernate.connection.driver_class";
+ static final String DEFAULT_DRIVER = "";
+
+ String getDefaultUrl();
+ String getUrl();
+ void setUrl(String newUrl);
+ static final String URL_PROPERTY = "urlProperty";
+ // Hibernate key string
+ static final String HIBERNATE_URL = "hibernate.connection.url";
+ static final String DEFAULT_URL = "";
+
+ String getDefaultSchemaDefault();
+ String getSchemaDefault();
+ void setSchemaDefault(String newSchemaDefault);
+ static final String SCHEMA_DEFAULT_PROPERTY = "schemaDefaultProperty";
+ // Hibernate key string
+ static final String HIBERNATE_SCHEMA_DEFAULT = "hibernate.default_schema";
+ static final String DEFAULT_SCHEMA_DEFAULT = "";
+
+ String getDefaultCatalogDefault();
+ String getCatalogDefault();
+ void setCatalogDefault(String newCatalogDefault);
+ static final String CATALOG_DEFAULT_PROPERTY = "catalogDefaultProperty";
+ // Hibernate key string
+ static final String HIBERNATE_CATALOG = "hibernate.default_catalog";
+ static final String DEFAULT_CATALOG_DEFAULT = "";
+
+ String getDefaultUsername();
+ String getUsername();
+ void setUsername(String newUsername);
+ static final String USERNAME_PROPERTY = "usernameProperty";
+ // Hibernate key string
+ static final String HIBERNATE_USERNAME = "hibernate.connection.username";
+ static final String DEFAULT_USERNAME = "";
+
+ String getDefaultPassword();
+ String getPassword();
+ void setPassword(String newPassword);
+ static final String PASSWORD_PROPERTY = "passwordProperty";
+ // Hibernate key string
+ static final String HIBERNATE_PASSWORD = "hibernate.connection.password";
+ static final String DEFAULT_PASSWORD = "";
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/BasicHibernateProperties.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/HibernateBasic.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/HibernateBasic.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/HibernateBasic.java 2008-10-06 10:03:45 UTC (rev 10681)
@@ -0,0 +1,302 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.hibernate.jpt.core.internal.context.basic;
+
+import java.util.Map;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.Property;
+import org.eclipse.jpt.utility.model.event.PropertyChangeEvent;
+import org.eclipse.jpt.utility.model.value.ListValueModel;
+import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnitProperties;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class HibernateBasic extends HibernatePersistenceUnitProperties
+ implements BasicHibernateProperties {
+
+ // ********** Hibernate properties **********
+ private String configFile;
+ private String dialect;
+ private String driver;
+ private String url;
+ private String schemaDefault;
+ private String catalogDefault;
+ private String username;
+ private String password;
+
+ // ********** constructors **********
+ public HibernateBasic(PersistenceUnit parent, ListValueModel<Property> propertyListAdapter) {
+ super(parent, propertyListAdapter);
+ }
+
+ // ********** initialization **********
+ /**
+ * Initializes properties with values from the persistence unit.
+ */
+ @Override
+ protected void initializeProperties() {
+ this.configFile =
+ this.getStringValue(HIBERNATE_CONFIG_FILE);
+ this.dialect =
+ this.getStringValue(HIBERNATE_DIALECT);
+ this.driver =
+ this.getStringValue(HIBERNATE_DRIVER);
+ this.url =
+ this.getStringValue(HIBERNATE_URL);
+ this.schemaDefault =
+ this.getStringValue(HIBERNATE_SCHEMA_DEFAULT);
+ this.catalogDefault =
+ this.getStringValue(HIBERNATE_CATALOG);
+ this.username =
+ this.getStringValue(HIBERNATE_USERNAME);
+ this.password =
+ this.getStringValue(HIBERNATE_PASSWORD);
+ }
+
+
+ // ********** behavior **********
+ @Override
+ protected void addPropertyNames(Map<String, String> propertyNames) {
+ propertyNames.put(
+ HIBERNATE_CONFIG_FILE,
+ CONFIG_FILE_PROPERTY);
+ propertyNames.put(
+ HIBERNATE_DIALECT,
+ DIALECT_PROPERTY);
+ propertyNames.put(
+ HIBERNATE_DRIVER,
+ DRIVER_PROPERTY);
+ propertyNames.put(
+ HIBERNATE_URL,
+ URL_PROPERTY);
+ propertyNames.put(
+ HIBERNATE_SCHEMA_DEFAULT,
+ SCHEMA_DEFAULT_PROPERTY);
+ propertyNames.put(
+ HIBERNATE_CATALOG,
+ CATALOG_DEFAULT_PROPERTY);
+ propertyNames.put(
+ HIBERNATE_USERNAME,
+ USERNAME_PROPERTY);
+ propertyNames.put(
+ HIBERNATE_PASSWORD,
+ PASSWORD_PROPERTY);
+ }
+
+ public void propertyChanged(PropertyChangeEvent event) {
+ String aspectName = event.getAspectName();
+ if (aspectName.equals(CONFIG_FILE_PROPERTY)) {
+ this.configurationFileChanged(event);
+ } else if (aspectName.equals(DIALECT_PROPERTY)) {
+ this.dialectChanged(event);
+ } else if (aspectName.equals(DRIVER_PROPERTY)) {
+ this.driverChanged(event);
+ } else if (aspectName.equals(URL_PROPERTY)) {
+ this.urlChanged(event);
+ } else if (aspectName.equals(SCHEMA_DEFAULT_PROPERTY)) {
+ this.schemaDefaultChanged(event);
+ } else if (aspectName.equals(CATALOG_DEFAULT_PROPERTY)) {
+ this.catalogDefaultChanged(event);
+ } else if (aspectName.equals(USERNAME_PROPERTY)) {
+ this.usernameChanged(event);
+ } else if (aspectName.equals(PASSWORD_PROPERTY)) {
+ this.passwordChanged(event);
+ }
+ }
+
+ // ********** Configuration File **********
+ public String getDefaultConfigurationFile() {
+ return DEFAULT_CONFIG_FILE;
+ }
+
+ public String getConfigurationFile() {
+ return this.configFile;
+ }
+
+ public void setConfigurationFile(String newConfigFile) {
+ String old = this.configFile;
+ this.configFile = newConfigFile;
+ this.putProperty(CONFIG_FILE_PROPERTY, newConfigFile);
+ this.firePropertyChanged(CONFIG_FILE_PROPERTY, old, newConfigFile);
+ }
+
+ private void configurationFileChanged(PropertyChangeEvent event) {
+ String newFile = (event.getNewValue() == null) ? null : ((Property) event.getNewValue()).getValue();
+ String old = this.configFile;
+ this.configFile = newFile;
+ this.firePropertyChanged(event.getAspectName(), old, newFile);
+ }
+
+ // ********** Dialect **********
+ public String getDefaultDialect() {
+ return DEFAULT_DIALECT;
+ }
+
+ public String getDialect() {
+ return this.dialect;
+ }
+
+ public void setDialect(String newDialect) {
+ String old = this.dialect;
+ this.dialect = newDialect;
+ this.putProperty(DIALECT_PROPERTY, newDialect);
+ this.firePropertyChanged(DIALECT_PROPERTY, old, newDialect);
+ }
+
+ private void dialectChanged(PropertyChangeEvent event) {
+ String newDialect = (event.getNewValue() == null) ? null : ((Property) event.getNewValue()).getValue();
+ String old = this.dialect;
+ this.dialect = newDialect;
+ this.firePropertyChanged(event.getAspectName(), old, newDialect);
+ }
+
+ // ********** Driver **********
+ public String getDefaultDriver() {
+ return DEFAULT_DRIVER;
+ }
+
+ public String getDriver() {
+ return this.driver;
+ }
+
+ public void setDriver(String newDriver) {
+ String old = this.driver;
+ this.driver = newDriver;
+ this.putProperty(DRIVER_PROPERTY, newDriver);
+ this.firePropertyChanged(DRIVER_PROPERTY, old, newDriver);
+ }
+
+ private void driverChanged(PropertyChangeEvent event) {
+ String newDriver = (event.getNewValue() == null) ? null : ((Property) event.getNewValue()).getValue();
+ String old = this.driver;
+ this.driver = newDriver;
+ this.firePropertyChanged(event.getAspectName(), old, newDriver);
+ }
+
+ // ********** Url **********
+ public String getDefaultUrl() {
+ return DEFAULT_URL;
+ }
+
+ public String getUrl() {
+ return this.url;
+ }
+
+ public void setUrl(String newUrl) {
+ String old = this.url;
+ this.url = newUrl;
+ this.putProperty(URL_PROPERTY, newUrl);
+ this.firePropertyChanged(URL_PROPERTY, old, newUrl);
+ }
+
+ private void urlChanged(PropertyChangeEvent event) {
+ String newUrl = (event.getNewValue() == null) ? null : ((Property) event.getNewValue()).getValue();
+ String old = this.url;
+ this.url = newUrl;
+ this.firePropertyChanged(event.getAspectName(), old, newUrl);
+ }
+
+ // ********** Default schema **********
+ public String getDefaultSchemaDefault() {
+ return DEFAULT_SCHEMA_DEFAULT;
+ }
+
+ public String getSchemaDefault() {
+ return schemaDefault;
+ }
+
+ public void setSchemaDefault(String newSchemaDefault) {
+ String old = this.schemaDefault;
+ this.schemaDefault = newSchemaDefault;
+ this.putProperty(SCHEMA_DEFAULT_PROPERTY, newSchemaDefault);
+ this.firePropertyChanged(SCHEMA_DEFAULT_PROPERTY, old, newSchemaDefault);
+ }
+
+ private void schemaDefaultChanged(PropertyChangeEvent event) {
+ String newSchemaDefault = (event.getNewValue() == null) ? null : ((Property) event.getNewValue()).getValue();
+ String old = this.schemaDefault;
+ this.schemaDefault = newSchemaDefault;
+ this.firePropertyChanged(event.getAspectName(), old, newSchemaDefault);
+ }
+
+ // ********** Default catalog **********
+ public String getDefaultCatalogDefault() {
+ return DEFAULT_CATALOG_DEFAULT;
+ }
+
+ public String getCatalogDefault() {
+ return catalogDefault;
+ }
+
+ public void setCatalogDefault(String newCatalogDefault) {
+ String old = this.catalogDefault;
+ this.catalogDefault = newCatalogDefault;
+ this.putProperty(CATALOG_DEFAULT_PROPERTY, newCatalogDefault);
+ this.firePropertyChanged(CATALOG_DEFAULT_PROPERTY, old, newCatalogDefault);
+ }
+
+ private void catalogDefaultChanged(PropertyChangeEvent event) {
+ String newCatalogDefault = (event.getNewValue() == null) ? null : ((Property) event.getNewValue()).getValue();
+ String old = this.catalogDefault;
+ this.catalogDefault = newCatalogDefault;
+ this.firePropertyChanged(event.getAspectName(), old, newCatalogDefault);
+ }
+
+ // ********** Username **********
+ public String getDefaultUsername() {
+ return DEFAULT_USERNAME;
+ }
+
+ public String getUsername() {
+ return this.username;
+ }
+
+ public void setUsername(String newUsername) {
+ String old = this.username;
+ this.username = newUsername;
+ this.putProperty(USERNAME_PROPERTY, newUsername);
+ this.firePropertyChanged(USERNAME_PROPERTY, old, newUsername);
+ }
+
+ private void usernameChanged(PropertyChangeEvent event) {
+ String newUsername = (event.getNewValue() == null) ? null : ((Property) event.getNewValue()).getValue();
+ String old = this.username;
+ this.username = newUsername;
+ this.firePropertyChanged(event.getAspectName(), old, newUsername);
+ }
+
+ // ********** Password **********
+ public String getDefaultPassword() {
+ return DEFAULT_PASSWORD;
+ }
+
+ public String getPassword() {
+ return this.password;
+ }
+
+ public void setPassword(String newPassword) {
+ String old = this.password;
+ this.password = newPassword;
+ this.putProperty(PASSWORD_PROPERTY, newPassword);
+ this.firePropertyChanged(PASSWORD_PROPERTY, old, newPassword);
+ }
+
+ private void passwordChanged(PropertyChangeEvent event) {
+ String newPassword = (event.getNewValue() == null) ? null : ((Property) event.getNewValue()).getValue();
+ String old = this.password;
+ this.password = newPassword;
+ this.firePropertyChanged(event.getAspectName(), old, newPassword);
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/HibernateBasic.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
17 years, 3 months
JBoss Tools SVN: r10680 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui: src/org/jboss/tools/hibernate/jpt/ui/internal and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-10-06 06:02:22 -0400 (Mon, 06 Oct 2008)
New Revision: 10680
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernateUiFactory.java
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernatePlatformUI.java
Log:
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF 2008-10-05 20:23:55 UTC (rev 10679)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF 2008-10-06 10:02:22 UTC (rev 10680)
@@ -15,7 +15,10 @@
org.eclipse.datatools.connectivity;bundle-version="1.1.0",
org.eclipse.jdt.launching;bundle-version="3.4.0",
org.eclipse.wst.common.project.facet.ui;bundle-version="1.3.0",
- org.eclipse.wst.common.frameworks;bundle-version="1.1.200"
+ org.eclipse.wst.common.frameworks;bundle-version="1.1.200",
+ org.eclipse.jpt.utility;bundle-version="1.2.0",
+ org.eclipse.ui.forms;bundle-version="3.3.100",
+ org.jboss.tools.hibernate.jpt.core;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: Hibernate Team
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java 2008-10-06 10:02:22 UTC (rev 10680)
@@ -0,0 +1,316 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.hibernate.jpt.ui.internal.persistence.details;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.ui.WidgetFactory;
+import org.eclipse.jpt.ui.details.JpaPageComposite;
+import org.eclipse.jpt.ui.internal.widgets.AbstractFormPane;
+import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter;
+import org.eclipse.jpt.utility.internal.model.value.SimpleListValueModel;
+import org.eclipse.jpt.utility.model.event.PropertyChangeEvent;
+import org.eclipse.jpt.utility.model.listener.PropertyChangeListener;
+import org.eclipse.jpt.utility.model.value.PropertyValueModel;
+import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.console.utils.DialogSelectionHelper;
+import org.hibernate.eclipse.console.utils.DriverClassHelpers;
+import org.hibernate.eclipse.launch.PathHelper;
+import org.jboss.tools.hibernate.jpt.core.internal.context.basic.BasicHibernateProperties;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class HibernatePropertiesComposite extends AbstractFormPane<BasicHibernateProperties> implements
+ JpaPageComposite<PersistenceUnit> {
+
+ private Text cfgFile;
+
+ /**
+ * @param subjectHolder
+ * @param container
+ * @param widgetFactory
+ */
+ public HibernatePropertiesComposite(PropertyValueModel<BasicHibernateProperties> subjectHolder,
+ Composite container, WidgetFactory widgetFactory) {
+ super(subjectHolder, container, widgetFactory);
+ }
+
+ protected void initializeLayout(Composite container) {
+
+ final DriverClassHelpers helper = new DriverClassHelpers();
+
+ Composite section = buildSection(container, "Basic properties");
+
+ final SimpleListValueModel<String> lvmDialect = new SimpleListValueModel<String>(Arrays.asList(helper
+ .getDialectNames()));
+ PropertyValueModel<BasicHibernateProperties> p = getSubjectHolder();
+ List<String> drivers = new ArrayList<String>();
+ BasicHibernateProperties props = p.getValue();
+ if (props != null) {
+ String dialectClass = helper.getDialectClass(props.getDialect());
+ String[] driverClasses = helper.getDriverClasses(dialectClass);
+ drivers.addAll(Arrays.asList(driverClasses));
+ }
+
+ final SimpleListValueModel<String> lvmDriver = new SimpleListValueModel<String>(drivers);
+
+ List<String> urls = new ArrayList<String>();
+ if (props != null) {
+ String driverClass = props.getDriver();
+ String[] connectionURLS = helper.getConnectionURLS(driverClass);
+ urls.addAll(Arrays.asList(connectionURLS));
+ }
+ final SimpleListValueModel<String> lvmUrl = new SimpleListValueModel<String>(urls);
+
+ WritablePropertyValueModel<String> dialectHolder = buildDialectHolder();
+ WritablePropertyValueModel<String> driverHolder = buildDriverHolder();
+ WritablePropertyValueModel<String> urlHolder = buildUrlHolder();
+
+ Button b = buildButton(section, HibernateConsoleMessages.CodeGenerationSettingsTab_browse, createSetupAction());
+ cfgFile = buildLabeledText(section,
+ HibernateConsoleMessages.ConsoleConfigurationPropertySource_config_file + ':', buildConfigFileHolder(),
+ b, null);
+
+ buildLabeledEditableCombo(
+ section,
+ HibernateConsoleMessages.NewConfigurationWizardPage_database_dialect,
+ lvmDialect,
+ dialectHolder,
+ null);
+
+ buildLabeledEditableCombo(
+ section,
+ HibernateConsoleMessages.NewConfigurationWizardPage_driver_class,
+ lvmDriver,
+ driverHolder,
+ null);
+
+ buildLabeledEditableCombo(
+ section,
+ HibernateConsoleMessages.NewConfigurationWizardPage_connection_url,
+ lvmUrl,
+ urlHolder,
+ null);
+
+ dialectHolder.addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChanged(PropertyChangeEvent event) {
+ String dialectClass = helper.getDialectClass((String) event.getNewValue());
+ String[] driverClasses = helper.getDriverClasses(dialectClass);
+ lvmDriver.clear();
+ lvmDriver.addAll(Arrays.asList(driverClasses));
+ }
+ });
+
+ driverHolder.addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChanged(PropertyChangeEvent event) {
+ String driverClass = helper.getDialectClass((String) event.getNewValue());
+ String[] connectionURLS = helper.getConnectionURLS(driverClass);
+ lvmUrl.clear();
+ lvmUrl.addAll(Arrays.asList(connectionURLS));
+ }
+ });
+
+ buildLabeledText(
+ section,
+ HibernateConsoleMessages.NewConfigurationWizardPage_default_schema,
+ buildSchemaDefaultHolder());
+
+ buildLabeledText(
+ section,
+ HibernateConsoleMessages.NewConfigurationWizardPage_default_catalog,
+ buildCatalogDefaultHolder());
+
+ buildLabeledText(
+ section,
+ HibernateConsoleMessages.NewConfigurationWizardPage_user_name,
+ buildUsernameHolder());
+
+ buildLabeledText(
+ section,
+ HibernateConsoleMessages.NewConfigurationWizardPage_password,
+ buildPasswordHolder());
+ }
+
+ private IPath getConfigurationFilePath() {
+ return PathHelper.pathOrNull(cfgFile.getText());
+ }
+
+ private Runnable createSetupAction() {
+ return new Runnable() {
+ public void run() {
+ IPath initialPath = getConfigurationFilePath();
+ IPath[] paths = DialogSelectionHelper.chooseFileEntries(getControl().getShell(), initialPath,
+ new IPath[0],
+ HibernateConsoleMessages.ConsoleConfigurationMainTab_select_hibernate_cfg_xml_file,
+ HibernateConsoleMessages.ConsoleConfigurationMainTab_choose_file_to_use_as_hibernate_cfg_xml,
+ new String[] { HibernateConsoleMessages.ConsoleConfigurationMainTab_cfg_xml }, false, false,
+ true);
+ if (paths != null && paths.length == 1) {
+ // TODO update to subpath
+ cfgFile.setText((paths[0]).toOSString());
+ }
+ }
+ };
+ }
+
+ private WritablePropertyValueModel<String> buildConfigFileHolder() {
+ return new PropertyAspectAdapter<BasicHibernateProperties, String>(getSubjectHolder(),
+ BasicHibernateProperties.CONFIG_FILE_PROPERTY) {
+ @Override
+ protected String buildValue_() {
+ return subject.getConfigurationFile();
+ }
+
+ @Override
+ protected void setValue_(String value) {
+ if ("".equals(value))value = null;//$NON-NLS-1$
+ subject.setConfigurationFile(value);
+ }
+ };
+ }
+
+ private WritablePropertyValueModel<String> buildDialectHolder() {
+ return new PropertyAspectAdapter<BasicHibernateProperties, String>(getSubjectHolder(),
+ BasicHibernateProperties.DIALECT_PROPERTY) {
+ @Override
+ protected String buildValue_() {
+ return subject.getDialect();
+ }
+
+ @Override
+ protected void setValue_(String value) {
+ if ("".equals(value))value = null; //$NON-NLS-1$
+ subject.setDialect(value);
+ }
+ };
+ }
+
+ private WritablePropertyValueModel<String> buildDriverHolder() {
+ return new PropertyAspectAdapter<BasicHibernateProperties, String>(getSubjectHolder(),
+ BasicHibernateProperties.DRIVER_PROPERTY) {
+ @Override
+ protected String buildValue_() {
+ return subject.getDriver();
+ }
+
+ @Override
+ protected void setValue_(String value) {
+ if ("".equals(value))value = null;//$NON-NLS-1$
+ subject.setDriver(value);
+ }
+ };
+ }
+
+ private WritablePropertyValueModel<String> buildUrlHolder() {
+ return new PropertyAspectAdapter<BasicHibernateProperties, String>(getSubjectHolder(),
+ BasicHibernateProperties.URL_PROPERTY) {
+ @Override
+ protected String buildValue_() {
+ return subject.getUrl();
+ }
+
+ @Override
+ protected void setValue_(String value) {
+ if ("".equals(value))value = null;//$NON-NLS-1$
+ subject.setUrl(value);
+ }
+ };
+ }
+
+ private WritablePropertyValueModel<String> buildSchemaDefaultHolder() {
+ return new PropertyAspectAdapter<BasicHibernateProperties, String>(getSubjectHolder(),
+ BasicHibernateProperties.SCHEMA_DEFAULT_PROPERTY) {
+ @Override
+ protected String buildValue_() {
+ return subject.getSchemaDefault();
+ }
+
+ @Override
+ protected void setValue_(String value) {
+ if ("".equals(value))value = null;//$NON-NLS-1$
+ subject.setSchemaDefault(value);
+ }
+ };
+ }
+
+ private WritablePropertyValueModel<String> buildCatalogDefaultHolder() {
+ return new PropertyAspectAdapter<BasicHibernateProperties, String>(getSubjectHolder(),
+ BasicHibernateProperties.CATALOG_DEFAULT_PROPERTY) {
+ @Override
+ protected String buildValue_() {
+ return subject.getCatalogDefault();
+ }
+
+ @Override
+ protected void setValue_(String value) {
+ if ("".equals(value))value = null;//$NON-NLS-1$
+ subject.setCatalogDefault(value);
+ }
+ };
+ }
+
+ private WritablePropertyValueModel<String> buildUsernameHolder() {
+ return new PropertyAspectAdapter<BasicHibernateProperties, String>(getSubjectHolder(),
+ BasicHibernateProperties.USERNAME_PROPERTY) {
+ @Override
+ protected String buildValue_() {
+ return subject.getUsername();
+ }
+
+ @Override
+ protected void setValue_(String value) {
+ if ("".equals(value))value = null;//$NON-NLS-1$
+ subject.setUsername(value);
+ }
+ };
+ }
+
+ private WritablePropertyValueModel<String> buildPasswordHolder() {
+ return new PropertyAspectAdapter<BasicHibernateProperties, String>(getSubjectHolder(),
+ BasicHibernateProperties.PASSWORD_PROPERTY) {
+ @Override
+ protected String buildValue_() {
+ return subject.getPassword();
+ }
+
+ @Override
+ protected void setValue_(String value) {
+ if ("".equals(value))value = null;//$NON-NLS-1$
+ subject.setPassword(value);
+ }
+ };
+ }
+
+ public String getHelpID() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Image getPageImage() {
+ return null;
+ }
+
+ public String getPageText() {
+ return "Hibernate";
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernatePlatformUI.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernatePlatformUI.java 2008-10-05 20:23:55 UTC (rev 10679)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernatePlatformUI.java 2008-10-06 10:02:22 UTC (rev 10680)
@@ -21,6 +21,7 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.ui.JpaUiFactory;
import org.eclipse.jpt.ui.internal.platform.generic.GenericPlatformUi;
import org.hibernate.eclipse.launch.HibernateLaunchConstants;
import org.jboss.tools.hibernate.jpt.ui.HibernateJptUIPlugin;
@@ -53,7 +54,12 @@
WizardDialog dialog = new WizardDialog(null, wizard);
dialog.open();
}
-
+
+ @Override
+ protected JpaUiFactory createJpaUiFactory() {
+ return new HibernateUiFactory();
+ }
+
public static ILaunchConfigurationWorkingCopy createDefaultLaunchConfig(String projectName) {
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType launchConfigurationType = launchManager
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernateUiFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernateUiFactory.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernateUiFactory.java 2008-10-06 10:02:22 UTC (rev 10680)
@@ -0,0 +1,61 @@
+package org.jboss.tools.hibernate.jpt.ui.internal.platform;
+
+import java.util.ArrayList;
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.ui.WidgetFactory;
+import org.eclipse.jpt.ui.details.JpaPageComposite;
+import org.eclipse.jpt.ui.internal.GenericJpaUiFactory;
+import org.eclipse.jpt.ui.internal.persistence.details.PersistenceUnitConnectionComposite;
+import org.eclipse.jpt.ui.internal.persistence.details.PersistenceUnitGeneralComposite;
+import org.eclipse.jpt.ui.internal.persistence.details.PersistenceUnitPropertiesComposite;
+import org.eclipse.jpt.utility.internal.model.value.TransformationPropertyValueModel;
+import org.eclipse.jpt.utility.model.value.PropertyValueModel;
+import org.eclipse.swt.widgets.Composite;
+import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit;
+import org.jboss.tools.hibernate.jpt.core.internal.context.basic.BasicHibernateProperties;
+import org.jboss.tools.hibernate.jpt.ui.internal.persistence.details.HibernatePropertiesComposite;
+
+public class HibernateUiFactory extends GenericJpaUiFactory {
+
+ public ListIterator<JpaPageComposite<PersistenceUnit>> createPersistenceUnitComposites(
+ PropertyValueModel<PersistenceUnit> subjectHolder, Composite parent, WidgetFactory widgetFactory) {
+
+ ArrayList<JpaPageComposite<PersistenceUnit>> pages = new ArrayList<JpaPageComposite<PersistenceUnit>>(1);
+
+ pages.add(new PersistenceUnitGeneralComposite(subjectHolder, parent, widgetFactory));
+ pages.add(new PersistenceUnitConnectionComposite(subjectHolder, parent, widgetFactory));
+ pages.add(new PersistenceUnitPropertiesComposite(subjectHolder, parent, widgetFactory));
+
+ // ************Hibernate pages***************
+ PropertyValueModel<HibernatePersistenceUnit> hibernatePersistenceUnitHolder = this
+ .buildHibernatePersistenceUnitHolder(subjectHolder);
+
+ PropertyValueModel<BasicHibernateProperties> basicHolder = this.buildBasicHolder(hibernatePersistenceUnitHolder);
+ pages.add(new HibernatePropertiesComposite(basicHolder, parent, widgetFactory));
+
+ return pages.listIterator();
+ }
+
+ private PropertyValueModel<BasicHibernateProperties> buildBasicHolder(
+ PropertyValueModel<HibernatePersistenceUnit> subjectHolder) {
+ return new TransformationPropertyValueModel<HibernatePersistenceUnit, BasicHibernateProperties>(subjectHolder) {
+ @Override
+ protected BasicHibernateProperties transform_(HibernatePersistenceUnit value) {
+ return value.getBasicProperties();
+ }
+ };
+ }
+
+ private PropertyValueModel<HibernatePersistenceUnit> buildHibernatePersistenceUnitHolder(
+ PropertyValueModel<PersistenceUnit> subjectHolder) {
+ return new TransformationPropertyValueModel<PersistenceUnit, HibernatePersistenceUnit>(subjectHolder) {
+ @Override
+ protected HibernatePersistenceUnit transform_(PersistenceUnit value) {
+ return (HibernatePersistenceUnit) value;
+ }
+ };
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernateUiFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
17 years, 3 months
JBoss Tools SVN: r10679 - workspace.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-05 16:23:55 -0400 (Sun, 05 Oct 2008)
New Revision: 10679
Added:
workspace/examples/
Log:
17 years, 3 months
JBoss Tools SVN: r10678 - trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-10-04 07:59:07 -0400 (Sat, 04 Oct 2008)
New Revision: 10678
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF/MANIFEST.MF
Log:
org.jboss.tools.vpe.html.template package exported in project org.jboss.tools.vpe.html.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF/MANIFEST.MF 2008-10-04 08:50:10 UTC (rev 10677)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/META-INF/MANIFEST.MF 2008-10-04 11:59:07 UTC (rev 10678)
@@ -13,4 +13,5 @@
org.jboss.tools.common
Eclipse-LazyStart: true
Bundle-Localization: plugin
+Export-Package: org.jboss.tools.vpe.html.template
17 years, 3 months
JBoss Tools SVN: r10677 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-10-04 04:50:10 -0400 (Sat, 04 Oct 2008)
New Revision: 10677
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
Log:
commented broken-down code
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2008-10-04 08:37:38 UTC (rev 10676)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2008-10-04 08:50:10 UTC (rev 10677)
@@ -22,7 +22,7 @@
/**
- * TODO There is code which doesn't compile . It was commented .
+ * TODO There was code which didn't compile . It was commented .
*/
/**
* A wrapper of VpeAbstractTemplate. Does the same, but ignores all attributes except id.
17 years, 3 months
JBoss Tools SVN: r10676 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-10-04 04:37:38 -0400 (Sat, 04 Oct 2008)
New Revision: 10676
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
Log:
commented broken-down code
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2008-10-03 18:05:48 UTC (rev 10675)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2008-10-04 08:37:38 UTC (rev 10676)
@@ -13,14 +13,18 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
-import org.jboss.tools.vpe.html.template.HtmlBodyTemplate;
+//import org.jboss.tools.vpe.html.template.HtmlBodyTemplate;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
+
/**
+ * TODO There is code which doesn't compile . It was commented .
+ */
+/**
* A wrapper of VpeAbstractTemplate. Does the same, but ignores all attributes except id.
* @author yradtsevich
* @see HtmlBodyTemplate
@@ -28,11 +32,11 @@
public class JsfBodyTemplate extends VpeAbstractTemplate {
public static final String ID_ID = "id"; //$NON-NLS-1$
- private final HtmlBodyTemplate htmlBodyTemplate = new HtmlBodyTemplate();
+// private final HtmlBodyTemplate htmlBodyTemplate = new HtmlBodyTemplate();
- /**
- * @see org.jboss.tools.vpe.html.template.HtmlBodyTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
- */
+// /**
+// * @see org.jboss.tools.vpe.html.template.HtmlBodyTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+// */
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
sourceNode = sourceNode.cloneNode(true);
@@ -46,7 +50,8 @@
}
}
- return htmlBodyTemplate.create(pageContext, sourceNode, visualDocument);
+// return htmlBodyTemplate.create(pageContext, sourceNode, visualDocument);
+ return null;
}
// TODO: change to default implementation (remove)
17 years, 3 months
JBoss Tools SVN: r10675 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test: .settings and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-10-03 14:05:48 -0400 (Fri, 03 Oct 2008)
New Revision: 10675
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/.settings/org.eclipse.jdt.ui.prefs
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.jdt.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.jst.common.project.facet.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.wst.common.component
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.jboss.tools.jst.web.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/
Log:
Added .settings folder to jsf2test project.
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test
___________________________________________________________________
Name: svn:ignore
- bin
AllTests.txt
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/.settings/org.eclipse.jdt.ui.prefs (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/.settings/org.eclipse.jdt.ui.prefs 2008-10-03 18:05:48 UTC (rev 10675)
@@ -0,0 +1,3 @@
+#Thu Oct 02 19:28:49 EEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.jdt.core.prefs 2008-10-03 18:05:48 UTC (rev 10675)
@@ -0,0 +1,7 @@
+#Fri Dec 28 13:39:43 GMT+02:00 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.jst.common.project.facet.core.prefs
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.jst.common.project.facet.core.prefs (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.jst.common.project.facet.core.prefs 2008-10-03 18:05:48 UTC (rev 10675)
@@ -0,0 +1,3 @@
+#Fri Dec 28 17:19:23 GMT+02:00 2007
+classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:jdk1.5.0_13/owners=jst.java\:5.0
+eclipse.preferences.version=1
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.wst.common.component 2008-10-03 18:05:48 UTC (rev 10675)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="jsf2Test">
+<wb-resource deploy-path="/" source-path="/WebContent"/>
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/JavaSource"/>
+<property name="java-output-path" value="build/classes"/>
+<property name="context-root" value="jsf2Test"/>
+</wb-module>
+</project-modules>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.eclipse.wst.common.project.facet.core.xml 2008-10-03 18:05:48 UTC (rev 10675)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.web" version="2.4"/>
+</faceted-project>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.jboss.tools.jst.web.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.jboss.tools.jst.web.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.settings/org.jboss.tools.jst.web.xml 2008-10-03 18:05:48 UTC (rev 10675)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<file-systems VERSION="2.0.0.GA" application-name="example_1_2_w_f"
+ model-entity="FileSystems" workspace-home="./WebContent/WEB-INF">
+ <file-system NAME="WEB-INF" location="%workspace.home%" model-entity="FileSystemFolder"/>
+ <file-system NAME="WEB-ROOT" info="Content-Type=Web"
+ location="%workspace.home%/.." model-entity="FileSystemFolder"/>
+ <file-system NAME="src" location="%workspace.home%/../../JavaSource" model-entity="FileSystemFolder"/>
+ <file-system NAME="lib" location="%workspace.home%/lib" model-entity="FileSystemFolder"/>
+ <file-system NAME="classes" location="%workspace.home%/classes" model-entity="FileSystemFolder"/>
+ <file-system NAME="build" location="%workspace.home%/../../ant" model-entity="FileSystemFolder"/>
+ <file-system NAME="lib-jsf-api.jar"
+ location="D:\doc\prj\jboss\svn\trunk\jsf\tests\org.jboss.tools.jsf.vpe.jsf.test\resources\jsf2test\WebContent\WEB-INF\lib\jsf-api.jar" model-entity="FileSystemJar"/>
+ <file-system NAME="lib-jsf-impl.jar"
+ location="D:\doc\prj\jboss\svn\trunk\jsf\tests\org.jboss.tools.jsf.vpe.jsf.test\resources\jsf2test\WebContent\WEB-INF\lib\jsf-impl.jar" model-entity="FileSystemJar"/>
+ <web SERVLET_VERSION="2.5" model-entity="JstWeb" model-path="/web.xml">
+ <module URI="/WEB-INF/faces-config.xml" model-entity="WebJSFModule"
+ model-path="/faces-config.xml" src="src" web-root="WEB-ROOT"/>
+ </web>
+</file-systems>
17 years, 3 months
JBoss Tools SVN: r10674 - trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-10-03 13:53:27 -0400 (Fri, 03 Oct 2008)
New Revision: 10674
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestUtil.java
Log:
MAX_IDLE time changed from 30 minutes to 15 seconds.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestUtil.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestUtil.java 2008-10-03 17:44:39 UTC (rev 10673)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/TestUtil.java 2008-10-03 17:53:27 UTC (rev 10674)
@@ -60,7 +60,7 @@
protected final static String EDITOR_ID = "org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor"; //$NON-NLS-1$
/** The Constant MAX_IDLE. */
- private static final long MAX_IDLE = 30*60*1000L;
+ private static final long MAX_IDLE = 15*1000L;
/**
17 years, 3 months
JBoss Tools SVN: r10673 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-10-03 13:44:39 -0400 (Fri, 03 Oct 2008)
New Revision: 10673
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
Log:
Introduced constant IMPORT_JSF_20_PROJECT_NAME.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java 2008-10-03 17:35:32 UTC (rev 10672)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java 2008-10-03 17:44:39 UTC (rev 10673)
@@ -52,6 +52,6 @@
}
protected String getTestProjectName() {
- return Jsf20AllTests.IMPORT_PROJECT_NAME;
+ return JsfAllTests.IMPORT_JSF_20_PROJECT_NAME;
}
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-10-03 17:35:32 UTC (rev 10672)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-10-03 17:44:39 UTC (rev 10673)
@@ -60,10 +60,11 @@
public class JsfAllTests {
public static final String IMPORT_PROJECT_NAME = "jsfTest"; //$NON-NLS-1$
+ public static final String IMPORT_JSF_20_PROJECT_NAME = "jsf2Test"; //$NON-NLS-1$
public static Test suite() {
- TestSuite suite = new TestSuite("Tests for Vpe Jsf components"); // $NON-NLS-1$ //$NON-NLS-1$
+ TestSuite suite = new TestSuite("Tests for Vpe Jsf components"); // $NON-NLS-1$
// $JUnit-BEGIN$
suite.addTestSuite(JsfComponentTest.class);
suite.addTestSuite(Jsf20ComponentContentTest.class);
@@ -110,7 +111,7 @@
projectToImport.add(importBeanJsf1);
ImportBean importBeanJsf20 = new ImportBean();
- importBeanJsf20.setImportProjectName(Jsf20AllTests.IMPORT_PROJECT_NAME);
+ importBeanJsf20.setImportProjectName(JsfAllTests.IMPORT_JSF_20_PROJECT_NAME);
importBeanJsf20.setImportProjectPath(JsfTestPlugin.getPluginResourcePath());
projectToImport.add(importBeanJsf20);
17 years, 3 months
JBoss Tools SVN: r10672 - in trunk/jsf: plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template and 15 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-10-03 13:35:32 -0400 (Fri, 03 Oct 2008)
New Revision: 10672
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.classpath
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.project
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/JavaSource/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/META-INF/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/classes/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/lib/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/lib/jsf-api.jar
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/lib/jsf-impl.jar
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/web.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body1.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body1.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body2.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body2.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head1.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head1.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head2.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head2.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputScript.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesBlue.css
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesRed.css
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/images/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/images/image.gif
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/scripts/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/scripts/f1.js
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/scripts/f2.js
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/ant/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/ant/build.properties
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/ant/build.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
Log:
Support of new JSF 2.0 tags added to VPE.
Added tests for these tags.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF 2008-10-03 17:14:47 UTC (rev 10671)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/META-INF/MANIFEST.MF 2008-10-03 17:35:32 UTC (rev 10672)
@@ -13,7 +13,8 @@
org.jboss.tools.jst.jsp,
org.eclipse.wst.sse.core,
org.eclipse.jst.jsp.core,
- org.eclipse.wst.html.core
+ org.eclipse.wst.html.core,
+ org.jboss.tools.vpe.html
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.jsf.vpe.jsf.template
Bundle-Localization: plugin
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfBodyTemplate.java 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.jsf.vpe.jsf.template;
+
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.html.template.HtmlBodyTemplate;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * A wrapper of VpeAbstractTemplate. Does the same, but ignores all attributes except id.
+ * @author yradtsevich
+ * @see HtmlBodyTemplate
+ */
+public class JsfBodyTemplate extends VpeAbstractTemplate {
+ public static final String ID_ID = "id"; //$NON-NLS-1$
+
+ private final HtmlBodyTemplate htmlBodyTemplate = new HtmlBodyTemplate();
+
+ /**
+ * @see org.jboss.tools.vpe.html.template.HtmlBodyTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+ */
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ sourceNode = sourceNode.cloneNode(true);
+ NamedNodeMap attributes = sourceNode.getAttributes();
+ int length = attributes.getLength();
+ for (int i = 0; i < length; i++) {
+ Node attribute = attributes.item(i);
+
+ if(!attribute.getNodeName().equalsIgnoreCase(ID_ID)) {
+ attributes.removeNamedItem(attribute.getNodeName());
+ }
+ }
+
+ return htmlBodyTemplate.create(pageContext, sourceNode, visualDocument);
+ }
+
+ // TODO: change to default implementation (remove)
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsIDOMElement, java.lang.Object, java.lang.String, java.lang.String)
+ */
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ // TODO: change to false
+ return true;
+ }
+
+
+
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-10-03 17:14:47 UTC (rev 10671)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -60,8 +60,7 @@
<vpe:template children="no" modify="no" class="org.jboss.tools.jsf.vpe.jsf.template.JsfInputTextAreaTemplate">
<!-- <textarea class="{@styleClass}" style="{@style}"
rows="{@rows}" cols="{@cols}" title="{tagstring()}" dir="{@dir}">
- <vpe:value expr="{jsfvalue(@value)}" />
-
+ <vpe:value expr="{jsfvalue(@value)}" />
</textarea>-->
<vpe:resize>
<vpe:width width-attr="style.width" />
@@ -797,9 +796,62 @@
</vpe:template>
</vpe:tag>
+ <!-- JSF 2.0 Tags -->
+ <vpe:tag name="h:body" case-sensitive="yes">
+ <!-- The tag cannot have any attribute. -->
+ <vpe:if test="tld_version('min=2.0')">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.jsf.template.JsfBodyTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no"></vpe:drop>
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+
+ <vpe:tag name="h:head" case-sensitive="yes">
+ <!-- The tag cannot have any attribute. -->
+ <vpe:if test="tld_version('min=2.0')">
+ <vpe:template children="yes" modify="no">
+ <div style="display:none;" />
+ <vpe:dnd>
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+
+ <!--
+ Tag h:outputScript can have any of next attributes: name, library, target.
+ Mojarra 2.0 EDR1 implementation of JSF 2.0 includes a script as follows:
+ <script type="text/javascript"
+ src="{facesContext.getApplication().getResourceHandler().createResource(name, library).getRequestPath()}"/>
+ -->
+ <vpe:tag name="h:outputScript" case-sensitive="yes">
+ <vpe:if test="tld_version('min=2.0')">
+ <vpe:template children="no" modify="no"/>
+ </vpe:if>
+ </vpe:tag>
+
+ <!--
+ Tag h:outputStylesheet can have any of next attributes: name, library, target.
+ Value of target could be either 'head' or 'body'.
+ Mojarra 2.0 EDR1 implementation of JSF 2.0 links a stylesheet as follows:
+ <link type="text/css" rel="stylesheet"
+ href="{facesContext.getApplication().getResourceHandler().createResource(name, library).getRequestPath()}"/>
+ -->
+ <vpe:tag name="h:outputStylesheet" case-sensitive="yes">
+ <vpe:if test="tld_version('min=2.0')">
+ <vpe:template children="no" modify="no">
+ <vpe:link rel="stylesheet" href="{href(@name)}" />
+ </vpe:template>
+ </vpe:if>
+ </vpe:tag>
+ <!-- End of JSF 2.0 Tags -->
+
<!-- Default template -->
<vpe:template children="yes" modify="no">
<vpe:any value="{name()}" title="{tagstring()}"/>
</vpe:template>
-
</vpe:templates>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.classpath
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.classpath (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.classpath 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
+</classpath>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.project
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.project (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/.project 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jsf2Test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.jboss.tools.jsf.jsfnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/META-INF/MANIFEST.MF 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/faces-config.xml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
+ version="2.0">
+
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
+</faces-config>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/lib/jsf-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/lib/jsf-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/lib/jsf-impl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/lib/jsf-impl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/WEB-INF/web.xml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<web-app version="2.5"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <display-name>
+ JavaServer Faces 2.0 Test Application
+ </display-name>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/jsf2test/*</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+
+</web-app>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/index.html 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,13 @@
+<html>
+<head>
+ <title>JavaServer Faces 2.0 Test Pages</title>
+</head>
+<body>
+ <a href="jsf2test/pages/components/head1.xhtml">h:head (1st)</a><br>
+ <a href="jsf2test/pages/components/head2.xhtml">h:head (2nd)</a><br>
+ <a href="jsf2test/pages/components/body1.xhtml">h:body (1st)</a><br>
+ <a href="jsf2test/pages/components/body2.xhtml">h:body (2st)</a><br>
+ <a href="jsf2test/pages/components/outputScript.xhtml">h:outputScript</a><br>
+ <a href="jsf2test/pages/components/outputStylesheet.xhtml">h:outputStylesheet</a><br>
+</body>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body1.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body1.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body1.xhtml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,7 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html">
+<h:head />
+<h:body id="body1"></h:body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body1.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body1.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body1.xhtml.xml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,7 @@
+<tests>
+ <test id="body1">
+ <div>
+ <br/>
+ </div>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body2.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body2.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body2.xhtml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html">
+<h:head/>
+<h:body id="body1">
+ JSF 2.0 Test
+</h:body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body2.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body2.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/body2.xhtml.xml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,9 @@
+<tests>
+ <test id="body1">
+ <div>
+ <span>
+ JSF 2.0 Test
+ </span>
+ </div>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head1.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head1.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head1.xhtml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,8 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html">
+<h:head id="head1"/>
+<h:body>
+</h:body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head1.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head1.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head1.xhtml.xml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,7 @@
+<tests>
+ <test id="head1">
+ <div>
+ <br/>
+ </div>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head2.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head2.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head2.xhtml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,8 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html">
+<h:head id="head1"><title>JSF 2.0 Test</title></h:head>
+<h:body>
+</h:body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head2.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head2.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/head2.xhtml.xml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,7 @@
+<tests>
+ <test id="head1">
+ <div>
+ <h1>JSF 2.0 Test</h1>
+ </div>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputScript.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputScript.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputScript.xhtml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,9 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html">
+<h:head />
+<h:body>
+ Invisi<h:outputScript name="/resources/scripts/f1.js" id="outputScript1"/>ble tag
+</h:body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html">
+<h:head />
+<h:body>
+ <h:outputStylesheet name="/resources/css/stylesRed.css" id="outputStylesheetRed"/>
+ <h:outputStylesheet name="/resources/css/stylesBlue.css" id="outputStylesheetBlue"/>
+ Blue text
+</h:body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml.xml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,12 @@
+<tests>
+ <test id="outputStylesheetRed">
+ <style>
+ span { color: red;}
+ </style>
+ </test>
+ <test id="outputStylesheetBlue">
+ <style>
+ span { color: blue;}
+ </style>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesBlue.css
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesBlue.css (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesBlue.css 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,4 @@
+span {
+ color: blue;
+
+}
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesRed.css
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesRed.css (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/css/stylesRed.css 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,4 @@
+span {
+ color: red;
+
+}
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/images/image.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/images/image.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/scripts/f1.js
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/scripts/f1.js (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/scripts/f1.js 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1 @@
+function f1{}
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/scripts/f2.js
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/scripts/f2.js (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/resources/scripts/f2.js 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1 @@
+function f2{}
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/ant/build.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/ant/build.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/ant/build.properties 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,3 @@
+#
+#Fri Dec 28 13:39:43 GMT+02:00 2007
+classpath.external=
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/ant/build.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/ant/build.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/ant/build.xml 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,74 @@
+<project name="jsf2testDemo" default="deploy" basedir="../">
+
+ <!-- Project settings -->
+ <property file="${basedir}/ant/build.properties" />
+
+ <property name="project.name" value="jsf2testDemo" />
+ <property name="web.content.dir" value="${basedir}/WebContent" />
+ <property name="web-inf.dir" value="${web.content.dir}/WEB-INF" />
+ <property name="build.dir" value="build" />
+ <property name="war.name" value="${build.dir}/${project.name}.war" />
+
+ <!-- Define a folder for deployment -->
+ <property name="deploy.dir" value="deploy" />
+
+ <!-- Compile classpath -->
+ <path id="compile.classpath">
+ <fileset dir="${webinf.dir}/lib">
+ <include name="**/*.jar" />
+ </fileset>
+ <pathelement path="${classpath}" />
+ <pathelement path="${classpath.external}" />
+ <pathelement path="${webinf.dir}/classes" />
+ </path>
+
+ <!-- Copy any resource or configuration files -->
+ <target name="copyResources">
+ <copy todir="${web-inf.dir}/classes" includeEmptyDirs="no">
+ <fileset dir="JavaSource">
+ <patternset>
+ <include name="**/*.*" />
+ <exclude name="**/*.java" />
+ </patternset>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- Check timestamp on files -->
+ <target name="prepare">
+ <tstamp />
+ </target>
+
+ <!-- Remove classes directory for clean build -->
+ <target name="clean" description="Prepare for clean build">
+ <delete dir="${web-inf.dir}/classes" failonerror="false"/>
+ <mkdir dir="${web-inf.dir}/classes" />
+ </target>
+
+ <!-- Normal build of application -->
+ <target name="compile" depends="prepare, copyResources">
+ <javac srcdir="JavaSource" destdir="${web-inf.dir}/classes">
+ <classpath refid="compile.classpath" />
+ </javac>
+ </target>
+
+ <!-- Build Project -->
+ <target name="build" depends="prepare, compile" />
+
+ <!-- Rebuild Project -->
+ <target name="rebuild" depends="clean, prepare, compile" />
+
+ <!-- Build WAR -->
+ <target name="war" depends="build">
+ <mkdir dir="${build.dir}" />
+ <war warfile="${war.name}" basedir="${web.content.dir}" webxml="${web-inf.dir}/web.xml">
+ <exclude name="WEB-INF/web.xml" />
+ </war>
+ </target>
+
+ <target name="deploy" depends="war">
+ <delete dir="${deploy.dir}/${project.name}" failonerror="false"/>
+ <copy file="${war.name}" todir="${deploy.dir}" />
+ </target>
+
+</project>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/Jsf20ComponentContentTest.java 2008-10-03 17:35:32 UTC (rev 10672)
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.jsf.vpe.jsf.test;
+
+import org.jboss.tools.vpe.ui.test.ComponentContentTest;
+
+/**
+ * Performs tests for JavaServer Faces 2.0
+ *
+ * @author yradtsevich
+ *
+ */
+public class Jsf20ComponentContentTest extends ComponentContentTest {
+ public static final String OUTPUT_SCRIPT_ID = "outputScript1"; //$NON-NLS-1$
+
+
+ public Jsf20ComponentContentTest(String name) {
+ super(name);
+ setCheckWarning(false);
+ }
+
+ public void testBody1() throws Throwable {
+ performContentTest("components/body1.xhtml"); //$NON-NLS-1$
+ }
+
+ public void testBody2() throws Throwable {
+ performContentTest("components/body2.xhtml"); //$NON-NLS-1$
+ }
+
+ public void testHead1() throws Throwable {
+ performContentTest("components/head1.xhtml"); //$NON-NLS-1$
+ }
+
+ public void testHead2() throws Throwable {
+ performContentTest("components/head2.xhtml"); //$NON-NLS-1$
+ }
+
+ public void testOutputScript() throws Throwable {
+ performInvisibleTagTest("components/outputScript.xhtml", OUTPUT_SCRIPT_ID); //$NON-NLS-1$
+ }
+
+ public void testOutputStylesheet() throws Throwable {
+ performContentTest("components/outputStylesheet.xhtml"); //$NON-NLS-1$
+ }
+
+ protected String getTestProjectName() {
+ return Jsf20AllTests.IMPORT_PROJECT_NAME;
+ }
+}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-10-03 17:14:47 UTC (rev 10671)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-10-03 17:35:32 UTC (rev 10672)
@@ -66,6 +66,7 @@
TestSuite suite = new TestSuite("Tests for Vpe Jsf components"); // $NON-NLS-1$ //$NON-NLS-1$
// $JUnit-BEGIN$
suite.addTestSuite(JsfComponentTest.class);
+ suite.addTestSuite(Jsf20ComponentContentTest.class);
suite.addTestSuite(JsfJbide1467Test.class);
suite.addTestSuite(JsfJbide1501Test.class);
suite.addTestSuite(JBIDE1484Test.class);
@@ -103,10 +104,15 @@
// added by Max Areshkau
// add here projects which should be imported for junit tests
List<ImportBean> projectToImport = new ArrayList<ImportBean>();
- ImportBean importBean = new ImportBean();
- importBean.setImportProjectName(JsfAllTests.IMPORT_PROJECT_NAME);
- importBean.setImportProjectPath(JsfTestPlugin.getPluginResourcePath());
- projectToImport.add(importBean);
+ ImportBean importBeanJsf1 = new ImportBean();
+ importBeanJsf1.setImportProjectName(JsfAllTests.IMPORT_PROJECT_NAME);
+ importBeanJsf1.setImportProjectPath(JsfTestPlugin.getPluginResourcePath());
+ projectToImport.add(importBeanJsf1);
+
+ ImportBean importBeanJsf20 = new ImportBean();
+ importBeanJsf20.setImportProjectName(Jsf20AllTests.IMPORT_PROJECT_NAME);
+ importBeanJsf20.setImportProjectPath(JsfTestPlugin.getPluginResourcePath());
+ projectToImport.add(importBeanJsf20);
return new VpeTestSetup(suite, projectToImport);
17 years, 3 months
JBoss Tools SVN: r10671 - trunk/birt/docs/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-03 13:14:47 -0400 (Fri, 03 Oct 2008)
New Revision: 10671
Modified:
trunk/birt/docs/en/modules/birt_support.xml
Log:
Report Layout sub-chapter added
Modified: trunk/birt/docs/en/modules/birt_support.xml
===================================================================
--- trunk/birt/docs/en/modules/birt_support.xml 2008-10-03 15:29:46 UTC (rev 10670)
+++ trunk/birt/docs/en/modules/birt_support.xml 2008-10-03 17:14:47 UTC (rev 10671)
@@ -198,7 +198,7 @@
<para>The New Data Set dialog will appear. Enter a name for the Data Set Name field and ensure that the Data Source field shows the data source already created and that the Data Set Type field is set to "SQL Select Query".
- Then click on the Next button:</para>
+ Then click on the <emphasis><property>Next</property></emphasis> button:</para>
<figure>
@@ -227,8 +227,38 @@
</figure>
+ <para>Click on the <emphasis><property>Finish</property></emphasis> button. The Edit Data Set window opens where you can change Data Source, Settings, Parameters and other details for the Data Set created. If switched to the Query page you can check the schemas within this database, you can expand them to see the list of tables with their columns. Switch to the Preview page to test your query and verify whether the list of customers appears. </para>
+
+
+ <figure>
+ <title>Edit the Data Set</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/14EditDataSet.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <figure>
+ <title>Test the Query</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/15TestQuery.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on the <emphasis><property>Ok</property></emphasis> button.</para>
</section>
+ <section><title>Create Report Layout</title>
+
+ <para>After the Data source and Data set are specified you can continue with the report layout.</para>
+
+ </section>
+
+
</section>
</chapter>
17 years, 3 months
JBoss Tools SVN: r10670 - trunk/documentation/jboss-tools-docs/index/en.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-03 11:29:46 -0400 (Fri, 03 Oct 2008)
New Revision: 10670
Modified:
trunk/documentation/jboss-tools-docs/index/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-253
link to birt pdf is corrected
Modified: trunk/documentation/jboss-tools-docs/index/en/master.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/index/en/master.xml 2008-10-03 15:13:51 UTC (rev 10669)
+++ trunk/documentation/jboss-tools-docs/index/en/master.xml 2008-10-03 15:29:46 UTC (rev 10670)
@@ -129,13 +129,12 @@
<primaryie>JBoss Birt Plugin Reference Guide <ulink
url="en/jboss_birt_plugin_ref_guide/html/index.html">(html)</ulink>
<ulink url="en/jboss_birt_plugin_ref_guide/html_single/index.html">(html single)</ulink>
- <ulink url="en/jboss_portal_tools_ref_guide/pdf/Birt_Reference_Guide.pdf"
+ <ulink url="en/jboss_birt_tools_ref_guide/pdf/Birt_Reference_Guide.pdf"
>(pdf)</ulink>
</primaryie>
</indexentry>
-
<indexentry>
<primaryie>Exadel Studio Migration Guide <ulink
url="en/Exadel-migration/html/index.html">(html)</ulink>
17 years, 3 months
JBoss Tools SVN: r10669 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-03 11:13:51 -0400 (Fri, 03 Oct 2008)
New Revision: 10669
Modified:
trunk/jsf/docs/userguide/en/modules/preferences.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-432 - adding the concluding part;
Modified: trunk/jsf/docs/userguide/en/modules/preferences.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/preferences.xml 2008-10-03 15:12:49 UTC (rev 10668)
+++ trunk/jsf/docs/userguide/en/modules/preferences.xml 2008-10-03 15:13:51 UTC (rev 10669)
@@ -562,9 +562,8 @@
<listitem>
<para><emphasis>
<property>Project Template</property>
- </emphasis> so as <property>New JSF
- Project wizard</property> shows this template as default for the chosen JSF
- Environment</para>
+ </emphasis> so as <property>New JSF Project wizard</property> shows this
+ template as default for the chosen JSF Environment</para>
</listitem>
<listitem>
@@ -574,7 +573,7 @@
<para>If you check <emphasis>
<property>Use Default Path</property>
</emphasis> here, this box will be also checked in the <property>New JSF Project
- wizard</property>.</para>
+ wizard</property>.</para>
</listitem>
<listitem>
@@ -1141,4 +1140,15 @@
</figure>
</section>
-->
+
+ <para>In summary, this document should guide you to those parts of <property>JBoss
+ Tools</property> which you specifically need to develop Web Applications. It coves different
+ aspects of visual components such as editors, views, etc. for browsing, representing and
+ editing web resources you are working with.</para>
+
+ <para>If there's anything we didn't cover or you can't figure out,
+ please feel free to visit our <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
+ Developer Studio Forum</ulink> to ask questions. There we are also looking for your
+ suggestions and comments.</para>
</chapter>
17 years, 3 months
JBoss Tools SVN: r10668 - in trunk: hibernatetools/docs/reference/en/modules and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-03 11:12:49 -0400 (Fri, 03 Oct 2008)
New Revision: 10668
Modified:
trunk/as/docs/reference/en/modules/quick_start.xml
trunk/hibernatetools/docs/reference/en/modules/plugins.xml
trunk/hibernatetools/docs/reference/en/modules/preface.xml
trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml
trunk/jbpm/docs/reference/en/modules/Introduction.xml
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-418
links are corrected and text alignment in tables as well
Modified: trunk/as/docs/reference/en/modules/quick_start.xml
===================================================================
--- trunk/as/docs/reference/en/modules/quick_start.xml 2008-10-03 15:10:23 UTC (rev 10667)
+++ trunk/as/docs/reference/en/modules/quick_start.xml 2008-10-03 15:12:49 UTC (rev 10668)
@@ -174,7 +174,7 @@
<section>
<title>Other relevant resources on the topic</title>
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://www.jboss.com/products/devstudio/docs">here</ulink>.</para>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools/2.1.0.GA">here</ulink>.</para>
<para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
</section>
Modified: trunk/hibernatetools/docs/reference/en/modules/plugins.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2008-10-03 15:10:23 UTC (rev 10667)
+++ trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2008-10-03 15:12:49 UTC (rev 10668)
@@ -197,7 +197,7 @@
<colspec colnum="2" colwidth="3*"/>
- <colspec colnum="3" colwidth="1*"/>
+ <colspec colnum="3" align="left" colwidth="1*"/>
<thead>
<row>
@@ -370,7 +370,7 @@
<colspec colnum="2" colwidth="3*"/>
- <colspec colnum="3" colwidth="1*"/>
+ <colspec colnum="3" align="left" colwidth="1*"/>
<thead>
<row>
Modified: trunk/hibernatetools/docs/reference/en/modules/preface.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/preface.xml 2008-10-03 15:10:23 UTC (rev 10667)
+++ trunk/hibernatetools/docs/reference/en/modules/preface.xml 2008-10-03 15:12:49 UTC (rev 10668)
@@ -21,7 +21,7 @@
<colspec colnum="1" align="left" colwidth="1*"/>
<colspec colnum="2" colwidth="5*"/>
- <colspec colnum="3" colwidth="1*"/>
+ <colspec colnum="3" align="left" colwidth="1*"/>
<thead>
<row>
Modified: trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml 2008-10-03 15:10:23 UTC (rev 10667)
+++ trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml 2008-10-03 15:12:49 UTC (rev 10668)
@@ -697,7 +697,7 @@
does not support them or does not have them defined in their schema. Secondly, to allow
defining the name of the resulting properties (many-to-one and one-to-many's).</para>
- <para><programlisting role="XML"><![CDATA[<foreign-key
+ <programlisting role="XML"><![CDATA[<foreign-key
constraint-name="foreignKeyName"
foreign-catalog="catalogName"
foreign-schema="schemaName"
@@ -710,7 +710,7 @@
<set
property="aCollectionName"
exclude="true|false"/>
- </foreign-key>]]></programlisting></para>
+ </foreign-key>]]></programlisting>
<table frame="topbot">
<title>Foreign-key attributes</title>
Modified: trunk/jbpm/docs/reference/en/modules/Introduction.xml
===================================================================
--- trunk/jbpm/docs/reference/en/modules/Introduction.xml 2008-10-03 15:10:23 UTC (rev 10667)
+++ trunk/jbpm/docs/reference/en/modules/Introduction.xml 2008-10-03 15:12:49 UTC (rev 10668)
@@ -131,7 +131,7 @@
<section>
<title>Other relevant resources on the topic</title>
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://www.jboss.com/products/devstudio/docs">here</ulink>.</para>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools/2.1.0.GA/">here</ulink>.</para>
<para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
</section>
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2008-10-03 15:10:23 UTC (rev 10667)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2008-10-03 15:12:49 UTC (rev 10668)
@@ -675,7 +675,7 @@
</proposal>
</AttributeType>
]]></programlisting>
- <orderedlist Start="10" continuation="continues">
+ <orderedlist start="2" continuation="continues">
<listitem>
<para>Add information on your xml file in <emphasis>
<property><JBDS_home>/studio/eclipse/plugins/org.jboss.common.kb_***/plugin.xml</property>
17 years, 3 months
JBoss Tools SVN: r10667 - trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-03 11:10:23 -0400 (Fri, 03 Oct 2008)
New Revision: 10667
Modified:
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml-single.xsl
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml.xsl
Log:
https://jira.jboss.org/jira/browse/JBDS-399 - overlay is added as <div> element;
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl 2008-10-03 15:04:47 UTC (rev 10666)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl 2008-10-03 15:10:23 UTC (rev 10667)
@@ -57,8 +57,8 @@
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon0.ico" />
<xsl:apply-templates select="." mode="head.keywords.content"/>
-<script type="text/javascript" src="script/toggle.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
+
</xsl:template>
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml-single.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml-single.xsl 2008-10-03 15:04:47 UTC (rev 10666)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml-single.xsl 2008-10-03 15:10:23 UTC (rev 10667)
@@ -11,5 +11,82 @@
<xsl:import href="classpath:/xslt/com/jboss/xhtml-single.xsl"/>
<xsl:import href="common.xsl"/>
-
+ <xsl:template name="book.titlepage.recto">
+ <div id="overlay">
+ <xsl:text> </xsl:text>
+ </div>
+ <p xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:attribute name="id">
+ <xsl:text>title</xsl:text>
+ </xsl:attribute>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$siteHref" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>site_href</xsl:text>
+ </xsl:attribute>
+ <strong>
+ <xsl:value-of select="$siteLinkText"/>
+ </strong>
+ </a>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$docHref" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>doc_href</xsl:text>
+ </xsl:attribute>
+ <strong>
+ <xsl:value-of select="$docLinkText"/>
+ </strong>
+ </a>
+ </p>
+ <xsl:choose>
+ <xsl:when test="bookinfo/title">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="bookinfo/subtitle">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
+ </xsl:template>
</xsl:stylesheet>
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml.xsl 2008-10-03 15:04:47 UTC (rev 10666)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml.xsl 2008-10-03 15:10:23 UTC (rev 10667)
@@ -11,4 +11,88 @@
<xsl:import href="classpath:/xslt/com/jboss/xhtml.xsl"/>
<xsl:import href="common.xsl"/>
+ <xsl:template name="header.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+ <xsl:variable name="row1" select="$navig.showtitles != 0"/>
+ <xsl:variable name="row2" select="count($prev) > 0 or (count($up) > 0 and generate-id($up) != generate-id($home) and $navig.showtitles != 0) or count($next) > 0"/>
+ <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
+ <xsl:if test="$row1 or $row2">
+ <xsl:if test="$row1">
+ <div id="overlay">
+ <xsl:text> </xsl:text>
+ </div>
+ <p xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:attribute name="id">
+ <xsl:text>title</xsl:text>
+ </xsl:attribute>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$siteHref" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>site_href</xsl:text>
+ </xsl:attribute>
+ <strong>
+ <xsl:value-of select="$siteLinkText"/>
+ </strong>
+ </a>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$docHref" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>doc_href</xsl:text>
+ </xsl:attribute>
+ <strong>
+ <xsl:value-of select="$docLinkText"/>
+ </strong>
+ </a>
+ </p>
+ </xsl:if>
+ <xsl:if test="$row2">
+ <ul class="docnav" xmlns="http://www.w3.org/1999/xhtml">
+ <li class="previous">
+ <xsl:if test="count($prev)>0">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <strong>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'prev'"/>
+ </xsl:call-template>
+ </strong>
+ </a>
+ </xsl:if>
+ </li>
+ <li class="next">
+ <xsl:if test="count($next)>0">
+ <a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <strong>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </strong>
+ </a>
+ </xsl:if>
+ </li>
+ </ul>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$header.rule != 0">
+ <hr/>
+ </xsl:if>
+ </xsl:if>
+ </xsl:template>
</xsl:stylesheet>
17 years, 3 months
JBoss Tools SVN: r10666 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-10-03 11:04:47 -0400 (Fri, 03 Oct 2008)
New Revision: 10666
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2669 Fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-10-03 14:48:22 UTC (rev 10665)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-10-03 15:04:47 UTC (rev 10666)
@@ -60,7 +60,7 @@
.include("jsf-facelets\\.jar") //$NON-NLS-1$
.include("oscache.*\\.jar") //$NON-NLS-1$
.include("stringtemplate.*\\.jar") //$NON-NLS-1$
- .include("mvel14.jar") //$NON-NLS-1$
+ .include("mvel.*\\.jar") //$NON-NLS-1$
.include("jboss-el.jar"); //$NON-NLS-1$
public static AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_EAR_CONFIG = new AntCopyUtils.FileSet()
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2008-10-03 14:48:22 UTC (rev 10665)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2008-10-03 15:04:47 UTC (rev 10666)
@@ -54,7 +54,7 @@
.include("drools-core.*\\.jar") //$NON-NLS-1$
.include("jboss-seam.jar") //$NON-NLS-1$
.include("jboss-el.*.jar") //$NON-NLS-1$
- .include("mvel14.*.jar") //$NON-NLS-1$
+ .include("mvel.*\\.jar") //$NON-NLS-1$
.include("jbpm-jpdl.*\\.jar") //$NON-NLS-1$
.include("richfaces-api.*\\.jar"); //$NON-NLS-1$
17 years, 3 months
JBoss Tools SVN: r10665 - trunk/birt/docs/en/images/BirtSupport.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-03 10:48:22 -0400 (Fri, 03 Oct 2008)
New Revision: 10665
Added:
trunk/birt/docs/en/images/BirtSupport/15TestQuery.png
Log:
Added: trunk/birt/docs/en/images/BirtSupport/15TestQuery.png
===================================================================
(Binary files differ)
Property changes on: trunk/birt/docs/en/images/BirtSupport/15TestQuery.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 3 months
JBoss Tools SVN: r10663 - trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/script.
by jbosstools-commits@lists.jboss.org
Author: artdaw
Date: 2008-10-03 10:36:04 -0400 (Fri, 03 Oct 2008)
New Revision: 10663
Removed:
trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/script/toggle.js
Log:
https://jira.jboss.org/jira/browse/JBDS-336 - We do not need 'script' folder any more
Deleted: trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/script/toggle.js
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/script/toggle.js 2008-10-03 14:34:59 UTC (rev 10662)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/script/toggle.js 2008-10-03 14:36:04 UTC (rev 10663)
@@ -1 +0,0 @@
-document.write('<div id="overlay"> </div>');
17 years, 3 months
JBoss Tools SVN: r10662 - trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools.
by jbosstools-commits@lists.jboss.org
Author: artdaw
Date: 2008-10-03 10:34:59 -0400 (Fri, 03 Oct 2008)
New Revision: 10662
Modified:
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml-single.xsl
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml.xsl
Log:
https://jira.jboss.org/jira/browse/JBDS-336 - overlay was added as <div> element
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl 2008-10-03 14:29:45 UTC (rev 10661)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl 2008-10-03 14:34:59 UTC (rev 10662)
@@ -56,7 +56,6 @@
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon.ico" />
<xsl:apply-templates select="." mode="head.keywords.content"/>
-<script type="text/javascript" src="script/toggle.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
</xsl:template>
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml-single.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml-single.xsl 2008-10-03 14:29:45 UTC (rev 10661)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml-single.xsl 2008-10-03 14:34:59 UTC (rev 10662)
@@ -10,5 +10,83 @@
<xsl:import href="classpath:/xslt/org/jboss/xhtml-single.xsl"/>
<xsl:import href="common.xsl"/>
-
+ <xsl:template name="book.titlepage.recto">
+ <div id="overlay">
+ <xsl:text> </xsl:text>
+ </div>
+ <p xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:attribute name="id">
+ <xsl:text>title</xsl:text>
+ </xsl:attribute>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$siteHref" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>site_href</xsl:text>
+ </xsl:attribute>
+ <strong>
+ <xsl:value-of select="$siteLinkText"/>
+ </strong>
+ </a>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$docHref" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>doc_href</xsl:text>
+ </xsl:attribute>
+ <strong>
+ <xsl:value-of select="$docLinkText"/>
+ </strong>
+ </a>
+ </p>
+ <xsl:choose>
+ <xsl:when test="bookinfo/title">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="bookinfo/subtitle">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
</xsl:stylesheet>
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml.xsl 2008-10-03 14:29:45 UTC (rev 10661)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml.xsl 2008-10-03 14:34:59 UTC (rev 10662)
@@ -10,5 +10,88 @@
<xsl:import href="classpath:/xslt/org/jboss/xhtml.xsl"/>
<xsl:import href="common.xsl"/>
-
+ <xsl:template name="header.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+ <xsl:variable name="row1" select="$navig.showtitles != 0"/>
+ <xsl:variable name="row2" select="count($prev) > 0 or (count($up) > 0 and generate-id($up) != generate-id($home) and $navig.showtitles != 0) or count($next) > 0"/>
+ <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
+ <xsl:if test="$row1 or $row2">
+ <xsl:if test="$row1">
+ <div id="overlay">
+ <xsl:text> </xsl:text>
+ </div>
+ <p xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:attribute name="id">
+ <xsl:text>title</xsl:text>
+ </xsl:attribute>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$siteHref" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>site_href</xsl:text>
+ </xsl:attribute>
+ <strong>
+ <xsl:value-of select="$siteLinkText"/>
+ </strong>
+ </a>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$docHref" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>doc_href</xsl:text>
+ </xsl:attribute>
+ <strong>
+ <xsl:value-of select="$docLinkText"/>
+ </strong>
+ </a>
+ </p>
+ </xsl:if>
+ <xsl:if test="$row2">
+ <ul class="docnav" xmlns="http://www.w3.org/1999/xhtml">
+ <li class="previous">
+ <xsl:if test="count($prev)>0">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <strong>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'prev'"/>
+ </xsl:call-template>
+ </strong>
+ </a>
+ </xsl:if>
+ </li>
+ <li class="next">
+ <xsl:if test="count($next)>0">
+ <a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <strong>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </strong>
+ </a>
+ </xsl:if>
+ </li>
+ </ul>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$header.rule != 0">
+ <hr/>
+ </xsl:if>
+ </xsl:if>
+</xsl:template>
</xsl:stylesheet>
17 years, 3 months
JBoss Tools SVN: r10661 - trunk/birt/docs/en/images/BirtSupport.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-03 10:29:45 -0400 (Fri, 03 Oct 2008)
New Revision: 10661
Added:
trunk/birt/docs/en/images/BirtSupport/14EditDataSet.png
Log:
new image added
Added: trunk/birt/docs/en/images/BirtSupport/14EditDataSet.png
===================================================================
(Binary files differ)
Property changes on: trunk/birt/docs/en/images/BirtSupport/14EditDataSet.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 3 months
JBoss Tools SVN: r10660 - in trunk/jst/plugins: org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-10-03 10:22:03 -0400 (Fri, 03 Oct 2008)
New Revision: 10660
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/images/xstudio/wizards/new_css_class.gif
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Util.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-2530
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/META-INF/MANIFEST.MF 2008-10-03 14:19:16 UTC (rev 10659)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/META-INF/MANIFEST.MF 2008-10-03 14:22:03 UTC (rev 10660)
@@ -62,5 +62,6 @@
org.eclipse.ui.views
Bundle-Version: 2.0.0
Export-Package: org.jboss.tools.jst.jsp.outline.cssdialog.common,
+ org.jboss.tools.jst.jsp.outline.cssdialog.events,
org.jboss.tools.jst.jsp.outline.cssdialog.parsers
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java 2008-10-03 14:19:16 UTC (rev 10659)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java 2008-10-03 14:22:03 UTC (rev 10660)
@@ -126,7 +126,7 @@
}
} else if (attributeName.endsWith("Class") || attributeName.endsWith("class") ) {
- CSSClassDialog dialog = new CSSClassDialog(cellEditorWindow.getShell());
+ CSSClassDialog dialog = new CSSClassDialog(cellEditorWindow.getShell(),false);
if (dialog.open() == Window.OK) {
externalEditing = false;
return dialog.getSelectorName();
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-10-03 14:19:16 UTC (rev 10659)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-10-03 14:22:03 UTC (rev 10660)
@@ -16,6 +16,8 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.SWT;
@@ -60,6 +62,7 @@
private Combo classCombo;
private CSSModel cssModel;
private String selectorName;
+ private boolean allProject;
final static int MIN_HEIGHT_FOR_BROWSER = 60;
final static String[] fileExtensions = { "css" };
@@ -68,22 +71,25 @@
final static String CSS_FILE_SELECT_DIALOG_EMPTY_MESSAGE = "No CSS file in the current project";
final static String SKIP_FIRST_CHAR = ".";
- public CSSClassDialog(Shell parentShell) {
+ /**
+ *
+ * @param parentShell
+ * @param allProject (if allProject is true - browse css file in all projects, else only in current project)
+ */
+ public CSSClassDialog(Shell parentShell,boolean allProject) {
super(parentShell);
+ this.allProject = allProject;
setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX
| SWT.APPLICATION_MODAL);
styleAttributes = new StyleAttributes();
}
/**
- * Method for creating dialog area
*
* @param parent
+ * @return
*/
- protected Control createDialogArea(final Composite parent) {
-
- final Composite composite = (Composite) super.createDialogArea(parent);
-
+ public Control createDialogComposite(Composite composite) {
GridLayout layout = new GridLayout();
layout.numColumns = 1;
composite.setLayout(layout);
@@ -110,8 +116,18 @@
text.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- IProject project = Util.getCurrentProject();
- IResource res = project.findMember(text.getText());
+ IResource res = null;
+ if (allProject) {
+ IWorkspace workspace = Util.getCurrentWorkspace();
+ if(workspace!=null) {
+ res = workspace.getRoot().findMember(text.getText());
+ }
+ } else {
+ IProject project = Util.getCurrentProject();
+ if (project!=null)
+ res = project.findMember(text.getText());
+ }
+
if (res != null) {
if (res instanceof IFile) {
file = (IFile) res;
@@ -171,7 +187,10 @@
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
- IProject project = Util.getCurrentProject();
+ IAdaptable project = Util.getCurrentWorkspace();
+ if (!allProject) {
+ project = Util.getCurrentProject();
+ }
ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(
getShell(), new WorkbenchLabelProvider(),
@@ -185,8 +204,11 @@
.setEmptyListMessage(CSS_FILE_SELECT_DIALOG_EMPTY_MESSAGE);
dialog.open();
IResource res = (IResource) dialog.getFirstResult();
- text.setText(res.getProjectRelativePath().toOSString());
-
+ if (allProject) {
+ text.setText(res.getFullPath().toOSString());
+ } else {
+ text.setText(res.getProjectRelativePath().toOSString());
+ }
}
});
@@ -216,8 +238,32 @@
return composite;
}
+
+ public void saveChanges() {
+ styleComposite.updateStyle();
+ String newStyle = styleComposite.getNewStyle();
+ cssModel.setCSS(classCombo.getText(), newStyle);
+ cssModel.saveModel();
+ }
+ public String getSelectorName() {
+ return selectorName;
+ }
+
/**
+ * Method for creating dialog area
+ *
+ * @param parent
+ *
+ */
+ protected Control createDialogArea(final Composite parent) {
+
+ final Composite composite = (Composite) super.createDialogArea(parent);
+
+ return createDialogComposite(composite);
+ }
+
+ /**
* Method for setting title for dialog
*
* @param newShell
@@ -228,10 +274,7 @@
}
protected void okPressed() {
- styleComposite.updateStyle();
- String newStyle = styleComposite.getNewStyle();
- cssModel.setCSS(classCombo.getText(), newStyle);
- cssModel.saveModel();
+ saveChanges();
String sel = classCombo.getText();
if (sel.trim().startsWith(SKIP_FIRST_CHAR)) {
sel = sel.substring(1);
@@ -239,9 +282,7 @@
selectorName = sel;
super.okPressed();
}
+
+
- public String getSelectorName() {
- return selectorName;
- }
-
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Util.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Util.java 2008-10-03 14:19:16 UTC (rev 10659)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Util.java 2008-10-03 14:22:03 UTC (rev 10660)
@@ -17,6 +17,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -349,6 +350,24 @@
IProject project = file.getProject();
return project;
-
}
+
+ /**
+ * Get current workspace
+ *
+ * @return
+ */
+ public static IWorkspace getCurrentWorkspace() {
+ IEditorPart editor = JspEditorPlugin.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ IEditorInput input = editor.getEditorInput();
+ IFile file = null;
+ if (input instanceof IFileEditorInput) {
+ file = ((IFileEditorInput) input).getFile();
+ }
+ if (file == null)
+ return null;
+ IWorkspace workspace = file.getWorkspace();
+ return workspace;
+ }
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF 2008-10-03 14:19:16 UTC (rev 10659)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF 2008-10-03 14:22:03 UTC (rev 10660)
@@ -85,6 +85,7 @@
org.eclipse.core.resources,
org.eclipse.core.runtime,
org.eclipse.debug.ui,
- org.jboss.tools.jsf.vpe.jsf
+ org.jboss.tools.jsf.vpe.jsf,
+ org.jboss.tools.jst.jsp;bundle-version="2.0.0"
Bundle-Version: 2.0.0
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/images/xstudio/wizards/new_css_class.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.ui/images/xstudio/wizards/new_css_class.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2008-10-03 14:19:16 UTC (rev 10659)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2008-10-03 14:22:03 UTC (rev 10660)
@@ -109,6 +109,21 @@
</wizard>
<wizard
category="org.jboss.tools.jst.web"
+ class="org.jboss.tools.jst.web.ui.wizards.css.NewCSSClassWizard"
+ finalPerspective="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ icon="images/xstudio/wizards/new_css_class.gif"
+ id="org.jboss.tools.jst.web.ui.wizards.newfile.NewCSSClassWizard"
+ name="CSS Class"
+ preferredPerspectives="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ project="false">
+ <description>
+ Create a CSS Class
+ </description>
+ <selection class="org.eclipse.core.resources.IResource">
+ </selection>
+ </wizard>
+ <wizard
+ category="org.jboss.tools.jst.web"
class="org.jboss.tools.jst.web.ui.wizards.newfile.NewJSFileWizard"
finalPerspective="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
icon="images/xstudio/wizards/new_js_file.gif"
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java 2008-10-03 14:22:03 UTC (rev 10660)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.jst.web.ui.wizards.css;
+
+import org.eclipse.jface.dialogs.IDialogPage;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.jboss.tools.jst.jsp.outline.cssdialog.CSSClassDialog;
+
+public class NewCSSClassWizard extends Wizard implements INewWizard {
+
+ private NewCSSClassWizardPage page;
+
+
+
+ /**
+ * Constructor for SampleNewWizard.
+ */
+ public NewCSSClassWizard() {
+ super();
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+
+ }
+
+ /**
+ * Adding the page to the wizard.
+ */
+
+ public void addPages() {
+ page = new NewCSSClassWizardPage();
+ addPage(page);
+ }
+
+ /**
+ * This method is called when 'Finish' button is pressed in the wizard. We
+ * will create an operation and run it using wizard as execution context.
+ */
+ public boolean performFinish() {
+ page.saveChanges();
+ return true;
+ }
+
+ private class NewCSSClassWizardPage extends WizardPage {
+
+ private CSSClassDialog dialog;
+
+ final static String WIZARD_TITLE = "Create New CSS Class";
+ final static String WIZARD_DESCRIPTION = "Create New CSS Class";
+
+ /**
+ * Constructor for SampleNewWizardPage.
+ *
+ * @param pageName
+ */
+ public NewCSSClassWizardPage() {
+ super("newCSSClassWizard");
+ setTitle(WIZARD_TITLE);
+ setDescription(WIZARD_DESCRIPTION);
+ }
+
+ /**
+ * @see IDialogPage#createControl(Composite)
+ */
+ public void createControl(Composite parent) {
+ Composite container = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ container.setLayout(layout);
+
+ dialog = new CSSClassDialog(getShell(), true);
+ dialog.createDialogComposite(container);
+ setControl(container);
+ }
+
+ public void saveChanges() {
+ dialog.saveChanges();
+ }
+ }
+
+}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r10659 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: src/org/jboss/tools/jsf/vpe/richfaces/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-03 10:19:16 -0400 (Fri, 03 Oct 2008)
New Revision: 10659
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/RichFacesJBIDE1169Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
Log:
=JBIDE-1169
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2008-10-03 14:06:43 UTC (rev 10658)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2008-10-03 14:19:16 UTC (rev 10659)
@@ -18,7 +18,10 @@
org.jboss.tools.vpe.xulrunner,
org.jboss.tools.jsf.vpe.richfaces,
org.mozilla.xpcom,
- org.jboss.tools.vpe.ui.test
+ org.jboss.tools.vpe.ui.test,
+ org.jboss.tools.vpe.resref;bundle-version="2.0.0",
+ org.jboss.tools.common.el.ui;bundle-version="1.0.0",
+ org.jboss.tools.common.el.core;bundle-version="2.0.0"
Eclipse-LazyStart: true
Bundle-ClassPath: vpe-rf-test.jar
Export-Package: org.jboss.tools.jsf.vpe.richfaces.test
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-10-03 14:06:43 UTC (rev 10658)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-10-03 14:19:16 UTC (rev 10659)
@@ -26,6 +26,7 @@
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.Jbide1614Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.Jbide1639Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.Jbide1682Test;
+import org.jboss.tools.jsf.vpe.richfaces.test.jbide.RichFacesJBIDE1169Test;
import org.jboss.tools.tests.ImportBean;
import org.jboss.tools.vpe.ui.test.VpeTestSetup;
@@ -53,6 +54,7 @@
suite.addTestSuite(Jbide1682Test.class);
suite.addTestSuite(Jbide1548Test.class);
suite.addTestSuite(JBIDE1713Test.class);
+ suite.addTestSuite(RichFacesJBIDE1169Test.class);
suite.addTestSuite(RichFacesComboBoxTemplateTestCase.class);
suite.addTestSuite(RichFacesInplaceInputTemplateTestCase.class);
suite.addTestSuite(RichFacesInplaceSelectTemplateTestCase.class);
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/RichFacesJBIDE1169Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/RichFacesJBIDE1169Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/RichFacesJBIDE1169Test.java 2008-10-03 14:19:16 UTC (rev 10659)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+* Copyright (c) 2007-2008 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.jsf.vpe.richfaces.test.jbide;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.common.el.core.ELReferenceList;
+import org.jboss.tools.common.resref.core.ResourceReference;
+import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesAllTests;
+import org.jboss.tools.vpe.editor.util.ElService;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * @author mareshkau
+ * Test Case For JBIDE-1169
+ */
+public class RichFacesJBIDE1169Test extends VpeTest{
+
+ private String RICH_FACES_SKIN_KEY = "org.richfaces.SKIN"; //$NON-NLS-1$
+
+ private String SKIN_VALUE = "ruby"; //$NON-NLS-1$
+
+ private IFile testFile;
+
+ public RichFacesJBIDE1169Test(String name) {
+ super(name);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ResourceReference[] entries = new ResourceReference[1];
+ testFile = (IFile) TestUtil.getComponentPath(
+ "JBIDE/1169/test.xhtml", RichFacesAllTests.IMPORT_PROJECT_NAME); //$NON-NLS-1$
+ entries[0] = new ResourceReference(RICH_FACES_SKIN_KEY,ResourceReference.PROJECT_SCOPE);
+ entries[0].setProperties(SKIN_VALUE);
+ ELReferenceList.getInstance().setAllResources(testFile, entries);
+ //clear exception
+ setException(null);
+ }
+
+ public void testJBIDE1169() {
+ String replacedValue = ElService.getInstance().replaceEl(testFile,"#{"+RICH_FACES_SKIN_KEY+'}'); //$NON-NLS-1$
+ assertEquals("Skin value should be equals",SKIN_VALUE, replacedValue); //$NON-NLS-1$
+ }
+ /**
+ * Tear down.
+ *
+ * @throws Exception the exception
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ if(getException()!=null) {
+ throw new Exception(getException());
+ }
+ ELReferenceList.getInstance().setAllResources(testFile, new ResourceReference[0]);
+ testFile = null;
+ super.tearDown();
+ }
+}
17 years, 3 months
JBoss Tools SVN: r10658 - trunk/birt/docs/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-03 10:06:43 -0400 (Fri, 03 Oct 2008)
New Revision: 10658
Modified:
trunk/birt/docs/en/modules/birt_support.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-388 - screenshots added
Modified: trunk/birt/docs/en/modules/birt_support.xml
===================================================================
--- trunk/birt/docs/en/modules/birt_support.xml 2008-10-03 13:58:58 UTC (rev 10657)
+++ trunk/birt/docs/en/modules/birt_support.xml 2008-10-03 14:06:43 UTC (rev 10658)
@@ -183,11 +183,50 @@
</section>
- <section><title>Builde a Data Set</title>
+ <section><title>Build a Data Set</title>
- text here
+ <para>Data Set is a query to get and represent necessary column data from the data source specified. Select Data Sets in the tree view, right-click on it and select New Data Set:</para>
+
+ <figure>
+ <title>Create a Data Set</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/11DataSet.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>The New Data Set dialog will appear. Enter a name for the Data Set Name field and ensure that the Data Source field shows the data source already created and that the Data Set Type field is set to "SQL Select Query".
+ Then click on the Next button:</para>
+ <figure>
+ <title>New Data Set Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/12NewDataSet.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Enter the following details into the query:</para>
+ <programlisting><![CDATA[
+SELECT *
+FROM CUSTOMERS
+WHERE COUNTRY = 'USA']]></programlisting>
+
+
+ <figure>
+ <title>Query Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/13SQLQuery.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
</section>
</section>
17 years, 3 months
JBoss Tools SVN: r10657 - trunk/birt/docs/en/images/BirtSupport.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-03 09:58:58 -0400 (Fri, 03 Oct 2008)
New Revision: 10657
Added:
trunk/birt/docs/en/images/BirtSupport/12NewDataSet.png
trunk/birt/docs/en/images/BirtSupport/13SQLQuery.png
Log:
images replaced
Added: trunk/birt/docs/en/images/BirtSupport/12NewDataSet.png
===================================================================
(Binary files differ)
Property changes on: trunk/birt/docs/en/images/BirtSupport/12NewDataSet.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/birt/docs/en/images/BirtSupport/13SQLQuery.png
===================================================================
(Binary files differ)
Property changes on: trunk/birt/docs/en/images/BirtSupport/13SQLQuery.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 3 months
JBoss Tools SVN: r10656 - trunk/birt/docs/en/images/BirtSupport.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-03 09:58:25 -0400 (Fri, 03 Oct 2008)
New Revision: 10656
Removed:
trunk/birt/docs/en/images/BirtSupport/12NewDataSet.png
trunk/birt/docs/en/images/BirtSupport/13NewDataSet.png
trunk/birt/docs/en/images/BirtSupport/14SQLQuery.png
Log:
images will be replaced
Deleted: trunk/birt/docs/en/images/BirtSupport/12NewDataSet.png
===================================================================
(Binary files differ)
Deleted: trunk/birt/docs/en/images/BirtSupport/13NewDataSet.png
===================================================================
(Binary files differ)
Deleted: trunk/birt/docs/en/images/BirtSupport/14SQLQuery.png
===================================================================
(Binary files differ)
17 years, 3 months
JBoss Tools SVN: r10655 - in trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el: internal/core/parser and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-03 09:52:25 -0400 (Fri, 03 Oct 2008)
New Revision: 10655
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
Log:
JBIDE-1497.
Minor improvements
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java 2008-10-03 13:35:45 UTC (rev 10654)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java 2008-10-03 13:52:25 UTC (rev 10655)
@@ -24,7 +24,7 @@
*
*/
public class Tokenizer {
- static int LITERAL = -10;
+ public static int LITERAL = -10;
private Map<Integer, ITokenDescription> tokenDescriptions = new HashMap<Integer, ITokenDescription>();
private Map<Integer, List<IRule>> rules = new HashMap<Integer, List<IRule>>();
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2008-10-03 13:35:45 UTC (rev 10654)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2008-10-03 13:52:25 UTC (rev 10655)
@@ -12,6 +12,7 @@
import org.jboss.tools.common.el.core.model.ELObjectType;
import org.jboss.tools.common.el.core.parser.LexicalToken;
+import org.jboss.tools.common.el.core.parser.Tokenizer;
import org.jboss.tools.common.el.internal.core.model.ELArgumentImpl;
import org.jboss.tools.common.el.internal.core.model.ELArgumentExpressionImpl;
import org.jboss.tools.common.el.internal.core.model.ELComplexExpressionImpl;
@@ -288,7 +289,10 @@
private LexicalToken lookUpNextToken(LexicalToken token) {
LexicalToken c = token;
- while(c != null && (c == token || c.getType() == WhiteSpaceTokenDescription.WHITESPACE)) {
+ while(c != null
+ && (c == token
+ || c.getType() == WhiteSpaceTokenDescription.WHITESPACE
+ || c.getType() == Tokenizer.LITERAL)) {
c = c.getNextToken();
}
return c;
17 years, 3 months
JBoss Tools SVN: r10654 - trunk/birt/docs/en/images/BirtSupport.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-10-03 09:35:45 -0400 (Fri, 03 Oct 2008)
New Revision: 10654
Added:
trunk/birt/docs/en/images/BirtSupport/11DataSet.png
trunk/birt/docs/en/images/BirtSupport/12NewDataSet.png
trunk/birt/docs/en/images/BirtSupport/13NewDataSet.png
trunk/birt/docs/en/images/BirtSupport/14SQLQuery.png
Log:
new images added for the Build Data Set sub-chapter
Added: trunk/birt/docs/en/images/BirtSupport/11DataSet.png
===================================================================
(Binary files differ)
Property changes on: trunk/birt/docs/en/images/BirtSupport/11DataSet.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/birt/docs/en/images/BirtSupport/12NewDataSet.png
===================================================================
(Binary files differ)
Property changes on: trunk/birt/docs/en/images/BirtSupport/12NewDataSet.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/birt/docs/en/images/BirtSupport/13NewDataSet.png
===================================================================
(Binary files differ)
Property changes on: trunk/birt/docs/en/images/BirtSupport/13NewDataSet.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/birt/docs/en/images/BirtSupport/14SQLQuery.png
===================================================================
(Binary files differ)
Property changes on: trunk/birt/docs/en/images/BirtSupport/14SQLQuery.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 3 months