JBoss Tools SVN: r8643 - in trunk/seam/tests/org.jboss.tools.seam.pages.xml.test: META-INF and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-06-09 08:05:31 -0400 (Mon, 09 Jun 2008)
New Revision: 8643
Added:
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/.classpath
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/.cvsignore
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/.project
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/META-INF/
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/about.html
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/ant.properties
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/build.properties
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/info.xml
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/.project
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/pages/
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/pages/.wiki.xml.spdia
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/pages/wiki.xml
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/seam/
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/seam/pages/
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/seam/pages/xml/
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/seam/pages/xml/test/
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/seam/pages/xml/test/SeamPagesXMLAllTests.java
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/seam/pages/xml/test/SeamPagesXMLModelTest.java
Log:
Initial import.
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/.classpath
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/.classpath (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/.classpath 2008-06-09 12:05:31 UTC (rev 8643)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/.cvsignore
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/.cvsignore (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/.cvsignore 2008-06-09 12:05:31 UTC (rev 8643)
@@ -0,0 +1 @@
+bin
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/.project (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/.project 2008-06-09 12:05:31 UTC (rev 8643)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.seam.core.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/META-INF/MANIFEST.MF 2008-06-09 12:05:31 UTC (rev 8643)
@@ -0,0 +1,34 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Seam Pages XML Tests Plug-in
+Bundle-SymbolicName: org.jboss.tools.seam.pages.xml.test;singleton:=true
+Bundle-Version: 2.0.0
+Bundle-ClassPath: seam-pages-xml-tests.jar
+Bundle-Vendor: Red Hat, Inc.
+Export-Package: org.jboss.tools.seam.pages.xml.test
+Require-Bundle:
+ org.junit,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.jboss.tools.common.model,
+ org.jboss.tools.seam.pages.xml,
+ org.jboss.tools.common.test,
+ org.jboss.tools.jsf,
+ org.eclipse.wst.common.project.facet.core,
+ org.jboss.tools.tests,
+ org.eclipse.ui.workbench,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.jface,
+ org.jboss.tools.jst.firstrun,
+ org.eclipse.wst.server.core,
+ org.eclipse.datatools.connectivity,
+ org.eclipse.ltk.core.refactoring,
+ org.eclipse.ltk.ui.refactoring,
+ org.eclipse.jdt.core,
+ org.eclipse.jdt.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.jface,
+ org.eclipse.jdt.core.manipulation,
+ org.eclipse.jst.jsf.core
+Provide-Package: org.jboss.tools.seam.pages.xml.test
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/about.html
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/about.html (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/about.html 2008-06-09 12:05:31 UTC (rev 8643)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2007 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/ant.properties
===================================================================
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/build.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/build.properties (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/build.properties 2008-06-09 12:05:31 UTC (rev 8643)
@@ -0,0 +1,15 @@
+bin.includes = META-INF/,\
+ seam-pages-xml-tests.jar,\
+ projects/,\
+ info.xml,\
+ about.html,\
+ ant.properties
+src.includes = META-INF/,\
+ ant.properties,\
+ build.properties,\
+ info.xml,\
+ src/,\
+ projects/,\
+ about.html
+source.seam-pages-xml-tests.jar = src/
+jars.compile.order = seam-pages-xml-tests.jar
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/info.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/info.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/info.xml 2008-06-09 12:05:31 UTC (rev 8643)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin name="org.jboss.tools.common.model">
+ <classes>
+ <class path="/XModelEntityGroup/MAPPINGS/MAPPING/PAIR@value" />
+ <class path="/XModelEntityGroup/XModelEntity@AdoptManagerClass" />
+ <class path="/XModelEntityGroup/XModelEntity@ImplementationLoadingClass" />
+ <class path="/XModelEntityGroup/XModelEntity@ImplementingClass" />
+ </classes>
+</plugin>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/.project (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/.project 2008-06-09 12:05:31 UTC (rev 8643)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/pages/.wiki.xml.spdia
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/pages/.wiki.xml.spdia (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/pages/.wiki.xml.spdia 2008-06-09 12:05:31 UTC (rev 8643)
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<diagram model-entity="SeamPagesDiagram">
+ <item ID="#wiki.xhtml" NAME="#xwiki.xhtml" PATH="/wiki.xhtml"
+ SHAPE="832,33,0,0" TYPE="page" model-entity="SeamPagesDiagramItem">
+ <output ID="/docDisplay_#{skin}.xhtml" NAME="output"
+ PATH="/docDisplay_#{skin}.xhtml" TARGET="#xdocDisplay*" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/dirDisplay_#{skin}.xhtml" NAME="output1"
+ PATH="/dirDisplay_#{skin}.xhtml" TARGET="#xdirDisplay*" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item ID="#docDisplay*" NAME="#xdocDisplay*" PATH="/docDisplay*"
+ SHAPE="560,17,0,0" TYPE="page" model-entity="SeamPagesDiagramItem">
+ <output ID="/wiki.xhtml" NAME="output" PATH="/wiki.xhtml"
+ TARGET="#xwiki.xhtml" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item ID="#docHistory*" NAME="#xdocHistory*" PATH="/docHistory*"
+ SHAPE="32,17,0,0" TYPE="page" model-entity="SeamPagesDiagramItem">
+ <output ID="/docDisplay_#{skin}.xhtml" NAME="output"
+ PATH="/docDisplay_#{skin}.xhtml" TARGET="#xdocDisplay*" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/wiki.xhtml" NAME="output1" PATH="/wiki.xhtml"
+ TARGET="#xwiki.xhtml" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/message.xhtml" NAME="output2" PATH="/message.xhtml"
+ TARGET="#x*" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/docEdit_#{skin}.xhtml" NAME="output3"
+ PATH="/docEdit_#{skin}.xhtml" TARGET="#xdocEdit*" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item ID="#docEdit*" NAME="#xdocEdit*" PATH="/docEdit*"
+ SHAPE="304,241,0,0" TYPE="page" model-entity="SeamPagesDiagramItem">
+ <output ID="/wiki.xhtml" NAME="output" PATH="/wiki.xhtml"
+ TARGET="#xwiki.xhtml" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/docDisplay_#{skin}" NAME="output1"
+ PATH="/docDisplay_#{skin}" TARGET="#xdocDisplay*" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/dirDisplay_#{skin}.xhtml" NAME="output2"
+ PATH="/dirDisplay_#{skin}.xhtml" TARGET="#xdirDisplay*" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/dirDisplay_#{skin}.xhtml" NAME="output3"
+ PATH="/dirDisplay_#{skin}.xhtml" TARGET="#xdirDisplay*" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item ID="#dirDisplay*" NAME="#xdirDisplay*" PATH="/dirDisplay*"
+ SHAPE="1104,225,0,0" TYPE="page" model-entity="SeamPagesDiagramItem">
+ <output ID="/wiki.xhtml" NAME="output" PATH="/wiki.xhtml"
+ TARGET="#xwiki.xhtml" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item ID="#dirEdit*" NAME="#xdirEdit*" PATH="/dirEdit*"
+ SHAPE="560,433,0,0" TYPE="page" model-entity="SeamPagesDiagramItem">
+ <output ID="/wiki.xhtml" NAME="output" PATH="/wiki.xhtml"
+ TARGET="#xwiki.xhtml" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/dirDisplay_#{skin}.xhtml" NAME="output1"
+ PATH="/dirDisplay_#{skin}.xhtml" TARGET="#xdirDisplay*" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/dirDisplay_#{skin}.xhtml" NAME="output2"
+ PATH="/dirDisplay_#{skin}.xhtml" TARGET="#xdirDisplay*" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/dirDisplay_#{skin}.xhtml" NAME="output3"
+ PATH="/dirDisplay_#{skin}.xhtml" TARGET="#xdirDisplay*" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item ID="#fileEdit*" NAME="#xfileEdit*" PATH="/fileEdit*"
+ SHAPE="560,641,0,0" TYPE="page" model-entity="SeamPagesDiagramItem">
+ <output ID="/wiki.xhtml" NAME="output" PATH="/wiki.xhtml"
+ TARGET="#xwiki.xhtml" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/dirDisplay_#{skin}.xhtml" NAME="output1"
+ PATH="/dirDisplay_#{skin}.xhtml" TARGET="#xdirDisplay*" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/dirDisplay_#{skin}.xhtml" NAME="output2"
+ PATH="/dirDisplay_#{skin}.xhtml" TARGET="#xdirDisplay*" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item ID="#tagDisplay*" NAME="#xtagDisplay*" PATH="/tagDisplay*"
+ SHAPE="32,1105,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#search*" NAME="#xsearch*" PATH="/search*"
+ SHAPE="560,225,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#adminHome*" NAME="#xadminHome*" PATH="/adminHome*"
+ SHAPE="240,1121,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#userRegister*" NAME="#xuserRegister*" PATH="/userRegister*"
+ SHAPE="304,833,0,0" TYPE="page" model-entity="SeamPagesDiagramItem">
+ <output ID="/userHome_#{skin}.xhtml" NAME="output"
+ PATH="/userHome_#{skin}.xhtml" TARGET="#xuserHome*" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/wiki.xhtml" NAME="output1" PATH="/wiki.xhtml"
+ TARGET="#xwiki.xhtml" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item ID="#userHome*" NAME="#xuserHome*" PATH="/userHome*"
+ SHAPE="560,817,0,0" TYPE="page" model-entity="SeamPagesDiagramItem">
+ <output ID="/wiki.xhtml" NAME="output" PATH="/wiki.xhtml"
+ TARGET="#xwiki.xhtml" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/wiki.xhtml" NAME="output1" PATH="/wiki.xhtml"
+ TARGET="#xwiki.xhtml" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item ID="#userList*" NAME="#xuserList*" PATH="/userList*"
+ SHAPE="448,1105,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#confirmRegistration.xhtml"
+ NAME="#xconfirmRegistration.xhtml" PATH="/confirmRegistration.xhtml"
+ SHAPE="560,961,0,0" TYPE="page" model-entity="SeamPagesDiagramItem">
+ <output ID="/wiki.xhtml" NAME="output" PATH="/wiki.xhtml"
+ TARGET="#xwiki.xhtml" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/wiki.xhtml" NAME="output1" PATH="/wiki.xhtml"
+ TARGET="#xwiki.xhtml" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item ID="#*" NAME="#x*" PATH="/*" SHAPE="304,33,0,0" TYPE="page" model-entity="SeamPagesDiagramItem">
+ <output ID="/wiki.xhtml" NAME="output" PATH="/wiki.xhtml"
+ TARGET="#xwiki.xhtml" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/search_#{skin}.xhtml" NAME="output1"
+ PATH="/search_#{skin}.xhtml" TARGET="#xsearch*" model-entity="SeamPagesDiagramItemOutput"/>
+ <output ID="/message.xhtml" NAME="output2" PATH="/message.xhtml"
+ TARGET="#x*" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item ID="#docHistory_d.xhtml" NAME="#xdocHistory_d.xhtml"
+ PATH="/docHistory_d.xhtml" SHAPE="656,1121,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#docEdit_d.xhtml" NAME="#xdocEdit_d.xhtml"
+ PATH="/docEdit_d.xhtml" SHAPE="864,1105,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#dirEdit_d.xhtml" NAME="#xdirEdit_d.xhtml"
+ PATH="/dirEdit_d.xhtml" SHAPE="1072,1121,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#fileEdit_d.xhtml" NAME="#xfileEdit_d.xhtml"
+ PATH="/fileEdit_d.xhtml" SHAPE="32,1217,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#search_d.xhtml" NAME="#xsearch_d.xhtml"
+ PATH="/search_d.xhtml" SHAPE="240,1233,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#adminHome_d.xhtml" NAME="#xadminHome_d.xhtml"
+ PATH="/adminHome_d.xhtml" SHAPE="448,1217,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#userRegister_d.xhtml" NAME="#xuserRegister_d.xhtml"
+ PATH="/userRegister_d.xhtml" SHAPE="656,1233,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#userHome_d.xhtml" NAME="#xuserHome_d.xhtml"
+ PATH="/userHome_d.xhtml" SHAPE="864,1217,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#userList_d.xhtml" NAME="#xuserList_d.xhtml"
+ PATH="/userList_d.xhtml" SHAPE="1072,1233,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#docHistory_m.xhtml" NAME="#xdocHistory_m.xhtml"
+ PATH="/docHistory_m.xhtml" SHAPE="32,1329,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#docEdit_m.xhtml" NAME="#xdocEdit_m.xhtml"
+ PATH="/docEdit_m.xhtml" SHAPE="240,1345,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#dirEdit_m.xhtml" NAME="#xdirEdit_m.xhtml"
+ PATH="/dirEdit_m.xhtml" SHAPE="448,1329,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#fileEdit_m.xhtml" NAME="#xfileEdit_m.xhtml"
+ PATH="/fileEdit_m.xhtml" SHAPE="656,1345,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#search_m.xhtml" NAME="#xsearch_m.xhtml"
+ PATH="/search_m.xhtml" SHAPE="864,1329,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#adminHome_m.xhtml" NAME="#xadminHome_m.xhtml"
+ PATH="/adminHome_m.xhtml" SHAPE="1072,1345,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#userRegister_m.xhtml" NAME="#xuserRegister_m.xhtml"
+ PATH="/userRegister_m.xhtml" SHAPE="32,1441,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#userHome_m.xhtml" NAME="#xuserHome_m.xhtml"
+ PATH="/userHome_m.xhtml" SHAPE="240,1457,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="#userList_m.xhtml" NAME="#xuserList_m.xhtml"
+ PATH="/userList_m.xhtml" SHAPE="448,1441,0,0" TYPE="page" model-entity="SeamPagesDiagramItem"/>
+ <item ID="org.jboss.seam.framework.EntityNotFoundException"
+ NAME="org.jboss.seam.framework.EntityNotFoundException"
+ SHAPE="656,1457,0,0" TYPE="exception" model-entity="SeamPagesDiagramItem"/>
+ <item ID="org.jboss.seam.security.AuthorizationException"
+ NAME="org.jboss.seam.security.AuthorizationException"
+ SHAPE="32,225,0,0" TYPE="exception" model-entity="SeamPagesDiagramItem">
+ <output ID="/message.xhtml" NAME="output" PATH="/message.xhtml"
+ TARGET="#x*" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item ID="javax.persistence.OptimisticLockException"
+ NAME="javax.persistence.OptimisticLockException" SHAPE="32,433,0,0"
+ TYPE="exception" model-entity="SeamPagesDiagramItem">
+ <output ID="/message.xhtml" NAME="output" PATH="/message.xhtml"
+ TARGET="#x*" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+ <item SHAPE="32,641,0,0" TYPE="exception" model-entity="SeamPagesDiagramItem">
+ <output ID="/message.xhtml" NAME="output" PATH="/message.xhtml"
+ TARGET="#x*" model-entity="SeamPagesDiagramItemOutput"/>
+ </item>
+</diagram>
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/pages/wiki.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/pages/wiki.xml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/projects/Test/pages/wiki.xml 2008-06-09 12:05:31 UTC (rev 8643)
@@ -0,0 +1,360 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pages xmlns="http://jboss.com/products/seam/pages"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd">
+ <page view-id="/wiki.xhtml">
+ <param name="nodeId" value="#{wikiRequestResolver.nodeId}"/>
+ <param name="areaName" value="#{wikiRequestResolver.areaName}"/>
+ <param name="nodeName" value="#{wikiRequestResolver.nodeName}"/>
+ <param name="message" value="#{wikiRequestResolver.message}"/>
+ <action execute="#{wikiRequestResolver.resolve}"/>
+ <navigation>
+ <rule if-outcome="docDisplay">
+ <raise-event type="DocumentHome.init"/>
+ <render view-id="/docDisplay_#{skin}.xhtml"/>
+ </rule>
+ <rule if-outcome="dirDisplay">
+ <raise-event type="DirectoryHome.init"/>
+ <render view-id="/dirDisplay_#{skin}.xhtml"/>
+ </rule>
+ </navigation>
+ </page>
+
+ <page view-id="/docDisplay*">
+ <param name="documentId" value="#{documentHome.nodeId}"/>
+ <action execute="#{documentHome.init}"/>
+ <navigation>
+ <rule if-outcome="missingParameters">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/wiki.xhtml"/>
+ </rule>
+ </navigation>
+ </page>
+
+ <page view-id="/docHistory*" no-conversation-view-id="/wiki.xhtml">
+ <param name="nodeId" value="#{nodeHistory.nodeId}"/>
+ <param name="historicalNodeId" value = "#{nodeHistory.historicalNodeId}"/>
+ <action execute="#{nodeHistory.init}"/>
+ <begin-conversation flush-mode="MANUAL" join="true"/>
+ <navigation>
+ <rule if-outcome="exit">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/docDisplay_#{skin}.xhtml">
+ <param name="documentId" value="#{nodeHistory.currentNode.id}"/>
+ </redirect>
+ </rule>
+ <rule if-outcome="purgedHistory">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/wiki.xhtml">
+ <param name="nodeId" value="#{nodeHistory.currentNode.id}"/>
+ <param name="message" value="purgedHistory"/>
+ </redirect>
+ </rule>
+
+ <rule if-outcome="missingParameters">
+ <end-conversation/>
+ <redirect view-id="/message.xhtml">
+ <message severity="ERROR">No request parameters specified.</message>
+ </redirect>
+ </rule>
+ <rule if-outcome="rollback">
+ <redirect view-id="/docEdit_#{skin}.xhtml">
+ <param name="documentId" value="#{nodeHistory.currentNode.id}"/>
+ <param name="parentDirectoryId" value="#{nodeHistory.currentNode.parent.id}"/>
+ </redirect>
+ </rule>
+ </navigation>
+ </page>
+
+ <page view-id="/docEdit*" no-conversation-view-id="/wiki.xhtml">
+ <param name="documentId" value="#{documentHome.nodeId}"/>
+ <param name="parentDirectoryId" value="#{documentHome.parentDirectoryId}"/>
+ <action execute="#{documentHome.init}"/>
+ <begin-conversation flush-mode="MANUAL" join="true"/>
+
+ <navigation>
+ <rule if-outcome="missingParameters">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/wiki.xhtml"/>
+ </rule>
+ <rule if-outcome="exitManaged">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/docDisplay_#{skin}"/>
+ </rule>
+ <rule if-outcome="exitUnmanaged">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/dirDisplay_#{skin}.xhtml">
+ <param name="directoryId" value="#{documentHome.parentDirectoryId}"/>
+ </redirect>
+ </rule>
+ <rule if-outcome="removed">
+ <end-conversation/>
+ <redirect view-id="/dirDisplay_#{skin}.xhtml">
+ <param name="directoryId" value="#{documentHome.parentDirectoryId}"/>
+ </redirect>
+ </rule>
+ </navigation>
+ </page>
+
+ <page view-id="/dirDisplay*">
+ <param name="directoryId" value="#{directoryHome.nodeId}"/>
+ <action execute="#{directoryHome.init}"/>
+ <navigation>
+ <rule if-outcome="missingParameters">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/wiki.xhtml"/>
+ </rule>
+ </navigation>
+ </page>
+
+ <page view-id="/dirEdit*" no-conversation-view-id="/wiki.xhtml">
+ <param name="directoryId" value="#{directoryHome.nodeId}"/>
+ <param name="parentDirectoryId" value="#{directoryHome.parentDirectoryId}"/>
+ <action execute="#{directoryHome.init}"/>
+ <begin-conversation flush-mode="MANUAL" join="true"/>
+
+ <navigation>
+ <rule if-outcome="missingParameters">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/wiki.xhtml"/>
+ </rule>
+ <rule if-outcome="exitManaged">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/dirDisplay_#{skin}.xhtml"/>
+ </rule>
+ <rule if-outcome="exitUnmanaged">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/dirDisplay_#{skin}.xhtml">
+ <param name="directoryId" value="#{directoryHome.parentDirectoryId}"/>
+ </redirect>
+ </rule>
+ <rule if-outcome="removed">
+ <end-conversation/>
+ <redirect view-id="/dirDisplay_#{skin}.xhtml">
+ <param name="directoryId" value="#{directoryHome.parentDirectoryId}"/>
+ </redirect>
+ </rule>
+ </navigation>
+ </page>
+
+ <page view-id="/fileEdit*" no-conversation-view-id="/wiki.xhtml">
+ <param name="fileId" value="#{fileHome.nodeId}"/>
+ <param name="parentDirectoryId" value="#{fileHome.parentDirectoryId}"/>
+ <action execute="#{fileHome.init}"/>
+ <begin-conversation flush-mode="MANUAL" join="true"/>
+
+ <navigation>
+ <rule if-outcome="missingParameters">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/wiki.xhtml"/>
+ </rule>
+ <rule if-outcome="exit">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/dirDisplay_#{skin}.xhtml">
+ <param name="directoryId" value="#{fileHome.parentDirectoryId}"/>
+ </redirect>
+ </rule>
+ <rule if-outcome="removed">
+ <end-conversation/>
+ <redirect view-id="/dirDisplay_#{skin}.xhtml">
+ <param name="directoryId" value="#{fileHome.parentDirectoryId}"/>
+ </redirect>
+ </rule>
+ </navigation>
+ </page>
+
+ <page view-id="/tagDisplay*">
+ <param name="tag" value="#{tagHome.tag}"/>
+ </page>
+
+ <page view-id="/search*">
+ <param name="query" value="#{wikiSearch.simpleQuery}"/>
+ <begin-conversation flush-mode="MANUAL" join="true"/>
+ </page>
+
+ <page view-id="/adminHome*" no-conversation-view-id="/wiki.xhtml">
+ <restrict>#{s:hasPermission('User', 'isAdmin', currentUser)}</restrict>
+ <begin-conversation flush-mode="MANUAL" join="true"/>
+ </page>
+
+ <page view-id="/userRegister*" no-conversation-view-id="/wiki.xhtml">
+ <action execute="#{userHome.init}"/>
+ <begin-conversation flush-mode="MANUAL" join="true"/>
+ <navigation>
+ <rule if-outcome="persisted" if="#{s:hasPermission('User', 'isAdmin', currentUser)}">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/userHome_#{skin}.xhtml">
+ <param name="userId" value="#{userHome.userId}"/>
+ </redirect>
+ </rule>
+ <rule if-outcome="persisted">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/wiki.xhtml">
+ <param name="message" value="lacewiki.msg.AccountCreatedConfirmationSent"/>
+ </redirect>
+ </rule>
+ </navigation>
+ </page>
+
+ <page view-id="/userHome*" no-conversation-view-id="/wiki.xhtml">
+ <param name="userId" value="#{userHome.userId}"/>
+ <action execute="#{userHome.init}"/>
+ <begin-conversation flush-mode="MANUAL" join="true"/>
+ <navigation>
+ <rule if-outcome="updatedCurrentCredentials">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/wiki.xhtml">
+ <param name="message" value="lacewiki.msg.UpdatedCurrentCredentials"/>
+ </redirect>
+ </rule>
+ <rule if-outcome="removed">
+ <end-conversation/>
+ <redirect view-id="/wiki.xhtml"/>
+ </rule>
+ </navigation>
+ </page>
+
+ <page view-id="/userList*">
+ <begin-conversation flush-mode="MANUAL" join="true"/>
+ </page>
+
+ <page view-id="/confirmRegistration.xhtml" action="#{authenticator.activate}">
+ <param name="activationCode" value="#{authenticator.activationCode}"/>
+ <navigation>
+ <rule if-outcome="activated">
+ <redirect view-id="/wiki.xhtml">
+ <param name="message" value="lacewiki.msg.AccountActivatedPleaseLogin"/>
+ </redirect>
+ </rule>
+ <rule if-outcome="notFound">
+ <redirect view-id="/wiki.xhtml">
+ <param name="message" value="lacewiki.msg.InvalidActivationCode"/>
+ </redirect>
+ </rule>
+ </navigation>
+ </page>
+
+ <page view-id="/*">
+
+ <navigation>
+
+ <!-- Go to start page on logout because the session has been invalidated -->
+ <rule if-outcome="loggedOut">
+ <end-conversation before-redirect="true"/>
+ <redirect view-id="/wiki.xhtml"/>
+ </rule>
+
+ <!-- 'search' is a POST submit, turn it into a bookmarkable GET -->
+ <rule if-outcome="search">
+ <redirect view-id="/search_#{skin}.xhtml"/>
+ </rule>
+
+ <rule if-outcome="error">
+ <redirect view-id="/message.xhtml">
+ <message severity="ERROR">#{messages['lacewiki.msg.FatalError']}</message>
+ </redirect>
+ </rule>
+ </navigation>
+
+ </page>
+
+ <!-- Page descriptions don't support wildcards -->
+ <page view-id="/docHistory_d.xhtml">
+ <description>#{messages['lacewiki.label.docHistory.DocumentHistory']}</description>
+ </page>
+ <page view-id="/docEdit_d.xhtml">
+ <description>#{documentHome.idDefined
+ ? messages['lacewiki.label.docEdit.EditDocument']
+ : messages['lacewiki.label.docEdit.CreateDocument']}</description>
+ </page>
+ <page view-id="/dirEdit_d.xhtml">
+ <description>#{directoryHome.idDefined
+ ? messages['lacewiki.label.dirEdit.EditDirectory']
+ : messages['lacewiki.label.dirEdit.CreateDirectory']}</description>
+ </page>
+ <page view-id="/fileEdit_d.xhtml">
+ <description>#{fileHome.idDefined
+ ? messages['lacewiki.label.fileEdit.EditFile']
+ : messages['lacewiki.label.fileEdit.UploadFile']}</description>
+ </page>
+ <page view-id="/search_d.xhtml">
+ <description>#{messages['lacewiki.label.search.Search']} (#{messages['lacewiki.label.search.Results']}: #{wikiSearch.searchResult.size})</description>
+ </page>
+ <page view-id="/adminHome_d.xhtml">
+ <description>#{messages['lacewiki.label.adminHome.Administration']}</description>
+ </page>
+ <page view-id="/userRegister_d.xhtml">
+ <description>#{identity.loggedIn
+ ? messages['lacewiki.label.userRegister.CreateNewAccount']
+ : messages['lacewiki.label.userRegister.RegisterNewAccount']}</description>
+ </page>
+ <page view-id="/userHome_d.xhtml">
+ <description>#{messages['lacewiki.label.userHome.EditUser']}: #{userHome.instance.username}</description>
+ </page>
+ <page view-id="/userList_d.xhtml">
+ <description>#{messages['lacewiki.label.userList.MemberList']} (#{messages['lacewiki.label.userList.Results']}: #{userSearch.rowCount})</description>
+ </page>
+
+
+ <page view-id="/docHistory_m.xhtml">
+ <description>#{messages['lacewiki.label.docHistory.DocumentHistory']}</description>
+ </page>
+ <page view-id="/docEdit_m.xhtml">
+ <description>#{documentHome.idDefined
+ ? messages['lacewiki.label.docEdit.EditDocument']
+ : messages['lacewiki.label.docEdit.CreateDocument']}</description>
+ </page>
+ <page view-id="/dirEdit_m.xhtml">
+ <description>#{directoryHome.idDefined
+ ? messages['lacewiki.label.dirEdit.EditDirectory']
+ : messages['lacewiki.label.dirEdit.CreateDirectory']}</description>
+ </page>
+ <page view-id="/fileEdit_m.xhtml">
+ <description>#{fileHome.idDefined
+ ? messages['lacewiki.label.fileEdit.EditFile']
+ : messages['lacewiki.label.fileEdit.UploadFile']}</description>
+ </page>
+ <page view-id="/search_m.xhtml">
+ <description>#{messages['lacewiki.label.search.Search']} (#{messages['lacewiki.label.search.Results']}: #{wikiSearch.searchResult.size})</description>
+ </page>
+ <page view-id="/adminHome_m.xhtml">
+ <description>#{messages['lacewiki.label.adminHome.Administration']}</description>
+ </page>
+ <page view-id="/userRegister_m.xhtml">
+ <description>#{identity.loggedIn
+ ? messages['lacewiki.label.userRegister.CreateNewAccount']
+ : messages['lacewiki.label.userRegister.RegisterNewAccount']}</description>
+ </page>
+ <page view-id="/userHome_m.xhtml">
+ <description>#{messages['lacewiki.label.userHome.EditUser']}: #{userHome.instance.username}</description>
+ </page>
+ <page view-id="/userList_m.xhtml">
+ <description>#{messages['lacewiki.label.userList.MemberList']} (#{messages['lacewiki.label.userList.Results']}: #{userSearch.rowCount})</description>
+ </page>
+
+
+ <exception class="org.jboss.seam.framework.EntityNotFoundException">
+ <end-conversation/>
+ <http-error error-code="404"/>
+ </exception>
+
+ <exception class="org.jboss.seam.security.AuthorizationException">
+ <end-conversation/>
+ <redirect view-id="/message.xhtml">
+ <message severity="WARN">#{messages['lacewiki.msg.AccessDenied']}: #{org.jboss.seam.handledException.message}</message>
+ </redirect>
+ </exception>
+
+ <exception class="javax.persistence.OptimisticLockException">
+ <end-conversation/>
+ <redirect view-id="/message.xhtml">
+ <message severity="ERROR">#{messages['lacewiki.msg.OptimisticLockError']}</message>
+ </redirect>
+ </exception>
+
+ <exception>
+ <redirect view-id="/message.xhtml">
+ <message severity="ERROR">Exception: #{org.jboss.seam.exception.message}</message>
+ </redirect>
+ </exception>
+
+</pages>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/seam/pages/xml/test/SeamPagesXMLAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/seam/pages/xml/test/SeamPagesXMLAllTests.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/seam/pages/xml/test/SeamPagesXMLAllTests.java 2008-06-09 12:05:31 UTC (rev 8643)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * 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.seam.pages.xml.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * @author V.Kabanovich
+ *
+ */
+public class SeamPagesXMLAllTests {
+ public static final String PLUGIN_ID = "org.jboss.tools.seam.pages.xml";
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+ suite.setName("All tests for " + PLUGIN_ID);
+ suite.addTestSuite(SeamPagesXMLModelTest.class);
+
+ return suite;
+ }
+}
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/seam/pages/xml/test/SeamPagesXMLModelTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/seam/pages/xml/test/SeamPagesXMLModelTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/src/org/jboss/tools/seam/pages/xml/test/SeamPagesXMLModelTest.java 2008-06-09 12:05:31 UTC (rev 8643)
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * 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.seam.pages.xml.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.seam.pages.xml.model.SeamPagesConstants;
+import org.jboss.tools.seam.pages.xml.model.helpers.SeamPagesDiagramHelper;
+import org.jboss.tools.seam.pages.xml.model.helpers.SeamPagesDiagramStructureHelper;
+import org.jboss.tools.seam.pages.xml.model.impl.SeamPagesDiagramImpl;
+import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.test.util.xpl.EditorTestHelper;
+
+public class SeamPagesXMLModelTest extends TestCase {
+ IProject project = null;
+
+ public SeamPagesXMLModelTest() {
+ super("Seam Scanner test");
+ }
+
+ protected void setUp() throws Exception {
+ project = ResourcesUtils.importProject(
+ "org.jboss.tools.seam.pages.xml.test","/projects/Test" , new NullProgressMonitor());
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ EditorTestHelper.joinBackgroundActivities();
+ }
+
+ /**
+ * This test is to check different cases of declaring components in xml.
+ * It does not check interaction of xml declaration with other declarations.
+ */
+ public void testXMLModel() {
+ IFile f = project.getFile(new Path("pages/wiki.xml"));
+ assertNotNull("File pages/wiki.xml is not found in Test project.", f);
+
+ XModelObject fileObject = EclipseResourceUtil.createObjectForResource(f);
+ assertNotNull("Cannot create XModel object for file pages/wiki.xml.", fileObject);
+
+ String entity = fileObject.getModelEntity().getName();
+ assertEquals("File pages/wiki.xml is incorrectly parsed by XModel.", SeamPagesConstants.ENT_FILE_SEAM_PAGES_20, entity);
+
+ XModelObject diagramXML = SeamPagesDiagramStructureHelper.instance.getProcess(fileObject);
+ assertNotNull("Cannot find XModel diagram object for file pages/wiki.xml.", diagramXML);
+
+ if(!(diagramXML instanceof SeamPagesDiagramImpl)) {
+ fail("XModel diagram object must be instance of SeamPagesDiagramImpl.");
+ }
+
+ SeamPagesDiagramImpl impl = (SeamPagesDiagramImpl)diagramXML;
+ //invoke loading
+ diagramXML.getChildren();
+
+ SeamPagesDiagramHelper h = impl.getHelper();
+
+ checkTargetMatch("/docDisplay#{a}", h, "/docDisplay*");
+ checkTargetMatch("/docDisplay", h, "/docDisplay*");
+ checkTargetMatch("/docDispla", h, "/*");
+
+ //TODO continue test
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ EditorTestHelper.joinJobs(1000, 10000, 500);
+ project.delete(true,true, null);
+ }
+
+ private void checkTargetMatch(String targetViewId, SeamPagesDiagramHelper h, String expectedMatch) {
+ String s = h.findBestMatch(targetViewId);
+ assertEquals("Match for target view id is incorrectly computed.", expectedMatch, s);
+ }
+}
17 years, 10 months
JBoss Tools SVN: r8642 - trunk/seam/tests.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-06-09 08:04:16 -0400 (Mon, 09 Jun 2008)
New Revision: 8642
Added:
trunk/seam/tests/org.jboss.tools.seam.pages.xml.test/
Log:
Initial import.
17 years, 10 months
JBoss Tools SVN: r8641 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-06-09 07:22:49 -0400 (Mon, 09 Jun 2008)
New Revision: 8641
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEventBean.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
Log:
http://jira.jboss.org/jira/browse/JBIDE-675
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-06-09 11:21:42 UTC (rev 8640)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-06-09 11:22:49 UTC (rev 8641)
@@ -20,6 +20,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobManager;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IContributionItem;
@@ -139,6 +140,7 @@
import org.jboss.tools.vpe.editor.util.TemplateManagingUtil;
import org.jboss.tools.vpe.editor.util.TextUtil;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.jboss.tools.vpe.editor.util.VpeDebugUtil;
import org.jboss.tools.vpe.editor.util.VpeDndUtil;
import org.jboss.tools.vpe.messages.VpeUIMessages;
import org.jboss.tools.vpe.selbar.SelectionBar;
@@ -151,7 +153,6 @@
import org.mozilla.interfaces.nsIDOMMouseEvent;
import org.mozilla.interfaces.nsIDOMMutationEvent;
import org.mozilla.interfaces.nsIDOMNode;
-import org.mozilla.interfaces.nsIDOMNodeList;
import org.mozilla.interfaces.nsISelection;
import org.mozilla.interfaces.nsISelectionListener;
import org.mozilla.interfaces.nsISupports;
@@ -212,11 +213,16 @@
private UIJob job = null;
private LinkedList<Job> jobQueue;
private IProgressMonitor progressMonitor;
- private Object mutex = new Object();
+ private UIJob uiJob;
+ /**
+ * Added by Max Areshkau
+ * JBIDE-675, stores information about modification events
+ */
+ private LinkedList<VpeEventBean> changeEvents;
Shell tip;
- public final static String MODEL_FLAVOR = ModelTransfer.MODEL; //$NON-NLS-1$
+ public final static String MODEL_FLAVOR = ModelTransfer.MODEL;
public VpeController(VpeEditorPart editPart) {
@@ -226,7 +232,7 @@
void init(StructuredTextEditor sourceEditor, MozillaEditor visualEditor)
throws Exception {
- this.sourceEditor = sourceEditor;
+ this.sourceEditor = sourceEditor;
if (sourceEditor instanceof IJSPTextEditor) {
((IJSPTextEditor) sourceEditor).setVPEController(this);
dropWindow.setEditor((IJSPTextEditor) sourceEditor);
@@ -320,10 +326,17 @@
}
public void dispose() {
+
if (job != null) {
job.cancel();
job = null;
}
+
+ if(uiJob!=null) {
+ uiJob.cancel();
+ getChangeEvents().clear();
+ uiJob=null;
+ }
if (optionsListener != null) {
XModelObject optionsObject = ModelUtilities.getPreferenceModel()
.getByPath(VpePreference.EDITOR_PATH);
@@ -416,54 +429,46 @@
display = PlatformUI.getWorkbench().getDisplay();
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){
+
+ getChangeEvents().addLast(new VpeEventBean(notifier, eventType, feature, oldValue,newValue, pos));
+
+ if(uiJob==null || uiJob.getState()==Job.NONE) {
+ uiJob = new UIJob(VpeUIMessages.VPE_UPDATE_JOB_TITLE){
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
-
- synchronized (mutex) {
+ monitor.beginTask(VpeUIMessages.VPE_UPDATE_JOB_TITLE, 100);
+ while(getChangeEvents().size()>0) {
+ VpeDebugUtil.debugInfo(getChangeEvents().size()+"\n"); //$NON-NLS-1$
+ monitor.worked((int)(100/getChangeEvents().size()));
+ VpeEventBean eventBean = getChangeEvents().getFirst();
+ if (monitor.isCanceled()) {
+ getChangeEvents().clear();
+ return Status.CANCEL_STATUS;
+ }
+ try {
+ notifyChangedInUiThread(eventBean.getNotifier(), eventBean.getEventType(),
+ eventBean.getFeature(), eventBean.getOldValue(), eventBean.getNewValue(),
+ eventBean.getPos());
+ } catch (NullPointerException ex) {
+ //TODO Max Areshkau
+ //JBIDE-675 find possability correctly resolve nulpointer
+ //exception when we closse editor and job is executed
+ VpePlugin.getPluginLog().logError(ex);
+ }
+ getChangeEvents().remove(eventBean);
+ }
+ monitor.done();
- if (monitor.isCanceled()) {
- getJobQueue().clear();
- return Status.CANCEL_STATUS;
- }
- 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();
- }else {
- monitor.done();
- }
- }
return Status.OK_STATUS;
- }};
- nonUIJob.setPriority(Job.LONG);
- getJobQueue().addLast(nonUIJob);
- if(getJobQueue().size()==1) {
- setProgressMonitor(null);
- nonUIJob.setProgressGroup(getProgressMonitor(), 100);
- getProgressMonitor().beginTask(VpeUIMessages.VPE_UPDATE_JOB_TITLE, IProgressMonitor.UNKNOWN);
- Job job = getJobQueue().getFirst();
- job.schedule();
- } else {
-
- nonUIJob.setProgressGroup(getProgressMonitor(), 100);
}
+ };
+ uiJob.setPriority(Job.LONG);
+ uiJob.schedule();
+ }
+
+
return;
}
// start job when we modify file in non ui thread
@@ -645,7 +650,7 @@
//we should processed if we have correct view in visual editor,
//otherwise we shouldn't process this event
- if(getJobQueue().size()>0) {
+ if(getChangeEvents().size()>0) {
return;
}
@@ -2876,17 +2881,6 @@
}
synced = true;
}
- /**
- * @return the jobQueue
- */
- private LinkedList<Job> getJobQueue() {
-
- if(jobQueue==null) {
-
- jobQueue = new LinkedList<Job>();
- }
- return jobQueue;
- }
/**
* @return the progressMonitor
@@ -2909,4 +2903,16 @@
this.progressMonitor = progressMonitor;
}
+ /**
+ * @return the changeEvents
+ */
+ public LinkedList<VpeEventBean> getChangeEvents() {
+
+ if(changeEvents==null) {
+
+ changeEvents = new LinkedList<VpeEventBean>();
+ }
+ return changeEvents;
+ }
+
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEventBean.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEventBean.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEventBean.java 2008-06-09 11:22:49 UTC (rev 8641)
@@ -0,0 +1,96 @@
+/*******************************************************************************
+* 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.wst.sse.core.internal.provisional.INodeNotifier;
+
+/**
+ * Class created to store information about source editor update event.
+ * This class store links on parameters which using for call VpeController.notifyChanged method
+ *
+ * @author mareshkau
+ *
+ */
+public class VpeEventBean {
+
+ private INodeNotifier notifier;
+
+ private int eventType;
+
+ private Object feature;
+
+ private Object oldValue;
+
+ private Object newValue;
+
+ private int pos;
+
+ /**
+ * @param eventType
+ * @param feature
+ * @param newValue
+ * @param notifier
+ * @param oldValue
+ * @param pos
+ */
+ public VpeEventBean(INodeNotifier notifier,int eventType, Object feature, Object oldValue,
+ Object newValue, int pos) {
+ this.eventType = eventType;
+ this.feature = feature;
+ this.newValue = newValue;
+ this.notifier = notifier;
+ this.oldValue = oldValue;
+ this.pos = pos;
+ }
+
+ /**
+ * @return the notifier
+ */
+ public INodeNotifier getNotifier() {
+ return notifier;
+ }
+
+ /**
+ * @return the eventType
+ */
+ public int getEventType() {
+ return eventType;
+ }
+
+ /**
+ * @return the feature
+ */
+ public Object getFeature() {
+ return feature;
+ }
+
+ /**
+ * @return the oldValue
+ */
+ public Object getOldValue() {
+ return oldValue;
+ }
+
+ /**
+ * @return the newValue
+ */
+ public Object getNewValue() {
+ return newValue;
+ }
+
+ /**
+ * @return the pos
+ */
+ public int getPos() {
+ return pos;
+ }
+
+}
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-06-09 11:21:42 UTC (rev 8640)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-06-09 11:22:49 UTC (rev 8641)
@@ -447,6 +447,11 @@
//reads and dispatch events
getPageContext().processDisplayEvents();
+ //check source node can be changed and link can be a null in this case
+ //we shouldn't process this node
+ if(sourceNode==null) {
+ return null;
+ }
switch (sourceNode.getNodeType()) {
case Node.ELEMENT_NODE:
17 years, 10 months
JBoss Tools SVN: r8640 - 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-06-09 07:21:42 -0400 (Mon, 09 Jun 2008)
New Revision: 8640
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.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
Log:
Fix templates.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2008-06-09 09:55:05 UTC (rev 8639)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2008-06-09 11:21:42 UTC (rev 8640)
@@ -336,59 +336,8 @@
}
- /**
- * Removes the attribute.
- *
- * @param sourceElement the source element
- * @param visualDocument the visual document
- * @param visualNode the visual node
- * @param data the data
- * @param pageContext the page context
- * @param name the name
- */
- @Override
- public void removeAttribute(VpePageContext pageContext, Element sourceElement, nsIDOMDocument visualDocument, nsIDOMNode visualNode,
- Object data, String name) {
- super.removeAttribute(pageContext, sourceElement, visualDocument, visualNode, data, name);
- final nsIDOMElement span = (nsIDOMElement) visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- if (RichFaces.ATTR_STYLE_CLASS.equals(name)) {
- span.setAttribute(HTML.ATTR_CLASS, DEFAULT_NULL_VALUE);
- } else if (RichFaces.ATTR_VALUE.equals(name)) {
- span.removeChild(span.getFirstChild());
- span.appendChild(visualDocument.createTextNode(DEFAULT_NULL_VALUE));
- }
-
- }
-
/**
- * Sets the attribute.
- *
- * @param sourceElement the source element
- * @param value the value
- * @param visualDocument the visual document
- * @param visualNode the visual node
- * @param data the data
- * @param pageContext the page context
- * @param name the name
- */
- @Override
- public void setAttribute(VpePageContext pageContext, Element sourceElement, nsIDOMDocument visualDocument, nsIDOMNode visualNode,
- Object data, String name, String value) {
- super.setAttribute(pageContext, sourceElement, visualDocument, visualNode, data, name, value);
-
- final nsIDOMElement span = (nsIDOMElement) visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- if (RichFaces.ATTR_VALUE.equals(name)) {
- final nsIDOMText text = visualDocument.createTextNode(((value == null) || (value.length() == 0) ? DEFAULT_NULL_VALUE : value));
-
- span.removeChild(span.getFirstChild());
- span.appendChild(text);
- } else if (RichFaces.ATTR_STYLE_CLASS.equals(name)) {
- span.setAttribute(HTML.ATTR_CLASS, ((value == null) || (value.length() == 0) ? RICH_INPLACE_VIEW_DEFAULT_STYLE_CLASS : value));
- }
- }
-
- /**
* Sets the up img.
*
* @param i * @param width the width
@@ -457,6 +406,8 @@
}
+ protected abstract String getCssStylesControlSuffix();
+
/**
* Creates the controls div.
@@ -470,13 +421,13 @@
protected nsIDOMElement createControlsDiv(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
final nsIDOMElement element = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- element.setAttribute(HTML.ATTR_CLASS, "rich-inplace"+getCssStylesSuffix()+"-controls-set");
+ element.setAttribute(HTML.ATTR_CLASS, "rich-inplace"+getCssStylesControlSuffix()+"-controls-set");
element.setAttribute(HTML.ATTR_STYLE, "position: absolute; top: " + controlsVerticalPositions.get(this.controlsVerticalPosition)
+ ";left:" + " " + controlsHorizontalPositions.get(this.controlsHorizontalPosition) + ";");
final nsIDOMElement divShadov = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- divShadov.setAttribute(HTML.ATTR_CLASS, "rich-inplace"+getCssExtension()+"-shadow");
+ divShadov.setAttribute(HTML.ATTR_CLASS, "rich-inplace"+getCssStylesSuffix()+"-shadow");
final nsIDOMElement divShadovTable = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
divShadovTable.setAttribute(HTML.ATTR_CELLPADDING, "0");
divShadovTable.setAttribute(HTML.ATTR_CELLSPACING, "0");
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-06-09 09:55:05 UTC (rev 8639)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2008-06-09 11:21:42 UTC (rev 8640)
@@ -18,6 +18,7 @@
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;
@@ -68,6 +69,7 @@
innerInput1.setAttribute(HTML.ATTR_STYLE, "top: 0px; width: " + this.inputWidth + ";");
innerInput1.setAttribute(HTML.ATTR_TYPE, "text");
innerInput1.setAttribute("autocomplete", "off");
+
if (showControls) {
rootSpan.appendChild(createControlsDiv(pageContext, sourceNode, visualDocument));
}
@@ -76,15 +78,24 @@
innerInput1.setAttribute(HTML.ATTR_TYPE, "button");
}
data = new VpeCreationData(rootSpan);
-// final DOMTreeDumper dumper = new DOMTreeDumper();
+ final DOMTreeDumper dumper = new DOMTreeDumper();
if (!isToggle) {
-
- rootSpan.appendChild(visualDocument.createTextNode(getValue()));
+ final String value = getValue();
+
+ if (value.equals(DEFAULT_NULL_VALUE)) {
+ final nsIDOMElement pre = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+
+ pre.appendChild(visualDocument.createTextNode("aaaa"));
+ pre.setAttribute(HTML.ATTR_STYLE,"width:100px;");
+ rootSpan.appendChild(pre);
+ } else {
+ rootSpan.appendChild(visualDocument.createTextNode(value));
+ }
} else {
innerInput1.setAttribute(HTML.ATTR_VALUE, this.sourceValue);
}
-// dumper.dumpToStream(System.err, rootSpan);
+ dumper.dumpToStream(System.err, rootSpan);
return data;
}
@@ -162,4 +173,12 @@
}
+ /**
+ * @see org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getCssStylesControlSuffix()
+ */
+ @Override
+ public String getCssStylesControlSuffix() {
+ return "-input";
+ }
+
}
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-06-09 09:55:05 UTC (rev 8639)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java 2008-06-09 11:21:42 UTC (rev 8640)
@@ -288,4 +288,12 @@
this.controlsVerticalPositions.put("center", "100px");
}
+ /**
+ * @see org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getCssStylesControlSuffix()
+ */
+ @Override
+ protected String getCssStylesControlSuffix() {
+ return this.getCssStylesSuffix();
+ }
+
}
17 years, 10 months
JBoss Tools SVN: r8639 - trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-06-09 05:55:05 -0400 (Mon, 09 Jun 2008)
New Revision: 8639
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/SelectOnDiagramHandler.java
Log:
JBIDE-2285
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/SelectOnDiagramHandler.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/SelectOnDiagramHandler.java 2008-06-09 09:54:58 UTC (rev 8638)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/SelectOnDiagramHandler.java 2008-06-09 09:55:05 UTC (rev 8639)
@@ -18,47 +18,67 @@
import org.jboss.tools.seam.pages.xml.model.SeamPagesConstants;
import org.jboss.tools.seam.pages.xml.model.helpers.SeamPagesDiagramStructureHelper;
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
public class SelectOnDiagramHandler extends AbstractHandler implements SeamPagesConstants {
- public SelectOnDiagramHandler() {}
+ public SelectOnDiagramHandler() {}
- public boolean isEnabled(XModelObject object) {
- return (object != null && object.isActive());
- }
+ public boolean isEnabled(XModelObject object) {
+ return (object != null && object.isActive());
+ }
- public void executeHandler(XModelObject object, Properties p) throws XModelException {
- if(object == null) return;
- String entity = object.getModelEntity().getName();
- if(entity.startsWith(SeamPagesConstants.ENT_NAVIGATION_RULE)
- || entity.startsWith(SeamPagesConstants.ENT_RULE)) {
- object = object.getChildByPath("target");
- }
- XModelObject item = getItemOnDiagram(object);
- if(item == null) return;
- FindObjectHelper.findModelObject(item, FindObjectHelper.IN_EDITOR_ONLY, "Diagram");
- FindObjectHelper.findModelObject(object, FindObjectHelper.IN_EDITOR_ONLY);
- }
+ public void executeHandler(XModelObject object, Properties p) throws XModelException {
+ if(object == null) return;
+ XModelObject item = getItemOnDiagram(object);
+ if(item == null) return;
+ FindObjectHelper.findModelObject(item, FindObjectHelper.IN_EDITOR_ONLY, "Diagram");
+ FindObjectHelper.findModelObject(object, FindObjectHelper.IN_EDITOR_ONLY);
+ }
- public static XModelObject getItemOnDiagram(XModelObject object) {
- if(object == null) return null;
- XModelObject diagram = SeamPagesDiagramStructureHelper.instance.getProcess(object);
- return (diagram == null) ? null : getItemOnDiagram(diagram, object);
- }
+ /**
+ *
+ * @param object
+ * @return the best match in diagram XML for argument file XML object.
+ */
+ public static XModelObject getItemOnDiagram(XModelObject object) {
+ if(object == null) return null;
+ String entity = object.getModelEntity().getName();
+ if(entity.startsWith(SeamPagesConstants.ENT_NAVIGATION_RULE)
+ || entity.startsWith(SeamPagesConstants.ENT_RULE)) {
+ object = object.getChildByPath("target");
+ } else if(entity.startsWith(SeamPagesConstants.ENT_NAVIGATION)) {
+ XModelObject[] cs = object.getChildren();
+ if(cs.length != 1) {
+ object = object.getParent();
+ } else {
+ object = cs[0].getChildByPath("target");
+ }
+ if(object == null) return null;
+ } else if(entity.startsWith(SeamPagesConstants.ENT_PARAM)) {
+ //or should we return object itself, if params are displayed by diagram?
+ return getItemOnDiagram(object.getParent());
+ }
+ XModelObject diagram = SeamPagesDiagramStructureHelper.instance.getProcess(object);
+ return (diagram == null) ? null : getItemOnDiagram(diagram, object);
+ }
- public static XModelObject getItemOnDiagram(XModelObject diagramObject, XModelObject object) {
- if(diagramObject instanceof ReferenceObject) {
- if(((ReferenceObject)diagramObject).getReference() == object) return diagramObject;
- }
- return getItemOnDiagram(diagramObject.getChildren(), object);
- }
+ private static XModelObject getItemOnDiagram(XModelObject diagramObject, XModelObject object) {
+ if(diagramObject instanceof ReferenceObject) {
+ if(((ReferenceObject)diagramObject).getReference() == object) return diagramObject;
+ }
+ return getItemOnDiagram(diagramObject.getChildren(), object);
+ }
- public static XModelObject getItemOnDiagram(XModelObject[] diagramObjects, XModelObject object) {
- for (int i = 0; i < diagramObjects.length; i++) {
- XModelObject cr = getItemOnDiagram(diagramObjects[i], object);
- if(cr != null) return cr;
- }
- return null;
- }
+ private static XModelObject getItemOnDiagram(XModelObject[] diagramObjects, XModelObject object) {
+ for (int i = 0; i < diagramObjects.length; i++) {
+ XModelObject cr = getItemOnDiagram(diagramObjects[i], object);
+ if(cr != null) return cr;
+ }
+ return null;
+ }
}
-
17 years, 10 months
JBoss Tools SVN: r8638 - trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-06-09 05:54:58 -0400 (Mon, 09 Jun 2008)
New Revision: 8638
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesEditor.java
Log:
JBIDE-2285
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-06-09 02:27:19 UTC (rev 8637)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesEditor.java 2008-06-09 09:54:58 UTC (rev 8638)
@@ -106,6 +106,7 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.XModelTransferBuffer;
import org.jboss.tools.seam.pages.xml.model.SeamPagesConstants;
+import org.jboss.tools.seam.pages.xml.model.handlers.SelectOnDiagramHandler;
import org.jboss.tools.seam.pages.xml.model.helpers.SeamPagesDiagramStructureHelper;
import org.jboss.tools.seam.ui.pages.SeamUIPagesMessages;
import org.jboss.tools.seam.ui.pages.SeamUiPagesPlugin;
@@ -593,6 +594,19 @@
protected void setSelectedModelObject(XModelObject object) {
if(object == null) return;
+
+ // Make projection to diagram XML if necessary.
+ XModelObject diagramXML = (XModelObject)getPagesModel().getData();
+ if(diagramXML == null) return;
+ XModelObject fileXML = diagramXML.getParent();
+ if(fileXML == null || !object.getPath().startsWith(fileXML.getPath())) {
+ return;
+ }
+ if(!diagramXML.getPath().startsWith(object.getPath())) {
+ object = SelectOnDiagramHandler.getItemOnDiagram(object);
+ if(object == null) return;
+ }
+
EObject element = getPagesModel().findElement(object);
if(element == null) {
17 years, 10 months
JBoss Tools SVN: r8637 - trunk/seam/plugins/org.jboss.tools.seam.pages.xml/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-06-08 22:27:19 -0400 (Sun, 08 Jun 2008)
New Revision: 8637
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/META-INF/MANIFEST.MF
Log:
fix build errors
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/META-INF/MANIFEST.MF 2008-06-09 02:26:04 UTC (rev 8636)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/META-INF/MANIFEST.MF 2008-06-09 02:27:19 UTC (rev 8637)
@@ -10,7 +10,6 @@
Provide-Package: org.jboss.tools.seam.pages.xml,
org.jboss.tools.seam.pages.xml.model,
org.jboss.tools.seam.pages.xml.model.helpers,
- org.jboss.tools.seam.pages.xml.model.handlers,
org.jboss.tools.seam.pages.xml.model.impl
Require-Bundle: org.jboss.tools.jst.web;visibility:=reexport,
org.eclipse.ui.ide,
@@ -30,4 +29,10 @@
org.eclipse.core.runtime,
org.eclipse.wst.web
Bundle-Version: 2.0.0
+Export-Package: org.jboss.tools.seam.pages.xml,
+ org.jboss.tools.seam.pages.xml.model,
+ org.jboss.tools.seam.pages.xml.model.handlers,
+ org.jboss.tools.seam.pages.xml.model.helpers,
+ org.jboss.tools.seam.pages.xml.model.helpers.autolayout,
+ org.jboss.tools.seam.pages.xml.model.impl
17 years, 10 months
JBoss Tools SVN: r8636 - trunk/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-06-08 22:26:04 -0400 (Sun, 08 Jun 2008)
New Revision: 8636
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF
Log:
fix build errors
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF 2008-06-08 20:31:46 UTC (rev 8635)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF 2008-06-09 02:26:04 UTC (rev 8636)
@@ -5,7 +5,19 @@
Bundle-Activator: org.jboss.tools.seam.ui.pages.SeamUiPagesPlugin
Bundle-Vendor: %providerName
Provide-Package: org.jboss.tools.seam.ui.pages,
- org.jboss.tools.seam.ui.pages.editor
+ org.jboss.tools.seam.ui.pages.editor,
+ org.jboss.tools.seam.ui.pages.editor.commands,
+ org.jboss.tools.seam.ui.pages.editor.dnd,
+ org.jboss.tools.seam.ui.pages.editor.ecore.pages,
+ org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl,
+ org.jboss.tools.seam.ui.pages.editor.ecore.pages.util,
+ org.jboss.tools.seam.ui.pages.editor.edit,
+ org.jboss.tools.seam.ui.pages.editor.edit.xpl,
+ org.jboss.tools.seam.ui.pages.editor.figures,
+ org.jboss.tools.seam.ui.pages.editor.figures.xpl,
+ org.jboss.tools.seam.ui.pages.editor.palette,
+ org.jboss.tools.seam.ui.pages.editor.print,
+ org.jboss.tools.seam.ui.pages.editor.wizard
Export-Package: org.jboss.tools.seam.ui.pages,
org.jboss.tools.seam.ui.pages.editor,
org.jboss.tools.seam.ui.pages.editor.edit
17 years, 10 months
JBoss Tools SVN: r8635 - trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-06-08 16:31:46 -0400 (Sun, 08 Jun 2008)
New Revision: 8635
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/FigureFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java
Log:
make the associations black so you can see them
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/FigureFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/FigureFactory.java 2008-06-08 20:30:16 UTC (rev 8634)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/FigureFactory.java 2008-06-08 20:31:46 UTC (rev 8635)
@@ -14,6 +14,7 @@
import org.eclipse.draw2d.ManhattanConnectionRouter;
import org.eclipse.draw2d.PolygonDecoration;
import org.eclipse.draw2d.geometry.PointList;
+import org.eclipse.jdt.internal.ui.preferences.formatter.BlankLinesTabPage;
import org.eclipse.swt.graphics.Color;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
import org.jboss.tools.seam.ui.pages.editor.edit.LinkEditPart;
@@ -38,13 +39,14 @@
public static ConnectionFigure createNewBendableWire(LinkEditPart part,
Link link) {
ConnectionFigure conn = new ConnectionFigure(part);
- conn.setForegroundColor(normalColor);
+ conn.setForegroundColor(NodeFigure.blackColor);
PolygonDecoration decor = new PolygonDecoration();
- decor.setBackgroundColor(NodeFigure.whiteColor);
+
+ decor.setBackgroundColor(NodeFigure.blackColor);
decor.setTemplate(TRIANGLE_TIP);
decor.setScale(1, 1);
-
+ decor.setForegroundColor(NodeFigure.blackColor);
conn.setTargetDecoration(decor);
return conn;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java 2008-06-08 20:30:16 UTC (rev 8634)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java 2008-06-08 20:31:46 UTC (rev 8635)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.seam.ui.pages.editor.figures;
-import javax.swing.text.StyleConstants.ColorConstants;
import org.eclipse.draw2d.FigureUtilities;
import org.eclipse.swt.SWT;
17 years, 10 months
JBoss Tools SVN: r8634 - trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-06-08 16:30:16 -0400 (Sun, 08 Jun 2008)
New Revision: 8634
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/DiagramFigure.java
Log:
use same constant for the same thing
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/DiagramFigure.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/DiagramFigure.java 2008-06-08 19:47:13 UTC (rev 8633)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/DiagramFigure.java 2008-06-08 20:30:16 UTC (rev 8634)
@@ -18,13 +18,12 @@
import org.eclipse.draw2d.MarginBorder;
import org.eclipse.draw2d.PrinterGraphics;
import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.swt.graphics.Color;
import org.jboss.tools.seam.ui.pages.editor.edit.PagesDiagramEditPart;
public class DiagramFigure extends FreeformLayer implements IFigure {
- public static final Color lightGrayColor = new Color(null, 0xf1, 0xf1, 0xf1);
+
private PagesDiagramEditPart editPart;
public DiagramFigure(PagesDiagramEditPart editPart) {
@@ -45,7 +44,7 @@
if (editPart.isGridVisible() && !(g instanceof PrinterGraphics)) {
g.setLineStyle(Graphics.LINE_DOT);
- g.setForegroundColor(lightGrayColor);
+ g.setForegroundColor(NodeFigure.lightGrayColor);
g.setBackgroundColor(ColorConstants.white);
for (int i = 0; i < width; i += editPart.getVisualGridStep()) {
g.drawLine(i, 0, i, height - 1);
17 years, 10 months