JBoss Tools SVN: r8441 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-05-29 10:53:26 -0400 (Thu, 29 May 2008)
New Revision: 8441
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/RichFacesFileUploadTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPickListTemplate.java
Log:
Junits for http://jira.jboss.com/jira/browse/JBIDE-2196
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-05-29 14:38:57 UTC (rev 8440)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-05-29 14:53:26 UTC (rev 8441)
@@ -25,7 +25,6 @@
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
-import org.jboss.tools.vpe.xulrunner.browser.util.DOMTreeDumper;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java 2008-05-29 14:38:57 UTC (rev 8440)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java 2008-05-29 14:53:26 UTC (rev 8441)
@@ -12,7 +12,6 @@
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
-import org.jboss.tools.vpe.xulrunner.browser.util.DOMTreeDumper;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2008-05-29 14:38:57 UTC (rev 8440)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2008-05-29 14:53:26 UTC (rev 8441)
@@ -18,7 +18,6 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.xulrunner.browser.util.DOMTreeDumper;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java 2008-05-29 14:38:57 UTC (rev 8440)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java 2008-05-29 14:53:26 UTC (rev 8441)
@@ -17,11 +17,9 @@
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.HTML;
-import org.jboss.tools.vpe.xulrunner.browser.util.DOMTreeDumper;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPickListTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPickListTemplate.java 2008-05-29 14:38:57 UTC (rev 8440)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPickListTemplate.java 2008-05-29 14:53:26 UTC (rev 8441)
@@ -29,7 +29,6 @@
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
-import org.jboss.tools.vpe.xulrunner.browser.util.DOMTreeDumper;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMText;
15 years, 11 months
JBoss Tools SVN: r8440 - in trunk/documentation/jboss-tools-docs: index and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-05-29 10:38:57 -0400 (Thu, 29 May 2008)
New Revision: 8440
Added:
trunk/documentation/jboss-tools-docs/index/
trunk/documentation/jboss-tools-docs/index/master.xml
trunk/documentation/jboss-tools-docs/index/pom.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-344 - applying org styles to nightly docs page
Added: trunk/documentation/jboss-tools-docs/index/master.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/index/master.xml (rev 0)
+++ trunk/documentation/jboss-tools-docs/index/master.xml 2008-05-29 14:38:57 UTC (rev 8440)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd">
+<book>
+ <bookinfo>
+ <title>JBoss Tools Guides - Latest Version</title>
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ </bookinfo>
+ <itemizedlist>
+
+ <listitem>
+ <para>Getting Started with JBoss Developer Studio Guide
+ <ulink url="../../en/GettingStartedGuide/html/index.html">(html)</ulink>
+ <ulink url="../../en/GettingStartedGuide/html_single/index.html">(html single)</ulink>
+ <ulink url="../../en/GettingStartedGuide/pdf/Getting_Started_Guide.pdf">(pdf)</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Seam Dev Tools Reference Guide
+ <ulink url="../../en/seam/html/index.html">(html)</ulink>
+ <ulink url="../../en/seam/html_single/index.html">(html single)</ulink>
+ <ulink url="../../en/seam/pdf/Seam_Reference_Guide.pdf">(pdf)</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Visual Web Tools Reference Guide
+ <ulink url="../../en/jsf/html/index.html">(html)</ulink>
+ <ulink url="../../en/jsf/html_single/index.html">(html single)</ulink>
+ <ulink url="../../en/jsf/pdf/Visual_Web_Tools_Reference_Guide.pdf">(pdf)</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>JBoss Server Manager Reference Guide
+ <ulink url="../../en/as/html/index.html">(html)</ulink>
+ <ulink url="../../en/as/html_single/index.html">(html single)</ulink>
+ <ulink url="../../en/as/pdf/AS_Reference_Guide.pdf">(pdf)</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>jBPM Tools Reference Guide
+ <ulink url="../../en/jbpm/html/index.html">(html)</ulink>
+ <ulink url="../../en/jbpm/html_single/index.html">(html single)</ulink>
+ <ulink url="../../en/jbpm/pdf/JBPM_Reference_Guide.pdf">(pdf)</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Hibernate Tools Reference Guide
+ <ulink url="../../en/hibernatetools/html/index.html">(html)</ulink>
+ <ulink url="../../en/hibernatetools/html_single/index.html">(html single)</ulink>
+ <ulink url="../../en/hibernatetools/pdf/Hibernatetools_Reference_Guide.pdf">(pdf)</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>ESB Editor Reference Guide
+ <ulink url="../../en/esb_ref_Guide/html/index.html">(html)</ulink>
+ <ulink url="../../en/esb_ref_Guide/html_single/index.html">(html single)</ulink>
+ <ulink url="../../en/esb_ref_Guide/pdf/Hibernatetools_Reference_Guide.pdf">(pdf)</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>JSF Tools Reference Guide
+ <ulink url="../../en/jsf_tools_ref_Guide/html/index.html">(html)</ulink>
+ <ulink url="../../en/jsf_tools_ref_Guide/html_single/index.html">(html single)</ulink>
+ <ulink url="../../en/jsf_tools_ref_Guide/pdf/JSF_Tools_Reference_Guide.pdf">(pdf)</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>JSF Tools Tutorial
+ <ulink url="../../en/jsf_tools_tutorial/html/index.html">(html)</ulink>
+ <ulink url="../../en/jsf_tools_tutorial/html_single/index.html">(html single)</ulink>
+ <ulink url="../../en/jsf_tools_tutorial/pdf/JSF_Tools_Tutorial.pdf">(pdf)</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>Struts Tools Reference Guide
+ <ulink url="../../en/struts_tools_ref_Guide/html/index.html">(html)</ulink>
+ <ulink url="../../en/struts_tools_ref_Guide/html_single/index.html">(html single)</ulink>
+ <ulink url="../../en/struts_tools_ref_Guide/pdf/Struts_Tools_Reference_Guide.pdf">(pdf)</ulink>
+ </para>
+ </listitem>
+
+
+ <listitem>
+ <para>Struts Tools Tutorial
+ <ulink url="../../en/struts_tools_tutorial/html/index.html">(html)</ulink>
+ <ulink url="../../en/struts_tools_tutorial/html_single/index.html">(html single)</ulink>
+ <ulink url="../../en/struts_tools_tutorial/pdf/Struts_Tools_Tutorial.pdf">(pdf)</ulink>
+ </para>
+ </listitem>
+
+
+ <listitem>
+ <para>Exadel Studio Migration Guide
+ <ulink url="../../en/Exadel-migration/html/index.html">(html)</ulink>
+ <ulink url="../../en/Exadel-migration/html_single/index.html">(html single)</ulink>
+ <ulink url="../../en/Exadel-migration/pdf/Exadel_Studio_Migration_Guide.pdf">(pdf)</ulink>
+ </para>
+ </listitem>
+
+ </itemizedlist>
+</book>
Added: trunk/documentation/jboss-tools-docs/index/pom.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/index/pom.xml (rev 0)
+++ trunk/documentation/jboss-tools-docs/index/pom.xml 2008-05-29 14:38:57 UTC (rev 8440)
@@ -0,0 +1,84 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>all-guides-index</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jdocbook</packaging>
+ <name>All_Userguides_index</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>2.1.0-200803311251UTC-MPJDOCBOOK-8</version>
+
+ <extensions>true</extensions>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossorg-docbook-xslt</artifactId>
+ <version>1.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossorg-jdocbook-style</artifactId>
+ <version>1.1.0</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+
+ <configuration>
+ <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDirectory>${pom.basedir}</sourceDirectory>
+ <cssResource>
+ <directory>${pom.basedir}/${cssdir}</directory>
+ </cssResource>
+
+ <formats>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>file:${pom.basedir}/${stylesdir}/xslt/org/jboss/tools/xhtml.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ <options>
+ <xincludeSupported>true</xincludeSupported>
+ <xmlTransformerType>saxon</xmlTransformerType>
+ <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
+ <!-- could also locate the docbook dependency and inspect its version... -->
+ <docbookVersion>1.72.0</docbookVersion>
+ </options>
+
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <properties>
+ <stylesdir>../../jbosstools-docbook-xslt/src/main/resources/</stylesdir>
+ <cssdir>../../jbosstools-jdocbook-style/src/main/org/css/</cssdir>
+ <translation>en-US</translation>
+ </properties>
+
+</project>
15 years, 11 months
JBoss Tools SVN: r8439 - trunk/documentation/jboss-tools-docs.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-05-29 10:38:43 -0400 (Thu, 29 May 2008)
New Revision: 8439
Modified:
trunk/documentation/jboss-tools-docs/all-guides.xml
trunk/documentation/jboss-tools-docs/pom.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-344 - applying org styles to nightly docs page
Modified: trunk/documentation/jboss-tools-docs/all-guides.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/all-guides.xml 2008-05-29 14:29:48 UTC (rev 8438)
+++ trunk/documentation/jboss-tools-docs/all-guides.xml 2008-05-29 14:38:43 UTC (rev 8439)
@@ -22,17 +22,17 @@
-->
<fileSets>
<fileSet>
- <directory>.</directory>
- <outputDirectory>../</outputDirectory>
- <filtered>false</filtered>
- <lineEnding>keep</lineEnding>
- <includes>
- <include>index.html</include>
- </includes>
- <useStrictFiltering>false</useStrictFiltering>
- <useDefaultExcludes>true</useDefaultExcludes>
- <fileMode>0644</fileMode>
- <directoryMode>0755</directoryMode>
+ <directory>index/target/docbook/publish/en-US</directory>
+ <outputDirectory>../index</outputDirectory>
+ <filtered>false</filtered>
+ <lineEnding>keep</lineEnding>
+ <includes>
+ <include>**/*.*</include>
+ </includes>
+ <useStrictFiltering>false</useStrictFiltering>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <fileMode>0644</fileMode>
+ <directoryMode>0755</directoryMode>
</fileSet>
<fileSet>
<directory>../guides/Exadel-migration/target/docbook/publish/en-US</directory>
@@ -205,7 +205,7 @@
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</fileSet>
- <fileSet>
+ <fileSet>
<directory>../../esb/docs/esb_ref_guide/target/docbook/publish/en-US</directory>
<outputDirectory>/esb_ref_guide</outputDirectory>
<filtered>false</filtered>
@@ -218,6 +218,6 @@
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</fileSet>
- </fileSets>
+ </fileSets>
</assembly>
\ No newline at end of file
Modified: trunk/documentation/jboss-tools-docs/pom.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/pom.xml 2008-05-29 14:29:48 UTC (rev 8438)
+++ trunk/documentation/jboss-tools-docs/pom.xml 2008-05-29 14:38:43 UTC (rev 8439)
@@ -23,6 +23,7 @@
<module>../../struts/docs/struts_tools_ref_guide</module>
<module>../../struts/docs/struts_tools_tutorial</module>
<module>../../esb/docs/esb_ref_guide</module>
+ <module>index</module>
</modules>
<build>
15 years, 11 months
JBoss Tools SVN: r8438 - in trunk/seam/plugins/org.jboss.tools.seam.pages.xml: resources/meta and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-05-29 10:29:48 -0400 (Thu, 29 May 2008)
New Revision: 8438
Added:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages-wizards.meta
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/SeamPagesXMLMessages.java
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/messages.properties
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessHelper.java
Log:
JBIDE-1189
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/plugin.xml 2008-05-29 14:29:29 UTC (rev 8437)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/plugin.xml 2008-05-29 14:29:48 UTC (rev 8438)
@@ -66,6 +66,9 @@
class="org.jboss.tools.seam.pages.xml.model.handlers.OpenPageHandler"/>
<xclass id="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"
class="org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler"/>
+
+ <xclass id="org.jboss.tools.seam.pages.xml.model.handlers.AddViewSupport"
+ class="org.jboss.tools.seam.pages.xml.model.handlers.AddViewSupport"/>
</extension>
<extension point="org.eclipse.wst.xml.core.catalogContributions">
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages-wizards.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages-wizards.meta 2008-05-29 14:29:29 UTC (rev 8437)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages-wizards.meta 2008-05-29 14:29:48 UTC (rev 8438)
@@ -89,4 +89,30 @@
<XActionItem kind="list"/>
<XDependencies/>
</XModelEntity>
+ <XModelEntity name="SeamPagesAddViewWizard">
+ <XChildrenEntities/>
+ <XEntityRenderer/>
+ <XModelAttributes>
+ <XModelAttribute name="view id">
+ <Constraint loader="Tree">
+ <value name="JSFPageTree"/>
+ <value name="extensions=jsp,html,htm,xhtml"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
+ <XModelAttribute default="true" name="create file">
+ <Constraint loader="List">
+ <value name="true"/>
+ <value name="false"/>
+ </Constraint>
+ <Editor name="CheckBox"/>
+ </XModelAttribute>
+ <XModelAttribute name="template">
+ <Constraint loader="ListString"/>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list"/>
+ <XDependencies/>
+ </XModelEntity>
</XModelEntityGroup>
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta 2008-05-29 14:29:29 UTC (rev 8437)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta 2008-05-29 14:29:48 UTC (rev 8438)
@@ -2809,7 +2809,17 @@
</XModelAttribute>
</XModelAttributes>
<XActionItem kind="list">
- <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions"/>
+ <XActionItem ICON="action.empty" displayName="New" kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%SpecialWizard%" ICON="action.empty"
+ PROPERTIES="support=org.jboss.tools.seam.pages.xml.model.handlers.AddViewSupport"
+ displayName="New Page..." kind="action" name="AddPage">
+ <EntityData EntityName="SeamPagesAddViewWizard">
+ <AttributeData AttributeName="view id" Mandatory="no"/>
+ <AttributeData AttributeName="create file" Mandatory="no"/>
+ <AttributeData AttributeName="template" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
<XActionItem HIDE="always"
HandlerClassName="org.jboss.tools.jsf.model.handlers.CreateCommentHandler"
ICON="action.empty" WizardClassName="%OneParameter%"
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/SeamPagesXMLMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/SeamPagesXMLMessages.java 2008-05-29 14:29:29 UTC (rev 8437)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/SeamPagesXMLMessages.java 2008-05-29 14:29:48 UTC (rev 8438)
@@ -3,12 +3,21 @@
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-public class SeamPagesXMLMessages {
+import org.eclipse.osgi.util.NLS;
+
+public class SeamPagesXMLMessages extends NLS {
private static final String BUNDLE_NAME = "org.jboss.tools.seam.pages.xml.messages"; //$NON-NLS-1$
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
.getBundle(BUNDLE_NAME);
+ public static String WARNING;
+ public static String ATTRIBUTE_VIEW_ID_IS_NOT_CORRECT;
+ public static String TEMPLATE_IS_NOT_SPECIFIED;
+ public static String TEMPLATE_DOES_NOT_EXIST;
+ public static String THE_VIEW_WITH_PATH_IS_ALREADY_CREATED;
+ public static String TEMPLATE_IS_NOT_FOUND;
+
private SeamPagesXMLMessages() {
}
@@ -19,4 +28,10 @@
return '!' + key + '!';
}
}
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, SeamPagesXMLMessages.class);
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/messages.properties 2008-05-29 14:29:29 UTC (rev 8437)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/messages.properties 2008-05-29 14:29:48 UTC (rev 8438)
@@ -1 +1,7 @@
SEAM_PAGES_XML_PLUGIN_NO_MESSAGE=No message
+WARNING = Warning
+ATTRIBUTE_VIEW_ID_IS_NOT_CORRECT=Attribute 'view id' is not correct
+TEMPLATE_IS_NOT_SPECIFIED = Template is not specified
+TEMPLATE_DOES_NOT_EXIST = Template does not exist.
+THE_VIEW_WITH_PATH_IS_ALREADY_CREATED = The View with 'view id' '{0}' is already created.\n
+TEMPLATE_IS_NOT_FOUND = Template {0} is not found.
Added: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java 2008-05-29 14:29:48 UTC (rev 8438)
@@ -0,0 +1,339 @@
+/*******************************************************************************
+ * 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.seam.pages.xml.model.handlers;
+
+import java.io.File;
+import java.util.Properties;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.common.meta.action.impl.DefaultWizardDataValidator;
+import org.jboss.tools.common.meta.action.impl.SpecialWizardSupport;
+import org.jboss.tools.common.meta.action.impl.WizardDataValidator;
+import org.jboss.tools.common.meta.action.impl.handlers.DefaultCreateHandler;
+import org.jboss.tools.common.model.ServiceDialog;
+import org.jboss.tools.common.model.XModelException;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.filesystems.impl.FileSystemImpl;
+import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.model.util.FindObjectHelper;
+import org.jboss.tools.common.model.util.ModelFeatureFactory;
+import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.jst.web.model.ReferenceObject;
+import org.jboss.tools.jst.web.project.helpers.AbstractWebProjectTemplate;
+import org.jboss.tools.seam.pages.xml.SeamPagesXMLMessages;
+import org.jboss.tools.seam.pages.xml.SeamPagesXMLPlugin;
+import org.jboss.tools.seam.pages.xml.model.SeamPagesConstants;
+import org.jboss.tools.seam.pages.xml.model.helpers.SeamPagesProcessHelper;
+
+public class AddViewSupport extends SpecialWizardSupport implements SeamPagesConstants {
+ public static String JSF_ADD_VIEW_PATH = ""; //preference name
+ AbstractWebProjectTemplate templates = (AbstractWebProjectTemplate)ModelFeatureFactory.getInstance().createFeatureInstance("org.jboss.tools.jsf.web.JSFTemplate");
+ static String LAST_CREATE_FILE_PREFERENCE = "org.jboss.tools.jsf.lastCreateFileValue";
+ XModelObject sample;
+
+ public void reset() {
+ sample = (XModelObject)getProperties().get("sample");
+ if(sample != null) {
+ setAttributeValue(0, ATTR_VIEW_ID, sample.getAttributeValue(ATTR_PATH));
+ }
+ if(templates != null) {
+ templates.updatePageTemplates();
+ String[] s = templates.getPageTemplateList();
+ setValueList(0, "template", s);
+ //take from preferences
+ setAttributeValue(0, "template", getDefaultTemplate(s));
+ }
+ //TODO combine this feature with jsf
+ String last = SeamPagesXMLPlugin.getDefault().getPluginPreferences().getString(LAST_CREATE_FILE_PREFERENCE);
+ if(last == null || last.length() == 0) {
+ last = "true";
+ } else if(!"true".equals(last)) {
+ last = "false";
+ }
+ setAttributeValue(0, "create file", last);
+ }
+
+ static XModelObject getPreferenceObject() {
+ return PreferenceModelUtilities.getPreferenceModel().getByPath(JSF_ADD_VIEW_PATH);
+ }
+
+ public String getDefaultTemplate(String[] list) {
+ if(list.length == 0) return "";
+ XModelObject addView = getPreferenceObject();
+ String v = (addView == null) ? "" : addView.getAttributeValue("Page Template");
+ if(v != null) for (int i = 0; i < list.length; i++) if(v.equals(list[i])) return list[i];
+ return list[0];
+ }
+
+ public String getExtension(String template) {
+ if(template != null) {
+ int i = template.trim().lastIndexOf('.');
+ if(i > 0) {
+ return template.trim().substring(i);
+ }
+ }
+ return getExtension();
+ }
+
+ public static String getExtension() {
+ XModelObject addView = getPreferenceObject();
+ String v = (addView == null) ? "" : addView.getAttributeValue("Extension");
+ if(v == null || v.length() == 0) return ".jsp";
+ if(!v.startsWith(".")) v = "." + v;
+ return v;
+ }
+
+ public void action(String name) throws XModelException {
+ if(FINISH.equals(name)) {
+ execute();
+ setFinished(true);
+ } else if(CANCEL.equals(name)) {
+ setFinished(true);
+ }
+ }
+
+ public String[] getActionNames(int stepId) {
+ return new String[]{FINISH, CANCEL, HELP};
+ }
+
+ protected void execute() throws XModelException {
+ boolean doNotCreateEmptyRule = false; //"yes".equals(JSFPreference.DO_NOT_CREATE_EMPTY_RULE.getValue());
+ Properties p = extractStepData(0);
+ String path = p.getProperty(ATTR_VIEW_ID);
+ path = revalidatePath(path, getAttributeValue(0, "template"));
+
+ createFile(path);
+
+ XModelObject m = getTarget().getParent().getChildByPath(FOLDER_PAGES);
+ String pp = SeamPagesProcessHelper.toNavigationRulePathPart(path);
+ boolean isPattern = SeamPagesProcessHelper.isPattern(path);
+ boolean existsR = m.getChildByPath(path) != null; // m.getRuleCount(path) != 0;
+ boolean existsV = findView(path) != null;
+
+ boolean exists = existsR || existsV;
+ if(exists) {
+ ServiceDialog d = getTarget().getModel().getService();
+ String message = NLS.bind(SeamPagesXMLMessages.THE_VIEW_WITH_PATH_IS_ALREADY_CREATED, path);
+ if(existsR) {
+// message += JSFUIMessages.YOU_WANT_TO_ADD_ADDITIONAL_NAVIGATION_RULE_WITH_SAME_FROM_VIEW_ID;
+ //Do not support
+ } else if(existsV && isPattern) {
+// message += JSFUIMessages.YOU_WANT_TO_CREATE_AN_ADDITIONAL_VIEW_WITH_THE_SAME_FROM_VIEW_ID;
+ //Do not support
+ } else {
+// message += JSFUIMessages.YOU_WANT_TO_CREATE_A_NAVIGATION_RULE_FOR_THIS_FROM_VIEW_ID;
+ //Do not support
+ }
+ int q = d.showDialog(SeamPagesXMLMessages.WARNING, message, new String[]{OK/*, CANCEL*/}, null, ServiceDialog.WARNING);
+// if(q != 0) return;
+ return;
+ }
+
+ XModelObject created = null;
+ if(!doNotCreateEmptyRule || (exists && !isPattern) || sample != null) {
+ XModelObject rule = addPage(m, path); // m.addRule(path);
+ addCasesFromSample(rule);
+ m.setModified(true);
+ created = getTarget().getChildByPath(pp);
+ } else {
+ created = getTarget().getModel().createModelObject(SeamPagesConstants.ENT_PROCESS_ITEM, null);
+ String ppi = pp;
+// if(exists && SeamPagesProcessHelper.isPattern(path)) {
+// int index = -1;
+// while(getTarget().getChildByPath(ppi + ":" + index) != null) index--;
+// ppi = ppi + ":" + index;
+// }
+ created.setAttributeValue(SeamPagesConstants.ATTR_NAME, ppi);
+ created.setAttributeValue(SeamPagesConstants.ATTR_PATH, path);
+ created.setAttributeValue("persistent", "true");
+ DefaultCreateHandler.addCreatedObject(getTarget(), created, getProperties());
+ }
+
+ if(!exists || isPattern) {
+ String shape = getShape();
+ if(created != null && shape != null) created.setAttributeValue("shape", shape);
+ }
+ if(created != null) {
+ FindObjectHelper.findModelObject(created, FindObjectHelper.IN_EDITOR_ONLY);
+ }
+ }
+
+ private XModelObject addPage(XModelObject pages, String path) {
+ String childEntity = pages.getModelEntity().getChildren()[0].getName();
+ XModelObject page = pages.getModel().createModelObject(childEntity, null);
+ page.setAttributeValue(ATTR_VIEW_ID, path);
+ pages.addChild(page);
+ return page;
+ }
+
+ private XModelObject findView(String path) {
+ String pp = SeamPagesProcessHelper.toNavigationRulePathPart(path);
+ XModelObject o = getTarget().getChildByPath(pp);
+ if(o != null) return o;
+ if(!SeamPagesProcessHelper.isPattern(path)) return null;
+ XModelObject[] cs = getTarget().getChildren();
+ for (int i = 0; i < cs.length; i++) {
+ String p = cs[i].getPathPart();
+ if(pp.equals(p) || p.startsWith(pp + ":")) return cs[i];
+ }
+ return null;
+ }
+
+ private void addCasesFromSample(XModelObject rule) {
+ if(!(sample instanceof ReferenceObject)) return;
+ XModelObject rs = ((ReferenceObject)sample).getReference();
+ if(rs == null) return;
+ XModelObject[] cs = rs.getChildren();
+ for (int j = 0; j < cs.length; j++) {
+ rule.addChild(cs[j].copy());
+ }
+
+ }
+
+ private String getShape() {
+ String x = getProperties().getProperty("process.mouse.x");
+ String y = getProperties().getProperty("process.mouse.y");
+ return (x == null || y == null) ? null : x + "," + y + ",0,0";
+ }
+
+ public static String revalidatePath(String path) {
+ if(path != null) path = path.trim();
+ if(path == null || path.length() == 0) return path;
+ if(!path.startsWith("/") && !path.startsWith("*")) path = "/" + path;
+ if(path.indexOf('*') >= 0) return path;
+ if(path.indexOf('.') < 0 && !path.endsWith("/")) {
+ path += getExtension();
+ }
+ return path;
+ }
+
+ String revalidatePath(String path, String template) {
+ if(path != null) path = path.trim();
+ if(path == null || path.length() == 0) return path;
+ if(!path.startsWith("/") && !path.startsWith("*")) path = "/" + path;
+ if(path.indexOf('*') >= 0) return path;
+ if(path.indexOf('.') < 0 && !path.endsWith("/")) {
+ path += getExtension(template);
+ }
+ return path;
+ }
+
+ public boolean canCreateFile(String path) {
+ XModelObject fs = getTarget().getModel().getByPath("FileSystems/WEB-ROOT");
+ if(fs == null) return false;
+ path = revalidatePath(path, getAttributeValue(0, "template"));
+ if(path == null || path.length() == 0 || path.indexOf('*') >= 0) return false;
+ return isCorrectPath(path) && !fileExists(path);
+ }
+
+ static String FORBIDDEN_INDICES = "\"\n\t*\\:<>?|";
+
+ static boolean isCorrectPath(String path) {
+ if(path == null || path.equals("/") || path.indexOf("//") >= 0) return false;
+ if(path.endsWith("/") || path.indexOf("../") >= 0) return false;
+ if(path.endsWith("..")) return false;
+ if(path.equals("*")) return true;
+ for (int i = 0; i < FORBIDDEN_INDICES.length(); i++) {
+ if(path.indexOf(FORBIDDEN_INDICES.charAt(i)) >= 0) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ boolean fileExists(String path) {
+ return getTarget().getModel().getByPath(path) != null;
+ }
+
+ void createFile(String path) throws XModelException {
+ if(!canCreateFile(path)) return;
+ String lastCreateFileValue = getAttributeValue(0, "create file");
+ SeamPagesXMLPlugin.getDefault().getPluginPreferences().setDefault(LAST_CREATE_FILE_PREFERENCE, lastCreateFileValue);
+ if(!"true".equals(lastCreateFileValue)) return;
+ String template = getAttributeValue(0, "template");
+ if(template != null) template = template.trim();
+ File fs = null;
+ if(templates != null) {
+ fs = (File)templates.getPageTemplates().get(template);
+ if(fs == null || !fs.isFile()) throw new XModelException(NLS.bind(SeamPagesXMLMessages.TEMPLATE_IS_NOT_FOUND, template));
+ }
+ String location = ((FileSystemImpl)getTarget().getModel().getByPath("FileSystems/WEB-ROOT")).getAbsoluteLocation();
+ location += path;
+ File ft = new File(location);
+ ft.getParentFile().mkdirs();
+ if(fs != null) FileUtil.copyFile(fs, ft);
+ getTarget().getModel().update();
+ try {
+ EclipseResourceUtil.getResource(getTarget()).getProject().refreshLocal(IProject.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ throw new XModelException(e);
+ }
+ }
+
+ protected DefaultWizardDataValidator viewValidator = new ViewValidator();
+
+ public WizardDataValidator getValidator(int step) {
+ viewValidator.setSupport(this, step);
+ return viewValidator;
+ }
+
+ class ViewValidator extends DefaultWizardDataValidator {
+ public void validate(Properties data) {
+ super.validate(data);
+ if(message != null) return;
+ String path = revalidatePath(data.getProperty(SeamPagesConstants.ATTR_VIEW_ID), data.getProperty("template"));
+ if(!isCorrectPath(path)) {
+ message = SeamPagesXMLMessages.ATTRIBUTE_VIEW_ID_IS_NOT_CORRECT;
+ }
+ if(message != null) return;
+
+ String template = data.getProperty("template");
+ if(template != null && isFieldEditorEnabled(0, "template", data)) {
+ if(template.trim().length() == 0) {
+ message = SeamPagesXMLMessages.TEMPLATE_IS_NOT_SPECIFIED;
+ return;
+ }
+ if (templates != null) {
+ File templateFile = (File) templates.getPageTemplates()
+ .get(template.trim());
+ if (templateFile == null || !templateFile.isFile()) {
+ message = SeamPagesXMLMessages.TEMPLATE_DOES_NOT_EXIST;
+ }
+ }
+ }
+ if(message != null) return;
+
+ boolean doNotCreateEmptyRule = false; //"yes".equals(JSFPreference.DO_NOT_CREATE_EMPTY_RULE.getValue());
+ String pp = SeamPagesProcessHelper.toNavigationRulePathPart(path);
+ boolean exists = getTarget().getChildByPath(pp) != null;
+ if(doNotCreateEmptyRule && exists /*&& !SeamPagesProcessHelper.isPattern(path)*/) {
+ message = "View exists."; //JSFUIMessages.THE_VIEW_EXISTS;
+ }
+
+ }
+ }
+
+ public boolean isFieldEditorEnabled(int stepId, String name, Properties values) {
+ String path = values.getProperty(ATTR_VIEW_ID);
+ boolean c = canCreateFile(path);
+ if(name.equals("create file")) {
+ return c;
+ }
+ boolean g = c && "true".equals(values.getProperty("create file"));
+ if(name.equals("template")) {
+ return g;
+ }
+ return true;
+ }
+
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessHelper.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessHelper.java 2008-05-29 14:29:29 UTC (rev 8437)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessHelper.java 2008-05-29 14:29:48 UTC (rev 8438)
@@ -362,4 +362,9 @@
int i = pathpart.lastIndexOf(':');
return (i < 0) ? pathpart : pathpart.substring(0, i);
}
+
+ public static boolean isPattern(String path) {
+ return path != null && (path.length() == 0 || path.indexOf('*') >= 0);
+ }
+
}
15 years, 11 months
JBoss Tools SVN: r8437 - in trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor: dnd and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-05-29 10:29:29 -0400 (Thu, 29 May 2008)
New Revision: 8437
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/DndHelper.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/FileTransferDropTargetListener.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/PagesTemplateTransferDropTargetListener.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/XModelTransferDropTargetListener.java
Removed:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/FakePageEditor.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesContextMenuProvider.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesEditor.java
Log:
JBIDE-1189
Deleted: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/FakePageEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/FakePageEditor.java 2008-05-29 14:28:56 UTC (rev 8436)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/FakePageEditor.java 2008-05-29 14:29:29 UTC (rev 8437)
@@ -1,21 +0,0 @@
-package org.jboss.tools.seam.ui.pages.editor;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.ui.IEditorInput;
-
-public class FakePageEditor implements IAdaptable {
-
- public FakePageEditor(IEditorInput input) {}
-
- public ISelectionProvider getModelSelectionProvider() {
- return null;
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- public void dispose() {}
-
-}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesContextMenuProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesContextMenuProvider.java 2008-05-29 14:28:56 UTC (rev 8436)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesContextMenuProvider.java 2008-05-29 14:29:29 UTC (rev 8437)
@@ -107,7 +107,7 @@
LinkEditPart part = (LinkEditPart)selected;
Object partModel = part.getModel();
if(partModel instanceof Link) {
-// return (XModelObject)((Link)partModel).getData();
+ return (XModelObject)((Link)partModel).getData();
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesEditor.java 2008-05-29 14:28:56 UTC (rev 8436)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesEditor.java 2008-05-29 14:29:29 UTC (rev 8437)
@@ -25,8 +25,6 @@
import org.eclipse.core.resources.ResourcesPlugin;
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.draw2d.ConnectionLayer;
import org.eclipse.draw2d.FigureCanvas;
import org.eclipse.draw2d.FreeformViewport;
@@ -108,6 +106,9 @@
import org.jboss.tools.seam.pages.xml.model.helpers.SeamPagesProcessStructureHelper;
import org.jboss.tools.seam.ui.pages.SeamUIPagesMessages;
import org.jboss.tools.seam.ui.pages.SeamUiPagesPlugin;
+import org.jboss.tools.seam.ui.pages.editor.dnd.FileTransferDropTargetListener;
+import org.jboss.tools.seam.ui.pages.editor.dnd.PagesTemplateTransferDropTargetListener;
+import org.jboss.tools.seam.ui.pages.editor.dnd.XModelTransferDropTargetListener;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesElement;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesModel;
@@ -122,8 +123,6 @@
public class PagesEditor extends GEFEditor implements PagesModelListener{
-
-
protected void createPaletteViewer(Composite parent) {
PaletteViewer viewer = new PaletteViewer();
PagesPaletteViewerPreferences prefs = new PagesPaletteViewerPreferences(
@@ -414,17 +413,17 @@
protected void initializeGraphicalViewer() {
getGraphicalViewer().setContents(getPagesModel());
-// getGraphicalViewer().addDropTargetListener(
-// new XModelTransferDropTargetListener(this));
-//
-// getGraphicalViewer().addDropTargetListener(
-// new FileTransferDropTargetListener(this));
+ getGraphicalViewer().addDropTargetListener(
+ new XModelTransferDropTargetListener(this));
-// getGraphicalViewer()
-// .addDropTargetListener(
-// (TransferDropTargetListener) new JSFTemplateTransferDropTargetListener(
-// getGraphicalViewer()));
+ getGraphicalViewer().addDropTargetListener(
+ new FileTransferDropTargetListener(this));
+ getGraphicalViewer()
+ .addDropTargetListener(
+ (TransferDropTargetListener) new PagesTemplateTransferDropTargetListener(
+ getGraphicalViewer()));
+
((ConnectionLayer) ((ScalableFreeformRootEditPart) getGraphicalViewer()
.getRootEditPart())
.getLayer(ScalableFreeformRootEditPart.CONNECTION_LAYER))
@@ -620,8 +619,7 @@
LinkEditPart part = (LinkEditPart) selected;
Object partModel = part.getModel();
if (partModel instanceof Link) {
-//TODO
-// return (XModelObject) ((Link) partModel).getSource();
+ return (XModelObject) ((Link)partModel).getData();
}
}
Added: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/DndHelper.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/DndHelper.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/DndHelper.java 2008-05-29 14:29:29 UTC (rev 8437)
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * 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.seam.ui.pages.editor.dnd;
+
+import java.util.Properties;
+
+import org.jboss.tools.common.model.XModelException;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.XModelTransferBuffer;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.jboss.tools.common.model.ui.dnd.DnDUtil;
+import org.jboss.tools.common.meta.action.XAction;
+import org.jboss.tools.seam.ui.pages.SeamUiPagesPlugin;
+
+public class DndHelper{
+
+ public DndHelper() {
+ }
+
+ public static boolean drag(Object source) {
+ if (source == null)
+ return false;
+ XAction copy = (XAction) DnDUtil.getEnabledAction(
+ (XModelObject) source, null, "CopyActions.Copy");
+ if (copy == null)
+ return false;
+ XModelTransferBuffer.getInstance().enable();
+ Properties properties = new Properties();
+ properties.setProperty("isDrop", "true");
+ properties.setProperty("isDrag", "true");
+ properties.setProperty("actionSourceGUIComponentID", "editor");
+ try {
+ copy.executeHandler((XModelObject) source, properties);
+ } catch (XModelException e) {
+ SeamUiPagesPlugin.getDefault().logError(e);
+ XModelTransferBuffer.getInstance().disable();
+ return false;
+ }
+ return true;
+ }
+
+ public static void dragEnd() {
+ XModelTransferBuffer.getInstance().disable();
+ }
+
+ public static void drop(Object target, Point point) {
+ if (target == null)
+ return;
+ Properties properties = new Properties();
+ properties.setProperty("isDrop", "true");
+ properties.setProperty("actionSourceGUIComponentID", "editor");
+ if (point != null) {
+ properties.put("process.mouse.x", "" + point.x);
+ properties.put("process.mouse.y", "" + point.y);
+ }
+ try {
+ DnDUtil.paste((XModelObject) target, properties);
+ } catch (XModelException ex) {
+ SeamUiPagesPlugin.getDefault().logError(ex);
+ }
+ }
+
+ public static void drop(Object target) {
+ drop(target, null);
+ }
+
+ public static boolean isDropEnabled(Object target) {
+ return DnDUtil.isPasteEnabled((XModelObject) target);
+ }
+
+}
Added: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/FileTransferDropTargetListener.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/FileTransferDropTargetListener.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/FileTransferDropTargetListener.java 2008-05-29 14:29:29 UTC (rev 8437)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * 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.seam.ui.pages.editor.dnd;
+
+import java.io.File;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.jface.util.TransferDropTargetListener;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.Transfer;
+
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.seam.ui.pages.editor.PagesEditor;
+import org.jboss.tools.seam.ui.pages.editor.edit.PagesDiagramEditPart;
+
+public class FileTransferDropTargetListener implements TransferDropTargetListener {
+ PagesEditor editor;
+ boolean baseDropAccept = false;
+
+ public FileTransferDropTargetListener(PagesEditor editor) {
+ this.editor = editor;
+ }
+
+ public void dragOperationChanged(DropTargetEvent event) {
+
+ }
+
+ public void dragEnter(DropTargetEvent event) {
+ String[] os = (String[]) FileTransfer.getInstance().nativeToJava(
+ event.currentDataType);
+ if (os == null || os.length != 1 || !new File(os[0]).isFile())
+ return;
+ IFile f = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(
+ new Path(os[0]));
+ if (f == null || !f.exists())
+ return;
+ if (!DndHelper.drag(EclipseResourceUtil.getObjectByResource(f)))
+ return;
+
+ if (DndHelper.isDropEnabled(editor.getPagesModel().getData())) {
+ baseDropAccept = true;
+ } else {
+ baseDropAccept = false;
+ }
+ }
+
+ public void dragOver(DropTargetEvent event) {
+ if (!baseDropAccept)
+ event.detail = DND.DROP_NONE;
+ else
+ event.detail = DND.DROP_COPY;
+
+ }
+
+ public void dragLeave(DropTargetEvent event) {
+ }
+
+ public void dropAccept(DropTargetEvent event) {
+ }
+
+ public void drop(DropTargetEvent event) {
+ org.eclipse.swt.graphics.Point parentPoint = editor
+ .getScrollingGraphicalViewer().getControl().toControl(event.x,
+ event.y);
+ Point point = new Point(parentPoint.x, parentPoint.y);
+ ((PagesDiagramEditPart) editor.getScrollingGraphicalViewer()
+ .getRootEditPart().getChildren().get(0)).getFigure()
+ .translateToRelative(point);
+ DndHelper.drop(editor.getPagesModel().getData(), point);
+ }
+
+ public Transfer getTransfer() {
+ return FileTransfer.getInstance();
+ }
+
+ public boolean isEnabled(DropTargetEvent event) {
+ return true;
+ }
+
+}
Added: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/PagesTemplateTransferDropTargetListener.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/PagesTemplateTransferDropTargetListener.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/PagesTemplateTransferDropTargetListener.java 2008-05-29 14:29:29 UTC (rev 8437)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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.seam.ui.pages.editor.dnd;
+
+import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.dnd.TemplateTransferDropTargetListener;
+import org.eclipse.gef.requests.CreationFactory;
+
+public class PagesTemplateTransferDropTargetListener extends TemplateTransferDropTargetListener {
+
+ public PagesTemplateTransferDropTargetListener(EditPartViewer viewer) {
+ super(viewer);
+ }
+
+ protected CreationFactory getFactory(Object template) {
+ return new JSFTemplateFactory();
+ }
+
+ class JSFTemplateFactory implements CreationFactory {
+ public Object getNewObject() {
+ return "view";
+ }
+
+ public Object getObjectType() {
+ return String.class;
+ }
+ }
+
+}
Added: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/XModelTransferDropTargetListener.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/XModelTransferDropTargetListener.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/dnd/XModelTransferDropTargetListener.java 2008-05-29 14:29:29 UTC (rev 8437)
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * 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.seam.ui.pages.editor.dnd;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.jboss.tools.common.model.ui.dnd.ModelTransfer;
+import org.eclipse.gef.dnd.TemplateTransfer;
+import org.eclipse.jface.util.TransferDropTargetListener;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import java.io.File;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.jboss.tools.common.meta.action.XActionInvoker;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+
+import org.jboss.tools.seam.ui.pages.editor.PagesEditor;
+import org.jboss.tools.seam.ui.pages.editor.edit.PagesDiagramEditPart;
+
+public class XModelTransferDropTargetListener implements TransferDropTargetListener {
+ PagesEditor editor;
+
+ boolean baseDropAccept = false;
+
+ public XModelTransferDropTargetListener(PagesEditor editor) {
+ this.editor = editor;
+ }
+
+ public void dragOperationChanged(DropTargetEvent event) {
+
+ }
+
+ public void dragEnter(DropTargetEvent event) {
+ if (TemplateTransfer.getInstance().isSupportedType(
+ event.currentDataType)) {
+ baseDropAccept = true;
+ return;
+ } else if (FileTransfer.getInstance().isSupportedType(
+ event.currentDataType)) {
+ String[] os = (String[]) FileTransfer.getInstance().nativeToJava(
+ event.currentDataType);
+ if (os == null || os.length != 1 || !new File(os[0]).isFile())
+ return;
+ IFile f = ResourcesPlugin.getWorkspace().getRoot()
+ .getFileForLocation(new Path(os[0]));
+ if (f == null || !f.exists())
+ return;
+ if (!DndHelper.drag(EclipseResourceUtil.getObjectByResource(f)))
+ return;
+ }
+ if (DndHelper.isDropEnabled(editor.getPagesModel().getData())) {
+ baseDropAccept = true;
+ } else {
+ baseDropAccept = false;
+ }
+ }
+
+ public void dragOver(DropTargetEvent event) {
+ if (!baseDropAccept)
+ event.detail = DND.DROP_NONE;
+ else
+ event.detail = DND.DROP_COPY;
+ }
+
+ public void dragLeave(DropTargetEvent event) {
+ }
+
+ public void dropAccept(DropTargetEvent event) {
+ }
+
+ public void drop(DropTargetEvent event) {
+ org.eclipse.swt.graphics.Point parentPoint = editor
+ .getScrollingGraphicalViewer().getControl().toControl(event.x,
+ event.y);
+ Point point = new Point(parentPoint.x, parentPoint.y);
+
+ ((PagesDiagramEditPart) editor.getScrollingGraphicalViewer()
+ .getRootEditPart().getChildren().get(0)).getFigure()
+ .translateToRelative(point);
+ if (TemplateTransfer.getInstance().isSupportedType(
+ event.currentDataType)) {
+ Properties properties = new Properties();
+ if (point != null) {
+ properties.put("process.mouse.x", "" + point.x);
+ properties.put("process.mouse.y", "" + point.y);
+ }
+
+ XActionInvoker
+ .invoke("CreateActions.AddPage", (XModelObject) editor
+ .getPagesModel().getData(), properties);
+ return;
+ }
+ DndHelper.drop(editor.getPagesModel().getData(), point);
+ }
+
+ public Transfer getTransfer() {
+ return ModelTransfer.getInstance();
+ }
+
+ public boolean isEnabled(DropTargetEvent event) {
+ return true;
+ }
+
+}
15 years, 11 months
JBoss Tools SVN: r8436 - trunk/jsf/plugins/org.jboss.tools.jsf.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-05-29 10:28:56 -0400 (Thu, 29 May 2008)
New Revision: 8436
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
Log:
JBIDE-1189
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2008-05-29 13:56:18 UTC (rev 8435)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2008-05-29 14:28:56 UTC (rev 8436)
@@ -1903,6 +1903,9 @@
<xclass id="org.jboss.tools.jsf.model.helpers.autolayout.JSFItems"
class="org.jboss.tools.jsf.model.helpers.autolayout.JSFItems"/>
+
+ <xclass id="org.jboss.tools.jsf.web.JSFTemplate"
+ class="org.jboss.tools.jsf.web.JSFTemplate"/>
</extension>
<extension
point="org.eclipse.wst.common.project.facet.core.facets">
15 years, 11 months
JBoss Tools SVN: r8435 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor/context and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-05-29 09:56:18 -0400 (Thu, 29 May 2008)
New Revision: 8435
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/UpdateJobGroup.java
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/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
Log:
http://jira.jboss.org/jira/browse/JBIDE-675
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/UpdateJobGroup.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/UpdateJobGroup.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/UpdateJobGroup.java 2008-05-29 13:56:18 UTC (rev 8435)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+* 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.vpe.editor;
+
+
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * @author mareshkau
+ *
+ * Creates a group of jobs for updating vpe content
+ */
+
+public abstract class UpdateJobGroup extends UIJob {
+
+ /**
+ * Current job identification
+ */
+ private String jobName;
+ /**
+ * Contains indetification for job group
+ */
+ public static final String UPDATE_JOB="UPDATE_JOB"; //$NON-NLS-1$
+
+ /**
+ * Update Job
+ * @param name
+ * @param jobName
+ */
+ public UpdateJobGroup(String name, String jobName) {
+ super(name);
+ setJobName(jobName);
+ }
+
+ public boolean belongsTo(Object family) {
+
+ return UPDATE_JOB.equals(getJobName());
+ }
+ /**
+ * @return the jobName
+ */
+ private String getJobName() {
+ return jobName;
+ }
+ /**
+ * @param jobName the jobName to set
+ */
+ private void setJobName(String jobName) {
+ this.jobName = jobName;
+ }
+
+}
\ No newline at end of file
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-05-29 12:59:17 UTC (rev 8434)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-05-29 13:56:18 UTC (rev 8435)
@@ -11,6 +11,7 @@
package org.jboss.tools.vpe.editor;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
@@ -209,6 +210,10 @@
private XModelTreeListenerSWTSync optionsListener;
// Added by Max Areshkau Fix for JBIDE-1479
private UIJob job = null;
+ private LinkedList<Job> jobQueue;
+ private IProgressMonitor progressMonitor;
+ private Object mutex = new Object();
+
Shell tip;
public final static String MODEL_FLAVOR = ModelTransfer.MODEL; //$NON-NLS-1$
@@ -394,50 +399,94 @@
public boolean isAdapterForType(Object type) {
return type == this;
}
-
// FIX Fox JBIDE-1479 added by Max Areshkau
public void notifyChanged(final INodeNotifier notifier,
- final int eventType, final Object feature, final Object oldValue,
- final Object newValue, final int pos) {
+ final int eventType, final Object feature, final Object oldValue,
+ final Object newValue, final int pos) {
- if (!isVisualEditorVisible()) {
- synced = false;
- return;
- }
+ if (!visualEditorVisible) {
+ synced = false;
+ return;
+ }
- // start job when we modify file in ui thread, without this code
- // changes will be applied with 1 second delay
- Display display = null;
- if (PlatformUI.isWorkbenchRunning())
- display = PlatformUI.getWorkbench().getDisplay();
+ // start job when we modify file in ui thread, without this code
+ // changes will be applied with 1 second delay
+ Display display = null;
+ if (PlatformUI.isWorkbenchRunning())
+ display = PlatformUI.getWorkbench().getDisplay();
- if (display != null && (Thread.currentThread() == display.getThread())) {
- notifyChangedInUiThread(notifier, eventType, feature, oldValue,
- newValue, pos);
- return;
- }
- // start job when we modify file in non ui thread
- if (job != null) {
- job.cancel();
- }
+ if (display != null && (Thread.currentThread() == display.getThread())) {
+// notifyChangedInUiThread(notifier, eventType, feature, oldValue,
+// newValue, pos);
+// return;
+// notifyChangedInUiThread(notifier, eventType, feature, oldValue,
+// newValue, pos);
+// return;
+ UIJob nonUIJob = new UpdateJobGroup(VpeUIMessages.VPE_UPDATE_JOB_TITLE,UpdateJobGroup.UPDATE_JOB){
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
- job = new UIJob("NotifyChangedJob") {
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- // we checks is job was canceled and if is it true we cancel job
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- } else {
- notifyChangedInUiThread(notifier, eventType, feature,
- oldValue, newValue, pos);
- }
- return Status.OK_STATUS;
- }
- };
- job.setPriority(Job.LONG);
- job.schedule(1000L);
- }
+ synchronized (mutex) {
+
+ if (monitor.isCanceled()) {
+ getJobQueue().clear();
+ return Status.CANCEL_STATUS;
+ }
+ monitor.beginTask(VpeUIMessages.VPE_UPDATE_JOB_TITLE, getJobQueue().size());
+ monitor.worked(1);
+ notifyChangedInUiThread(notifier, eventType, feature, oldValue, newValue, pos);
+ if (monitor.isCanceled()) {
+ getJobQueue().clear();
+ return Status.CANCEL_STATUS;
+ }
+
+ getJobQueue().remove(this);
+
+ if(getJobQueue().size()>0) {
+ Job job =getJobQueue().getFirst();
+ job.schedule();
+ }
+ }
+ return Status.OK_STATUS;
+ }};
+ nonUIJob.setPriority(Job.LONG);
+ getJobQueue().addLast(nonUIJob);
+ if(getJobQueue().size()==1) {
+ setProgressMonitor(null);
+ nonUIJob.setProgressGroup(getProgressMonitor(), 100);
+ Job job = getJobQueue().getFirst();
+ job.schedule();
+ } else {
+
+ nonUIJob.setProgressGroup(getProgressMonitor(), 100);
+ }
+
+ return;
+ }
+ // start job when we modify file in non ui thread
+ if (job != null) {
+ job.cancel();
+ }
+
+ job = new UIJob("NotifyChangedJob") {
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ // we checks is job was canceled and if is it true we cancel job
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ } else {
+ notifyChangedInUiThread(notifier, eventType, feature,
+ oldValue, newValue, pos);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setPriority(Job.LONG);
+ job.schedule(1000L);
+ }
+
+
public void notifyChangedInUiThread(INodeNotifier notifier, int eventType,
Object feature, Object oldValue, Object newValue, int pos) {
if (switcher == null || !switcher
@@ -591,6 +640,14 @@
}
public void sourceSelectionChanged(boolean showCaret) {
+
+ //we should processed if we have correct view in visual editor,
+ //otherwise we shouldn't process this event
+ if(getJobQueue().size()>0) {
+
+ return;
+ }
+
Point range = sourceEditor.getTextViewer().getSelectedRange();
int anchorPosition = range.x;
int focusPosition = range.x + range.y;
@@ -2817,5 +2874,37 @@
}
synced = true;
}
+ /**
+ * @return the jobQueue
+ */
+ private LinkedList<Job> getJobQueue() {
+
+ if(jobQueue==null) {
+
+ jobQueue = new LinkedList<Job>();
+ }
+ return jobQueue;
+ }
+ /**
+ * @return the progressMonitor
+ */
+ private IProgressMonitor getProgressMonitor() {
+
+ if(progressMonitor==null) {
+
+ progressMonitor = Job.getJobManager().createProgressGroup();
+ }
+
+ return progressMonitor;
+ }
+
+ /**
+ * @param progressMonitor the progressMonitor to set
+ */
+ private void setProgressMonitor(IProgressMonitor progressMonitor) {
+
+ this.progressMonitor = progressMonitor;
+ }
+
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-05-29 12:59:17 UTC (rev 8434)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-05-29 13:56:18 UTC (rev 8435)
@@ -444,6 +444,10 @@
protected nsIDOMNode createNode(Node sourceNode,
nsIDOMNode visualOldContainer) {
boolean registerFlag = isCurrentMainDocument();
+
+ //reads and dispatch events
+ getPageContext().processDisplayEvents();
+
switch (sourceNode.getNodeType()) {
case Node.ELEMENT_NODE:
// Map<?, ?> xmlnsMap = createXmlns((Element) sourceNode);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2008-05-29 12:59:17 UTC (rev 8434)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2008-05-29 13:56:18 UTC (rev 8435)
@@ -20,6 +20,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IWorkbenchPage;
@@ -407,5 +408,20 @@
}
return vpeCash;
}
+
+ /**
+ * Processes display events to prevent eclipse froze
+ */
+ public void processDisplayEvents() {
+
+ Display display=null;
+ display = Display.getCurrent();
+ if(display==null) {
+ display=Display.getDefault();
+ }
+ if(display!=null) {
+ while(display.readAndDispatch()){}
+ }
+ }
}
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2008-05-29 12:59:17 UTC (rev 8434)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2008-05-29 13:56:18 UTC (rev 8435)
@@ -92,6 +92,6 @@
public static String CONFIRM_SELECTION_BAR_DIALOG_TITLE;
public static String CONFIRM_SELECTION_BAR_DIALOG_MESSAGE;
public static String CONFIRM_SELECTION_BAR_DIALOG_TOGGLE_MESSAGE;
+ public static String VPE_UPDATE_JOB_TITLE;
-
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2008-05-29 12:59:17 UTC (rev 8434)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2008-05-29 13:56:18 UTC (rev 8435)
@@ -52,3 +52,4 @@
CONFIRM_SELECTION_BAR_DIALOG_TITLE=Confirm hide selection bar
CONFIRM_SELECTION_BAR_DIALOG_MESSAGE=Hide selection bar ?
CONFIRM_SELECTION_BAR_DIALOG_TOGGLE_MESSAGE=Always hide selection bar without prompt
+VPE_UPDATE_JOB_TITLE=Visual Editor View Update
15 years, 11 months
JBoss Tools SVN: r8434 - in trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore: pages and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-05-29 08:59:17 -0400 (Thu, 29 May 2008)
New Revision: 8434
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.genmodel
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/Link.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PagesPackage.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/LinkImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesPackageImpl.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1189
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/Link.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/Link.java 2008-05-29 12:58:49 UTC (rev 8433)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/Link.java 2008-05-29 12:59:17 UTC (rev 8434)
@@ -74,4 +74,19 @@
*/
void setShortcut(boolean value);
+ /**
+ * returns data of link
+ * @model
+ */
+ public Object getData();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link#getData <em>Data</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Data</em>' attribute.
+ * @see #getData()
+ * @generated
+ */
+ void setData(Object value);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PagesPackage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PagesPackage.java 2008-05-29 12:58:49 UTC (rev 8433)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/PagesPackage.java 2008-05-29 12:59:17 UTC (rev 8434)
@@ -117,13 +117,22 @@
int LINK__SHORTCUT = 3;
/**
+ * The feature id for the '<em><b>Data</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK__DATA = 4;
+
+ /**
* The number of structural features of the '<em>Link</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int LINK_FEATURE_COUNT = 4;
+ int LINK_FEATURE_COUNT = 5;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
@@ -664,6 +673,17 @@
EAttribute getLink_Shortcut();
/**
+ * Returns the meta object for the attribute '{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link#getData <em>Data</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Data</em>'.
+ * @see org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link#getData()
+ * @see #getLink()
+ * @generated
+ */
+ EAttribute getLink_Data();
+
+ /**
* Returns the meta object for class '{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.Page <em>Page</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -910,6 +930,14 @@
EAttribute LINK__SHORTCUT = eINSTANCE.getLink_Shortcut();
/**
+ * The meta object literal for the '<em><b>Data</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute LINK__DATA = eINSTANCE.getLink_Data();
+
+ /**
* The meta object literal for the '{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.PageImpl <em>Page</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/LinkImpl.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/LinkImpl.java 2008-05-29 12:58:49 UTC (rev 8433)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/LinkImpl.java 2008-05-29 12:59:17 UTC (rev 8434)
@@ -30,6 +30,7 @@
* <li>{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.LinkImpl#getFromElement <em>From Element</em>}</li>
* <li>{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.LinkImpl#getToElement <em>To Element</em>}</li>
* <li>{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.LinkImpl#isShortcut <em>Shortcut</em>}</li>
+ * <li>{@link org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl.LinkImpl#getData <em>Data</em>}</li>
* </ul>
* </p>
*
@@ -97,10 +98,30 @@
protected boolean shortcut = SHORTCUT_EDEFAULT;
/**
+ * The default value of the '{@link #getData() <em>Data</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @see #getData()
* @generated
+ * @ordered
*/
+ protected static final Object DATA_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getData() <em>Data</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getData()
+ * @generated
+ * @ordered
+ */
+ protected Object data = DATA_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
protected LinkImpl() {
super();
}
@@ -282,6 +303,27 @@
* <!-- end-user-doc -->
* @generated
*/
+ public Object getData() {
+ return data;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setData(Object newData) {
+ Object oldData = data;
+ data = newData;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PagesPackage.LINK__DATA, oldData, data));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
@@ -331,6 +373,8 @@
return basicGetToElement();
case PagesPackage.LINK__SHORTCUT:
return isShortcut() ? Boolean.TRUE : Boolean.FALSE;
+ case PagesPackage.LINK__DATA:
+ return getData();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -355,6 +399,9 @@
case PagesPackage.LINK__SHORTCUT:
setShortcut(((Boolean)newValue).booleanValue());
return;
+ case PagesPackage.LINK__DATA:
+ setData(newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -379,6 +426,9 @@
case PagesPackage.LINK__SHORTCUT:
setShortcut(SHORTCUT_EDEFAULT);
return;
+ case PagesPackage.LINK__DATA:
+ setData(DATA_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -399,6 +449,8 @@
return toElement != null;
case PagesPackage.LINK__SHORTCUT:
return shortcut != SHORTCUT_EDEFAULT;
+ case PagesPackage.LINK__DATA:
+ return DATA_EDEFAULT == null ? data != null : !DATA_EDEFAULT.equals(data);
}
return super.eIsSet(featureID);
}
@@ -417,6 +469,8 @@
result.append(name);
result.append(", shortcut: ");
result.append(shortcut);
+ result.append(", data: ");
+ result.append(data);
result.append(')');
return result.toString();
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesPackageImpl.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesPackageImpl.java 2008-05-29 12:58:49 UTC (rev 8433)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesPackageImpl.java 2008-05-29 12:59:17 UTC (rev 8434)
@@ -207,6 +207,15 @@
* <!-- end-user-doc -->
* @generated
*/
+ public EAttribute getLink_Data() {
+ return (EAttribute)linkEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getPage() {
return pageEClass;
}
@@ -388,6 +397,7 @@
createEReference(linkEClass, LINK__FROM_ELEMENT);
createEReference(linkEClass, LINK__TO_ELEMENT);
createEAttribute(linkEClass, LINK__SHORTCUT);
+ createEAttribute(linkEClass, LINK__DATA);
pageEClass = createEClass(PAGE);
createEAttribute(pageEClass, PAGE__PARAMS_VISIBLE);
@@ -453,6 +463,7 @@
initEReference(getLink_FromElement(), this.getPagesElement(), this.getPagesElement_OutputLinks(), "fromElement", null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getLink_ToElement(), this.getPagesElement(), this.getPagesElement_InputLinks(), "toElement", null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getLink_Shortcut(), ecorePackage.getEBoolean(), "shortcut", null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getLink_Data(), ecorePackage.getEJavaObject(), "data", null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(pageEClass, Page.class, "Page", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPage_ParamsVisible(), ecorePackage.getEBoolean(), "paramsVisible", null, 0, 1, Page.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
Added: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore 2008-05-29 12:59:17 UTC (rev 8434)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="pages"
+ nsURI="http:///org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore" nsPrefix="org.jboss.tools.seam.ui.pages.editor.ecore.pages">
+ <eClassifiers xsi:type="ecore:EClass" name="Link">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="fromElement" eType="#//PagesElement"
+ eOpposite="#//PagesElement/outputLinks"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="toElement" eType="#//PagesElement"
+ eOpposite="#//PagesElement/inputLinks"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="shortcut" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="data" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Page" eSuperTypes="#//PagesElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="paramsVisible" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PagesElement" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="location" eType="#//Point"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="#//Dimension"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
+ eType="#//PagesElement" eOpposite="#//PagesElement/parent"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//PagesElement"
+ eOpposite="#//PagesElement/children"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="inputLinks" upperBound="-1"
+ eType="#//Link" eOpposite="#//Link/toElement"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="outputLinks" upperBound="-1"
+ eType="#//Link" eOpposite="#//Link/fromElement"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="data" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PagesModel" eSuperTypes="#//PagesElement"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Param" eSuperTypes="#//PagesElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PgException" eSuperTypes="#//PagesElement"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="Point" instanceClassName="org.eclipse.draw2d.geometry.Point"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="Dimension" instanceClassName="org.eclipse.draw2d.geometry.Dimension"/>
+</ecore:EPackage>
Added: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.genmodel
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.genmodel (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.genmodel 2008-05-29 12:59:17 UTC (rev 8434)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.jboss.tools.seam.ui.pages/src"
+ modelPluginID="org.jboss.tools.seam.ui.pages" modelName="Pages" importerID="org.eclipse.emf.importer.java"
+ complianceLevel="5.0" copyrightFields="false">
+ <foreignModel>@model</foreignModel>
+ <genPackages prefix="Pages" basePackage="org.jboss.tools.seam.ui.pages.editor.ecore"
+ disposableProviderFactory="true" ecorePackage="pages.ecore#/">
+ <genDataTypes ecoreDataType="pages.ecore#//Point"/>
+ <genDataTypes ecoreDataType="pages.ecore#//Dimension"/>
+ <genClasses ecoreClass="pages.ecore#//Link">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Link/name"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//Link/fromElement"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//Link/toElement"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Link/shortcut"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Link/data"/>
+ </genClasses>
+ <genClasses ecoreClass="pages.ecore#//Page">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Page/paramsVisible"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="pages.ecore#//PagesElement">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/location"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/size"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/children"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/parent"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/inputLinks"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/outputLinks"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/data"/>
+ </genClasses>
+ <genClasses ecoreClass="pages.ecore#//PagesModel"/>
+ <genClasses ecoreClass="pages.ecore#//Param">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Param/value"/>
+ </genClasses>
+ <genClasses ecoreClass="pages.ecore#//PgException"/>
+ </genPackages>
+</genmodel:GenModel>
15 years, 11 months
JBoss Tools SVN: r8433 - trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-05-29 08:58:49 -0400 (Thu, 29 May 2008)
New Revision: 8433
Removed:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.genmodel
Log:
http://jira.jboss.com/jira/browse/JBIDE-1189
Deleted: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore 2008-05-29 12:54:21 UTC (rev 8432)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore 2008-05-29 12:58:49 UTC (rev 8433)
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="pages"
- nsURI="http:///org/jboss/tools/seam/ui/pages/editor/ecore/pages.ecore" nsPrefix="org.jboss.tools.seam.ui.pages.editor.ecore.pages">
- <eClassifiers xsi:type="ecore:EClass" name="Link">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="fromElement" eType="#//PagesElement"
- eOpposite="#//PagesElement/outputLinks"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="toElement" eType="#//PagesElement"
- eOpposite="#//PagesElement/inputLinks"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="shortcut" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Page" eSuperTypes="#//PagesElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="paramsVisible" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="PagesElement" abstract="true">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="location" eType="#//Point"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="#//Dimension"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
- eType="#//PagesElement" eOpposite="#//PagesElement/parent"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//PagesElement"
- eOpposite="#//PagesElement/children"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="inputLinks" upperBound="-1"
- eType="#//Link" eOpposite="#//Link/toElement"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="outputLinks" upperBound="-1"
- eType="#//Link" eOpposite="#//Link/fromElement"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="data" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="PagesModel" eSuperTypes="#//PagesElement"/>
- <eClassifiers xsi:type="ecore:EClass" name="Param" eSuperTypes="#//PagesElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="PgException" eSuperTypes="#//PagesElement"/>
- <eClassifiers xsi:type="ecore:EDataType" name="Point" instanceClassName="org.eclipse.draw2d.geometry.Point"/>
- <eClassifiers xsi:type="ecore:EDataType" name="Dimension" instanceClassName="org.eclipse.draw2d.geometry.Dimension"/>
-</ecore:EPackage>
Deleted: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.genmodel
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.genmodel 2008-05-29 12:54:21 UTC (rev 8432)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages.genmodel 2008-05-29 12:58:49 UTC (rev 8433)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.jboss.tools.seam.ui.pages/src"
- modelPluginID="org.jboss.tools.seam.ui.pages" modelName="Pages" importerID="org.eclipse.emf.importer.java"
- complianceLevel="5.0" copyrightFields="false">
- <foreignModel>@model</foreignModel>
- <genPackages prefix="Pages" basePackage="org.jboss.tools.seam.ui.pages.editor.ecore"
- disposableProviderFactory="true" ecorePackage="pages.ecore#/">
- <genDataTypes ecoreDataType="pages.ecore#//Point"/>
- <genDataTypes ecoreDataType="pages.ecore#//Dimension"/>
- <genClasses ecoreClass="pages.ecore#//Link">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Link/name"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//Link/fromElement"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//Link/toElement"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Link/shortcut"/>
- </genClasses>
- <genClasses ecoreClass="pages.ecore#//Page">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Page/paramsVisible"/>
- </genClasses>
- <genClasses image="false" ecoreClass="pages.ecore#//PagesElement">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/name"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/location"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/size"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/children"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/parent"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/inputLinks"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference pages.ecore#//PagesElement/outputLinks"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//PagesElement/data"/>
- </genClasses>
- <genClasses ecoreClass="pages.ecore#//PagesModel"/>
- <genClasses ecoreClass="pages.ecore#//Param">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute pages.ecore#//Param/value"/>
- </genClasses>
- <genClasses ecoreClass="pages.ecore#//PgException"/>
- </genPackages>
-</genmodel:GenModel>
15 years, 11 months
JBoss Tools SVN: r8432 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: resources/richFacesTest/WebContent/pages/components and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-05-29 08:54:21 -0400 (Thu, 29 May 2008)
New Revision: 8432
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columns.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columnsWithAttributes.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBox.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes2.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload/fileUpload.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInput.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithValueAttribute.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceSelect/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceSelect/inplaceSelect.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList/pickList.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBar.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBarWithAttributes.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/CommonRichFacesTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.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:
Junits for http://jira.jboss.com/jira/browse/JBIDE-2196
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-05-29 12:51:11 UTC (rev 8431)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2008-05-29 12:54:21 UTC (rev 8432)
@@ -4,7 +4,8 @@
Bundle-SymbolicName: org.jboss.tools.jsf.vpe.richfaces.test;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.tools.jsf.vpe.richfaces.test.RichFacesTestPlugin
-Require-Bundle: org.eclipse.ui,
+Require-Bundle: org.jboss.tools.jsf.vpe.richfaces,
+ org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.vpe,
org.junit,
@@ -15,6 +16,7 @@
org.jboss.tools.common.text.ext,
org.jboss.tools.common.model,
org.jboss.tools.vpe.xulrunner,
+ org.jboss.tools.jsf.vpe.richfaces,
org.mozilla.xpcom,
org.jboss.tools.vpe.ui.test
Eclipse-LazyStart: true
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columns.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columns.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columns.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,16 @@
+<!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>
+ <!-- ComboBox -->
+ <rich:columns value="#{bean.value}">
+ </rich:columns>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columns.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columnsWithAttributes.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columnsWithAttributes.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columnsWithAttributes.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,17 @@
+<!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>
+<!-- ComboBox -->
+<rich:columns value="#{bean.value}" width="52px"
+ style="text-align:center" styleClass="myClass" var="myVar">
+</rich:columns>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columnsWithAttributes.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBox.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBox.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBox.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,15 @@
+<!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>
+ <!-- ComboBox -->
+ <rich:comboBox/>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBox.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,16 @@
+<!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>
+ <!-- ComboBox -->
+ <rich:comboBox value="#{bean.value}" defaultLabel="Select Any Value" style="width:250px"/>
+
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes2.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes2.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes2.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,16 @@
+<!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>
+ <!-- ComboBox -->
+ <rich:comboBox value="#{bean.value}" style="width:255px"/>
+
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes2.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload/fileUpload.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload/fileUpload.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload/fileUpload.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,16 @@
+<!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>
+ <!-- DataDefenitionList -->
+ <rich:fileUpload/>
+
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload/fileUpload.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInput.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInput.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInput.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,14 @@
+<!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>
+ <rich:inplaceInput></rich:inplaceInput>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInput.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,15 @@
+<!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>
+ <!-- ComboBox -->
+ <rich:inplaceInput value="#{person.name}" styleClass="myStyleClass"/>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithValueAttribute.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithValueAttribute.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithValueAttribute.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,15 @@
+<!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>
+ <!-- ComboBox -->
+ <rich:inplaceInput value="#{person.name}"/>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithValueAttribute.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceSelect/inplaceSelect.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceSelect/inplaceSelect.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceSelect/inplaceSelect.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,15 @@
+<!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>
+
+ <rich:inplaceSelect/>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceSelect/inplaceSelect.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList/pickList.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList/pickList.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList/pickList.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,15 @@
+<!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>
+ <!-- PickList -->
+ <rich:pickList/>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList/pickList.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBar.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBar.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBar.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,14 @@
+<!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>
+ <rich:progressBar/>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBar.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBarWithAttributes.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBarWithAttributes.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBarWithAttributes.xhtml 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,14 @@
+<!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>
+ <rich:progressBar styleClass="myStyleClass" value="#{bean.value}" style="width:250px;"/>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBarWithAttributes.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/CommonRichFacesTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/CommonRichFacesTestCase.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/CommonRichFacesTestCase.java 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * 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;
+
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.VpeEditorPart;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+
+
+/**
+ * The Class CommonRichFacesTestCase.
+ *
+ * @author Eugene Stherbin
+ */
+public abstract class CommonRichFacesTestCase extends VpeTest {
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public CommonRichFacesTestCase(String name) {
+ super(name);
+ setCheckWarning(false);
+ }
+
+ /**
+ * get xulrunner source page.
+ *
+ * @param part - JSPMultiPageEditor
+ *
+ * @return nsIDOMDocument
+ */
+ protected nsIDOMDocument getVpeVisualDocument(JSPMultiPageEditor part) {
+
+ VpeEditorPart visualEditor = (VpeEditorPart) part.getVisualEditor();
+
+ VpeController vpeController = visualEditor.getController();
+
+ // get xulRunner editor
+ XulRunnerEditor xulRunnerEditor = vpeController.getXulRunnerEditor();
+
+ // get dom document
+ nsIDOMDocument document = xulRunnerEditor.getDOMDocument();
+
+ return document;
+ }
+
+ /**
+ * Perform test for rich faces component.
+ *
+ * @param componentPage the component page
+ *
+ * @return the ns IDOM element
+ *
+ * @throws Throwable the throwable
+ */
+ protected nsIDOMElement performTestForRichFacesComponent(IFile componentPage) throws Throwable {
+ nsIDOMElement rst = null;
+ TestUtil.waitForJobs();
+
+ setException(null);
+
+ // IFile file = (IFile)
+ // TestUtil.getComponentPath(componentPage,getImportProjectName());
+ IEditorInput input = new FileEditorInput(componentPage);
+
+ TestUtil.waitForJobs();
+ //
+ JSPMultiPageEditor editor = (JSPMultiPageEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(
+ input, EDITOR_ID, true);
+
+ // get dom document
+ nsIDOMDocument document = getVpeVisualDocument(editor);
+ rst = document.getDocumentElement();
+ // check that element is not null
+ assertNotNull(rst);
+ return rst;
+ }
+
+ void fail(Throwable t){
+ fail("Test case was fail "+t.getMessage()+":"+t);
+ }
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/CommonRichFacesTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
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-05-29 12:51:11 UTC (rev 8431)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-05-29 12:54:21 UTC (rev 8432)
@@ -49,6 +49,14 @@
suite.addTestSuite(Jbide1682Test.class);
suite.addTestSuite(Jbide1548Test.class);
suite.addTestSuite(JBIDE1713Test.class);
+ //
+ suite.addTestSuite(RichFacesComboBoxTemplateTestCase.class);
+ suite.addTestSuite(RichFacesInplaceInputTemplateTestCase.class);
+ suite.addTestSuite(RichFacesInplaceSelectTemplateTestCase.class);
+ suite.addTestSuite(RichFacesProgressBarTemplateTestCase.class);
+ suite.addTestSuite(RichFacesFileUploadTemplateTestCase.class);
+ suite.addTestSuite(RichFacesColumnsTemplateTestCase.class);
+ suite.addTestSuite(RichFacesPickListTemplateTestCase.class);
// $JUnit-END$
List<ImportBean> projectToImport = new ArrayList<ImportBean>();
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * 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;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * Test case for testing <rich:columns>.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesColumnsTemplateTestCase extends CommonRichFacesTestCase {
+
+ /** The Constant COLUMNS_WITH_ATTRIBUTES. */
+ private static final String COLUMNS_WITH_ATTRIBUTES = "components/columns/columnsWithAttributes.xhtml";
+
+ /** The Constant COMPONENTS_COLUMNS_COLUMNS_XHTML. */
+ private static final String COMPONENTS_COLUMNS_COLUMNS_XHTML = "components/columns/columns.xhtml";
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesColumnsTemplateTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Test columns with attributes.
+ */
+ public void testColumnsWithAttributes() {
+ try {
+ final nsIDOMElement rst = performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(COLUMNS_WITH_ATTRIBUTES,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_TD);
+
+ nsIDOMElement divOne = (nsIDOMElement) elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Style class should be equals", "dr-table-cell rich-table-cell myClass", divOne.getAttribute(HTML.ATTR_CLASS));
+ assertEquals("Style should be equals ", "text-align: center;", divOne.getAttribute(HTML.ATTR_STYLE));
+ assertTrue("Style should contains of 52 value ", divOne.getAttribute("width").contains("52"));
+ } catch (CoreException e) {
+ fail(e.getMessage() + ":" + e);
+ } catch (Throwable e) {
+ fail(e.getMessage() + ":" + e);
+ }
+ }
+
+ /**
+ * Test simple columns.
+ */
+ public void testSimpleColumns() {
+ try {
+ final nsIDOMElement rst = performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(COMPONENTS_COLUMNS_COLUMNS_XHTML,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_TD);
+
+ nsIDOMElement divOne = (nsIDOMElement) elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Style class should be equals", "dr-table-cell rich-table-cell", divOne.getAttribute(HTML.ATTR_CLASS));
+ } catch (CoreException e) {
+ fail(e.getMessage() + ":" + e);
+ } catch (Throwable e) {
+ fail(e.getMessage() + ":" + e);
+ }
+ }
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,182 @@
+/*******************************************************************************
+ * 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;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.PartInitException;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * Test case for testing {@link RichFacesComboBoxTemplateTestCase} class.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesComboBoxTemplateTestCase extends CommonRichFacesTestCase {
+
+ /** The Constant _150PX. */
+ private static final String _150PX = "150px";
+
+ /** The Constant _250PX. */
+ private static final String _250PX = "250px";
+
+ /** The Constant _255PX. */
+ private static final String _255PX = "255px";
+
+ /** The Constant COMPONENTS_COMBO_BOX_WITHOUT_ATTR. */
+ private static final String COMPONENTS_COMBO_BOX_WITHOUT_ATTR = "components/comboBox/comboBox.xhtml";
+
+ /** The Constant COMPONENTS_COMBO_WITH_ATTR_TEMPLATE. */
+ private static final String COMPONENTS_COMBO_WITH_ATTR_TEMPLATE = "components/comboBox/comboBoxWithAttributes.xhtml";
+
+ /** The Constant COMPONENTS_COMBO_WITH_ATTR_TEMPLATE2. */
+ private static final String COMPONENTS_COMBO_WITH_ATTR_TEMPLATE2 = "components/comboBox/comboBoxWithAttributes2.xhtml";
+
+ /** DEFAULT_INPUT_STYLE. */
+ private static final String DEFAULT_INPUT_STYLE = "rich-combobox-font-disabled rich-combobox-input-inactive";
+
+ /** The Constant DEFAULT_WIDTH. */
+ private static final String DEFAULT_WIDTH = "width: 150px;";
+
+ /** The Constant EL_VALUE. */
+ private static final String EL_VALUE = "#{bean.value}";
+
+ /** The Constant SELECT_ANY_VALUE. */
+ private static final String SELECT_ANY_VALUE = "Select Any Value";
+
+ /** The Constant ZERO. */
+ private static final int ZERO = 0;
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesComboBoxTemplateTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Base table check.
+ *
+ * @param width the width
+ * @param page the page
+ *
+ * @return the ns IDOM element
+ *
+ * @throws Throwable the throwable
+ * @throws PartInitException the part init exception
+ */
+ private nsIDOMElement baseTableCheck(String page, String width) throws PartInitException, Throwable {
+ final nsIDOMElement rst = performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(page,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "td" elements
+
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_DIV);
+ for(nsIDOMNode e:elements){
+ nsIDOMElement div = (nsIDOMElement) e.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ System.err.println(div.getNodeName()+":"+div.getAttribute(HTML.ATTR_CLASS));
+ }
+
+// assertEquals("Size should be 5", 5, elements.size());
+
+ nsIDOMElement divOne = (nsIDOMElement) elements.get(4).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ assertTrue("Style classes should be contains ",divOne.getAttribute(HTML.ATTR_CLASS).contains("rich-combobox-font rich-combobox"));
+ assertTrue("Defaule style should be contains " + DEFAULT_WIDTH, divOne.getAttribute(HTML.ATTR_STYLE).indexOf("150") > 1);
+ assertTrue("Defaule style should be contains " + DEFAULT_WIDTH, divOne.getAttribute(HTML.ATTR_STYLE).startsWith("width"));
+ // Check input
+
+ return rst;
+ }
+
+ /**
+ * Check value in input.
+ *
+ * @param inputValue the input value
+ * @param rst the rst
+ */
+ private void checkValueInInput(final nsIDOMElement rst, String inputValue) {
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_INPUT);
+
+ assertEquals("Size should be equals 2", 3, elements.size());
+ final nsIDOMElement input = (nsIDOMElement) elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ assertEquals("Value should be equals " + inputValue, inputValue, input.getAttribute(HTML.ATTR_VALUE));
+ }
+
+ /**
+ * Test combo box with attributes.
+ *
+ * @throws Throwable the throwable
+ * @throws PartInitException the part init exception
+ */
+ public void testComboBoxWithAttributes() throws PartInitException, Throwable {
+ final nsIDOMElement rst = baseTableCheck(COMPONENTS_COMBO_WITH_ATTR_TEMPLATE, _250PX);
+
+ checkValueInInput(rst, SELECT_ANY_VALUE);
+
+ }
+
+ /**
+ * Test combo box with attributes2.
+ *
+ * @throws Throwable the throwable
+ * @throws PartInitException the part init exception
+ */
+ public void testComboBoxWithAttributes2() throws PartInitException, Throwable {
+ final nsIDOMElement rst = baseTableCheck(COMPONENTS_COMBO_WITH_ATTR_TEMPLATE2, _255PX);
+
+ checkValueInInput(rst, EL_VALUE);
+
+ }
+
+ /**
+ * Test combo box.
+ *
+ * @throws PartInitException the part init exception
+ * @throws Throwable the throwable
+ */
+ public void testComboBoxWithoutAttributes() throws PartInitException, Throwable {
+
+ final nsIDOMElement rst = baseTableCheck(COMPONENTS_COMBO_BOX_WITHOUT_ATTR, _150PX);
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_INPUT);
+
+ assertEquals("Size should be equals 2", 3, elements.size());
+
+ final nsIDOMElement input = (nsIDOMElement) elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Default input class should be equals " + DEFAULT_INPUT_STYLE, input.getAttribute(HTML.ATTR_CLASS),
+ DEFAULT_INPUT_STYLE);
+// assertEquals("Input style style should be empty", "", input.getAttribute(HTML.ATTR_STYLE));
+// assertEquals("Input type should be text", HTML.VALUE_TEXT_TYPE, input.getAttribute(HTML.ATTR_TYPE));
+// assertEquals("Input size should be " + String.valueOf(10), String.valueOf(10), input.getAttribute(HTML.ATTR_SIZE));
+//
+// final nsIDOMElement img = (nsIDOMElement) elements.get(1).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+// assertTrue("Shoul contains of image path ", img.getAttribute("src").indexOf("\\comboBox\\down.gif") > 1);
+
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,42 @@
+
+
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.PartInitException;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+
+
+/**
+ * Test case for testing {@link RichFacesFileUploadTemplateTestCase}.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesFileUploadTemplateTestCase extends CommonRichFacesTestCase {
+
+ /** The Constant COMPONENTS_FILE_UPLOAD_FILE_UPLOAD_BASE. */
+ private static final String COMPONENTS_FILE_UPLOAD_FILE_UPLOAD_BASE = "components/fileUpload/fileUpload.xhtml";
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesFileUploadTemplateTestCase(String name) {
+ super(name);
+ setCheckWarning(false);
+ }
+
+ /**
+ * Test file upload.
+ *
+ * @throws PartInitException the part init exception
+ * @throws Throwable the throwable
+ */
+ public void testBaseFileUpload() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(COMPONENTS_FILE_UPLOAD_FILE_UPLOAD_BASE,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * 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;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * Test case for testing <rich:inplaceInput/> template.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesInplaceInputTemplateTestCase extends CommonRichFacesTestCase {
+
+ /** The Constant EL_VALUE. */
+ private static final String EL_VALUE = "#{person.name}";
+
+ /** The Constant MY_STYLE_CLASS. */
+ private static final String MY_STYLE_CLASS = "myStyleClass";
+
+ /** The Constant NULL. */
+ private static final String NULL = "null";
+
+ /** The Constant RICH_INPLACE_VIEW. */
+ private static final String RICH_INPLACE_VIEW = "rich-inplace rich-inplace-view";
+
+ /** The Constant TEMPLATE_WITH_EMPTY_TAG. */
+ private static final String TEMPLATE_WITH_EMPTY_TAG = "components/inplaceInput/inplaceInput.xhtml";
+
+ /** The Constant TEMPLATE_WITH_VALUE_AND_STYLE_CLASS. */
+ private static final String TEMPLATE_WITH_VALUE_AND_STYLE_CLASS = "components/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml";
+
+ /** The Constant TEMPLATE_WITH_VALUE_ATTR. */
+ private static final String TEMPLATE_WITH_VALUE_ATTR = "components/inplaceInput/inplaceInputWithValueAttribute.xhtml";
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesInplaceInputTemplateTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Base check.
+ *
+ * @param styleClass the style class
+ * @param value the value
+ * @param page the page
+ *
+ * @throws CoreException the core exception
+ * @throws Throwable the throwable
+ */
+ private void baseCheck(String page, String value, String styleClass) throws Throwable, CoreException {
+ final nsIDOMElement rst = performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(page,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_SPAN);
+
+ assertEquals("Count of items should be 1", 1, elements.size());
+
+ final nsIDOMElement element = (nsIDOMElement) elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Text value should be equals 'null'", value, element.getFirstChild().getNodeValue());
+
+ assertTrue("Style class should be equals " + styleClass, element.getAttribute(HTML.ATTR_CLASS).contains(styleClass));
+ }
+
+ /**
+ * Test inplace input without attributes.
+ *
+ * @throws CoreException the core exception
+ * @throws Throwable the throwable
+ */
+ public void testInplaceInputWithoutAttributes() throws CoreException, Throwable {
+ baseCheck(TEMPLATE_WITH_EMPTY_TAG, NULL, RICH_INPLACE_VIEW);
+
+ }
+
+ /**
+ * Test inplace input with value.
+ *
+ * @throws CoreException the core exception
+ * @throws Throwable the throwable
+ */
+ public void testInplaceInputWithValue() throws CoreException, Throwable {
+ baseCheck(TEMPLATE_WITH_VALUE_ATTR, EL_VALUE, RICH_INPLACE_VIEW);
+
+ }
+
+ /**
+ * Test inplace input with value and style.
+ *
+ * @throws CoreException the core exception
+ * @throws Throwable the throwable
+ */
+ public void testInplaceInputWithValueAndStyle() throws CoreException, Throwable {
+ baseCheck(TEMPLATE_WITH_VALUE_AND_STYLE_CLASS, EL_VALUE, MY_STYLE_CLASS);
+
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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;
+
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.PartInitException;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+
+
+/**
+ * The Class RichFacesInplaceSelectTemplateTestCase.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesInplaceSelectTemplateTestCase extends CommonRichFacesTestCase {
+
+ /** The Constant COMPONENTS_INPLACE_SELECT_INPLACE_SELECT_XHTML. */
+ private static final String COMPONENTS_INPLACE_SELECT_INPLACE_SELECT_XHTML = "components/inplaceSelect/inplaceSelect.xhtml";
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesInplaceSelectTemplateTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Test simple.
+ *
+ * @throws CoreException the core exception
+ * @throws PartInitException the part init exception
+ * @throws Throwable the throwable
+ */
+ public void testSimple() throws PartInitException, CoreException, Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(COMPONENTS_INPLACE_SELECT_INPLACE_SELECT_XHTML,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * 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;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * Test case for testing <rich:pickList/> component.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesPickListTemplateTestCase extends CommonRichFacesTestCase {
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesPickListTemplateTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Test simple pick list.
+ */
+ public void testSimplePickList() {
+ nsIDOMElement rst;
+ try {
+ rst = performTestForRichFacesComponent((IFile) TestUtil.getComponentPath("components/pickList/pickList.xhtml",
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_TABLE);
+ assertEquals("Count of tables should be 3", 3, elements.size());
+ nsIDOMElement tableOne = (nsIDOMElement) elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Style class should be equals", "rich-list-picklist", tableOne.getAttribute(HTML.ATTR_CLASS));
+ assertEquals("Style should be empty", "", tableOne.getAttribute(HTML.ATTR_STYLE));
+ elements.clear();
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_DIV);
+ assertEquals("Count of divs should be 18", 18, elements.size());
+
+ elements.clear();
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_IMG);
+ assertEquals("Count of divs should be 18", 4, elements.size());
+
+ } catch (CoreException e) {
+ fail(e);
+ } catch (Throwable e) {
+ fail(e);
+ }
+
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java 2008-05-29 12:54:21 UTC (rev 8432)
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * 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;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * Test case for testing <rich:progressBar/> component.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesProgressBarTemplateTestCase extends CommonRichFacesTestCase {
+
+ /** The Constant CHECK_BASE_STYLE. */
+ private static final String CHECK_BASE_STYLE = "rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell";
+
+ /** The Constant MY_STYLE_CLASS. */
+ private static final String MY_STYLE_CLASS = " myStyleClass";
+
+ /** The Constant PERCENTAGES. */
+ private static final String PERCENTAGES = " 60%;";
+
+ /** The Constant SIMPLE_PAGE. */
+ private static final String SIMPLE_PAGE = "/components/progressBar/progressBar.xhtml";
+
+ /** The Constant SIMPLE_WITH_ATTRIBUTES. */
+ private static final String SIMPLE_WITH_ATTRIBUTES = "/components/progressBar/progressBarWithAttributes.xhtml";
+
+ /** The Constant STYLE_1_FOR_CHECK. */
+ private static final String STYLE_1_FOR_CHECK = "width: 250px; text-align: left;";
+
+ /** The Constant STYLE_CLASS_2. */
+ private static final String STYLE_CLASS_2 = "rich-progress-bar-height rich-progress-bar-uploaded null";
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesProgressBarTemplateTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Base test.
+ *
+ * @param styleClass the style class
+ * @param page the page
+ * @param style the style
+ * @param twoStyleClass the two style class
+ * @param style2 the style2
+ */
+ private void baseTest(String page, String styleClass, String style, String twoStyleClass, String style2) {
+ nsIDOMElement rst = null;
+
+ try {
+ rst = performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(page, RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ } catch (CoreException e) {
+ fail(e.getMessage() + e);
+ } catch (Throwable e) {
+ fail(e.getMessage() + e);
+ }
+
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_DIV);
+
+ assertEquals("Size should be 2", 5, elements.size());
+ final nsIDOMElement divOne = (nsIDOMElement) elements.get(3).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Style class should be equals" + styleClass, styleClass, divOne.getAttribute(HTML.ATTR_CLASS));
+ assertEquals("Style should be equals" + style, style, divOne.getAttribute(HTML.ATTR_STYLE));
+
+ final nsIDOMElement divTwo = (nsIDOMElement) elements.get(4).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Style class should be equals" + twoStyleClass, twoStyleClass, divTwo.getAttribute(HTML.ATTR_CLASS));
+ assertEquals("Style should be equals" + style2, style2, divTwo.getAttribute(HTML.ATTR_STYLE));
+
+ }
+
+ /**
+ * Test simple.
+ */
+ public void testSimple() {
+ baseTest(SIMPLE_PAGE, CHECK_BASE_STYLE, "text-align: left;", STYLE_CLASS_2,VpeStyleUtil.PARAMETER_WIDTH
+ + VpeStyleUtil.COLON_STRING + PERCENTAGES);
+ }
+
+ /**
+ * Test with attributes.
+ */
+ public void testWithAttributes() {
+ baseTest(SIMPLE_WITH_ATTRIBUTES, CHECK_BASE_STYLE + MY_STYLE_CLASS, STYLE_1_FOR_CHECK,
+ STYLE_CLASS_2,VpeStyleUtil.PARAMETER_WIDTH
+ + VpeStyleUtil.COLON_STRING + PERCENTAGES);
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
15 years, 11 months