JBoss Tools SVN: r16002 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: src/org/jboss/tools/jsf/vpe/richfaces/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-06-17 03:24:51 -0400 (Wed, 17 Jun 2009)
New Revision: 16002
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidths.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidths.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsDifferent.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsDifferent.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsEms.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsEms.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsPixels.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsPixels.xhtml.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4439, JUnits for rich:layoutPanel width processing were added.
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidths.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidths.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidths.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidths.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidths.xhtml.xml 2009-06-17 07:24:51 UTC (rev 16002)
@@ -0,0 +1,451 @@
+<tests>
+ <test id="id1">
+
+ <DIV CLASS="rich-page styleClass" STYLE="width: 1000px; background-color: white;">
+ <DIV CLASS="rich-page-header headerClass">
+ <DIV CLASS="rich-page-header-content">
+ <SPAN STYLE="font-size: 2em;">
+ HEADER
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-page-subheader subheaderClass">
+ <SPAN STYLE="font-size: 2em;">
+ SUBHEADER
+</SPAN>
+ </DIV>
+ <DIV CLASS="rich-page-content">
+ <DIV CLASS="rich-page-sidebar sidebarClass" STYLE="width: 15em; float: right;">
+ <SPAN STYLE="font-size: 2em;">
+ SIDEBAR
+</SPAN>
+ </DIV>
+ <DIV CLASS="rich-page-main" STYLE="float: left; margin-right: -30em;">
+ <DIV CLASS="rich-page-body bodyClass" STYLE="margin-right: 15em;">
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ NO WEIGHTS
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 33.33%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 33.33%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 33.33%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ WEIGHTS NOT EVERYWHERE LESS THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="25%" STYLE="float: left; width: 25%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="35%" STYLE="float: left; width: 35%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 40%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ WEIGHTS NOT EVERYWHERE LESS THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="90%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="20%" STYLE="float: left; width: 20%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 40%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 40%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="80%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ ALL WIDTHS SUM MORE THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="25%" STYLE="float: left; width: 18.52%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65%" STYLE="float: left; width: 48.15%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="45%" STYLE="float: right; width: 33.33%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ ALL WIDTHS SUM LESS THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="10%" STYLE="float: left; width: 16.67%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="20%" STYLE="float: left; width: 33.33%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="30%" STYLE="float: right; width: 50%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ WIDTHS SUM MORE THAN 100 NOT EVERYWHERE
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65%" STYLE="float: left; width: 50%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65%" STYLE="float: right; width: 50%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SINGLE WIDTH MORE THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="float: left; width: 165%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SINGLE WIDTH MORE THAN 100 WITH ANOTHER LEFT
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65%" STYLE="float: left; width: 65%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="float: left; width: 165%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SINGLE WIDTH MORE THAN 100 WITH ANOTHER RIGHT
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="float: left; width: 165%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65%" STYLE="float: right; width: 65%;">
+ <DIV >
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-page-footer footerClass">
+ <DIV CLASS="rich-page-footer-content">
+ <SPAN STYLE="font-size: 2em;">
+ FOOTER
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidths.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsDifferent.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsDifferent.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsDifferent.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsDifferent.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsDifferent.xhtml.xml 2009-06-17 07:24:51 UTC (rev 16002)
@@ -0,0 +1,450 @@
+<tests>
+ <test id="id1">
+
+ <DIV CLASS="rich-page styleClass" STYLE="width: 1000px; background-color: white;">
+ <DIV CLASS="rich-page-header headerClass">
+ <DIV CLASS="rich-page-header-content">
+ <SPAN STYLE="font-size: 2em;">
+ HEADER
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-page-subheader subheaderClass">
+ <SPAN STYLE="font-size: 2em;">
+ SUBHEADER
+</SPAN>
+ </DIV>
+ <DIV CLASS="rich-page-content">
+ <DIV CLASS="rich-page-sidebar sidebarClass" STYLE="width: 15em; float: right;">
+ <SPAN STYLE="font-size: 2em;">
+ SIDEBAR
+</SPAN>
+ </DIV>
+ <DIV CLASS="rich-page-main" STYLE="float: left; margin-right: -30em;">
+ <DIV CLASS="rich-page-body bodyClass" STYLE="margin-right: 15em;">
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ PX EM % </SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="30em" STYLE="float: left; width: 30em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="30%" STYLE="float: left; width: 100%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="30" STYLE="float: right; width: 30px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ WEIGHTS NOT EVERYWHERE LESS THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="25%" STYLE="float: left; width: 25%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="35" STYLE="float: left; width: 35px;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 75%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ WEIGHTS NOT EVERYWHERE LESS THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="90%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="20em" STYLE="float: left; width: 20em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 50%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 50%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="80%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ ALL WIDTHS SUM MORE THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="25em" STYLE="float: left; width: 25em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65" STYLE="float: left; width: 65px;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="45%" STYLE="float: right; width: 100%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ ALL WIDTHS SUM LESS THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="10%" STYLE="float: left; width: 10%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 90%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="30em" STYLE="float: right; width: 30em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ WIDTHS SUM MORE THAN 100 NOT EVERYWHERE
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 100%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65em" STYLE="float: left; width: 65em;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65" STYLE="float: right; width: 65px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SINGLE WIDTH MORE THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="float: left; width: 165%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="300" STYLE="float: right; width: 300px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SINGLE WIDTH MORE THAN 100 WITH ANOTHER LEFT
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65" STYLE="float: left; width: 65px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="165em" STYLE="float: left; width: 165em;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 100%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SINGLE WIDTH MORE THAN 100 WITH ANOTHER RIGHT
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 35%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="165" STYLE="float: left; width: 165px;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65%" STYLE="float: right; width: 65%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-page-footer footerClass">
+ <DIV CLASS="rich-page-footer-content">
+ <SPAN STYLE="font-size: 2em;">
+ FOOTER
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsDifferent.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsEms.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsEms.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsEms.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsEms.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsEms.xhtml.xml 2009-06-17 07:24:51 UTC (rev 16002)
@@ -0,0 +1,451 @@
+<tests>
+ <test id="id1">
+
+ <DIV CLASS="rich-page styleClass" STYLE="width: 1000px; background-color: white;">
+ <DIV CLASS="rich-page-header headerClass">
+ <DIV CLASS="rich-page-header-content">
+ <SPAN STYLE="font-size: 2em;">
+ HEADER
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-page-subheader subheaderClass">
+ <SPAN STYLE="font-size: 2em;">
+ SUBHEADER
+</SPAN>
+ </DIV>
+ <DIV CLASS="rich-page-content">
+ <DIV CLASS="rich-page-sidebar sidebarClass" STYLE="width: 15em; float: right;">
+ <SPAN STYLE="font-size: 2em;">
+ SIDEBAR
+</SPAN>
+ </DIV>
+ <DIV CLASS="rich-page-main" STYLE="float: left; margin-right: -30em;">
+ <DIV CLASS="rich-page-body bodyClass" STYLE="margin-right: 15em;">
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ NO WEIGHTS
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100em" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 33.33%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 33.33%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 33.33%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ WEIGHTS NOT EVERYWHERE LESS THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;" >
+ <DIV WIDTH="100em" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="25em" STYLE="float: left; width: 25em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="35em" STYLE="float: left; width: 35em;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 100%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100em" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ WEIGHTS NOT EVERYWHERE LESS THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="90em" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="20em" STYLE="float: left; width: 20em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 50%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 50%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="80em" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ ALL WIDTHS SUM MORE THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100em" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="25em" STYLE="float: left; width: 25em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65em" STYLE="float: left; width: 65em;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="45em" STYLE="float: right; width: 45em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100em" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ ALL WIDTHS SUM LESS THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100em" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="10em" STYLE="float: left; width: 10em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="20em" STYLE="float: left; width: 20em;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="30em" STYLE="float: right; width: 30em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100em" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ WIDTHS SUM MORE THAN 100 NOT EVERYWHERE
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100em" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 100%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65em" STYLE="float: left; width: 65em;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65em" STYLE="float: right; width: 65em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100em" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SINGLE WIDTH MORE THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100em" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 50%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="165em" STYLE="float: left; width: 165em;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 50%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100em" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SINGLE WIDTH MORE THAN 100 WITH ANOTHER LEFT
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100em" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65em" STYLE="float: left; width: 65em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="165em" STYLE="float: left; width: 165em;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 100%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100em" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SINGLE WIDTH MORE THAN 100 WITH ANOTHER RIGHT
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100em" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 100%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="165em" STYLE="float: left; width: 165em;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65em" STYLE="float: right; width: 65em;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100em" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-page-footer footerClass">
+ <DIV CLASS="rich-page-footer-content">
+ <SPAN STYLE="font-size: 2em;">
+ FOOTER
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsEms.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsPixels.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsPixels.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsPixels.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsPixels.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsPixels.xhtml.xml 2009-06-17 07:24:51 UTC (rev 16002)
@@ -0,0 +1,451 @@
+<tests>
+ <test id="id1">
+
+ <DIV CLASS="rich-page styleClass" STYLE="width: 1000px; background-color: white;">
+ <DIV CLASS="rich-page-header headerClass">
+ <DIV CLASS="rich-page-header-content">
+ <SPAN STYLE="font-size: 2em;">
+ HEADER
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-page-subheader subheaderClass">
+ <SPAN STYLE="font-size: 2em;">
+ SUBHEADER
+</SPAN>
+ </DIV>
+ <DIV CLASS="rich-page-content">
+ <DIV CLASS="rich-page-sidebar sidebarClass" STYLE="width: 15em; float: right;">
+ <SPAN STYLE="font-size: 2em;">
+ SIDEBAR
+</SPAN>
+ </DIV>
+ <DIV CLASS="rich-page-main" STYLE="float: left; margin-right: -30em;">
+ <DIV CLASS="rich-page-body bodyClass" STYLE="margin-right: 15em;">
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ NO WEIGHT
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 33.33%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 33.33%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 33.33%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ WEIGHT NOT EVERYWHERE LESS THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;" >
+ <DIV WIDTH="100" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="25" STYLE="float: left; width: 25px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="35" STYLE="float: left; width: 35px;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 100%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ WEIGHT NOT EVERYWHERE LESS THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="90" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="20" STYLE="float: left; width: 20px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 50%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 50%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="80" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ ALL WIDTH SUM MORE THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="25" STYLE="float: left; width: 25px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65" STYLE="float: left; width: 65px;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="45" STYLE="float: right; width: 45px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ ALL WIDTH SUM LESS THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="10" STYLE="float: left; width: 10px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="20" STYLE="float: left; width: 20px;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="30" STYLE="float: right; width: 30px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ WIDTH SUM MORE THAN 100 NOT EVERYWHERE
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 100%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65" STYLE="float: left; width: 65px;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65" STYLE="float: right; width: 65px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SINGLE WIDTH MORE THAN 100
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 50%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="165" STYLE="float: left; width: 165px;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 50%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SINGLE WIDTH MORE THAN 100 WITH ANOTHER LEFT
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65" STYLE="float: left; width: 65px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="165" STYLE="float: left; width: 165px;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 100%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SINGLE WIDTH MORE THAN 100 WITH ANOTHER RIGHT
+</SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100" STYLE="">
+ <DIV >
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 100%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="165" STYLE="float: left; width: 165px;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65" STYLE="float: right; width: 65px;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
+ .
+</DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-page-footer footerClass">
+ <DIV CLASS="rich-page-footer-content">
+ <SPAN STYLE="font-size: 2em;">
+ FOOTER
+</SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithWidthsPixels.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2009-06-17 07:16:58 UTC (rev 16001)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2009-06-17 07:24:51 UTC (rev 16002)
@@ -347,7 +347,23 @@
public void testPageWithNestedLayouts() throws Throwable {
performContentTest("components/page/pageWithNestedLayouts.xhtml");//$NON-NLS-1$
}
+
+ public void testPageWithWidths() throws Throwable {
+ performContentTest("components/page/pageWithWidths.xhtml");//$NON-NLS-1$
+ }
+ public void testPageWithWidthsPixels() throws Throwable {
+ performContentTest("components/page/pageWithWidthsPixels.xhtml");//$NON-NLS-1$
+ }
+
+ public void testPageWithWidthsEms() throws Throwable {
+ performContentTest("components/page/pageWithWidthsEms.xhtml");//$NON-NLS-1$
+ }
+
+ public void testPageWithWidthsDifferent() throws Throwable {
+ performContentTest("components/page/pageWithWidthsDifferent.xhtml");//$NON-NLS-1$
+ }
+
@Override
protected String getTestProjectName() {
return RichFacesAllTests.IMPORT_PROJECT_NAME;
15 years, 6 months
JBoss Tools SVN: r16001 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui: icons/full/obj16 and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-06-17 03:16:58 -0400 (Wed, 17 Jun 2009)
New Revision: 16001
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/XMLFile.gif
trunk/smooks/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/XSDFile.gif
trunk/smooks/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/jcu_obj.gif
trunk/smooks/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/unknown_obj.gif
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/WSDLObjectAnalyzer.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDStructuredDataWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDStructuredDataWizardPage.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConfigurationActivator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputLabelProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelLoadComposite.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformDataWizardSelectionPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDObjectAnalyzer.java
Log:
JBIDE-4173
Done
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2009-06-17 07:16:58 UTC (rev 16001)
@@ -20,7 +20,11 @@
org.eclipse.jdt.core,
org.eclipse.jdt.ui,
org.eclipse.wst.validation,
- org.eclipse.pde.ui
+ org.eclipse.pde.ui,
+ org.eclipse.xsd,
+ org.eclipse.wst.wsdl,
+ org.apache.xerces,
+ javax.wsdl
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/XMLFile.gif
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/XMLFile.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/XSDFile.gif
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/XSDFile.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/jcu_obj.gif
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/jcu_obj.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/unknown_obj.gif
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/unknown_obj.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConfigurationActivator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConfigurationActivator.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConfigurationActivator.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -67,6 +67,10 @@
reg.put(GraphicsConstants.JAVA_PROPERTY_ICON,
getImageDescriptor(GraphicsConstants.JAVA_PROPERTY_ICON_PATH));
+ reg.put(GraphicsConstants.IMAGE_UNKNOWN_OBJ, imageDescriptorFromPlugin(PLUGIN_ID,
+ GraphicsConstants.IMAGE_UNKNOWN_OBJ));
+
+
// regist ovr images
reg.put(GraphicsConstants.IMAGE_OVR_ERROR, getImageDescriptor(GraphicsConstants.IMAGE_OVR_ERROR));
reg.put(GraphicsConstants.IMAGE_OVR_WARING, getImageDescriptor(GraphicsConstants.IMAGE_OVR_WARING));
@@ -91,8 +95,18 @@
GraphicsConstants.IMAGE_JAVA_ARRAY));
reg.put(GraphicsConstants.IMAGE_JAVA_COLLECTION, imageDescriptorFromPlugin(PLUGIN_ID,
GraphicsConstants.IMAGE_JAVA_COLLECTION));
+ reg.put(GraphicsConstants.IMAGE_JAVA_FILE, imageDescriptorFromPlugin(PLUGIN_ID,
+ GraphicsConstants.IMAGE_JAVA_FILE));
+
// for the xml2xml line
+ reg.put(GraphicsConstants.IMAGE_XML_FILE, imageDescriptorFromPlugin(PLUGIN_ID,
+ GraphicsConstants.IMAGE_XML_FILE));
+
+ reg.put(GraphicsConstants.IMAGE_XSD_FILE, imageDescriptorFromPlugin(PLUGIN_ID,
+ GraphicsConstants.IMAGE_XSD_FILE));
+
+
reg.put(GraphicsConstants.IMAGE_BINDING_LINE, imageDescriptorFromPlugin(PLUGIN_ID,
GraphicsConstants.IMAGE_BINDING_LINE));
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputLabelProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputLabelProvider.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/ExtentionInputLabelProvider.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -10,11 +10,15 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors;
+import java.util.Iterator;
+import java.util.List;
+
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
import org.jboss.tools.smooks.model.graphics.ext.InputType;
+import org.jboss.tools.smooks.model.graphics.ext.ParamType;
import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
/**
@@ -38,12 +42,18 @@
case 0:
if (SmooksModelUtils.INPUT_TYPE_JAVA.equals(type)) {
return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
- GraphicsConstants.IMAGE_JAVA_OBJECT);
+ GraphicsConstants.IMAGE_JAVA_FILE);
}
if (SmooksModelUtils.INPUT_TYPE_XML.equals(type)) {
return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
- GraphicsConstants.IMAGE_XML_ELEMENT);
+ GraphicsConstants.IMAGE_XML_FILE);
}
+ if (SmooksModelUtils.INPUT_TYPE_XSD.equals(type)) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_XSD_FILE);
+ }
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_UNKNOWN_OBJ);
}
}
return null;
@@ -61,11 +71,25 @@
String value = SmooksModelUtils.getInputPath((InputType) element);
if (value == null)
value = "";
+ String extValue = "";
+ List<ParamType> paramers = ((InputType) element).getParam();
+ for (Iterator<?> iterator = paramers.iterator(); iterator.hasNext();) {
+ ParamType paramType = (ParamType) iterator.next();
+ if ("path".equals(paramType.getName())) {
+ continue;
+ }
+ extValue += paramType.getName() + "=" + paramType.getValue() + ",";
+ }
+ if (extValue.length() != 0) {
+ extValue = extValue.substring(0, extValue.length() - 1);
+ }
switch (columnIndex) {
case 0:
return ((InputType) element).getType();
case 1:
return value;
+ case 2:
+ return extValue;
}
}
return "";
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizardPage.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizardPage.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -21,7 +21,7 @@
private ProtableFileStringProcessor processor = null;
public FileSelectionWizardPage(String pageName) {
- super(pageName);
+ super(pageName , new String[]{});
processor = new ProtableFileStringProcessor();
setFilePathProcessor(processor);
setTitle("File Selection");
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -47,4 +47,12 @@
public static final String IMAGE_MAPPING_LINE = "icons/full/obj16/mapping_line.gif";
public static final String IMAGE_BINDING_LINE = "icons/full/obj16/binding_line.gif";
+
+ public static final String IMAGE_UNKNOWN_OBJ = "icons/full/obj16/unknown_obj.gif";
+
+ public static final String IMAGE_JAVA_FILE = "icons/full/obj16/jcu_obj.gif";
+
+ public static final String IMAGE_XML_FILE = "icons/full/obj16/XMLFile.gif";
+
+ public static final String IMAGE_XSD_FILE = "icons/full/obj16/XSDFile.gif";
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -51,7 +51,9 @@
import org.jboss.tools.smooks.configuration.editors.xml.AbstractXMLObject;
import org.jboss.tools.smooks.configuration.editors.xml.TagList;
import org.jboss.tools.smooks.configuration.editors.xml.XMLObjectAnalyzer;
+import org.jboss.tools.smooks.configuration.editors.xml.XSDObjectAnalyzer;
import org.jboss.tools.smooks.model.graphics.ext.InputType;
+import org.jboss.tools.smooks.model.graphics.ext.ParamType;
import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
@@ -69,7 +71,7 @@
private Button fullPathButton;
private SelectorAttributes selectorAttributes = null;
private IEditorPart editorPart = null;
-
+
private FormToolkit toolkit;
public SelectoreSelectionDialog(IShellProvider parentShell) {
@@ -220,7 +222,6 @@
return composite;
}
-
private void handleButtons() {
fullPathButton.addSelectionListener(new SelectionAdapter() {
@Override
@@ -236,8 +237,8 @@
}
});
}
-
- public static List<Object> generateInputData(SmooksGraphicsExtType extType){
+
+ public static List<Object> generateInputData(SmooksGraphicsExtType extType) {
List<Object> list = new ArrayList<Object>();
if (extType != null) {
IJavaProject project = SmooksUIUtils.getJavaProject(extType);
@@ -257,13 +258,38 @@
if (model != null) {
list.add(model);
}
- }catch(Throwable t){
+ } catch (Throwable t) {
// ignore
}
}
+ if (SmooksModelUtils.INPUT_TYPE_XSD.equals(type)) {
+ try {
+ path = SmooksUIUtils.parseFilePath(path);
+ String rootElementName = null;
+ List<ParamType> paramers = inputType.getParam();
+ for (Iterator<?> iterator2 = paramers.iterator(); iterator2.hasNext();) {
+ ParamType paramType = (ParamType) iterator2.next();
+ if ("rootElement".equals(paramType.getName())) {
+ rootElementName = paramType.getValue();
+ break;
+ }
+ }
+ if (rootElementName != null) {
+ rootElementName = rootElementName.trim();
+ list.add(new XSDObjectAnalyzer().loadElement(path, rootElementName));
+ }
+ } catch (Throwable tt) {
+ // ingore
+ }
+ }
if (SmooksModelUtils.INPUT_TYPE_XML.equals(type)) {
try {
path = SmooksUIUtils.parseFilePath(path);
+
+ // XMLObjectAnalyzer analyzer = new
+ // XMLObjectAnalyzer();
+ // TagList doc = analyzer.analyze(path, null);
+
AbstractXMLObject model = new XMLObjectAnalyzer().analyze(path, null);
if (model != null) {
if (model instanceof TagList) {
@@ -304,7 +330,7 @@
wizard.setForcePreviousAndNextButtons(true);
StructuredDataSelectionWizardDailog dialog = new StructuredDataSelectionWizardDailog(this.getShell(), wizard,
this.graphicsExt);
- if(dialog.show() == WizardDialog.OK){
+ if (dialog.show() == WizardDialog.OK) {
List<Object> input = this.generateInputData();
this.viewer.setInput(input);
SmooksUIUtils.expandSelectorViewer(input, viewer);
@@ -322,16 +348,17 @@
return selectorAttributes;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.jface.dialogs.Dialog#close()
*/
@Override
public boolean close() {
- if(toolkit != null){
+ if (toolkit != null) {
toolkit.dispose();
}
return super.close();
}
-
-
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationFormPage.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationFormPage.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -137,6 +137,12 @@
TableColumn pathColumn = new TableColumn(inputDataViewer.getTable(), SWT.NONE);
pathColumn.setText("Path");
pathColumn.setWidth(300);
+
+ TableColumn extColumn = new TableColumn(inputDataViewer.getTable(), SWT.NONE);
+ extColumn.setText("Extension Paramers");
+ extColumn.setWidth(400);
+
+
inputDataViewer.setContentProvider(new ExtentionInputContentProvider());
inputDataViewer.setLabelProvider(new ExtentionInputLabelProvider());
inputDataViewer.getTable().setHeaderVisible(true);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelLoadComposite.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelLoadComposite.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModelLoadComposite.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -144,13 +144,13 @@
TableColumn nameColumn = new TableColumn(listViewer.getTable(), SWT.NONE);
nameColumn.setText("Class");
TableColumn isArrayColumn = new TableColumn(listViewer.getTable(), SWT.NONE);
- isArrayColumn.setText("Array");
- TableColumn isListColumn = new TableColumn(listViewer.getTable(), SWT.NONE);
- isListColumn.setText("List");
+ isArrayColumn.setText("Is Array");
+// TableColumn isListColumn = new TableColumn(listViewer.getTable(), SWT.NONE);
+// isListColumn.setText("List");
nameColumn.setWidth(400);
isArrayColumn.setWidth(60);
- isListColumn.setWidth(60);
+// isListColumn.setWidth(60);
listViewer.getTable().setHeaderVisible(true);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.uitls;
+import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
@@ -55,7 +56,6 @@
import org.eclipse.jface.fieldassist.IContentProposal;
import org.eclipse.jface.fieldassist.IContentProposalListener;
import org.eclipse.jface.fieldassist.IContentProposalListener2;
-import org.eclipse.jface.fieldassist.IContentProposalProvider;
import org.eclipse.jface.fieldassist.TextContentAdapter;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
@@ -401,6 +401,9 @@
}
public static String parseFilePath(String path) throws InvocationTargetException {
+ if(new File(path).exists()){
+ return path;
+ }
int index = path.indexOf(FILE_PRIX);
if (index != -1) {
path = path.substring(index + FILE_PRIX.length(), path.length());
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformDataWizardSelectionPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformDataWizardSelectionPage.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/TransformDataWizardSelectionPage.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -35,6 +35,7 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
+import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
/**
* @author Dart Peng
@@ -60,13 +61,21 @@
GridLayout gridLayout = new GridLayout();
main.setLayout(gridLayout);
- viewer = new TreeViewer(main, SWT.NONE);
+ Label label = new Label(main, SWT.NONE);
+ label.setText("Input Data Type");
+
+ viewer = new TreeViewer(main, SWT.BORDER);
viewer.setContentProvider(new WizardNodeContentProvider());
viewer.setLabelProvider(new WizardNodeLabelProvider());
GridData gd = new GridData(GridData.FILL_BOTH);
viewer.getTree().setLayoutData(gd);
createAllExtentionWizard();
-
+
+ Composite separatorComposite = new Composite(main,SWT.NONE);
+ gd = new GridData();
+ gd.heightHint = 12;
+ separatorComposite.setLayoutData(gd);
+
desLabel = new Label(main, SWT.NONE);
gd = new GridData(GridData.FILL_HORIZONTAL);
desLabel.setLayoutData(gd);
@@ -150,8 +159,8 @@
public TransformDataWizardSelectionPage(String pageName) {
super(pageName);
- setDescription("Selection data type"); //$NON-NLS-1$
- setTitle("Selection data type"); //$NON-NLS-1$
+ setDescription("Choose \"Input Data Type\" to open wizard dialog to select the input data."); //$NON-NLS-1$
+ setTitle("Input Data Selection"); //$NON-NLS-1$
}
@@ -161,16 +170,17 @@
private class WizardNodeLabelProvider extends LabelProvider {
- private HashMap<Object,Object> map = new HashMap<Object,Object>();
+ private HashMap<Object, Object> map = new HashMap<Object, Object>();
@Override
public Image getImage(Object element) {
if (element instanceof TransformSelectWizardNode) {
String path = ((TransformSelectWizardNode) element).getIconPath();
if (path != null) {
- Image icon = (Image) map.get(path);
+ Image icon = SmooksConfigurationActivator.getDefault().getImageRegistry().get(path);
if (icon == null) {
-
+ }else{
+ return icon;
}
}
}
@@ -187,6 +197,12 @@
@Override
public void dispose() {
+ if(!map.values().isEmpty()){
+ for (Iterator<?> iterator = map.values().iterator(); iterator.hasNext();) {
+ Image img = (Image) iterator.next();
+ img.dispose();
+ }
+ }
super.dispose();
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -16,12 +16,14 @@
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.jboss.tools.smooks.configuration.editors.GraphicsConstants;
import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanContentProvider;
+import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanStrucutredDataWizard;
import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanlabelProvider;
-import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanStrucutredDataWizard;
import org.jboss.tools.smooks.configuration.editors.xml.XMLStructuredDataContentProvider;
import org.jboss.tools.smooks.configuration.editors.xml.XMLStructuredDataLabelProvider;
import org.jboss.tools.smooks.configuration.editors.xml.XMLStructuredDataWizard;
+import org.jboss.tools.smooks.configuration.editors.xml.XSDStructuredDataWizard;
import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
/**
@@ -127,7 +129,7 @@
// for java
BaseViewerInitor javabeanViewerInitor = new BaseViewerInitor();
String name = "Java";
- String description = "Browse a Java type";
+ String description = "Select a Java type(class,interface) as the input data.";
String iconPath = null;
String typeID = SmooksModelUtils.INPUT_TYPE_JAVA;
@@ -138,13 +140,14 @@
javabeanViewerInitor.setLabelProvider(new JavabeanlabelProvider());
javabeanViewerInitor.setTreeContentProvider(new JavabeanContentProvider());
javabeanViewerInitor.setStructuredDataLoadWizard(new JavabeanStrucutredDataWizard());
+ javabeanViewerInitor.setWizardIconPath(GraphicsConstants.IMAGE_JAVA_FILE);
map.put(typeID, javabeanViewerInitor);
// for XML
BaseViewerInitor xmlViewerInitor = new BaseViewerInitor();
name = "XML";
- description = "Select a xml file ";
+ description = "Select a XML file to be the input data. ";
iconPath = null;
typeID = SmooksModelUtils.INPUT_TYPE_XML;
@@ -155,8 +158,28 @@
xmlViewerInitor.setLabelProvider(new XMLStructuredDataLabelProvider());
xmlViewerInitor.setTreeContentProvider(new XMLStructuredDataContentProvider());
xmlViewerInitor.setStructuredDataLoadWizard(new XMLStructuredDataWizard());
+ xmlViewerInitor.setWizardIconPath(GraphicsConstants.IMAGE_XML_FILE);
map.put(typeID, xmlViewerInitor);
+ // for XSD
+
+ BaseViewerInitor xsdViewerInitor = new BaseViewerInitor();
+ name = "XSD/WSDL";
+ description = "Select a XSD file to be the input data. Need to figure out a Root Element. ";
+ iconPath = null;
+ typeID = SmooksModelUtils.INPUT_TYPE_XSD;
+
+ xsdViewerInitor.setName(name);
+ xsdViewerInitor.setDescription(description);
+ xsdViewerInitor.setWizardIconPath(iconPath);
+ xsdViewerInitor.setTypeID(typeID);
+ xsdViewerInitor.setLabelProvider(new XMLStructuredDataLabelProvider());
+ xsdViewerInitor.setTreeContentProvider(new XMLStructuredDataContentProvider());
+ xsdViewerInitor.setStructuredDataLoadWizard(new XSDStructuredDataWizard());
+ xsdViewerInitor.setWizardIconPath(GraphicsConstants.IMAGE_XSD_FILE);
+ map.put(typeID, xsdViewerInitor);
+
+
return map;
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -3,6 +3,7 @@
*/
package org.jboss.tools.smooks.configuration.editors.xml;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -10,6 +11,7 @@
import org.eclipse.emf.common.ui.dialogs.WorkspaceResourceDialog;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
@@ -33,8 +35,7 @@
*
* @author Dart Peng Date : 2008-8-13
*/
-public abstract class AbstractFileSelectionWizardPage extends WizardPage
- implements SelectionListener {
+public abstract class AbstractFileSelectionWizardPage extends WizardPage implements SelectionListener {
protected IStructuredSelection selection;
protected Object returnObject = null;
protected Text fileText;
@@ -45,27 +46,59 @@
protected Button workspaceBrowseButton;
private String filePath = null;
protected Object[] initSelections;
- protected List<ViewerFilter> filters = null;
- protected boolean multiSelect =false;
-
+ protected List<ViewerFilter> filters = new ArrayList<ViewerFilter>();
+ protected boolean multiSelect = false;
+
private IFilePathProcessor filePathProcessor = null;
-
- public AbstractFileSelectionWizardPage(String pageName,boolean multiSelect , Object[] initSelections,List<ViewerFilter> filters) {
+
+ private String[] fileExtensionNames;
+
+ public AbstractFileSelectionWizardPage(String pageName, boolean multiSelect, Object[] initSelections,
+ List<ViewerFilter> filters) {
super(pageName);
this.initSelections = initSelections;
- this.filters = filters;
+ if (filters != null) {
+ this.filters.addAll(filters);
+ }
this.multiSelect = multiSelect;
}
-
- public AbstractFileSelectionWizardPage(String pageName){
- this(pageName,false,null,Collections.EMPTY_LIST);
+
+ public AbstractFileSelectionWizardPage(String pageName, String[] fileExtensionNames) {
+ this(pageName, false, null, Collections.EMPTY_LIST);
+ this.fileExtensionNames = fileExtensionNames;
+ if (this.fileExtensionNames != null) {
+ ViewerFilter extensionNameFilter = new ViewerFilter() {
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse
+ * .jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if (element instanceof IFile && AbstractFileSelectionWizardPage.this.fileExtensionNames != null) {
+ String extName = ((IFile) element).getFileExtension();
+ for (int i = 0; i < AbstractFileSelectionWizardPage.this.fileExtensionNames.length; i++) {
+ String name = AbstractFileSelectionWizardPage.this.fileExtensionNames[i];
+ if (name.equalsIgnoreCase(extName)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ return true;
+ }
+ };
+ this.filters.add(extensionNameFilter);
+ }
}
-
public Object getReturnValue() {
try {
String path = getFilePath();
- if(path == null) return null;
+ if (path == null)
+ return null;
path = SmooksUIUtils.parseFilePath(path);
returnObject = this.loadedTheObject(path);
} catch (Exception e) {
@@ -73,12 +106,11 @@
}
return returnObject;
}
-
- public String getFilePath(){
+
+ public String getFilePath() {
return filePath;
}
-
-
+
public IFilePathProcessor getFilePathProcessor() {
return filePathProcessor;
}
@@ -90,7 +122,9 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ * @see
+ * org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets
+ * .Composite)
*/
public void createControl(Composite parent) {
@@ -117,8 +151,7 @@
// xsdButton = new Button(mainComposite, SWT.RADIO);
// xsdButton.setText("Select a XSD file");
- Composite xsdComposite = this
- .createFileSelectionComposite(mainComposite);
+ createFileSelectionComposite(mainComposite);
// init the panel status (XSD file selection composite is disabled)
// xsdButton.setSelection(true);
@@ -167,12 +200,10 @@
};
- workspaceBrowseButton
- .addSelectionListener(wbrowseButtonSelectionAdapter);
+ workspaceBrowseButton.addSelectionListener(wbrowseButtonSelectionAdapter);
// xmlFileSystemBrowseButton
// .addSelectionListener(browseButtonSelectionAdapter);
- fileSystemBrowseButton
- .addSelectionListener(browseButtonSelectionAdapter);
+ fileSystemBrowseButton.addSelectionListener(browseButtonSelectionAdapter);
}
protected void openWorkSpaceSelection(Text relationT) {
@@ -185,22 +216,22 @@
relationT.setText(s);
}
}
-
- protected String processFileSystemFilePath(String path){
- if(filePathProcessor != null){
+
+ protected String processFileSystemFilePath(String path) {
+ if (filePathProcessor != null) {
String s = filePathProcessor.processFileSystemPath(path);
- if(s != null){
+ if (s != null) {
return s;
}
}
path = SmooksUIUtils.FILE_PRIX + path;
return path;
}
-
- protected String processWorkSpaceFilePath(IFile file){
- if(filePathProcessor != null){
- String s = filePathProcessor.processWorkBenchPath(file);
- if(s != null){
+
+ protected String processWorkSpaceFilePath(IFile file) {
+ if (filePathProcessor != null) {
+ String s = filePathProcessor.processWorkBenchPath(file);
+ if (s != null) {
return s;
}
}
@@ -209,19 +240,9 @@
return s;
}
- protected Composite createFileSelectionComposite(Composite parent) {
- Composite xsdComposite = new Composite(parent, SWT.NONE);
+ protected Text createFilePathText(Composite parent) {
+ fileTextComposite = new Composite(parent, SWT.NONE);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- xsdComposite.setLayoutData(gd);
- GridLayout xsdLayout = new GridLayout();
- xsdLayout.numColumns = 2;
- xsdLayout.marginWidth = 0;
- xsdComposite.setLayout(xsdLayout);
-
- Label nfileLanel = new Label(xsdComposite, SWT.NONE);
- nfileLanel.setText("File : "); //$NON-NLS-1$
- fileTextComposite = new Composite(xsdComposite, SWT.NONE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
gd.grabExcessHorizontalSpace = true;
fileTextComposite.setLayoutData(gd);
GridLayout xsdtgl = new GridLayout();
@@ -230,31 +251,62 @@
xsdtgl.numColumns = 1;
fileTextComposite.setLayout(xsdtgl);
- fileText = new Text(fileTextComposite, SWT.BORDER);
+ Text fileText = new Text(fileTextComposite, SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
fileText.setLayoutData(gd);
gd.grabExcessHorizontalSpace = true;
-// final Button loadXSDButton = new Button(fileTextComposite, SWT.NONE);
-// loadXSDButton.setText("Load");
-// loadXSDButton.addSelectionListener(new SelectionAdapter() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// super.widgetSelected(e);
-// reasourceLoaded = false;
-// try {
-// returnObject = loadedTheObject(fileText.getText());
-// reasourceLoaded = true;
-// } catch (Throwable e2) {
-// // ignore
-// e2.printStackTrace();
-// }
-// changeWizardPageStatus();
-// }
-//
-// });
+ return fileText;
+ }
+ protected Composite createFileSelectionComposite(Composite parent) {
+ Composite xsdComposite = new Composite(parent, SWT.NONE);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ xsdComposite.setLayoutData(gd);
+ GridLayout xsdLayout = new GridLayout();
+ xsdLayout.numColumns = 2;
+ xsdLayout.marginWidth = 0;
+ xsdComposite.setLayout(xsdLayout);
+
+ Label nfileLanel = new Label(xsdComposite, SWT.NONE);
+ nfileLanel.setText("File : "); //$NON-NLS-1$
+ // fileTextComposite = new Composite(xsdComposite, SWT.NONE);
+ // gd = new GridData(GridData.FILL_HORIZONTAL);
+ // gd.grabExcessHorizontalSpace = true;
+ // fileTextComposite.setLayoutData(gd);
+ // GridLayout xsdtgl = new GridLayout();
+ // xsdtgl.marginWidth = 0;
+ // xsdtgl.marginHeight = 0;
+ // xsdtgl.numColumns = 1;
+ // fileTextComposite.setLayout(xsdtgl);
+ //
+ // fileText = new Text(fileTextComposite, SWT.BORDER);
+ // gd = new GridData(GridData.FILL_HORIZONTAL);
+ // fileText.setLayoutData(gd);
+ // gd.grabExcessHorizontalSpace = true;
+
+ fileText = createFilePathText(xsdComposite);
+
+ // final Button loadXSDButton = new Button(fileTextComposite, SWT.NONE);
+ // loadXSDButton.setText("Load");
+ // loadXSDButton.addSelectionListener(new SelectionAdapter() {
+ //
+ // @Override
+ // public void widgetSelected(SelectionEvent e) {
+ // super.widgetSelected(e);
+ // reasourceLoaded = false;
+ // try {
+ // returnObject = loadedTheObject(fileText.getText());
+ // reasourceLoaded = true;
+ // } catch (Throwable e2) {
+ // // ignore
+ // e2.printStackTrace();
+ // }
+ // changeWizardPageStatus();
+ // }
+ //
+ // });
+
Composite browseButtonComposite = new Composite(xsdComposite, SWT.NONE);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
@@ -287,27 +339,27 @@
abstract protected Object loadedTheObject(String path) throws Exception;
protected void initTableViewer() {
-// tableViewer.addCheckStateListener(new ICheckStateListener() {
-// boolean flag = true;
-//
-// public void checkStateChanged(CheckStateChangedEvent event) {
-// if (flag) {
-// Object checkObject = event.getElement();
-// boolean check = event.getChecked();
-// flag = false;
-// tableViewer.setAllChecked(false);
-// tableViewer.setChecked(checkObject, check);
-// flag = true;
-// changeWizardPageStatus();
-// }
-// }
-// });
-// tableViewer.setContentProvider(new XSDStructuredModelContentProvider());
-// tableViewer.setLabelProvider(new XSDStructuredModelLabelProvider());
+ // tableViewer.addCheckStateListener(new ICheckStateListener() {
+ // boolean flag = true;
+ //
+ // public void checkStateChanged(CheckStateChangedEvent event) {
+ // if (flag) {
+ // Object checkObject = event.getElement();
+ // boolean check = event.getChecked();
+ // flag = false;
+ // tableViewer.setAllChecked(false);
+ // tableViewer.setChecked(checkObject, check);
+ // flag = true;
+ // changeWizardPageStatus();
+ // }
+ // }
+ // });
+ // tableViewer.setContentProvider(new
+ // XSDStructuredModelContentProvider());
+ // tableViewer.setLabelProvider(new XSDStructuredModelLabelProvider());
}
- protected void setCompositeChildrenEnabled(Composite composite,
- boolean enabled) {
+ protected void setCompositeChildrenEnabled(Composite composite, boolean enabled) {
Control[] children = composite.getChildren();
for (int i = 0; i < children.length; i++) {
Control child = children[i];
@@ -325,11 +377,22 @@
protected void openFileSelection(Text relationText) {
FileDialog dialog = new FileDialog(this.getShell());
+ if (fileExtensionNames != null) {
+ String s = "";
+ for (int i = 0; i < fileExtensionNames.length; i++) {
+ String exname = fileExtensionNames[i];
+ s += "*." + exname + ";";
+ }
+ if (s.length() != 0) {
+ s = s.substring(0, s.length() - 1);
+ dialog.setFilterExtensions(new String[]{s,"*.*"});
+ }
+ }
String path = dialog.open();
if (path != null) {
path = processFileSystemFilePath(path);
relationText.setText(path);
- }
+ }
}
protected void changeWizardPageStatus() {
@@ -337,15 +400,15 @@
String error = null;
if (text == null || "".equals(text)) //$NON-NLS-1$
error = "File's name can be null"; //$NON-NLS-1$
-
-// File tempFile = new File(text);
-// if(!tempFile.exists()){
-// error = "Can't find the file , please select another one.";
-// }
-
-// if (!reasourceLoaded) {
-// error = "Resource must be loaded";
-// }
+
+ // File tempFile = new File(text);
+ // if(!tempFile.exists()){
+ // error = "Can't find the file , please select another one.";
+ // }
+
+ // if (!reasourceLoaded) {
+ // error = "Resource must be loaded";
+ // }
this.setErrorMessage(error);
this.setPageComplete(error == null);
@@ -398,7 +461,5 @@
public void setMultiSelect(boolean multiSelect) {
this.multiSelect = multiSelect;
}
-
-
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/WSDLObjectAnalyzer.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/WSDLObjectAnalyzer.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/WSDLObjectAnalyzer.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.progress.IProgressService;
+import org.eclipse.wst.wsdl.Definition;
+import org.eclipse.wst.wsdl.ExtensibilityElement;
+import org.eclipse.wst.wsdl.Types;
+import org.eclipse.wst.wsdl.WSDLFactory;
+import org.eclipse.wst.wsdl.XSDSchemaExtensibilityElement;
+import org.eclipse.wst.wsdl.util.WSDLParser;
+import org.eclipse.wst.wsdl.util.WSDLResourceImpl;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDSchema;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ *
+ */
+public class WSDLObjectAnalyzer {
+ private XSDObjectAnalyzer xsdAnalyzer = new XSDObjectAnalyzer();
+
+ public static List<XSDElementDeclaration> loadAllElement(String filePath) throws InvocationTargetException,
+ IOException, ParserConfigurationException, SAXException {
+
+ List<XSDElementDeclaration> nl = new ArrayList<XSDElementDeclaration>();
+ String file = SmooksUIUtils.parseFilePath(filePath);
+ WSDLParser parser = new WSDLParser();
+ parser.parse(new FileInputStream(file));
+ final Document document = parser.getDocument();
+ final Definition definition = WSDLFactory.eINSTANCE.createDefinition();
+ definition.setDocumentBaseURI(URI.createFileURI(file).toString());
+ definition.setDocument(document);
+ final ResourceSet resourceSet = new ResourceSetImpl();
+ final Resource resource = new WSDLResourceImpl(URI.createFileURI(file));
+ resourceSet.getResources().add(resource);
+ resource.getContents().add(definition);
+
+ resource.setModified(false);
+
+ IRunnableWithProgress setElementOperation = new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ monitor.beginTask("", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
+ definition.setElement(document.getDocumentElement());
+ }
+ };
+
+ IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
+ try {
+ progressService.busyCursorWhile(setElementOperation);
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ // Resource resource = new WSDLResourceImpl(URI.createFileURI(file));
+ // List<XSDElementDeclaration> list = schema.getElementDeclarations();
+ // for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
+ // XSDElementDeclaration elementDeclaration = (XSDElementDeclaration)
+ // iterator.next();
+ // if (elementDeclaration.isAbstract())
+ // continue;
+ // nl.add(elementDeclaration);
+ // }
+ Types types = definition.getETypes();
+ if (types != null) {
+ XSDSchemaExtensibilityElement el = null;
+ for (Iterator<?> j = types.getEExtensibilityElements().iterator(); j.hasNext();) {
+ ExtensibilityElement extensibilityElement = (ExtensibilityElement) j.next();
+ if (!(extensibilityElement instanceof XSDSchemaExtensibilityElement)) {
+ continue;
+ }
+
+ el = (XSDSchemaExtensibilityElement) extensibilityElement;
+ XSDSchema schema = el.getSchema();
+ if (schema != null) {
+ List<XSDElementDeclaration> list = schema.getElementDeclarations();
+ for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
+ XSDElementDeclaration elementDeclaration = (XSDElementDeclaration) iterator.next();
+ if (elementDeclaration.isAbstract())
+ continue;
+ nl.add(elementDeclaration);
+ }
+ break;
+ }
+ }
+ }
+ return nl;
+ }
+
+ public TagObject loadElement(String path, String rootElementName) throws IOException {
+ WSDLResourceImpl resource = new WSDLResourceImpl(URI.createFileURI(path));
+ resource.load(Collections.emptyMap());
+ if (resource.getContents().isEmpty()) {
+ return null;
+ }
+ Object obj = resource.getContents().get(0);
+ // xsdAnalyzer.loadElement(schema, rootElementName);
+ return null;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/WSDLObjectAnalyzer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizardPage.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizardPage.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -9,7 +9,7 @@
public class XMLStructuredDataWizardPage extends AbstractFileSelectionWizardPage {
public XMLStructuredDataWizardPage(String pageName) {
- super(pageName);
+ super(pageName,new String[]{"xml","xsd","wsdl","xsl"});
setPageText();
}
@@ -28,8 +28,9 @@
*/
@Override
protected Object loadedTheObject(String path) throws Exception {
- XMLObjectAnalyzer analyzer = new XMLObjectAnalyzer();
- TagList doc = analyzer.analyze(path, null);
- return doc;
+ return null;
+// XMLObjectAnalyzer analyzer = new XMLObjectAnalyzer();
+// TagList doc = analyzer.analyze(path, null);
+// return doc;
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDObjectAnalyzer.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDObjectAnalyzer.java 2009-06-16 22:17:31 UTC (rev 16000)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDObjectAnalyzer.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -10,10 +10,278 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.xml;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.xsd.XSDAttributeDeclaration;
+import org.eclipse.xsd.XSDAttributeUse;
+import org.eclipse.xsd.XSDComplexTypeDefinition;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.eclipse.xsd.XSDModelGroup;
+import org.eclipse.xsd.XSDParticle;
+import org.eclipse.xsd.XSDParticleContent;
+import org.eclipse.xsd.XSDSchema;
+import org.eclipse.xsd.XSDSimpleTypeDefinition;
+import org.eclipse.xsd.XSDTypeDefinition;
+import org.eclipse.xsd.util.XSDResourceFactoryImpl;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+
/**
* @author Dart (dpeng(a)redhat.com)
- *
+ *
*/
public class XSDObjectAnalyzer {
+ // private static List<XSDElementDeclaration> findChildrenElement(XSDSchema
+ // schema, XSDElementDeclaration baseElement) {
+ // return findChildrenElement(schema, baseElement.getTypeDefinition());
+ // }
+ private HashMap<Object, Object> tagObjectBuffer = new HashMap<Object, Object>();
+
+ public static List<XSDElementDeclaration> loadAllElement(String filePath) throws InvocationTargetException, IOException {
+ List<XSDElementDeclaration> nl = new ArrayList<XSDElementDeclaration>();
+ String file = SmooksUIUtils.parseFilePath(filePath);
+ Resource resource = new XSDResourceFactoryImpl().createResource(URI.createFileURI(file));
+ resource.load(Collections.EMPTY_MAP);
+ XSDSchema schema = (XSDSchema) resource.getContents().get(0);
+ List<XSDElementDeclaration> list = schema.getElementDeclarations();
+ for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
+ XSDElementDeclaration elementDeclaration = (XSDElementDeclaration) iterator.next();
+ if (elementDeclaration.isAbstract())
+ continue;
+ nl.add(elementDeclaration);
+ }
+ return nl;
+ }
+
+ private List<XSDElementDeclaration> findChildrenElement(XSDSchema schema, XSDTypeDefinition baseTypeDefinition) {
+ List<XSDElementDeclaration> elementList = new ArrayList<XSDElementDeclaration>();
+ List<XSDElementDeclaration> elements = schema.getElementDeclarations();
+ for (Iterator<?> iterator = elements.iterator(); iterator.hasNext();) {
+ XSDElementDeclaration elementDec = (XSDElementDeclaration) iterator.next();
+ if (elementDec.isAbstract())
+ continue;
+ XSDTypeDefinition td = elementDec.getType();
+ XSDSimpleTypeDefinition st = td.getSimpleType();
+ if (st != null) {
+ continue;
+ }
+ if (td instanceof XSDComplexTypeDefinition) {
+ XSDTypeDefinition tdd = td.getBaseType();
+ if (tdd == baseTypeDefinition) {
+ elementList.add(elementDec);
+ }
+ } else {
+ // XSDSimpleTypeDefinition stype = td.getSimpleType();
+ // System.out.println("Simple Type :" +stype.toString());
+ }
+ }
+ if (elementList.isEmpty())
+ return null;
+ return elementList;
+ }
+
+ public TagObject loadElement(XSDSchema schema, String rootElementName) throws IOException {
+ List<XSDElementDeclaration> elements = schema.getElementDeclarations();
+ for (Iterator<?> iterator = elements.iterator(); iterator.hasNext();) {
+ XSDElementDeclaration elementDec = (XSDElementDeclaration) iterator.next();
+ if (rootElementName.equals(elementDec.getAliasName())) {
+ tagObjectBuffer.clear();
+ return loadElement(schema, elementDec);
+ }
+ }
+ return null;
+ }
+
+ public TagObject loadElement(String filePath, String rootElementName) throws InvocationTargetException, IOException {
+ tagObjectBuffer.clear();
+ Resource resource = new XSDResourceFactoryImpl().createResource(URI.createFileURI(filePath));
+ resource.load(Collections.EMPTY_MAP);
+ if (resource.getContents().isEmpty())
+ return null;
+ XSDSchema schema = (XSDSchema) resource.getContents().get(0);
+ return loadElement(schema, rootElementName);
+ }
+
+ public TagObject loadElement(String filePath, XSDElementDeclaration rootElement) throws InvocationTargetException,
+ IOException {
+ tagObjectBuffer.clear();
+ Resource resource = new XSDResourceFactoryImpl().createResource(URI.createFileURI(filePath));
+ resource.load(Collections.EMPTY_MAP);
+ if (resource.getContents().isEmpty())
+ return null;
+ XSDSchema schema = (XSDSchema) resource.getContents().get(0);
+ return loadElement(schema, rootElement);
+ }
+
+ private TagObject loadElement(XSDSchema schema, XSDElementDeclaration elementDec) {
+ if (elementDec.isAbstract())
+ return null;
+
+ TagObject tag = (TagObject) tagObjectBuffer.get(elementDec);
+ if (tag == null) {
+ tag = new TagObject();
+ tag.setName(elementDec.getAliasName());
+ tag.setNamespaceURL(elementDec.getAliasURI());
+ tagObjectBuffer.put(elementDec, tag);
+ }else{
+ return tag;
+ }
+
+ XSDTypeDefinition td = elementDec.getType();
+ XSDSimpleTypeDefinition st = td.getSimpleType();
+ // XSDComplexTypeDefinition ct = td.getComplexType();
+ if (st != null) {
+ }
+ if (td instanceof XSDComplexTypeDefinition) {
+ XSDComplexTypeDefinition ctype = (XSDComplexTypeDefinition) td;
+ XSDParticle xsdparticle = td.getComplexType();
+ if (xsdparticle != null) {
+ XSDParticleContent term = xsdparticle.getContent();// .getTerm
+ // ();
+ if (term instanceof XSDModelGroup) {
+ List<?> list = ((XSDModelGroup) term).getParticles();
+ for (Iterator<?> iterator2 = list.iterator(); iterator2.hasNext();) {
+ XSDParticle xp = (XSDParticle) iterator2.next();
+ XSDParticleContent content = xp.getContent();
+ if (content instanceof XSDElementDeclaration) {
+ XSDElementDeclaration child = (XSDElementDeclaration) content;
+ List<XSDElementDeclaration> childElement = null;
+ if (child.isElementDeclarationReference()) {
+ child = child.getResolvedElementDeclaration();
+ }
+ XSDTypeDefinition childType = child.getTypeDefinition();
+ if (child.isAbstract()) {
+ childElement = findChildrenElement(schema, childType);
+ if (childElement != null) {
+ for (Iterator<?> iterator3 = childElement.iterator(); iterator3.hasNext();) {
+ XSDElementDeclaration elementDeclaration = (XSDElementDeclaration) iterator3
+ .next();
+ TagObject childTag = loadElement(schema, elementDeclaration);
+ if (childTag != null) {
+ tag.addChildTag(childTag);
+ }
+ }
+ }
+ } else {
+ TagObject childTag = loadElement(schema, child);
+ if (childTag != null) {
+ tag.addChildTag(childTag);
+ }
+ }
+ }
+ }
+ }
+ }
+ List<?> attributeContents = ctype.getAttributeContents();
+ for (Iterator<?> iterator2 = attributeContents.iterator(); iterator2.hasNext();) {
+ XSDAttributeUse attributeUse = (XSDAttributeUse) iterator2.next();
+ XSDAttributeDeclaration attribute = attributeUse.getAttributeDeclaration();
+ TagPropertyObject tp = new TagPropertyObject();
+ tp.setName(attribute.getAliasName());
+ tp.setNamespaceURL(attribute.getTypeDefinition().getURI());
+ tag.addProperty(tp);
+ }
+ } else {
+ // XSDSimpleTypeDefinition stype = td.getSimpleType();
+ // System.out.println("Simple Type :" +stype.toString());
+ }
+
+ return tag;
+ }
+
+ public static void main(String[] args) throws IOException {
+ Resource resource = new XSDResourceFactoryImpl().createResource(URI.createFileURI("F:/smooks-1.1.xsd"));
+ resource.load(Collections.EMPTY_MAP);
+ XSDSchema schema = (XSDSchema) resource.getContents().get(0);
+ TagObject rootTag = new XSDObjectAnalyzer().loadElement(schema, "smooks-resource-list");
+ System.out.println(rootTag);
+ // List<XSDElementDeclaration> elements =
+ // schema.getElementDeclarations();
+ // for (Iterator<?> iterator = elements.iterator(); iterator.hasNext();)
+ // {
+ // XSDElementDeclaration elementDec = (XSDElementDeclaration)
+ // iterator.next();
+ // if (elementDec.isAbstract())
+ // continue;
+ // XSDTypeDefinition td = elementDec.getType();
+ // XSDSimpleTypeDefinition st = td.getSimpleType();
+ // System.out.println("Element Name :" + elementDec.getAliasName());
+ // // XSDComplexTypeDefinition ct = td.getComplexType();
+ // if (st != null) {
+ // System.out.println("\tSimple Type :" + st.toString());
+ // }
+ // if (td instanceof XSDComplexTypeDefinition) {
+ // XSDComplexTypeDefinition ctype = (XSDComplexTypeDefinition) td;
+ //
+ // XSDParticle xsdparticle = td.getComplexType();
+ // XSDTypeDefinition tdd = td.getBaseType();
+ // String tds = "";
+ // if (tdd != null) {
+ // tds = tdd.getAliasName();
+ // }
+ // if (xsdparticle != null) {
+ // XSDParticleContent term = xsdparticle.getContent();// .getTerm
+ // // ();
+ // if (term instanceof XSDModelGroup) {
+ // List<?> list = ((XSDModelGroup) term).getParticles();
+ // for (Iterator<?> iterator2 = list.iterator(); iterator2.hasNext();) {
+ // XSDParticle xp = (XSDParticle) iterator2.next();
+ // XSDParticleContent content = xp.getContent();
+ // if (content instanceof XSDElementDeclaration) {
+ // XSDElementDeclaration child = (XSDElementDeclaration) content;
+ // String refStr = "";
+ // List<XSDElementDeclaration> childElement = null;
+ // if (child.isElementDeclarationReference()) {
+ // child = child.getResolvedElementDeclaration();
+ // refStr = "Reference";
+ // }
+ // XSDTypeDefinition childType = child.getTypeDefinition();
+ // if (child.isAbstract()) {
+ // childElement = findChildrenElement(schema, childType);
+ // if(childElement != null){
+ // for (Iterator<?> iterator3 = childElement.iterator();
+ // iterator3.hasNext();) {
+ // XSDElementDeclaration elementDeclaration = (XSDElementDeclaration)
+ // iterator3
+ // .next();
+ // System.out.println("\t" + refStr + "Element Name: " +
+ // elementDeclaration.getAliasName() + " - "
+ // + childType.getAliasName());
+ // }
+ // }
+ // } else {
+ // System.out.println("\t" + refStr + "Element Name: " +
+ // child.getAliasName() + " - "
+ // + childType.getAliasName());
+ // }
+ // }
+ // }
+ // }
+ // }
+ // List<?> attributeContents = ctype.getAttributeContents();
+ // for (Iterator<?> iterator2 = attributeContents.iterator();
+ // iterator2.hasNext();) {
+ // XSDAttributeUse attributeUse = (XSDAttributeUse) iterator2.next();
+ // XSDAttributeDeclaration attribute =
+ // attributeUse.getAttributeDeclaration();
+ // System.out.println("\tAttributes :" + attribute.getAliasName() +
+ // " - "
+ // + attribute.getTypeDefinition().getQName());
+ // }
+ // continue;
+ // } else {
+ // // XSDSimpleTypeDefinition stype = td.getSimpleType();
+ // // System.out.println("Simple Type :" +stype.toString());
+ // }
+ // System.out.println();
+ // }
+ }
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDStructuredDataWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDStructuredDataWizard.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDStructuredDataWizard.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import java.util.Properties;
+
+import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ *
+ */
+public class XSDStructuredDataWizard extends AbstractStructuredDdataWizard {
+
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.smooks.configuration.editors.xml.AbstractStructuredDdataWizard#createAbstractFileSelectionWizardPage()
+ */
+ @Override
+ protected AbstractFileSelectionWizardPage createAbstractFileSelectionWizardPage() {
+ // TODO Auto-generated method stub
+ return new XSDStructuredDataWizardPage("XSD");
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.smooks.configuration.editors.wizard.IStructuredDataSelectionWizard#getInputDataTypeID()
+ */
+ public String getInputDataTypeID() {
+ return SmooksModelUtils.INPUT_TYPE_XSD;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.smooks.configuration.editors.wizard.IStructuredDataSelectionWizard#getProperties()
+ */
+ public Properties getProperties() {
+ Properties pro = new Properties();
+ pro.setProperty("rootElement", ((XSDStructuredDataWizardPage)page).getRootElementName());
+ return pro;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDStructuredDataWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDStructuredDataWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDStructuredDataWizardPage.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDStructuredDataWizardPage.java 2009-06-17 07:16:58 UTC (rev 16001)
@@ -0,0 +1,292 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.xsd.XSDElementDeclaration;
+import org.xml.sax.SAXException;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ *
+ */
+public class XSDStructuredDataWizardPage extends AbstractFileSelectionWizardPage {
+
+ private CheckboxTableViewer tableViewer = null;
+
+ private boolean fireEvent = true;
+
+ private String rootElementName = null;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.xml.
+ * AbstractFileSelectionWizardPage#loadedTheObject(java.lang.String)
+ */
+ @Override
+ protected Object loadedTheObject(String path) throws Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public XSDStructuredDataWizardPage(String pageName, boolean multiSelect, Object[] initSelections,
+ List<ViewerFilter> filters) {
+ super(pageName, multiSelect, initSelections, filters);
+ this.setTitle("XSD Input Data Selection");
+ this.setDescription("Select a XSD file to be the input data");
+ }
+
+ public XSDStructuredDataWizardPage(String pageName) {
+ super(pageName, new String[] { "xsd", "wsdl" });
+ this.setTitle("XSD Input Data Selection");
+ this.setDescription("Select a XSD file to be the input data");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.xml.
+ * AbstractFileSelectionWizardPage#changeWizardPageStatus()
+ */
+ @Override
+ protected void changeWizardPageStatus() {
+ super.changeWizardPageStatus();
+ String errorMessage = this.getErrorMessage();
+ if (errorMessage == null) {
+ if (reasourceLoaded) {
+ if(tableViewer.getCheckedElements() == null || tableViewer.getCheckedElements().length == 0){
+ errorMessage = "Must select a root element.";
+ }
+ } else {
+ errorMessage = "The elements of XSD file should click the 'Load' button to load.";
+ }
+ setErrorMessage(errorMessage);
+ setPageComplete(errorMessage == null);
+ }
+ }
+
+ /**
+ * @return the rootElementName
+ */
+ public String getRootElementName() {
+ return rootElementName;
+ }
+
+ /**
+ * @param rootElementName
+ * the rootElementName to set
+ */
+ public void setRootElementName(String rootElementName) {
+ this.rootElementName = rootElementName;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.xml.
+ * AbstractFileSelectionWizardPage
+ * #createFilePathText(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Text createFilePathText(Composite parent) {
+ fileTextComposite = new Composite(parent, SWT.NONE);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.grabExcessHorizontalSpace = true;
+ fileTextComposite.setLayoutData(gd);
+ GridLayout xsdtgl = new GridLayout();
+ xsdtgl.marginWidth = 0;
+ xsdtgl.marginHeight = 0;
+ xsdtgl.numColumns = 2;
+ fileTextComposite.setLayout(xsdtgl);
+
+ final Text fileText = new Text(fileTextComposite, SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ fileText.setLayoutData(gd);
+ fileText.addModifyListener(new ModifyListener(){
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
+ */
+ public void modifyText(ModifyEvent e) {
+ reasourceLoaded = false;
+ if(tableViewer != null){
+ tableViewer.setInput(Collections.emptyList());
+ }
+ }
+
+ });
+ gd.grabExcessHorizontalSpace = true;
+
+ final Button loadXSDButton = new Button(fileTextComposite, SWT.NONE);
+ loadXSDButton.setText("Load");
+ loadXSDButton.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ super.widgetSelected(e);
+ if(fileText.getText() == null || fileText.getText().length() == 0){
+ changeWizardPageStatus();
+ return;
+ }
+ reasourceLoaded = false;
+ try {
+ List<?> list = loadElement(fileText.getText());
+ tableViewer.setInput(list);
+ reasourceLoaded = true;
+ } catch (Throwable e2) {
+ e2.printStackTrace();
+ }
+ changeWizardPageStatus();
+ }
+
+ });
+ return fileText;
+ }
+
+ private List<XSDElementDeclaration> loadElement(String path) throws InvocationTargetException, IOException {
+ if (path == null)
+ return null;
+ String pp = path.toLowerCase();
+ if (pp.endsWith(".wsdl")) {
+ try {
+ return WSDLObjectAnalyzer.loadAllElement(path);
+ } catch (ParserConfigurationException e) {
+ throw new InvocationTargetException(e);
+ } catch (SAXException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+ return XSDObjectAnalyzer.loadAllElement(path);
+ }
+
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ Composite mainComposite = (Composite) getControl();
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ Label label = new Label(mainComposite, SWT.NONE);
+ label.setLayoutData(gd);
+ label.setText("Select root element");
+ tableViewer = CheckboxTableViewer.newCheckList(mainComposite, SWT.BORDER);
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = 250;
+ tableViewer.getControl().setLayoutData(gd);
+
+ tableViewer.setContentProvider(new XSDListContentProvider());
+ tableViewer.setLabelProvider(new XSDListLabelProvider());
+ tableViewer.addCheckStateListener(new ICheckStateListener() {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.ICheckStateListener#checkStateChanged
+ * (org.eclipse.jface.viewers.CheckStateChangedEvent)
+ */
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ if (!fireEvent)
+ return;
+ rootElementName = null;
+ fireEvent = false;
+ tableViewer.setAllChecked(false);
+ if (event.getChecked()) {
+ tableViewer.setChecked(event.getElement(), true);
+ rootElementName = ((XSDElementDeclaration) event.getElement()).getAliasName();
+ }
+ fireEvent = true;
+ changeWizardPageStatus();
+ }
+
+ });
+
+ }
+
+ private class XSDListLabelProvider extends LabelProvider {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof XSDElementDeclaration) {
+ return ((XSDElementDeclaration) element).getAliasName();
+ }
+ return super.getText(element);
+ }
+
+ }
+
+ private class XSDListContentProvider implements IStructuredContentProvider {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.IStructuredContentProvider#getElements(
+ * java.lang.Object)
+ */
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof List) {
+ return ((List<?>) inputElement).toArray();
+ }
+ return new Object[] {};
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse
+ * .jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+
+ }
+
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XSDStructuredDataWizardPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 6 months
JBoss Tools SVN: r16000 - trunk/maven/plugins/org.jboss.tools.maven.seam/poms.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-06-16 18:17:31 -0400 (Tue, 16 Jun 2009)
New Revision: 16000
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-3874 Maven integration
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml 2009-06-16 19:34:13 UTC (rev 15999)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml 2009-06-16 22:17:31 UTC (rev 16000)
@@ -214,6 +214,20 @@
<artifactId>richfaces-api</artifactId>
<version>${richfaces.version}</version>
<scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.richfaces.framework</groupId>
15 years, 6 months
JBoss Tools SVN: r15999 - trunk/jbpm/plugins.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-06-16 15:34:13 -0400 (Tue, 16 Jun 2009)
New Revision: 15999
Removed:
trunk/jbpm/plugins/org.jboss.tools.flow.common/
Log:
this plugin sits in the jbosstools/flow subfolder
15 years, 6 months
JBoss Tools SVN: r15998 - trunk/jbpm/features.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-06-16 15:32:31 -0400 (Tue, 16 Jun 2009)
New Revision: 15998
Removed:
trunk/jbpm/features/org.jboss.tools.flow.common.feature/
Log:
this feature sits in the jbosstools/flow subfolder
15 years, 6 months
JBoss Tools SVN: r15997 - in trunk: tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-06-16 13:38:34 -0400 (Tue, 16 Jun 2009)
New Revision: 15997
Added:
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/IMarkerFilter.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java
Log:
Fixed Seam Core Tests
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-06-16 16:56:21 UTC (rev 15996)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-06-16 17:38:34 UTC (rev 15997)
@@ -33,11 +33,13 @@
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ProjectImportTestSetup;
import org.jboss.tools.tests.AbstractResourceMarkerTest;
+import org.jboss.tools.tests.IMarkerFilter;
public class SeamValidatorsTest extends AbstractResourceMarkerTest {
IProject project = null;
public static final String MARKER_TYPE = "org.eclipse.wst.validation.problemmarker";
+ public static SeamMarkerFilter SEAM_MARKER_FILTER = new SeamMarkerFilter();
public SeamValidatorsTest() {
super("Seam Validator Tests");
@@ -81,7 +83,7 @@
*/
public void testJavaFileOutsideClassPath() throws CoreException {
IFile file = project.getFile("WebContent/Authenticator.java");
- String[] messages = getMarkersMessage(file);
+ String[] messages = getMarkersMessage(file, SEAM_MARKER_FILTER);
assertTrue("Problem marker was found in WebContent/Authenticator.java file. Seam EL validator should not validate it.", messages.length == 0);
}
@@ -163,13 +165,13 @@
number = getMarkersNumber(bbcComponentFile);
assertFalse("Problem marker 'Duplicate component name' not found", number == 0);
- String[] messages = getMarkersMessage(bbcComponentFile);
+ String[] messages = getMarkersMessage(bbcComponentFile, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Duplicate component name' not found","Duplicate component name: \"abcComponent\"", messages[0]);
- int[] lineNumbers = getMarkersNumbersOfLine(bbcComponentFile);
+ Integer[] lineNumbers = getMarkersNumbersOfLine(bbcComponentFile, SEAM_MARKER_FILTER);
- assertEquals("Problem marker has wrong line number", 7, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 7, lineNumbers[0].intValue());
// Stateful component does not contain @Remove method
//System.out.println("Test - Stateful component does not contain @Remove method");
@@ -187,12 +189,12 @@
number = getMarkersNumber(statefulComponentFile);
assertFalse("Problem marker 'Stateful component does not contain @Remove method' not found' not found", number == 0);
- messages = getMarkersMessage(statefulComponentFile);
+ messages = getMarkersMessage(statefulComponentFile, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Stateful component does not contain @Remove method' not found", "Stateful component \"statefulComponent\" must have a method marked @Remove", messages[0]);
lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
- assertEquals("Problem marker has wrong line number", 16, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 16, lineNumbers[0].intValue());
// Stateful component does not contain @Destroy method
//System.out.println("Test - Stateful component does not contain @Destroy method");
@@ -210,12 +212,12 @@
number = getMarkersNumber(statefulComponentFile);
assertFalse("Problem marker 'Stateful component does not contain @Destroy method' not found' not found' not found", number == 0);
- messages = getMarkersMessage(statefulComponentFile);
+ messages = getMarkersMessage(statefulComponentFile, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Stateful component does not contain @Destroy method' not found", "Stateful component \"statefulComponent\" must have a method marked @Destroy", messages[0]);
lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
- assertEquals("Problem marker has wrong line number", 16, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 16, lineNumbers[0].intValue());
// Stateful component has wrong scope
//System.out.println("Test - Stateful component has wrong scope");
@@ -233,12 +235,12 @@
number = getMarkersNumber(statefulComponentFile);
assertFalse("Problem marker 'Stateful component has wrong scope' not found' not found' not found", number == 0);
- messages = getMarkersMessage(statefulComponentFile);
+ messages = getMarkersMessage(statefulComponentFile, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Stateful component has wrong scope' not found", "Stateful component \"statefulComponent\" should not have org.jboss.seam.ScopeType.PAGE, nor org.jboss.seam.ScopeType.STATELESS", messages[0]);
lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
- assertEquals("Problem marker has wrong line number", 16, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 16, lineNumbers[0].intValue());
// Component class name cannot be resolved to a type
//System.out.println("Test - Component class name cannot be resolved to a type");
@@ -257,12 +259,12 @@
number = getMarkersNumber(componentsFile);
assertFalse("Problem marker 'Component class name cannot be resolved to a type' was not found", number == 0);
- messages = getMarkersMessage(componentsFile);
+ messages = getMarkersMessage(componentsFile, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Component class name cannot be resolved to a type' was not found", "\"org.domain.SeamWebWarTestProject.session.StateComponent\" cannot be resolved to a type", messages[0]);
lineNumbers = getMarkersNumbersOfLine(componentsFile);
- assertEquals("Problem marker has wrong line number", 15, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 15, lineNumbers[0].intValue());
// Component class does not contain setter for property
//System.out.println("Test - Component class does not contain setter for property");
@@ -290,12 +292,12 @@
number = getMarkersNumber(componentsFile);
assertFalse("Problem marker 'Component class does not contain setter for property' not found' not found' not found", number == 0);
- messages = getMarkersMessage(componentsFile);
+ messages = getMarkersMessage(componentsFile, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Component class does not have a setter or a field for the property' not found", "Class \"StatefulComponent\" of component \"statefulComponent\" does not have a setter or a field for the property \"abc\"", messages[0]);
lineNumbers = getMarkersNumbersOfLine(componentsFile);
- assertEquals("Problem marker has wrong line number", 16, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 16, lineNumbers[0].intValue());
// resolve error in BbcComponent.java
IFile bbcComponentFile3 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.3");
@@ -329,12 +331,12 @@
number = getMarkersNumber(abcEntityFile);
assertFalse("Problem marker 'Entity component has wrong scope' was not found'", number == 0);
- String[] messages = getMarkersMessage(abcEntityFile);
+ String[] messages = getMarkersMessage(abcEntityFile, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Entity component has wrong scope' was not found", "Entity component \"abcEntity\" should not have org.jboss.seam.ScopeType.STATELESS", messages[0]);
- int[] lineNumbers = getMarkersNumbersOfLine(abcEntityFile);
+ Integer[] lineNumbers = getMarkersNumbersOfLine(abcEntityFile, SEAM_MARKER_FILTER);
- assertEquals("Problem marker has wrong line number", 15, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 15, lineNumbers[0].intValue());
}
public void testComponentLifeCycleMethodsValidator() throws CoreException {
@@ -501,13 +503,13 @@
number = getMarkersNumber(component12File);
assertFalse("Problem marker 'Unknown factory name' was not found", number == 0);
- String[] messages = getMarkersMessage(component12File);
+ String[] messages = getMarkersMessage(component12File, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Unknown factory name' was not found", "Factory method \"messageList2\" with a void return type must have an associated @Out/Databinder", messages[0]);
- int[] lineNumbers = getMarkersNumbersOfLine(component12File);
+ Integer[] lineNumbers = getMarkersNumbersOfLine(component12File, SEAM_MARKER_FILTER);
- assertEquals("Problem marker has wrong line number", 24, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 24, lineNumbers[0].intValue());
component12File2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/DuplicateFactory");
try{
@@ -559,10 +561,10 @@
number = getMarkersNumber(selectionTestFile);
assertFalse("Problem marker 'Multiple data binder' was not found", number == 0);
- String[] messages = getMarkersMessage(selectionTestFile);
+ String[] messages = getMarkersMessage(selectionTestFile, SEAM_MARKER_FILTER);
assertTrue("Problem marker 'Multiple data binder", messages[0].startsWith("@DataModelSelection and @DataModelSelectionIndex without name of the DataModel requires the only one @DataModel in the component"));
- int[] lineNumbers = getMarkersNumbersOfLine(selectionTestFile);
+ Integer[] lineNumbers = getMarkersNumbersOfLine(selectionTestFile, SEAM_MARKER_FILTER);
assertTrue("Wrong number of problem markers", lineNumbers.length == messages.length && messages.length == 2);
@@ -572,7 +574,7 @@
number = getMarkersNumber(selectionIndexTestFile);
assertFalse("Problem marker 'Multiple data binder' was not found", number == 0);
- messages = getMarkersMessage(selectionIndexTestFile);
+ messages = getMarkersMessage(selectionIndexTestFile, SEAM_MARKER_FILTER);
assertTrue("Problem marker 'Multiple data binder", messages[0].startsWith("@DataModelSelection and @DataModelSelectionIndex without name of the DataModel requires the only one @DataModel in the component"));
lineNumbers = getMarkersNumbersOfLine(selectionIndexTestFile);
@@ -606,27 +608,27 @@
number = getMarkersNumber(selectionTestFile);
assertFalse("Problem marker 'Unknown @DataModel/@Out name' not found' not found' not found' not found", number == 0);
- messages = getMarkersMessage(selectionTestFile);
+ messages = getMarkersMessage(selectionTestFile, SEAM_MARKER_FILTER);
assertTrue("Problem marker 'Unknown @DataModel/@Out name", messages[0].startsWith("Unknown @DataModel/@Out name: \"messageList2\""));
lineNumbers = getMarkersNumbersOfLine(selectionTestFile);
- assertEquals("Problem marker has wrong line number", 27, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 27, lineNumbers[0].intValue());
number = getMarkersNumber(selectionIndexTestFile);
assertFalse("Problem marker 'Unknown @DataModel/@Out name' not found' not found' not found' not found", number == 0);
- messages = getMarkersMessage(selectionIndexTestFile);
+ messages = getMarkersMessage(selectionIndexTestFile, SEAM_MARKER_FILTER);
assertTrue("Problem marker 'Unknown @DataModel/@Out name", messages[0].startsWith("Unknown @DataModel/@Out name: \"messageList2\""));
lineNumbers = getMarkersNumbersOfLine(selectionIndexTestFile);
- assertEquals("Problem marker has wrong line number", 27, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 27, lineNumbers[0].intValue());
}
public void testContextVariablesValidator() {
modifyPreferences();
- IPreferenceStore store = SeamCorePlugin.getDefault().getPreferenceStore();
+// IPreferenceStore store = SeamCorePlugin.getDefault().getPreferenceStore();
//System.out.println("UNKNOWN_EL_VARIABLE_NAME value- "+store.getString(SeamPreferences.UNKNOWN_EL_VARIABLE_NAME));
IFile contextVariableTestFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/ContextVariableTest.java");
@@ -649,14 +651,14 @@
refreshProject(project);
- String[] messages = getMarkersMessage(contextVariableTestFile);
+ String[] messages = getMarkersMessage(contextVariableTestFile, SEAM_MARKER_FILTER);
assertEquals("Not all problem markers 'Duplicate variable name' was found", 2, messages.length);
for(int i=0;i<2;i++)
assertEquals("Problem marker 'Duplicate factory name' not found", "Duplicate factory name: \"messageList\"", messages[i]);
- int[] lineNumbers = getMarkersNumbersOfLine(contextVariableTestFile);
+ Integer[] lineNumbers = getMarkersNumbersOfLine(contextVariableTestFile, SEAM_MARKER_FILTER);
for(int i=0;i<2;i++)
assertTrue("Problem marker has wrong line number", (lineNumbers[i] == 36)||(lineNumbers[i] == 41));
@@ -677,13 +679,13 @@
number = getMarkersNumber(contextVariableTestFile);
assertFalse("Problem marker 'Unknown variable name' not found' not found' not found' not found", number == 0);
- messages = getMarkersMessage(contextVariableTestFile);
+ messages = getMarkersMessage(contextVariableTestFile, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Unknown variable name' not found", "Unknown context variable name: \"messageList5\"", messages[0]);
lineNumbers = getMarkersNumbersOfLine(contextVariableTestFile);
- assertEquals("Problem marker has wrong line number", 22, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 22, lineNumbers[0].intValue());
}
@@ -721,13 +723,13 @@
number = getMarkersNumber(abcComponentXHTMLFile);
assertFalse("Problem marker 'Context variable cannot be resolved' not found' not found' not found' not found", number == 0);
- String[] messages = getMarkersMessage(abcComponentXHTMLFile);
+ String[] messages = getMarkersMessage(abcComponentXHTMLFile, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Context variable cannot be resolved' not found", "\"bcComponent\" cannot be resolved", messages[0]);
- int[] lineNumbers = getMarkersNumbersOfLine(abcComponentXHTMLFile);
+ Integer[] lineNumbers = getMarkersNumbersOfLine(abcComponentXHTMLFile, SEAM_MARKER_FILTER);
- assertEquals("Problem marker has wrong line number", 22, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 22, lineNumbers[0].intValue());
// Property cannot be resolved
//System.out.println("Test - Property cannot be resolved");
@@ -745,13 +747,13 @@
number = getMarkersNumber(abcComponentXHTMLFile);
assertFalse("Problem marker 'Property cannot be resolved' was not found", number == 0);
- messages = getMarkersMessage(abcComponentXHTMLFile);
+ messages = getMarkersMessage(abcComponentXHTMLFile, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Property cannot be resolved' was not found", "\"actionType2\" cannot be resolved", messages[0]);
lineNumbers = getMarkersNumbersOfLine(abcComponentXHTMLFile);
- assertEquals("Problem marker has wrong line number", 22, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 22, lineNumbers[0].intValue());
// Unpaired Getter/Setter
//System.out.println("Test - Unpaired Getter/Setter");
@@ -782,13 +784,13 @@
number = getMarkersNumber(abcComponentXHTMLFile);
assertFalse("Problem marker 'Unpaired Getter/Setter' was not found' not found' not found' not found", number == 0);
- messages = getMarkersMessage(abcComponentXHTMLFile);
+ messages = getMarkersMessage(abcComponentXHTMLFile, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Unpaired Getter/Setter' was not found", "Property \"actionType\" has only Setter. Getter is missing.", messages[0]);
lineNumbers = getMarkersNumbersOfLine(abcComponentXHTMLFile);
- assertEquals("Problem marker has wrong line number", 22, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 22, lineNumbers[0].intValue());
IFile abcComponentFile3 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/AbcComponent.3");
try{
@@ -803,13 +805,13 @@
number = getMarkersNumber(abcComponentXHTMLFile);
assertFalse("Problem marker 'Unpaired Getter/Setter' was not found", number == 0);
- messages = getMarkersMessage(abcComponentXHTMLFile);
+ messages = getMarkersMessage(abcComponentXHTMLFile, SEAM_MARKER_FILTER);
assertEquals("Problem marker 'Unpaired Getter/Setter' was not found", "Property \"actionType\" has only Getter. Setter is missing.", messages[0]);
lineNumbers = getMarkersNumbersOfLine(abcComponentXHTMLFile);
- assertEquals("Problem marker has wrong line number", 22, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 22, lineNumbers[0].intValue());
}
public void testInheritedMethods() {
@@ -842,9 +844,9 @@
JUnitUtils.fail("Error in changing 'components.xml' content to 'duplicateComponents.test'", ex);
}
JobUtils.waitForIdle();
- int[] lineNumbers = getMarkersNumbersOfLine(duplicateJavaComponentFile);
+ Integer[] lineNumbers = getMarkersNumbersOfLine(duplicateJavaComponentFile, SEAM_MARKER_FILTER);
assertEquals("There should be the only one error marker in DuplicateComponent.java.", 1, lineNumbers.length);
- assertEquals("Problem marker has wrong line number", 5, lineNumbers[0]);
+ assertEquals("Problem marker has wrong line number", 5, lineNumbers[0].intValue());
lineNumbers = getMarkersNumbersOfLine(componentsXmlFile);
assertEquals("There should be two error marker in components.xml.", 2, lineNumbers.length);
@@ -852,7 +854,7 @@
assertTrue("Problem marker was not found on 9 line", findLine(lineNumbers, 9));
}
- private static boolean findLine(int[] lines, int number) {
+ private static boolean findLine(Integer[] lines, int number) {
for (int i = 0; i < lines.length; i++) {
if(lines[i]==number) {
return true;
@@ -886,7 +888,7 @@
// ignore
}
}
-
+
public static int getMarkersNumber(IResource resource){
try{
IMarker[] markers = resource.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
@@ -906,4 +908,11 @@
}
return -1;
}
+
+ public static class SeamMarkerFilter implements IMarkerFilter {
+ public boolean accept(IMarker marker) {
+ String groupName = marker.getAttribute("groupName", null);
+ return groupName!=null && (groupName.equals(ISeamValidator.MARKED_SEAM_PROJECT_MESSAGE_GROUP) || groupName.equals(ISeamValidator.MARKED_SEAM_RESOURCE_MESSAGE_GROUP));
+ }
+ }
}
\ No newline at end of file
Modified: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java 2009-06-16 16:56:21 UTC (rev 15996)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java 2009-06-16 17:38:34 UTC (rev 15997)
@@ -105,28 +105,42 @@
}
}
- public static int getMarkersNumber(IResource resource){
+ public static int getMarkersNumber(IResource resource) {
+ return getMarkersNumber(resource, null);
+ }
+
+ public static int getMarkersNumber(IResource resource, IMarkerFilter filter) {
try{
IMarker[] markers = resource.findMarkers(null, true, IResource.DEPTH_INFINITE);
+ int length = markers.length;
for(int i=0;i<markers.length;i++){
- System.out.println("Marker - "+markers[i].getAttribute(IMarker.MESSAGE, "")); //$NON-NLS-1$//$NON-NLS-2$
+// System.out.println("Marker - "+markers[i].getAttribute(IMarker.MESSAGE, "")); //$NON-NLS-1$//$NON-NLS-2$
+ if(filter!=null && !filter.accept(markers[i])) {
+ length--;
+ }
}
- return markers.length;
+ return length;
}catch(CoreException ex){
JUnitUtils.fail("Can't get problem markers", ex); //$NON-NLS-1$
}
return -1;
}
- public static String[] getMarkersMessage(IResource resource){
+ public static String[] getMarkersMessage(IResource resource) {
+ return getMarkersMessage(resource, null);
+ }
+
+ public static String[] getMarkersMessage(IResource resource, IMarkerFilter filter) {
String[] messages = null;
try{
IMarker[] markers = resource.findMarkers(null, true, IResource.DEPTH_INFINITE);
messages = new String[markers.length];
+// System.out.println("Marker - "+markers[i].getAttribute(IMarker.MESSAGE, "")); //$NON-NLS-1$//$NON-NLS-2$
for(int i=0;i<markers.length;i++){
- System.out.println("Marker - "+markers[i].getAttribute(IMarker.MESSAGE, "")); //$NON-NLS-1$//$NON-NLS-2$
- messages[i] = markers[i].getAttribute(IMarker.MESSAGE, ""); //$NON-NLS-1$
+ if(filter==null || filter.accept(markers[i])) {
+ messages[i] = markers[i].getAttribute(IMarker.MESSAGE, ""); //$NON-NLS-1$
+ }
}
}catch(CoreException ex){
JUnitUtils.fail("Can't get problem markers", ex); //$NON-NLS-1$
@@ -134,20 +148,25 @@
return messages;
}
- public static int[] getMarkersNumbersOfLine(IResource resource){
- int[] numbers = null;
+ public static Integer[] getMarkersNumbersOfLine(IResource resource) {
+ return getMarkersNumbersOfLine(resource, null);
+ }
+
+ public static Integer[] getMarkersNumbersOfLine(IResource resource, IMarkerFilter filter) {
+ List<Integer> numbers = new ArrayList<Integer>();
try{
IMarker[] markers = resource.findMarkers(null, true, IResource.DEPTH_INFINITE);
- numbers = new int[markers.length];
for(int i=0;i<markers.length;i++){
- System.out.println("Marker line number - "+markers[i].getAttribute(IMarker.LINE_NUMBER, 0)); //$NON-NLS-1$
- numbers[i] = markers[i].getAttribute(IMarker.LINE_NUMBER, 0);
+// System.out.println("Marker line number - "+markers[i].getAttribute(IMarker.LINE_NUMBER, 0)); //$NON-NLS-1$
+ if(filter==null || filter.accept(markers[i])) {
+ numbers.add(markers[i].getAttribute(IMarker.LINE_NUMBER, 0));
+ }
}
}catch(CoreException ex){
JUnitUtils.fail("Can't get problem markers.", ex); //$NON-NLS-1$
}
- return numbers;
+ return numbers.toArray(new Integer[0]);
}
/**
Added: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/IMarkerFilter.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/IMarkerFilter.java (rev 0)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/IMarkerFilter.java 2009-06-16 17:38:34 UTC (rev 15997)
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.tests;
+
+import org.eclipse.core.resources.IMarker;
+
+/**
+ * @author Alexey Kazakov
+ */
+public interface IMarkerFilter {
+
+ boolean accept(IMarker marker);
+}
\ No newline at end of file
Property changes on: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/IMarkerFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 6 months
JBoss Tools SVN: r15996 - trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-06-16 12:56:21 -0400 (Tue, 16 Jun 2009)
New Revision: 15996
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta
Log:
https://jira.jboss.org/jira/browse/JBIDE-4190
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta 2009-06-16 16:42:44 UTC (rev 15995)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta 2009-06-16 16:56:21 UTC (rev 15996)
@@ -1925,6 +1925,7 @@
<EntityData EntityName="ESBJBRProvider101">
<AttributeData AttributeName="name"/>
<AttributeData AttributeName="protocol"/>
+ <AttributeData AttributeName="host" Mandatory="no"/>
</EntityData>
<EntityData EntityName="ESBBusCreator">
<AttributeData AttributeName="id"/>
15 years, 6 months
JBoss Tools SVN: r15995 - in trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common: model/ui/texteditors and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-06-16 12:42:44 -0400 (Tue, 16 Jun 2009)
New Revision: 15995
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/UIMessages.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/messages.properties
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/PropertiesTextEditorComponent.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesCompoundEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4465
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/UIMessages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/UIMessages.java 2009-06-16 15:06:11 UTC (rev 15994)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/UIMessages.java 2009-06-16 16:42:44 UTC (rev 15995)
@@ -21,4 +21,6 @@
NLS.initializeMessages(BUNDLE_NAME, UIMessages.class);
}
public static String CANNOT_DISPLAY_DOCUMENT_CONTENTS;
+ public static String PROPERTIES_EDITOR_FILTER;
+ public static String PROPERTIES_EDITOR_FILTER_MATCHES;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/messages.properties 2009-06-16 15:06:11 UTC (rev 15994)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/messages.properties 2009-06-16 16:42:44 UTC (rev 15995)
@@ -1 +1,3 @@
-CANNOT_DISPLAY_DOCUMENT_CONTENTS=Cannot display document contents.
\ No newline at end of file
+CANNOT_DISPLAY_DOCUMENT_CONTENTS=Cannot display document contents.
+PROPERTIES_EDITOR_FILTER=Filter
+PROPERTIES_EDITOR_FILTER_MATCHES=Filter matched {0} out of {1} items.
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/PropertiesTextEditorComponent.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/PropertiesTextEditorComponent.java 2009-06-16 15:06:11 UTC (rev 15994)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/PropertiesTextEditorComponent.java 2009-06-16 16:42:44 UTC (rev 15995)
@@ -18,8 +18,10 @@
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextListener;
+import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.TextEvent;
import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
@@ -293,8 +295,37 @@
}
public XModelObject findModelObjectAtCursor() {
+ XModelObject o = getModelObject();
+ if(o == null) return null;
+ ISelection selection = getSelectionProvider().getSelection();
+ if(!(selection instanceof ITextSelection)) return null;
+ int offset = ((ITextSelection)selection).getOffset();
+ IDocument doc = getDocumentProvider().getDocument(getEditorInput());
+ try {
+ int line = doc.getLineOfOffset(offset);
+ int lineStart = doc.getLineOffset(line);
+ int length = doc.getLineLength(line);
+ String txt = doc.get(lineStart, length);
+ XModelObject[] cs = o.getChildren();
+ String trimmed = txt.trim();
+ for (int i = 0; i < cs.length; i++) {
+ String n = cs[i].getAttributeValue("name");
+ if(!trimmed.startsWith(n)) continue;
+ String sep = cs[i].getAttributeValue("name-value-separator");
+ if(sep == null || sep.length() == 0) sep = "=";
+ int q = trimmed.indexOf('=');
+ if(q < 0) continue;
+ String s = trimmed.substring(n.length(), q).trim();
+ if(s.length() > 0) continue;
+
+ return cs[i];
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
return null;
}
+
}
class RevertToSavedAction3 extends RevertToSavedAction {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesCompoundEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesCompoundEditor.java 2009-06-16 15:06:11 UTC (rev 15994)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesCompoundEditor.java 2009-06-16 16:42:44 UTC (rev 15995)
@@ -10,11 +10,14 @@
******************************************************************************/
package org.jboss.tools.common.propertieseditor;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.PartInitException;
import org.jboss.tools.common.editor.AbstractSelectionProvider;
import org.jboss.tools.common.editor.ObjectMultiPageEditor;
import org.jboss.tools.common.editor.ObjectTextEditor;
+import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.propertieseditor.text.PropertiesTextEditor;
@@ -48,6 +51,7 @@
setPageText(index, "Properties");
propertiesEditor.setObject(object);
propertiesEditor.update();
+ propertiesEditor.refresh();
}
protected ObjectTextEditor createTextEditor() {
@@ -108,4 +112,14 @@
return new String[0];
}
+ protected void synchronizeSelectionWithText() {
+ if(getTextSelectionProvider() == null || propertiesEditor == null) return;
+ ISelection s = getTextSelectionProvider().getSelection();
+ if(s == null || s.isEmpty() || !(s instanceof IStructuredSelection)) return;
+ Object o = ((IStructuredSelection)s).getFirstElement();
+ if(!(o instanceof XModelObject) || o == getModelObject()) return;
+ propertiesEditor.getSelectionProvider().setSelection(s);
+ if(outline != null) outline.setSelection(s);
+ }
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java 2009-06-16 15:06:11 UTC (rev 15994)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/PropertiesEditor.java 2009-06-16 16:42:44 UTC (rev 15995)
@@ -10,55 +10,94 @@
******************************************************************************/
package org.jboss.tools.common.propertieseditor;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Properties;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.events.IExpansionListener;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.jboss.tools.common.meta.action.XAction;
import org.jboss.tools.common.meta.action.XActionInvoker;
+import org.jboss.tools.common.meta.action.impl.XEntityDataImpl;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.action.CommandBar;
import org.jboss.tools.common.model.ui.action.XMenuInvoker;
+import org.jboss.tools.common.model.ui.attribute.XAttributeSupport;
+import org.jboss.tools.common.model.ui.attribute.adapter.DefaultValueAdapter;
+import org.jboss.tools.common.model.ui.messages.UIMessages;
import org.jboss.tools.common.model.ui.objecteditor.XChildrenEditor;
import org.jboss.tools.common.model.ui.texteditors.TextActionHelper;
import org.jboss.tools.common.model.util.AbstractTableHelper;
public class PropertiesEditor extends XChildrenEditor implements ITextEditor, ITextOperationTarget {
+ static final String ENT_PROPERTY = "Property"; //$NON-NLS-1$
+ static final String ATTR_NAME = "name"; //$NON-NLS-1$
+ static final String ATTR_VALUE = "value"; //$NON-NLS-1$
+ static final String ATTR_ENABLED = "enabled"; //$NON-NLS-1$
+ XModelObject property = PreferenceModelUtilities.getPreferenceModel().createModelObject(ENT_PROPERTY, null);
+ XAttributeSupport support = new XAttributeSupport(property, XEntityDataImpl.create(new String[][]{
+ {ENT_PROPERTY, "yes"}, //$NON-NLS-1$
+ {ATTR_NAME, "no"}, //$NON-NLS-1$
+ {ATTR_VALUE, "no"} //$NON-NLS-1$
+ }));
+ private Label statistics;
+ Composite panel = null;
private ArrayList<String> actionMapping = new ArrayList<String>();
private Map<String,IAction> actions = new HashMap<String,IAction>();
private IEditorInput input;
IEditorSite site;
+ FPTableHelper pHelper;
+ private QualifiedName filterOpenedId = new QualifiedName("", "filterOpened"); //$NON-NLS-1$
+ private QualifiedName nameFilterId = new QualifiedName("", "nameFilter"); //$NON-NLS-1$
+ private QualifiedName valueFilterId = new QualifiedName("", "valueFilter"); //$NON-NLS-1$
+ private boolean filterOpened = false;
+
+
public PropertiesEditor() {
xtable.setMultiSelected();
setMnemonicEnabled(true);
}
protected AbstractTableHelper createHelper() {
- return new FPTableHelper();
+ return pHelper = new FPTableHelper(this);
}
protected int[] getColumnWidthHints() {
@@ -70,12 +109,48 @@
}
public Control createControl(Composite parent) {
- super.createControl(parent);
+ panel = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, false);
+ panel.setLayout(layout);
+
+ support.getPropertyEditorAdapterByName(ATTR_NAME).setValue(pHelper.nameFilter);
+ support.getPropertyEditorAdapterByName(ATTR_VALUE).setValue(pHelper.valueFilter);
+
+ ExpandableComposite g = new ExpandableComposite(panel, SWT.NONE);
+ g.setText(UIMessages.PROPERTIES_EDITOR_FILTER);
+ g.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ Composite g1 = new Composite(g, SWT.NONE);
+ g1.setLayout(new GridLayout(2, false));
+ g1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ g.setClient(g1);
+ g.setExpanded(filterOpened);
+ g.addExpansionListener(new IExpansionListener() {
+ public void expansionStateChanging(ExpansionEvent e) {
+ }
+ public void expansionStateChanged(ExpansionEvent e) {
+ filterOpened = e.getState();
+ panel.update();
+ panel.layout();
+ }
+ });
+ support.fillComposite(g1);
+ support.addPropertyChangeListener(pHelper);
+
+ statistics = new Label(panel, SWT.NONE);
+ statistics.setVisible(false);
+ GridData d = new GridData(GridData.FILL_HORIZONTAL);
+ d.heightHint = 1;
+ statistics.setLayoutData(d);
+
+ Control c = super.createControl(panel);
+ c.setLayoutData(new GridData(GridData.FILL_BOTH));
+
TMenuInvoker menu = new TMenuInvoker();
menu.setViewer(xtable.getViewer());
xtable.getViewer().getTable().addMouseListener(menu);
getControl().addMouseListener(menu);
- return getControl();
+
+ return panel;
}
protected void setMargins(CommandBar bar) {
@@ -84,7 +159,7 @@
protected Color getItemColor(int i) {
XModelObject o = helper.getModelObject(i);
- boolean disabled = "no".equals(o.getAttributeValue("enabled"));
+ boolean disabled = "no".equals(o.getAttributeValue(ATTR_ENABLED));
return ((disabled) ? GREYED_COLOR : DEFAULT_COLOR);
}
@@ -160,12 +235,40 @@
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
this.site = site;
this.input = input;
+ if(input instanceof IFileEditorInput) {
+ IFile f = ((IFileEditorInput)input).getFile();
+ loadPreferences(f);
+ }
}
+ void loadPreferences(IFile f) {
+ if(f == null || !f.exists()) return;
+ try {
+ filterOpened = "true".equals(f.getPersistentProperty(filterOpenedId));
+ pHelper.nameFilter = f.getPersistentProperty(nameFilterId);
+ pHelper.valueFilter = f.getPersistentProperty(valueFilterId);
+ if(pHelper.nameFilter == null) pHelper.nameFilter = "";
+ if(pHelper.valueFilter == null) pHelper.valueFilter = "";
+ } catch (CoreException e) {
+ //ignore
+ }
+ }
+
+ void savePreferences(IFile f) {
+ if(f == null || !f.exists()) return;
+ try {
+ f.setPersistentProperty(filterOpenedId, "" + filterOpened);
+ f.setPersistentProperty(nameFilterId, pHelper.nameFilter);
+ f.setPersistentProperty(valueFilterId, "" + pHelper.valueFilter);
+ } catch (CoreException e) {
+ //ignore
+ }
+ }
+
public void addPropertyListener(IPropertyListener listener) {}
public void createPartControl(Composite parent) {
- super.createControl(parent);
+ createControl(parent);
createActions();
}
@@ -293,12 +396,111 @@
}
}
+ public void refresh() {
+ xtable.update();
+ updateBar();
+ validateStatistics();
+ }
+
+ void validateStatistics() {
+ int filtered = pHelper.filteredChildren.length;
+ int total = pHelper.getModelObject().getChildren().length;
+ boolean mod = (filtered != total) != statistics.isVisible();
+ if(mod) {
+ statistics.setVisible(filtered != total);
+ GridData d = (GridData)statistics.getLayoutData();
+ d.heightHint = (filtered != total) ? SWT.DEFAULT : 1;
+ panel.update();
+ panel.layout();
+ }
+ if(filtered != total) {
+ statistics.setText(NLS.bind(UIMessages.PROPERTIES_EDITOR_FILTER_MATCHES, filtered, total));
+ }
+ }
+
+ public void dispose() {
+ super.dispose();
+ if(input instanceof IFileEditorInput) {
+ IFile f = ((IFileEditorInput)input).getFile();
+ savePreferences(f);
+ }
+ }
}
-class FPTableHelper extends AbstractTableHelper {
- public FPTableHelper() {}
+class FPTableHelper extends AbstractTableHelper implements PropertyChangeListener {
+ PropertiesEditor pe;
+ String nameFilter = "";
+ String valueFilter = "";
+ XModelObject[] filteredChildren = new XModelObject[0];
+ long ts = -1;
+
+ public void setModelObject(XModelObject object) {
+ super.setModelObject(object);
+ }
+
+ void applyFilters() {
+ ts = object == null ? -1 : object.getTimeStamp();
+ if(object == null) {
+ filteredChildren = new XModelObject[0];
+ } else if(nameFilter.length() == 0 && valueFilter.length() == 0) {
+ filteredChildren = object.getChildren();
+ } else {
+ XModelObject[] children = object.getChildren();
+ List<XModelObject> list = new ArrayList<XModelObject>();
+ for (XModelObject c: children) {
+ String n = c.getAttributeValue(PropertiesEditor.ATTR_NAME);
+ String v = c.getAttributeValue(PropertiesEditor.ATTR_VALUE);
+ if(nameFilter.length() > 0) {
+ if(n.indexOf(nameFilter) < 0) continue; //TODO improve
+ }
+ if(valueFilter.length() > 0) {
+ if(v.indexOf(valueFilter) < 0) continue; //TODO improve
+ }
+
+ list.add(c);
+ }
+ filteredChildren = list.toArray(new XModelObject[0]);
+ }
+ }
+ public FPTableHelper(PropertiesEditor pe) {
+ this.pe = pe;
+ }
+
+ public int size() {
+ if(object == null) return 0;
+ if(ts != object.getTimeStamp()) {
+ applyFilters();
+ }
+ return filteredChildren.length;
+ }
+
+ public XModelObject getModelObject(int r) {
+ if(object == null) return null;
+ if(ts != object.getTimeStamp()) {
+ applyFilters();
+ }
+ XModelObject[] cs = filteredChildren;
+ return (r < 0 || r >= cs.length) ? null : cs[r];
+ }
+
+
public String[] getHeader() {
return new String[]{"name", "value"};
}
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ if(evt.getSource() instanceof DefaultValueAdapter) {
+ DefaultValueAdapter a = (DefaultValueAdapter)evt.getSource();
+ String name = a.getAttribute().getName();
+ if(PropertiesEditor.ATTR_NAME.equals(name)) {
+ nameFilter = "" + evt.getNewValue();
+ } else if(PropertiesEditor.ATTR_VALUE.equals(name)) {
+ valueFilter = "" + evt.getNewValue();
+ }
+ applyFilters();
+ pe.refresh();
+ }
+
+ }
}
15 years, 6 months
JBoss Tools SVN: r15994 - in trunk/jsf: tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-06-16 11:06:11 -0400 (Tue, 16 Jun 2009)
New Revision: 15994
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithNestedLayouts.xhtml.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4439, logic for width attribute processing was added to tich:layout template, tests were updated.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java 2009-06-16 14:51:13 UTC (rev 15993)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java 2009-06-16 15:06:11 UTC (rev 15994)
@@ -1,5 +1,6 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
+import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
@@ -58,6 +59,13 @@
NodeList children = sourceNode.getChildNodes();
Map<String, Element> panels = new HashMap<String, Element>();
+ /*
+ * Array of columns weights
+ * 0 - for left panel
+ * 1 - for center panel
+ * 2 - for right panel
+ */
+ String[] widthStrings = {Constants.EMPTY, Constants.EMPTY, Constants.EMPTY};
for (int i = 0; i < children.getLength(); i++) {
Node node = children.item(i);
if (node instanceof Element && node.getNodeName() != null
@@ -68,16 +76,21 @@
* Adding several panel with the same position is forbidden.
* During adding to the map only the last panel
* with repeating position name will be displayed.
+ * Counting columns quantity and reading 'width attribute'
+ * at the same time.
*/
if (ComponentUtil.isNotBlank(position)) {
if (RichFaces.VALUE_TOP.equalsIgnoreCase(position)) {
panels.put(RichFaces.VALUE_TOP, element);
} else if (RichFaces.VALUE_LEFT.equalsIgnoreCase(position)) {
panels.put(RichFaces.VALUE_LEFT, element);
+ widthStrings[0] = element.getAttribute(HTML.ATTR_WIDTH);
} else if (RichFaces.VALUE_CENTER.equalsIgnoreCase(position)) {
panels.put(RichFaces.VALUE_CENTER, element);
+ widthStrings[1] = element.getAttribute(HTML.ATTR_WIDTH);
} else if (RichFaces.VALUE_RIGHT.equalsIgnoreCase(position)) {
panels.put(RichFaces.VALUE_RIGHT, element);
+ widthStrings[2] = element.getAttribute(HTML.ATTR_WIDTH);
} else if (RichFaces.VALUE_BOTTOM.equalsIgnoreCase(position)) {
panels.put(RichFaces.VALUE_BOTTOM, element);
}
@@ -86,63 +99,181 @@
}
/*
- * Adding panels' divs.
- * Order is important!
+ * Columns weights processing:
+ * 1) If column has no weight specified
+ * a) it should have a percent weight - when other weights are less than 100% summary,
+ * if there are some columns without weight - they should share
+ * total free weight between each other equally.
+ * b) if other columns has weights specified in percents
+ * and in summary it's more than 100%
+ * than no weight should be set.
+ * 2) If there are some columns has weight in '%' and their weights'
+ * sum is more or less 100% then new weight should be set in range of 100%
+ * in proportion to specified weights.
+ * 3) If column has weight set in '%' and the value is greater than 100%
+ * the value is added to style without changes.
+ * 4) Weights in 'px' and 'em' are set in style without changes.
*/
- int columsCount = 0;
- if (null != panels.get(RichFaces.VALUE_LEFT)) {
- columsCount++;
+
+ /*
+ * Array of columns weights
+ * 0 - for left panel
+ * 1 - for center panel
+ * 2 - for right panel
+ */
+ double[] widths = {-1, -1, -1};
+ for (int i = 0; i < widthStrings.length; i++) {
+ widths[i] = parseWidthFromPercents(widthStrings[i]);
}
- if (null != panels.get(RichFaces.VALUE_CENTER)) {
- columsCount++;
+ /*
+ * A) Find any >100% weight.
+ * Leave it as is.
+ */
+ boolean widthOverflow = false;
+ for (double w : widths) {
+ if (w > 100) {
+ widthOverflow = true;
+ }
}
- if (null != panels.get(RichFaces.VALUE_RIGHT)) {
- columsCount++;
+ if (!widthOverflow){
+ /*
+ * B) When weights are less than 100
+ * Count total weight in '%' (<100 || >100)
+ */
+ double totalWidth = 0;
+ for (double w : widths) {
+ if (w > 0) {
+ totalWidth += w;
+ }
+ }
+ /*
+ * Count columns with no width specified.
+ */
+ int noWeightColumns = 0;
+ for (String ws : widthStrings) {
+ if ((null == ws)
+ || Constants.EMPTY.equalsIgnoreCase(ws)) {
+ noWeightColumns++;
+ }
+ }
+ /*
+ * Free width to add to total width to 100.
+ */
+ double totalFreeWidth = 100 - totalWidth;
+ /*
+ * Total available width should always be less or equal 100.
+ */
+ double availableWidth = 100;
+ if ((totalWidth < 100) && (noWeightColumns > 0)){
+ /*
+ * Set specified width, free space will be filled
+ * with columns without width attribute.
+ */
+ availableWidth = totalWidth;
+ }
+ /*
+ * C) Adjust existed weights in '%'
+ */
+ double[] coeffs = {-1, -1, -1};
+ for (int i = 0; i < widths.length; i++) {
+ if (widths[i] > 0) {
+ coeffs[i] = widths[i] / totalWidth;
+ BigDecimal b = new BigDecimal(availableWidth*coeffs[i]).setScale(2,
+ BigDecimal.ROUND_HALF_UP);
+ widthStrings[i] = b.doubleValue() + Constants.PERCENT;
+ }
+ }
+
+ /*
+ * D) Adjust empty weight
+ * When there is some free space to adjust -
+ * divide it equally between width free columns.
+ */
+ if ((totalFreeWidth > 0) && (noWeightColumns > 0)) {
+ BigDecimal b = new BigDecimal(totalFreeWidth/noWeightColumns).setScale(2,
+ BigDecimal.ROUND_HALF_UP);
+ for (int i = 0; i < widthStrings.length; i++) {
+ if ((null == widthStrings[i])
+ || Constants.EMPTY.equalsIgnoreCase(widthStrings[i])) {
+ widthStrings[i] = b.doubleValue() + Constants.PERCENT;
+ }
+ }
+ }
}
+ /*
+ * E) Leave 'px' and 'em' without changes
+ */
+
+ /*
+ * Adding panels' divs.
+ * Order is important!
+ */
addPanelFromMap(RichFaces.VALUE_TOP, panels, mainDiv, topDiv,
- Constants.EMPTY, columsCount, creationData);
+ Constants.EMPTY, null, creationData);
addPanelFromMap(RichFaces.VALUE_LEFT, panels, mainDiv, leftDiv,
- FLOAT_LEFT_STYLE, columsCount, creationData);
+ FLOAT_LEFT_STYLE, widthStrings[0], creationData);
addPanelFromMap(RichFaces.VALUE_CENTER, panels, mainDiv, centerDiv,
- FLOAT_LEFT_STYLE, columsCount, creationData);
+ FLOAT_LEFT_STYLE, widthStrings[1], creationData);
addPanelFromMap(RichFaces.VALUE_RIGHT, panels, mainDiv, rightDiv,
- FLOAT_RIGHT_STYLE, columsCount, creationData);
+ FLOAT_RIGHT_STYLE, widthStrings[2], creationData);
addPanelFromMap(RichFaces.VALUE_BOTTOM, panels, mainDiv, bottomDiv,
- Constants.EMPTY, columsCount, creationData);
+ Constants.EMPTY, null, creationData);
+
return creationData;
}
+ /**
+ * Parse width string from percents form to a number.
+ * @param widthStr panel's width string
+ * @return panel's width number or -1 when parsing failed
+ */
+ private double parseWidthFromPercents(String widthStr) {
+ double result = -1;
+ if ((null != widthStr) && widthStr.endsWith(Constants.PERCENT)) {
+ try {
+ result = Double.parseDouble(widthStr.substring(0, widthStr.length()-1));
+ } catch (Exception e) {
+ /*
+ * Cannot parse - skip.
+ */
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Adds rich:layoutPanel to current rich:layout.
+ * Styles and width will be set.
+ * Panel will be added to children info.
+ *
+ * @param panelPositionMapName panel name, also used to get the panel from the map
+ * @param panelsMap map with panels elements from source
+ * @param mainDiv rich:layout's div
+ * @param panelDiv div to render layoutPanel
+ * @param style panel's css style
+ * @param panelWidth panel's width
+ * @param creationData VpeCreationData
+ */
private void addPanelFromMap(String panelPositionMapName, Map<String, Element> panelsMap,
- nsIDOMElement mainDiv, nsIDOMElement panelDiv, String style, int columsCount, VpeCreationData creationData) {
+ nsIDOMElement mainDiv, nsIDOMElement panelDiv, String style, String panelWidth, VpeCreationData creationData) {
Element panel = panelsMap.get(panelPositionMapName);
if (null != panel) {
String widthStr = panel.getAttribute(HTML.ATTR_WIDTH);
- double width = 100;
- switch (columsCount) {
- case 0:
- width = 100;
- break;
- case 1:
- width = 100;
- break;
- case 2:
- width = 50;
- break;
- case 3:
- width = 32.34;
- break;
-
- default:
- break;
- }
/*
* Apply column width for left, center and right panels only.
- * Top and bottom panels should always be 100% width.
*/
if (!RichFaces.VALUE_TOP.equalsIgnoreCase(panelPositionMapName)
- && !RichFaces.VALUE_BOTTOM.equalsIgnoreCase(panelPositionMapName)) {
- style += "; width: " + width + "%;"; //$NON-NLS-1$ //$NON-NLS-2$
+ && !RichFaces.VALUE_BOTTOM.equalsIgnoreCase(panelPositionMapName)
+ && (null != panelWidth)) {
+ style += "; width: " + panelWidth + ";"; //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+
}
+ /*
+ * Set the original width to 'width' attribute
+ * as richfaces do.
+ */
+
if (ComponentUtil.isNotBlank(widthStr)) {
panelDiv.setAttribute(HTML.ATTR_WIDTH, widthStr);
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml.xml 2009-06-16 14:51:13 UTC (rev 15993)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml.xml 2009-06-16 15:06:11 UTC (rev 15994)
@@ -1,5 +1,4 @@
<tests>
-
<test id="id1">
<DIV CLASS="rich-page styleClass" STYLE="width: 1000px; background-color: white;">
@@ -7,157 +6,157 @@
<DIV CLASS="rich-page-header-content">
<SPAN STYLE="font-size: 2em;">
HEADER
- </SPAN>
+</SPAN>
</DIV>
</DIV>
<DIV CLASS="rich-page-subheader subheaderClass">
<SPAN STYLE="font-size: 2em;">
SUBHEADER
- </SPAN>
+</SPAN>
</DIV>
<DIV CLASS="rich-page-content">
<DIV CLASS="rich-page-sidebar sidebarClass" STYLE="width: 15em; float: right;">
<SPAN STYLE="font-size: 2em;">
SIDEBAR
- </SPAN>
+</SPAN>
</DIV>
<DIV CLASS="rich-page-main" STYLE="float: left; margin-right: -30em;">
<DIV CLASS="rich-page-body bodyClass" STYLE="margin-right: 15em;">
<H1 STYLE="-moz-user-modify: read-write;">
<SPAN CLASS="vpe-text">
BODY START
- </SPAN>
+</SPAN>
</H1>
<DIV STYLE="border: 1px solid black;">
<DIV WIDTH="100%" STYLE="">
<DIV>
<SPAN CLASS="vpe-text">
TOP PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="15%" STYLE="float: left; width: 32.34%;">
+ <DIV WIDTH="15%" STYLE="float: left; width: 15%;">
<DIV>
<SPAN CLASS="vpe-text">
LEFT PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="75%" STYLE="float: left; width: 32.34%;">
+ <DIV WIDTH="75%" STYLE="float: left; width: 75%;">
<DIV>
- <SPAN STYLE="font-size: 2em;" >
+ <SPAN STYLE="font-size: 2em;">
CENTER PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="10%" STYLE="float: right; width: 32.34%;">
+ <DIV WIDTH="10%" STYLE="float: right; width: 10%;">
<DIV>
<SPAN CLASS="vpe-text">
RIGHT PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
<DIV STYLE="">
<DIV
STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
.
- </DIV>
+</DIV>
<DIV>
<SPAN CLASS="vpe-text">
BOTTOM PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
</DIV>
<H1 STYLE="-moz-user-modify: read-write;">
<SPAN CLASS="vpe-text">
SECOND PART
- </SPAN>
+</SPAN>
</H1>
<DIV STYLE="border: 1px solid black;">
<DIV WIDTH="100%" STYLE="">
<DIV>
<SPAN CLASS="vpe-text">
TOP PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="25%" STYLE="float: left; width: 32.34%;">
+ <DIV WIDTH="25%" STYLE="float: left; width: 25%;">
<DIV>
<SPAN CLASS="vpe-text">
LEFT PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="35%" STYLE="float: left; width: 32.34%;">
+ <DIV WIDTH="35%" STYLE="float: left; width: 35%;">
<DIV>
<SPAN STYLE="font-size: 2em;">
CENTER PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV STYLE="float: right; width: 32.34%;">
+ <DIV STYLE="float: right; width: 40%;">
<DIV>
<SPAN CLASS="vpe-text">
RIGHT PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
<DIV WIDTH="100%" STYLE="">
<DIV
STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
.
- </DIV>
+</DIV>
<DIV>
<SPAN CLASS="vpe-text">
BOTTOM PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
</DIV>
<H1 STYLE="-moz-user-modify: read-write;">
<SPAN CLASS="vpe-text">
THIRD PART
- </SPAN>
+</SPAN>
</H1>
<DIV STYLE="border: 1px solid black;">
<DIV WIDTH="100%" STYLE="">
<DIV>
<SPAN CLASS="vpe-text">
TOP PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV STYLE="float: left; width: 32.34%;">
+ <DIV STYLE="float: left; width: 17.5%;">
<DIV>
<SPAN CLASS="vpe-text">
LEFT PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="65%" STYLE="float: left; width: 32.34%;">
- <DIV>
+ <DIV WIDTH="65%" STYLE="float: left; width: 65%;">
+ <DIV >
<SPAN STYLE="font-size: 2em;">
CENTER PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV STYLE="float: right; width: 32.34%;">
+ <DIV STYLE="float: right; width: 17.5%;">
<DIV>
<SPAN CLASS="vpe-text">
RIGHT PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
<DIV WIDTH="100%" STYLE="">
<DIV
STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
.
- </DIV>
+</DIV>
<DIV>
<SPAN CLASS="vpe-text">
BOTTOM PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
</DIV>
@@ -166,53 +165,53 @@
</DIV>
<DIV CLASS="rich-page-footer footerClass">
<DIV CLASS="rich-page-footer-content">
- <SPAN STYLE="font-size: 2em;" >
+ <SPAN STYLE="font-size: 2em;">
FOOTER
- </SPAN>
+</SPAN>
</DIV>
</DIV>
</DIV>
-
</test>
<test id="id2">
+
<DIV STYLE="border: 1px solid black;" >
<DIV WIDTH="100%" STYLE="">
<DIV>
<SPAN CLASS="vpe-text">
TOP PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="15%" STYLE="float: left; width: 32.34%;">
+ <DIV WIDTH="15%" STYLE="float: left; width: 15%;">
<DIV>
<SPAN CLASS="vpe-text">
LEFT PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="75%" STYLE="float: left; width: 32.34%;">
+ <DIV WIDTH="75%" STYLE="float: left; width: 75%;">
<DIV>
- <SPAN STYLE="font-size: 2em;" >
+ <SPAN STYLE="font-size: 2em;">
CENTER PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="10%" STYLE="float: right; width: 32.34%;">
+ <DIV WIDTH="10%" STYLE="float: right; width: 10%;">
<DIV>
<SPAN CLASS="vpe-text">
RIGHT PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
<DIV STYLE="">
<DIV STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
.
- </DIV>
+</DIV>
<DIV>
<SPAN CLASS="vpe-text">
BOTTOM PANEL
- </SPAN>
+</SPAN>
</DIV>
</DIV>
</DIV>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithNestedLayouts.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithNestedLayouts.xhtml.xml 2009-06-16 14:51:13 UTC (rev 15993)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithNestedLayouts.xhtml.xml 2009-06-16 15:06:11 UTC (rev 15994)
@@ -6,151 +6,151 @@
<DIV CLASS="rich-page-header-content">
<SPAN STYLE="font-size: 2em;">
HEADER
- </SPAN>
+</SPAN>
</DIV>
</DIV>
<DIV CLASS="rich-page-subheader">
<SPAN STYLE="font-size: 2em;">
SUBHEADER
- </SPAN>
+</SPAN>
</DIV>
<DIV CLASS="rich-page-content">
<DIV CLASS="rich-page-sidebar" STYLE="width: 15em; float: right;">
<SPAN STYLE="font-size: 2em;">
SIDEBAR
- </SPAN>
+</SPAN>
</DIV>
<DIV CLASS="rich-page-main" STYLE="float: left; margin-right: -30em;">
<DIV CLASS="rich-page-body" STYLE="margin-right: 15em;">
<H1 STYLE="-moz-user-modify: read-write;">
<SPAN CLASS="vpe-text">
BODY START
- </SPAN>
+</SPAN>
</H1>
<DIV STYLE="border: 1px solid black; background-color: lime;">
<DIV WIDTH="80em" STYLE="">
- <DIV >
+ <DIV>
<SPAN CLASS="vpe-text">
TOP PANEL 11111
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="40%" STYLE="float: left; width: 32.34%;">
+ <DIV WIDTH="40%" STYLE="float: left; width: 36.36%;">
<DIV>
<SPAN CLASS="vpe-text">
LEFT PANEL 11111
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="30%" STYLE="float: left; width: 32.34%;">
+ <DIV WIDTH="30%" STYLE="float: left; width: 27.27%;">
<DIV>
<H1 STYLE="-moz-user-modify: read-write;">
<SPAN CLASS="vpe-text">
CENTER PANEL 11111
- </SPAN>
+</SPAN>
</H1>
<!-- FIRST NESTED LAYOUT -->
- <DIV STYLE="border: 1px solid black; background-color: green;" >
+ <DIV STYLE="border: 1px solid black; background-color: green;">
<DIV WIDTH="100%" STYLE="">
<DIV>
<SPAN CLASS="vpe-text">
TOP PANEL 222222
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="15%" STYLE="float: left; width: 32.34%;">
- <DIV >
+ <DIV WIDTH="15%" STYLE="float: left; width: 15%;">
+ <DIV>
<SPAN CLASS="vpe-text">
LEFT PANEL 222222
- </SPAN>
+</SPAN>
<!-- SECOND NESTED LAYOUT -->
<DIV STYLE="border: 1px solid black; background-color: aqua;">
<DIV WIDTH="100%" STYLE="">
<DIV>
<SPAN CLASS="vpe-text">
TOP PANEL 33333
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="15%" STYLE="float: left; width: 32.34%;">
+ <DIV WIDTH="15%" STYLE="float: left; width: 15%;">
<DIV>
<SPAN CLASS="vpe-text">
LEFT PANEL 33333
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="75%" STYLE="float: left; width: 32.34%;">
+ <DIV WIDTH="75%" STYLE="float: left; width: 75%;">
<DIV>
<SPAN STYLE="font-size: 2em;">
CENTER PANEL 33333
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="10%" STYLE="float: right; width: 32.34%;">
+ <DIV WIDTH="10%" STYLE="float: right; width: 10%;">
<DIV>
<SPAN CLASS="vpe-text">
RIGHT PANEL 33333
- </SPAN>
+</SPAN>
</DIV>
</DIV>
<DIV WIDTH="100%" STYLE="">
<DIV
STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
.
- </DIV>
+</DIV>
<DIV>
<SPAN CLASS="vpe-text">
BOTTOM PANEL 33333
- </SPAN>
+</SPAN>
</DIV>
</DIV>
</DIV>
</DIV>
</DIV>
- <DIV WIDTH="75%" STYLE="float: left; width: 32.34%;">
- <DIV >
- <SPAN STYLE="font-size: 2em;" >
+ <DIV WIDTH="75%" STYLE="float: left; width: 75%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
CENTER PANEL 222222
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="10%" STYLE="float: right; width: 32.34%;">
+ <DIV WIDTH="10%" STYLE="float: right; width: 10%;">
<DIV>
<SPAN CLASS="vpe-text">
RIGHT PANEL 222222
- </SPAN>
+</SPAN>
</DIV>
</DIV>
<DIV WIDTH="100%" STYLE="">
<DIV
STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
.
- </DIV>
+</DIV>
<DIV>
<SPAN CLASS="vpe-text">
BOTTOM PANEL 222222
- </SPAN>
+</SPAN>
</DIV>
</DIV>
</DIV>
</DIV>
</DIV>
- <DIV WIDTH="40%" STYLE="float: right; width: 32.34%;">
+ <DIV WIDTH="40%" STYLE="float: right; width: 36.36%;">
<DIV>
<SPAN CLASS="vpe-text">
RIGHT PANEL 11111
- </SPAN>
+</SPAN>
</DIV>
</DIV>
<DIV WIDTH="300" STYLE="">
<DIV
STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
.
- </DIV>
+</DIV>
<DIV>
<SPAN CLASS="vpe-text">
BOTTOM PANEL 11111
- </SPAN>
+</SPAN>
</DIV>
</DIV>
</DIV>
@@ -161,7 +161,7 @@
<DIV CLASS="rich-page-footer-content">
<SPAN STYLE="font-size: 2em;">
FOOTER
- </SPAN>
+</SPAN>
</DIV>
</DIV>
</DIV>
@@ -172,89 +172,89 @@
<H1 STYLE="-moz-user-modify: read-write;">
<SPAN CLASS="vpe-text">
CENTER PANEL 11111
- </SPAN>
+</SPAN>
</H1>
<!-- FIRST NESTED LAYOUT -->
- <DIV STYLE="border: 1px solid black; background-color: green;" >
+ <DIV STYLE="border: 1px solid black; background-color: green;">
<DIV WIDTH="100%" STYLE="">
<DIV>
<SPAN CLASS="vpe-text">
TOP PANEL 222222
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="15%" STYLE="float: left; width: 32.34%;">
- <DIV >
+ <DIV WIDTH="15%" STYLE="float: left; width: 15%;">
+ <DIV>
<SPAN CLASS="vpe-text">
LEFT PANEL 222222
- </SPAN>
+</SPAN>
<!-- SECOND NESTED LAYOUT -->
<DIV STYLE="border: 1px solid black; background-color: aqua;">
<DIV WIDTH="100%" STYLE="">
<DIV>
<SPAN CLASS="vpe-text">
TOP PANEL 33333
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="15%" STYLE="float: left; width: 32.34%;">
+ <DIV WIDTH="15%" STYLE="float: left; width: 15%;">
<DIV>
<SPAN CLASS="vpe-text">
LEFT PANEL 33333
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="75%" STYLE="float: left; width: 32.34%;">
+ <DIV WIDTH="75%" STYLE="float: left; width: 75%;">
<DIV>
<SPAN STYLE="font-size: 2em;">
CENTER PANEL 33333
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="10%" STYLE="float: right; width: 32.34%;">
+ <DIV WIDTH="10%" STYLE="float: right; width: 10%;">
<DIV>
<SPAN CLASS="vpe-text">
RIGHT PANEL 33333
- </SPAN>
+</SPAN>
</DIV>
</DIV>
<DIV WIDTH="100%" STYLE="">
<DIV
STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
.
- </DIV>
+</DIV>
<DIV>
<SPAN CLASS="vpe-text">
BOTTOM PANEL 33333
- </SPAN>
+</SPAN>
</DIV>
</DIV>
</DIV>
</DIV>
</DIV>
- <DIV WIDTH="75%" STYLE="float: left; width: 32.34%;">
- <DIV >
- <SPAN STYLE="font-size: 2em;" >
+ <DIV WIDTH="75%" STYLE="float: left; width: 75%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
CENTER PANEL 222222
- </SPAN>
+</SPAN>
</DIV>
</DIV>
- <DIV WIDTH="10%" STYLE="float: right; width: 32.34%;">
+ <DIV WIDTH="10%" STYLE="float: right; width: 10%;">
<DIV>
<SPAN CLASS="vpe-text">
RIGHT PANEL 222222
- </SPAN>
+</SPAN>
</DIV>
</DIV>
<DIV WIDTH="100%" STYLE="">
<DIV
STYLE="display: block; height: 0pt; clear: both; visibility: hidden;">
.
- </DIV>
+</DIV>
<DIV>
<SPAN CLASS="vpe-text">
BOTTOM PANEL 222222
- </SPAN>
+</SPAN>
</DIV>
</DIV>
</DIV>
15 years, 6 months
JBoss Tools SVN: r15993 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-06-16 10:51:13 -0400 (Tue, 16 Jun 2009)
New Revision: 15993
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/XTable.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4465
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/XTable.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/XTable.java 2009-06-16 14:08:25 UTC (rev 15992)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/XTable.java 2009-06-16 14:51:13 UTC (rev 15993)
@@ -193,14 +193,12 @@
Color color = provider.getColor(i);
if(color != null) item.setForeground(color);
}
- for (int i = table.getItemCount() - 1; i >= provider.getRowCount() ; i--) {
- item = table.getItem(i);
- try {
- item.dispose();
- } catch (SWTException e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ if(table.getTopIndex() > provider.getRowCount()) {
+ int ti = provider.getRowCount() - 20;
+ if(ti < 0) ti = 0;
+ table.setTopIndex(ti);
}
+ table.remove(provider.getRowCount(), table.getItemCount()- 1);
if(r >= 0) try {
table.setSelection(r);
} catch (SWTException e) {
15 years, 6 months