This is an automated email from the ASF dual-hosted git repository. dashorst pushed a commit to branch archive/wicket-1.1.x in repository https://gitbox.apache.org/repos/asf/wicket.git
commit 32da8f70de741d47171b0bb0412f668790bcc962 Author: cvs2svn <[email protected]> AuthorDate: Sat Jan 14 00:54:30 2006 +0000 This commit was manufactured by cvs2svn to create branch 'WICKET_1_1'. git-svn-id: https://svn.apache.org/repos/asf/incubator/wicket/branches/WICKET_1_1@458621 13f79535-47bb-0310-9956-ffa450edef68 --- wicket-quickstart/project.xml | 221 +++++++++++++++ wicket-quickstart/xdocs/News.xml | 123 ++++++++ wicket-quickstart/xdocs/changes.xml | 21 ++ wicket-quickstart/xdocs/index.xml | 113 ++++++++ .../.settings/org.eclipse.jdt.core.prefs | 310 +++++++++++++++++++++ wicket-sandbox/.settings/org.eclipse.jdt.ui.prefs | 14 + .../src/eelco/java/commons-logging.properties | 2 + wicket-sandbox/src/eelco/java/log4j.properties | 16 ++ wicket-sandbox/src/eelco/java/session/Home.html | 17 ++ wicket-sandbox/src/eelco/java/session/Home.java | 66 +++++ .../src/eelco/java/session/SessionApplication.java | 49 ++++ .../src/eelco/java/session/TestSession.java | 60 ++++ .../eelco/java/session/WicketSessionServlet.java | 92 ++++++ wicket-sandbox/src/webapp/WEB-INF/web.xml | 54 ++++ wicket-sandbox/src/webapp/index.html | 24 ++ wicket-sandbox/users/ivaynberg/wicked/.classpath | 7 + wicket-sandbox/users/ivaynberg/wicked/.cvsignore | 1 + wicket-sandbox/users/ivaynberg/wicked/.project | 17 ++ .../ivaynberg/wicked/src/wicked/Application.java | 51 ++++ .../ivaynberg/wicked/src/wicked/Component.java | 118 ++++++++ .../ivaynberg/wicked/src/wicked/Container.java | 109 ++++++++ .../users/ivaynberg/wicked/src/wicked/Page.java | 35 +++ .../users/ivaynberg/wicked/src/wicked/Panel.java | 42 +++ .../wicked/src/wicked/component/Label.java | 29 ++ .../src/wicked/markup/ComponentFragment.java | 70 +++++ .../wicked/src/wicked/markup/Fragment.java | 5 + .../src/wicked/markup/IFragmentCollector.java | 5 + .../ivaynberg/wicked/src/wicked/markup/Markup.java | 80 ++++++ .../wicked/src/wicked/markup/MarkupType.java | 5 + .../wicked/src/wicked/markup/StaticFragment.java | 24 ++ .../ivaynberg/wicked/src/wicked/markup/Tag.java | 31 +++ .../src/wicked/markup/parser/BasicParser.java | 150 ++++++++++ .../src/wicked/markup/parser/IMarkupParser.java | 9 + .../users/ivaynberg/wicked/test/wicked/Start.java | 28 ++ .../ivaynberg/wicked/test/wicked/TestPage.html | 39 +++ .../ivaynberg/wicked/test/wicked/TestPage.java | 15 + .../ivaynberg/wicked/test/wicked/TestPanel.html | 7 + .../ivaynberg/wicked/test/wicked/TestPanel.java | 14 + .../ivaynberg/wicked/test/wicked/TestPanel2.html | 16 ++ .../ivaynberg/wicked/test/wicked/TestPanel2.java | 14 + .../ivaynberg/wicked/test/wicked/TestPanel3.html | 5 + .../ivaynberg/wicked/test/wicked/TestPanel3.java | 12 + .../html/basic/SimplePageExpectedResult_7.html | 12 + .../wicket/markup/html/basic/SimplePage_7.html | 12 + .../wicket/markup/html/basic/SimplePage_7.java | 39 +++ .../markup/html/basic/SimplePage_7.properties | 2 + 46 files changed, 2185 insertions(+) diff --git a/wicket-quickstart/project.xml b/wicket-quickstart/project.xml new file mode 100644 index 0000000000..33714724dc --- /dev/null +++ b/wicket-quickstart/project.xml @@ -0,0 +1,221 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project> + <pomVersion>3</pomVersion> + <groupId>wicket</groupId> + <id>wicket-quickstart</id> + <name>QuickStart</name> + <currentVersion>1.1</currentVersion> + <organization> + <name>Wicket</name> + <url>http://wicket.sourceforge.net</url> + <logo>http://wicket.sourceforge.net/images/organizationLogo.png</logo> + </organization> + <inceptionYear>2005</inceptionYear> + <package>wicket</package> + <logo>/images/projectLogo.png</logo> + <description>A quickstart project for the Wicket framework. This project will get you up and running using Jetty as a servlet container and web server. This will allow you to quickly start developing your first Wicket application.</description> + <shortDescription>Quickstart project for web applications using Wicket.</shortDescription> + <url>http://wicket.sourceforge.net/wicket-quickstart</url> + <issueTrackingUrl>http://sourceforge.net/tracker/?group_id=${maven.sourceforge.project.groupId}</issueTrackingUrl> + <siteAddress>shell.sourceforge.net</siteAddress> + <siteDirectory>/home/groups/w/wi/wicket/htdocs/wicket-quickstart</siteDirectory> + <repository> + <connection>scm:cvs:pserver:[email protected]:/cvsroot/wicket:wicket-quickstart</connection> + <developerConnection>scm:cvs:ext:${maven.username}@cvs.sourceforge.net:/cvsroot/wicket:wicket-quickstart</developerConnection> + <url>http://cvs.sourceforge.net/viewcvs.py/wicket/wicket-quickstart</url> + </repository> + <versions> + <version> + <id>0.9.15-beta</id> + <name>0.9.15-beta</name> + <tag>WICKET_R_0_9_15_BETA</tag> + </version> + <version> + <id>0.9.16-beta</id> + <name>0.9.16-beta</name> + <tag>WICKET_R_0_9_16_BETA</tag> + </version> + <version> + <id>0.9.17-beta</id> + <name>0.9.17-beta</name> + <tag>WICKET_R_0_9_17_BETA</tag> + </version> + <version> + <id>0.9.19-beta</id> + <name>0.9.19-beta</name> + <tag>WICKET_R_0_9_19_BETA</tag> + </version> + <version> + <id>1.0.0-rc3</id> + <name>1.0.0-rc3</name> + <tag>WICKET_R_1_0_0_RC3</tag> + </version> + <version> + <id>1.0</id> + <name>1.0</name> + <tag>WICKET_R_1_0_0</tag> + </version> + </versions> + <dependencies> + <dependency> + <groupId>wicket</groupId> + <artifactId>wicket</artifactId> + <version>1.1</version> + <type>jar</type> + <properties> + <eclipse.dependency>true</eclipse.dependency> + <war.bundle>true</war.bundle> + <wicket.group>required</wicket.group> + <wicket.description>The Wicket jar</wicket.description> + </properties> + </dependency> + <!-- + =================================================================== + == Dependencies for using Wicket container == + =================================================================== + --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <url>http://www.junit.org</url> + <properties> + <wicket.group>test</wicket.group> + <wicket.description>Used for testing Wicket</wicket.description> + <war.bundle>false</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.11</version> + <url>http://logging.apache.org/log4j</url> + <properties> + <wicket.group>optional</wicket.group> + <wicket.description>If you use JDK style logging, this library is optional.</wicket.description> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>ognl</groupId> + <artifactId>ognl</artifactId> + <version>2.6.7</version> + <url>http://www.ognl.org</url> + <properties> + <wicket.group>required</wicket.group> + <wicket.description>Used for introspection.</wicket.description> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>servletapi</groupId> + <artifactId>servletapi</artifactId> + <version>2.3</version> + <jar>servletapi-2.3.jar</jar> + <properties> + <wicket.group>compile</wicket.group> + <wicket.description>Compile time only, is supplied by your application server.</wicket.description> + <war.bundle>false</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.0.4</version> + <url>http://jakarta.apache.org/commons/logging/</url> + <properties> + <wicket.group>required</wicket.group> + <wicket.description>This library enables us to give you the choice of logging toolkit (JDK, Log4j, etc.)</wicket.description> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <!-- + =================================================================== + == Dependencies for using Jetty servlet container == + =================================================================== + --> + + <dependency> + <groupId>jetty</groupId> + <artifactId>org.mortbay.jetty</artifactId> + <version>4.2.22</version> + <type>jar</type> + <url>http://www.mortbay.com</url> + <properties> + <war.bundle>false</war.bundle> + <wicket.group>test</wicket.group> + <wicket.description>Used for running the application from within your IDE.</wicket.description> + </properties> + </dependency> + <dependency> + <groupId>tomcat</groupId> + <artifactId>jasper-runtime</artifactId> + <version>4.1.30</version> + <type>jar</type> + <properties> + <war.bundle>false</war.bundle> + <wicket.group>test</wicket.group> + <wicket.description>Used for running the application from within your IDE.</wicket.description> + </properties> + </dependency> + <dependency> + <groupId>tomcat</groupId> + <artifactId>jasper-compiler</artifactId> + <version>4.1.30</version> + <type>jar</type> + <properties> + <war.bundle>false</war.bundle> + <wicket.group>test</wicket.group> + <wicket.description>Used for running the application from within your IDE.</wicket.description> + </properties> + </dependency> + </dependencies> + <build> + <sourceDirectory>src/main/java</sourceDirectory> + <unitTestSourceDirectory>src/test/java</unitTestSourceDirectory> + <unitTest> + <includes> + <include>**/*Test.java</include> + </includes> + <resources> + <resource> + <directory>src/test/java</directory> + <includes> + <include>**</include> + </includes> + <excludes> + <exclude>**/*.java</exclude> + </excludes> + <filtering>false</filtering> + </resource> + </resources> + </unitTest> + <resources> + <resource> + <directory>src/main/java</directory> + <includes> + <include>**</include> + </includes> + <excludes> + <exclude>**/*.java</exclude> + </excludes> + <filtering>false</filtering> + </resource> + <resource> + <directory>src/test/java</directory> + <includes> + <include>**</include> + </includes> + <excludes> + <exclude>**/*.java</exclude> + </excludes> + <filtering>false</filtering> + </resource> + </resources> + </build> + <reports> + <report>maven-license-plugin</report> + </reports> + <properties/> +</project> diff --git a/wicket-quickstart/xdocs/News.xml b/wicket-quickstart/xdocs/News.xml new file mode 100644 index 0000000000..7bd96f4555 --- /dev/null +++ b/wicket-quickstart/xdocs/News.xml @@ -0,0 +1,123 @@ +<?xml version="1.0"?> +<document> + <properties> + <title>News</title> + </properties> + <meta name="keyword" content="wicket, web, j2ee, java, components" /> + <body> + <section name="News Archive"> + <p> + Here is an overview of all Wicket related news items posted on our + <a href="http://wicket-stuff.sourceforge.net/wicket-kickstart">front page</a> + . + </p> + <subsection name="October 30, 2005 - Wicket 1.1 Available"> + <p> + The Wicket team is proud to announce the availability of Wicket 1.1 for + download! Wicket is a Java component oriented web application framework + that takes simplicity, separation of concerns and easy of use to a whole + new level. Wicket web applications consist of HTML markup and Java + classes. No strange languages, no strange markup, no configuration files + , no specialized, expensive tools: just Java, HTML and you. + </p> + <p> + This Wicket version contains a lot of improvements from the 1.0 version. + New features include: + </p> + <ul> + <li><b>Simplified feedback and validation</b> - enables custom feedback strategies</li> + <li><b>Live Component Reference</b> - the examples project contains a component reference showing how to use the components.</li> + <li><b>JavaScript and CSS support for components</b> - contribute JavaScript and CSS from your component to the using page</li> + <li><b>Markup Inheritance</b> - enables template pages and components</li> + <li><b>Inclusion of external markup</b></li> + <li><b>Simplified Choice component</b> - creating drop down, radio and list components was never this easy</li> + <li><b>Less dependencies</b> - we removed several library dependencies</li> + <li><b>Customizable Form handling</b> - easy for quick forms, easily enables full custom form processing</li> + <li><b>Improved resource handling</b></li> + <li><b>Date picker component</b> - will not get you dates, but a JavaScript and text field enabled localized calendar component.</li> + <li><b>Improved URL handling</b></li> + <li><b>AJAX request handling support</b> - support for two leading AJAX JavaScript libraries is available as separate downloads from our Wicket Stuff project: scriptaculous and DOJO toolkit</li> + </ul> + <p> + The Wicket team wishes to extend their gratitude to the user and + developer community for their testing efforts and help, making this + release a reality! + </p> + <p> + The Wicket 1.1 distribution can be downloaded from the SourceForge servers by + following + <a href="http://sourceforge.net/project/showfiles.php?group_id=119783">this link</a>. + The Wicket 1.1 release documentation can be found at: + <a href="/wicket-1.1">http://wicket.sourceforge.net/wicket-1.1</a> + </p> + <p> + Thank you for downloading and using Wicket! + </p> + <p><i> - the Wicket Team</i></p> + </subsection> + <subsection name="October 19, 2005 - Moved to Wicket home"> + <p> + The Wicket Quickstart project has been upgraded from the Wicket Stuff project + and moved to the Wicket core project. + </p> + <p> + In preparation for the Wicket 1.1 release, we have updated the project with regard + to the following sections: + <ul> + <li> + now includes an <a href="http://ant.apache.org">Ant</a> build.xml + file for building your WAR archive using Apache Ant + </li> + <li> + now includes a <a href="http://maven.apache.org">Maven 1</a> project descriptor + for those that want to build their project using Apache Maven (1.0.x and 1.1) + </li> + <li> + now also includes a sysdeo Tomcat plugin configuration file, so you can now run + the project directly using the Eclipse tomcat plugin. + </li> + </ul> + </p> + </subsection> + <subsection name="Juli 17, 2005 - NetBeans Guide available"> + <p> + Thanks to the writing talents of + <a href="http://blogs.sun.com/geertjan">Geertjan Wielenga</a> + we now have a full <a href="netbeans.html">NetBeans kickstart</a> description. + </p> + </subsection> + <subsection name="Juli 17, 2005 - Wicket 1.0.1 maintenance release available"> + <p> + The first maintenance release of the 1.0 release of + <a href="http://wicket.sf.net">Wicket</a> is available. The Kickstart project + has been updated to reflect this maintenance release. + </p> + </subsection> + <subsection name="June 7, 2005 - Wicket 1.0 final Launched!"> + <p> + With the launch of <a href="http://wicket.sf.net/PressRelease1_0.html">Wicket 1.0 final</a> + we also upgraded the Wicket Kickstart project to be 1.0 based. + </p> + </subsection> + <subsection name="May 4, 2005 - Eclipse Live Demo added"> + <p> + Using <a href="http://www.debugmode.com/wink/" title="Wink">Wink</a> we have + put together a live <a href="demos/EclipseDemo.html" target="_new">Eclipse Demo</a> + showing how to get started developing your first + <a href="http://wicket.sourceforge.net">Wicket</a> application. + </p> + </subsection> + <subsection name="April 18, 2005 - Netbeans guide added"> + <p> + Finally we have a Netbeans guide for running the kick start project in Netbeans. + </p> + </subsection> + <subsection name="April 15, 2005 - QuickStart has moved"> + <p> + The project formerly known as 'Wicket QuickStart' has moved into the Wicket Stuff + project and has been renamed to 'Wicket Kick Start'. + </p> + </subsection> + </section> + </body> +</document> \ No newline at end of file diff --git a/wicket-quickstart/xdocs/changes.xml b/wicket-quickstart/xdocs/changes.xml new file mode 100644 index 0000000000..3f6a9e447d --- /dev/null +++ b/wicket-quickstart/xdocs/changes.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<document> + <properties> + <title>Wicket Kick Start changes</title> + <author email="dashorst at users.sourceforge.net">Martijn Dashorst</author> + </properties> + <body> + <release version="1.1" date="2005-10-30" description="Wicket 1.1 final"> + <action type="add" dev="Martijn Dashorst">Added an ant build.xml file to the distribution</action> + <action type="add" dev="Martijn Dashorst">Added a maven project.xml file to the distribution</action> + <action type="add" dev="Martijn Dashorst">Added Sysdeo tomcat plugin configuration to the distribution</action> + <action type="fix" dev="Martijn Dashorst">Fixed the build such that only one distribution type is build</action> + <action type="update" dev="Martijn Dashorst">Updated the dependencies, such that all old transitive dependencies of Wicket were removed</action> + <action type="update" dev="Martijn Dashorst">Moved the project from Wicket Stuff to the Wicket Core project.</action> + </release> + <release version="1.0" date="2005-06-06" description="Wicket 1.0 final"> + <action type="update" dev="Martijn Dashorst">Upgraded Wicket to 1.0 final</action> + </release> + </body> +</document> diff --git a/wicket-quickstart/xdocs/index.xml b/wicket-quickstart/xdocs/index.xml new file mode 100644 index 0000000000..97f1fd61e8 --- /dev/null +++ b/wicket-quickstart/xdocs/index.xml @@ -0,0 +1,113 @@ +<?xml version="1.0"?> +<document> + <properties> + <title>Home</title> + </properties> + <meta name="keyword" content="wicket, web, j2ee, java, quickstart, eclipse, netbeans, intellij, idea" /> + <body> + <section name="Quick Start"> + <p> + This quick start is a small guide to get you up and running to start using + <a href="http://wicket.sourceforge.net">Wicket</a> + within minutes. This project is meant to be a starting point for your first project. + If you are looking for examples, please look at the example projects. + </p> + <p>This project has guides to the major three IDE's available:</p> + <ul> + <li><a href="eclipse.html">Eclipse</a></li> + <li><a href="netbeans.html">Netbeans</a></li> + <li><a href="intellij.html">IntelliJ IDEA</a></li> + </ul> + <p> + These quick start guides assume you have some knowlegde of developing Java web + applications and using your IDE. This kick start will only give you a working + environment, it is not intended as a blueprint project. + </p> + </section> + <section name="Latest News"> + <subsection name="October 30, 2005 - Wicket 1.1 Available"> + <p> + The Wicket team is proud to announce the availability of Wicket 1.1 for + download! Wicket is a Java component oriented web application framework + that takes simplicity, separation of concerns and easy of use to a whole + new level. Wicket web applications consist of HTML markup and Java + classes. No strange languages, no strange markup, no configuration files + , no specialized, expensive tools: just Java, HTML and you. + </p> + <p> + This Wicket version contains a lot of improvements from the 1.0 version. + New features include: + </p> + <ul> + <li><b>Simplified feedback and validation</b> - enables custom feedback strategies</li> + <li><b>Live Component Reference</b> - the examples project contains a component reference showing how to use the components.</li> + <li><b>JavaScript and CSS support for components</b> - contribute JavaScript and CSS from your component to the using page</li> + <li><b>Markup Inheritance</b> - enables template pages and components</li> + <li><b>Inclusion of external markup</b></li> + <li><b>Simplified Choice component</b> - creating drop down, radio and list components was never this easy</li> + <li><b>Less dependencies</b> - we removed several library dependencies</li> + <li><b>Customizable Form handling</b> - easy for quick forms, easily enables full custom form processing</li> + <li><b>Improved resource handling</b></li> + <li><b>Date picker component</b> - will not get you dates, but a JavaScript and text field enabled localized calendar component.</li> + <li><b>Improved URL handling</b></li> + <li><b>AJAX request handling support</b> - support for two leading AJAX JavaScript libraries is available as separate downloads from our Wicket Stuff project: scriptaculous and DOJO toolkit</li> + </ul> + <p> + The Wicket team wishes to extend their gratitude to the user and + developer community for their testing efforts and help, making this + release a reality! + </p> + <p> + The Wicket 1.1 distribution can be downloaded from the SourceForge servers by + following + <a href="http://sourceforge.net/project/showfiles.php?group_id=119783">this link</a>. + The Wicket 1.1 release documentation can be found at: + <a href="/wicket-1.1">http://wicket.sourceforge.net/wicket-1.1</a> + </p> + <p> + Thank you for downloading and using Wicket! + </p> + <p><i> - the Wicket Team</i></p> + </subsection> + <subsection name="October 19, 2005 - Moved to Wicket home"> + <p> + The Wicket Quickstart project has been upgraded from the Wicket Stuff project + and moved to the Wicket core project. + </p> + <p> + In preparation for the Wicket 1.1 release, we have updated the project with regard + to the following sections: + <ul> + <li> + now includes an <a href="http://ant.apache.org">Ant</a> build.xml + file for building your WAR archive using Apache Ant + </li> + <li> + now includes a <a href="http://maven.apache.org">Maven 1</a> project descriptor + for those that want to build their project using Apache Maven (1.0.x and 1.1) + </li> + <li> + now also includes a sysdeo Tomcat plugin configuration file, so you can now run + the project directly using the Eclipse tomcat plugin. + </li> + </ul> + </p> + </subsection> + <p> + See + <a href="News.html">the news archive</a> + for more (older) news. + </p> + </section> + <section name="Special Thanks"> + <p> + The Wicket Stuff development team would like to thank the following partners for + supporting Open Source in general and Wicket in particular. + </p> + <a href="http://www.sourceforge.net" target="_blank" class="logoLink"> + <img alt="SourceForge.net" + src="http://sourceforge.net/sflogo.php?group_id=119783&type=1" /> + </a> + </section> + </body> +</document> \ No newline at end of file diff --git a/wicket-sandbox/.settings/org.eclipse.jdt.core.prefs b/wicket-sandbox/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..40b5ae3605 --- /dev/null +++ b/wicket-sandbox/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,310 @@ +#Wed Nov 30 11:31:40 PST 2005 +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=disabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.3 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=20 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=48 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=64 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=64 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=0 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=0 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=next_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false +org.eclipse.jdt.core.formatter.comment.format_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=true +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=100 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=2 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/wicket-sandbox/.settings/org.eclipse.jdt.ui.prefs b/wicket-sandbox/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..c625bd9768 --- /dev/null +++ b/wicket-sandbox/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,14 @@ +#Wed Nov 30 11:31:41 PST 2005 +comment_clear_blank_lines=false +comment_format_comments=true +comment_format_header=true +comment_format_html=true +comment_format_source_code=true +comment_indent_parameter_description=true +comment_indent_root_tags=true +comment_line_length=80 +comment_new_line_for_parameter=true +comment_separate_root_tags=true +eclipse.preferences.version=1 +formatter_settings_version=8 +internal.default.compliance=default diff --git a/wicket-sandbox/src/eelco/java/commons-logging.properties b/wicket-sandbox/src/eelco/java/commons-logging.properties new file mode 100644 index 0000000000..2f7c181d42 --- /dev/null +++ b/wicket-sandbox/src/eelco/java/commons-logging.properties @@ -0,0 +1,2 @@ +#org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger +org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger diff --git a/wicket-sandbox/src/eelco/java/log4j.properties b/wicket-sandbox/src/eelco/java/log4j.properties new file mode 100644 index 0000000000..c89d81b5c6 --- /dev/null +++ b/wicket-sandbox/src/eelco/java/log4j.properties @@ -0,0 +1,16 @@ +log4j.debug=false + +log4j.rootLogger=DEBUG,Stdout +log4j.logger.org=INFO +log4j.logger.com=INFO +log4j.logger.net=INFO +log4j.logger.nl=INFO + +log4j.logger.wicket=INFO + +log4j.logger.wicket.protocol.http.servlet.WicketSessionFilter=DEBUG + +log4j.appender.Stdout=org.apache.log4j.ConsoleAppender +log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.Stdout.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n + diff --git a/wicket-sandbox/src/eelco/java/session/Home.html b/wicket-sandbox/src/eelco/java/session/Home.html new file mode 100644 index 0000000000..7fdd68b339 --- /dev/null +++ b/wicket-sandbox/src/eelco/java/session/Home.html @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<html xmlns="http://www.w3.org/1999/xhtml" > +<head> + <title>Session app</title> + <link rel="stylesheet" type="text/css" href="style.css"/> +</head> +<body> + + <form wicket:id="form"> + name attribute in session: <input type="text" wicket:id="name"/> + <input type="submit" value="change"/> + </form> + + <a href="servlet/sessiontest">display Wicket session attribute from a servlet</a> + +</body> +</html> diff --git a/wicket-sandbox/src/eelco/java/session/Home.java b/wicket-sandbox/src/eelco/java/session/Home.java new file mode 100644 index 0000000000..aa00ff6b9f --- /dev/null +++ b/wicket-sandbox/src/eelco/java/session/Home.java @@ -0,0 +1,66 @@ +/* + * $Id$ $Revision$ $Date$ + * + * ==================================================================== Licensed + * under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the + * License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package session; + +import wicket.Component; +import wicket.markup.html.WebPage; +import wicket.markup.html.form.Form; +import wicket.markup.html.form.TextField; +import wicket.model.IModel; +import wicket.model.Model; + +/** + * Home page of the wizard example. + * + * @author Eelco Hillenius + */ +public class Home extends WebPage +{ + /** + * Constructor. + */ + public Home() + { + add(new MyForm("form")); + } + + private final class MyForm extends Form + { + /** + * Construct. + * + * @param id + */ + public MyForm(String id) + { + super(id); + IModel model = new Model() + { + public Object getObject(Component component) + { + return ((TestSession)getSession()).getName(); + } + + public void setObject(Component component, Object object) + { + ((TestSession)getSession()).setName(String.valueOf(object)); + } + }; + add(new TextField("name", model)); + } + } +} \ No newline at end of file diff --git a/wicket-sandbox/src/eelco/java/session/SessionApplication.java b/wicket-sandbox/src/eelco/java/session/SessionApplication.java new file mode 100644 index 0000000000..8182afba90 --- /dev/null +++ b/wicket-sandbox/src/eelco/java/session/SessionApplication.java @@ -0,0 +1,49 @@ +/* + * $Id$ $Revision$ $Date$ + * + * ==================================================================== Licensed + * under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the + * License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package session; + +import wicket.ApplicationSettings; +import wicket.ISessionFactory; +import wicket.Session; +import wicket.protocol.http.WebApplication; + +public class SessionApplication extends WebApplication +{ + /** + * Constructor. + */ + public SessionApplication() + { + getPages().setHomePage(Home.class); + ApplicationSettings settings = getSettings(); + settings.setThrowExceptionOnMissingResource(false); + } + + /** + * @see wicket.Application#getSessionFactory() + */ + protected ISessionFactory getSessionFactory() + { + return new ISessionFactory() + { + public Session newSession() + { + return new TestSession(SessionApplication.this); + } + }; + } +} diff --git a/wicket-sandbox/src/eelco/java/session/TestSession.java b/wicket-sandbox/src/eelco/java/session/TestSession.java new file mode 100644 index 0000000000..a8a553d963 --- /dev/null +++ b/wicket-sandbox/src/eelco/java/session/TestSession.java @@ -0,0 +1,60 @@ +/* + * $Id$ $Revision$ $Date$ + * + * ============================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package session; + +import wicket.protocol.http.WebApplication; +import wicket.protocol.http.WebSession; + +/** + * @author hillenius + */ +public class TestSession extends WebSession +{ + private String name = "test"; + + /** + * Construct. + * + * @param application + */ + public TestSession(WebApplication application) + { + super(application); + } + + /** + * Gets name. + * + * @return name + */ + public String getName() + { + return name; + } + + /** + * Sets name. + * + * @param name + * name + */ + public void setName(String name) + { + this.name = name; + } + +} diff --git a/wicket-sandbox/src/eelco/java/session/WicketSessionServlet.java b/wicket-sandbox/src/eelco/java/session/WicketSessionServlet.java new file mode 100644 index 0000000000..c98e567621 --- /dev/null +++ b/wicket-sandbox/src/eelco/java/session/WicketSessionServlet.java @@ -0,0 +1,92 @@ +package session; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Enumeration; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import wicket.Session; + +public class WicketSessionServlet extends HttpServlet +{ + + /** + * Constructor of the object. + */ + public WicketSessionServlet() + { + super(); + } + + /** + * The doGet method of the servlet. <br> + * + * This method is called when a form has its tag value method equals to get. + * + * @param request + * the request send by the client to the server + * @param response + * the response send by the server to the client + * @throws ServletException + * if an error occurred + * @throws IOException + * if an error occurred + */ + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException + { + + response.setContentType("text/html"); + PrintWriter out = response.getWriter(); + out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"); + out.println("<HTML>"); + out.println(" <HEAD><TITLE>Wicket Session Test Servlet</TITLE></HEAD>"); + out.println(" <BODY>"); + + TestSession wicketSession = (TestSession)Session.get(); + + HttpSession httpSession = request.getSession(false); + + out.println("<p><h3>current Wicket session object: " + wicketSession + "<h3>"); + if (wicketSession != null) + { + out.println("<br />\t name: " + wicketSession.getName() + "<br />"); + } + + out.println("<p><h3>session values</h3><ul>"); + if (httpSession != null) + { + Enumeration e = httpSession.getAttributeNames(); + while (e.hasMoreElements()) + { + String name = (String)e.nextElement(); + Object value = httpSession.getAttribute(name); + out.println("\t<li>"); + out.println("\t\t" + name + "\t\t\t" + value); + out.println("\t</li>"); + } + } + out.println("</ul></p>"); + + out.println(" </BODY>"); + out.println("</HTML>"); + + out.flush(); + out.close(); + } + + /** + * Initialization of the servlet. <br> + * + * @throws ServletException + * if an error occure + */ + public void init() throws ServletException + { + } +} diff --git a/wicket-sandbox/src/webapp/WEB-INF/web.xml b/wicket-sandbox/src/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..2c897192dc --- /dev/null +++ b/wicket-sandbox/src/webapp/WEB-INF/web.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE web-app + PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" + "http://java.sun.com/dtd/web-app_2_3.dtd"> + +<web-app> + + <display-name>Wicket Sandbox</display-name> + + <filter> + <filter-name>WicketSessionFilter</filter-name> + <filter-class>wicket.protocol.http.servlet.WicketSessionFilter</filter-class> + <init-param> + <param-name>servletPath</param-name> + <param-value>sessiontest</param-value> + </init-param> + </filter> + + <filter-mapping> + <filter-name>WicketSessionFilter</filter-name> + <url-pattern>/servlet/sessiontest</url-pattern> + </filter-mapping> + + <servlet> + <servlet-name>SessionApplication</servlet-name> + <servlet-class>wicket.protocol.http.WicketServlet</servlet-class> + <init-param> + <param-name>applicationClassName</param-name> + <param-value>session.SessionApplication</param-value> + </init-param> + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet> + <servlet-name>WicketSessionServlet</servlet-name> + <servlet-class>session.WicketSessionServlet</servlet-class> + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>SessionApplication</servlet-name> + <url-pattern>/sessiontest/*</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>WicketSessionServlet</servlet-name> + <url-pattern>/servlet/sessiontest</url-pattern> + </servlet-mapping> + + <welcome-file-list> + <welcome-file>index.html</welcome-file> + </welcome-file-list> + +</web-app> diff --git a/wicket-sandbox/src/webapp/index.html b/wicket-sandbox/src/webapp/index.html new file mode 100644 index 0000000000..fc6d2724b0 --- /dev/null +++ b/wicket-sandbox/src/webapp/index.html @@ -0,0 +1,24 @@ +<html> + <head> + <title>Wicket Sandbox</title> + <link rel="stylesheet" type="text/css" href="style.css"/> + </head> + <body> + <p> + <h1>Wicket Sandbox</h1> + <p> + This is an area for Wicket developers to play around with new ideas.</h1> + <p id="titleblock"> + <b><font size="+1">experiments</font></b> + </p> + <p> + <h2>Eelco</h2> + <ul> + <li> <a href="objectedit">objectedit</a> - Generic Object Editing</li> + <li> <a href="sessiontest">sessiontest</a> - Test bridging Wicket - other servlets</li> + </ul> + </p> + </table> + </p> + </body> +</html> \ No newline at end of file diff --git a/wicket-sandbox/users/ivaynberg/wicked/.classpath b/wicket-sandbox/users/ivaynberg/wicked/.classpath new file mode 100644 index 0000000000..83b76b7922 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="test"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/wicket-sandbox/users/ivaynberg/wicked/.cvsignore b/wicket-sandbox/users/ivaynberg/wicked/.cvsignore new file mode 100644 index 0000000000..ba077a4031 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/.cvsignore @@ -0,0 +1 @@ +bin diff --git a/wicket-sandbox/users/ivaynberg/wicked/.project b/wicket-sandbox/users/ivaynberg/wicked/.project new file mode 100644 index 0000000000..575dc9774e --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>wicked</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Application.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Application.java new file mode 100644 index 0000000000..f7e88682d2 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Application.java @@ -0,0 +1,51 @@ +package wicked; + +import java.io.InputStream; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import wicked.markup.Markup; +import wicked.markup.parser.BasicParser; +import wicked.markup.parser.IMarkupParser; + +public class Application { + private static ThreadLocal<Application> LOCAL=new ThreadLocal<Application>(); + + private Map<Class, Markup> markupCache=new ConcurrentHashMap<Class, Markup>(); + + public static Application get() { + return LOCAL.get(); + } + + public static void set(Application app) { + LOCAL.set(app); + } + + public Markup getMarkup(Component component) { + + Class clazz=component.getClass(); + + if (!markupCache.containsKey(clazz)) { + String resource=clazz.getName().replaceAll("[.]", "/"); + resource=resource+".html"; + + InputStream markupStream = Thread.currentThread() + .getContextClassLoader().getResourceAsStream(resource); + + if (markupStream==null) { + throw new RuntimeException("cannot load markup for ["+resource+"]"); + } + + + IMarkupParser parser=new BasicParser(); + + Markup markup=parser.parse(markupStream); + + markupCache.put(clazz, markup); + } + + return markupCache.get(clazz); + + } + +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Component.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Component.java new file mode 100644 index 0000000000..358c533644 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Component.java @@ -0,0 +1,118 @@ +package wicked; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.Map; + +import wicked.markup.ComponentFragment; +import wicked.markup.Markup; +import wicked.markup.Tag; + +public class Component { + + private Container parent; + + private String id; + + // needed for end case(the page), there might be a cleaner way + Component(String id) { + this.id = id; + } + + public Component(Container parent, String id) { + if (parent == null || id == null || id.trim().length() == 0) { + throw new IllegalArgumentException(); + } + this.parent = parent; + this.id = id; + parent.add(this, id); + checkTag(); + } + + public Container getParent() { + return parent; + } + + public String getPath() { + StringBuilder builder = new StringBuilder(); + for (Component c = this; c != null && c.parent != null; c = c + .getParent()) { + if (builder.length() > 0) { + builder.insert(0, ':'); + } + builder.insert(0, c.getId()); + } + return builder.toString(); + } + + public ComponentFragment getFragment() { + return getFragment(getPath()); + } + + protected ComponentFragment getFragment(String path) { + return parent.getFragment(path); + + } + + public Page getPage() { + Component c = this; + while (c.parent != null) { + c = c.parent; + } + return (Page) c; + } + + public void render(OutputStream stream) { + ComponentFragment frag = getFragment(); + Tag tag = frag.getTag(); + + try { + stream.write("<".getBytes()); + stream.write(tag.getName().getBytes()); + for (Map.Entry<String, String> attr : tag.getAttributes() + .entrySet()) { + stream.write(" ".getBytes()); + stream.write(attr.getKey().getBytes()); + stream.write("=\"".getBytes()); + stream.write(attr.getValue().getBytes()); + stream.write("\"".getBytes()); + } + stream.write("/>".getBytes()); + + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public void checkTag() { + if (getFragment().getFragments() != null) { + throw new RuntimeException("component has markup but it should not"); + } + } + + public Component get(String path) { + if (path == null || path.length() == 0) { + return this; + } else { + throw new RuntimeException( + "component is not a container so it cannot contain other components"); + } + } + + public String getId() { + return id; + } + + protected Markup getMarkup() { + return parent.getMarkup(); + } + + protected String getMarkupRelativePath() { + return getMarkupRelativePath(getPath()); + } + + protected String getMarkupRelativePath(String path) { + return parent.getMarkupRelativePath(path); + } + +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Container.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Container.java new file mode 100644 index 0000000000..e502025c3b --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Container.java @@ -0,0 +1,109 @@ +package wicked; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import wicked.markup.ComponentFragment; +import wicked.markup.Fragment; +import wicked.markup.Tag; + +public class Container extends Component { + + Container(String id) { + super(id); + } + + public Container(Container parent, String id) { + super(parent, id); + } + + private Map<String, Component> idToComponent = new HashMap<String, Component>(); + + void add(Component c, String id) { + if (idToComponent.containsKey(id)) { + throw new IllegalArgumentException("id already exists in container"); + } + // DEBUG CHECK TO MAKE SURE MARKUP IS PRESENT + c.getFragment(); + + idToComponent.put(id, c); + } + + @Override + public void checkTag() { + } + + public void render(OutputStream stream) { + ComponentFragment frag = getFragment(); + Tag tag = frag.getTag(); + + try { + stream.write("<".getBytes()); + stream.write(tag.getName().getBytes()); + for (Map.Entry<String, String> attr : tag.getAttributes() + .entrySet()) { + stream.write(" ".getBytes()); + stream.write(attr.getKey().getBytes()); + stream.write("=\"".getBytes()); + stream.write(attr.getValue().getBytes()); + stream.write("\"".getBytes()); + } + + if (frag.getFragments() == null) { + stream.write("/>".getBytes()); + } else { + stream.write(">".getBytes()); + renderBody(stream, frag.getFragments()); + stream.write("</".getBytes()); + stream.write(tag.getName().getBytes()); + stream.write(">".getBytes()); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public void renderBody(OutputStream stream, List<Fragment> fragments) { + if (fragments != null) { + + for (Fragment f : fragments) { + switch (f.getType()) { + case STATIC: + try { + stream.write(f.toString().getBytes()); + } catch (IOException e) { + throw new RuntimeException(e); + } + break; + case COMPONENT: + ComponentFragment cf=(ComponentFragment) f; + Component comp=get(cf.getId()); + comp.render(stream); + break; + } + } + + } + } + + @Override + public Component get(String path) { + if (path==null||path.length()==0) { + return this; + } + + int col=path.indexOf(":"); + if (col<0) { + return idToComponent.get(path); + } + String first=path.substring(0, col); + String rest=path.substring(col+1); + + Component next=idToComponent.get(first); + return next.get(rest); + } + +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Page.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Page.java new file mode 100644 index 0000000000..84b1016f7a --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Page.java @@ -0,0 +1,35 @@ +package wicked; + +import java.io.OutputStream; + +import wicked.markup.ComponentFragment; +import wicked.markup.Markup; + +public class Page extends Container { + private static int idCounter=0; + + public Page() { + super(String.valueOf(idCounter++)); + } + + @Override + public ComponentFragment getFragment(String path) { + Markup markup=getMarkup(); + return markup.getComponentFragment(path); + } + + @Override + public void render(OutputStream stream) { + renderBody(stream, getMarkup().getFragments()); + } + + @Override + protected Markup getMarkup() { + return Application.get().getMarkup(this); + } + + @Override + protected String getMarkupRelativePath(String path) { + return path; + } +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Panel.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Panel.java new file mode 100644 index 0000000000..a0f6b1333f --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/Panel.java @@ -0,0 +1,42 @@ +package wicked; + +import wicked.markup.ComponentFragment; +import wicked.markup.Markup; + +public class Panel extends Container { + + public Panel(Container parent, String id) { + super(parent, id); + } + + @Override + public ComponentFragment getFragment() { + Markup pmarkup=getParent().getMarkup(); + String path=getParent().getMarkupRelativePath(getPath()); + ComponentFragment outside=pmarkup.getComponentFragment(path); + ComponentFragment panel=new ComponentFragment(outside.getTag()); + + Markup markup=Application.get().getMarkup(this); + panel.setFragments(markup.getFragments()); + + return panel; + } + + @Override + protected ComponentFragment getFragment(String path) { + String panelRelativePath=path.substring(getPath().length()+1); + return getMarkup().getComponentFragment(panelRelativePath); + } + + @Override + protected Markup getMarkup() { + Markup markup=Application.get().getMarkup(this); + return markup; + } + + @Override + protected String getMarkupRelativePath(String path) { + return path.substring(getPath().length()+1); + } + +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/component/Label.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/component/Label.java new file mode 100644 index 0000000000..dd973940af --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/component/Label.java @@ -0,0 +1,29 @@ +package wicked.component; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.List; + +import wicked.Container; +import wicked.markup.Fragment; + +public class Label extends Container { + + private String label; + + + public Label(Container parent, String id, String label) { + super(parent, id); + this.label=label; + } + + + @Override + public void renderBody(OutputStream stream, List<Fragment> fragments) { + try { + stream.write(label.getBytes()); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/ComponentFragment.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/ComponentFragment.java new file mode 100644 index 0000000000..0e828ff244 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/ComponentFragment.java @@ -0,0 +1,70 @@ +package wicked.markup; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + + +public class ComponentFragment extends Fragment implements IFragmentCollector { + private Tag tag; + private List<Fragment> fragments; + + public String getId() { + return tag.getAttributes().get("wicket:id"); + } + + public List<Fragment> getFragments() { + return fragments; + } + + public void setFragments(List<Fragment> fragments) { + this.fragments = fragments; + } + + public void addFragment(Fragment frag) { + if (fragments==null) { + fragments=new ArrayList<Fragment>(); + } + fragments.add(frag); + } + + public ComponentFragment(Tag tag) { + this.tag=tag; + } + + public Tag getTag() { + return tag; + } + + public void setTag(Tag tag) { + this.tag = tag; + } + + public String toString() { + StringBuilder builder=new StringBuilder(256); + builder.append("<").append(tag.getName()); + for (Map.Entry<String,String> attr:tag.getAttributes().entrySet()) { + builder.append(" ").append(attr.getKey()) + .append("=\"").append(attr.getValue()).append("\""); + } + + if (fragments!=null) { + builder.append(">"); + for (Fragment frag:fragments) { + builder.append(frag.toString()); + } + builder.append("</").append(tag.getName()).append(">"); + } else { + builder.append("/>"); + } + return builder.toString(); + } + + @Override + public MarkupType getType() { + return MarkupType.COMPONENT; + } + + + +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/Fragment.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/Fragment.java new file mode 100644 index 0000000000..6cefb87af8 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/Fragment.java @@ -0,0 +1,5 @@ +package wicked.markup; + +public abstract class Fragment { + public abstract MarkupType getType(); +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/IFragmentCollector.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/IFragmentCollector.java new file mode 100644 index 0000000000..56df3f9b6f --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/IFragmentCollector.java @@ -0,0 +1,5 @@ +package wicked.markup; + +public interface IFragmentCollector { + void addFragment(Fragment frag); +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/Markup.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/Markup.java new file mode 100644 index 0000000000..f4c26eec37 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/Markup.java @@ -0,0 +1,80 @@ +package wicked.markup; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class Markup implements IFragmentCollector { + private List<Fragment> fragments; + + private Map<String, Fragment> pathToFrag = new HashMap<String, Fragment>(); + + public List<Fragment> getFragments() { + return fragments; + } + + public ComponentFragment getComponentFragment(String path) { + Fragment frag = pathToFrag.get(path); + if (frag == null) { + throw new RuntimeException("component fragment for path [" + path + + "] not found in markup"); + } + if (frag.getType() != MarkupType.COMPONENT) { + throw new RuntimeException( + "component fragment has invalid markup type [" + + frag.getType().toString() + "]"); + } + + return (ComponentFragment)frag; + } + + public void setFragments(List<Fragment> fragments) { + this.fragments = fragments; + } + + public void addFragment(Fragment frag) { + if (fragments == null) { + fragments = new ArrayList<Fragment>(); + } + fragments.add(frag); + } + + public void init() { + if (fragments != null) { + + for (Fragment frag : fragments) { + if (frag.getType() == MarkupType.COMPONENT) { + initHelper((ComponentFragment) frag, null); + } + } + + } + } + + private void initHelper(ComponentFragment frag, String parentPath) { + String path = (parentPath == null) ? frag.getId() : parentPath + ":" + + frag.getId(); + pathToFrag.put(path, frag); + + if (frag.getFragments() != null) { + + for (Fragment child : frag.getFragments()) { + if (child.getType() == MarkupType.COMPONENT) { + initHelper((ComponentFragment) child, path); + } + } + } + } + + public String toString() { + StringBuilder builder = new StringBuilder(512); + if (fragments != null) { + for (Fragment frag : fragments) { + builder.append(frag.toString()); + } + } + return builder.toString(); + } + +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/MarkupType.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/MarkupType.java new file mode 100644 index 0000000000..5d411d20f1 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/MarkupType.java @@ -0,0 +1,5 @@ +package wicked.markup; + +public enum MarkupType { + STATIC, COMPONENT +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/StaticFragment.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/StaticFragment.java new file mode 100644 index 0000000000..dec3988fee --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/StaticFragment.java @@ -0,0 +1,24 @@ +package wicked.markup; + +public class StaticFragment extends Fragment { + private String text; + + public StaticFragment() { + } + + public StaticFragment(String string) { + text=string; + } + + public String toString() { + return text; + } + + @Override + public MarkupType getType() { + return MarkupType.STATIC; + } + + + +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/Tag.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/Tag.java new file mode 100644 index 0000000000..0faa90647e --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/Tag.java @@ -0,0 +1,31 @@ +package wicked.markup; + +import java.util.HashMap; +import java.util.Map; + +public class Tag { + private String name; + private Map<String, String> attributes=new HashMap<String, String>(); + + public Tag(String name) { + setName(name); + } + + public Map<String, String> getAttributes() { + return attributes; + } + public void setAttributes(Map<String, String> attributes) { + this.attributes = attributes; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + public String toString() { + return name; + } + +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/parser/BasicParser.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/parser/BasicParser.java new file mode 100644 index 0000000000..626439dd7e --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/parser/BasicParser.java @@ -0,0 +1,150 @@ +package wicked.markup.parser; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Stack; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +import wicked.markup.ComponentFragment; +import wicked.markup.IFragmentCollector; +import wicked.markup.Markup; +import wicked.markup.StaticFragment; +import wicked.markup.Tag; + +public class BasicParser implements IMarkupParser { + + public Markup parse(InputStream markupStream) { + + try { + SAXParser parser=SAXParserFactory.newInstance().newSAXParser(); + Markup markup=new Markup(); + parser.parse(markupStream, new Handler(markup)); + markup.init(); + return markup; + + } catch (ParserConfigurationException e) { + throw new RuntimeException(e); + } catch (SAXException e) { + throw new RuntimeException(e); + } catch (IOException e) { + throw new RuntimeException(e); + } + + } + + public class Handler extends DefaultHandler { + private StringBuilder textBuffer=new StringBuilder(); + private Stack<Boolean> componentTags=new Stack<Boolean>(); + + private Stack<IFragmentCollector> fragments=new Stack<IFragmentCollector>(); + + public Handler(Markup markup) { + fragments.push(markup); + } + + public void startComponent(Tag tag) { + ComponentFragment frag=new ComponentFragment(tag); + fragments.peek().addFragment(frag); + fragments.push(frag); + } + + public void endComponent() { + fragments.pop(); + } + + + @Override + public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { + + if (hasWicketId(attributes)) { + + recordStaticMarkup(); + + Tag tag=createTag(qName, attributes); + componentTags.push(true); + startComponent(tag); + + } else { + printTagToTextBuffer(qName, attributes); + componentTags.push(false); + } + } + + @Override + public void endElement(String uri, String localName, String qName) throws SAXException { + if (componentTags.peek()==true) { + + recordStaticMarkup(); + + endComponent(); + + } else { + textBuffer.append("</").append(qName).append(">"); + } + + componentTags.pop(); + } + + @Override + public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { + textBuffer.append(ch, start, length); + } + + @Override + public void characters(char[] ch, int start, int length) throws SAXException { + textBuffer.append(ch, start, length); + } + + @Override + public void endDocument() throws SAXException { + recordStaticMarkup(); + } + + private void recordStaticMarkup() { + if (textBuffer.length()>0) { + fragments.peek().addFragment(new StaticFragment(textBuffer.toString())); + textBuffer=new StringBuilder(); + } + } + + + private Tag createTag(String name, Attributes attributes) { + Tag tag=new Tag(name); + for (int i=0;i<attributes.getLength();i++) { + tag.getAttributes().put(attributes.getQName(i), attributes.getValue(i)); + } + return tag; + } + + private boolean hasWicketId(Attributes attributes) { + for (int i=0;i<attributes.getLength();i++) { + if (attributes.getQName(i).equals("wicket:id")) { + return true; + } + } + return false; + } + + private void printTagToTextBuffer(String name, Attributes attributes) { + textBuffer.append("<").append(name); + for (int i=0;i<attributes.getLength();i++) { + textBuffer.append(" ") + .append(attributes.getQName(i)) + .append("=\"") + .append(attributes.getValue(i)) + .append("\""); + } + textBuffer.append(">"); + } + + + } + +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/parser/IMarkupParser.java b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/parser/IMarkupParser.java new file mode 100644 index 0000000000..93d4d4d7ed --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/src/wicked/markup/parser/IMarkupParser.java @@ -0,0 +1,9 @@ +package wicked.markup.parser; + +import java.io.InputStream; + +import wicked.markup.Markup; + +public interface IMarkupParser { + Markup parse (InputStream markupStream); +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/test/wicked/Start.java b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/Start.java new file mode 100644 index 0000000000..a65051a8b4 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/Start.java @@ -0,0 +1,28 @@ +package wicked; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + + +public class Start { + + public static void main(String[] args) throws IOException { + + Application app=new Application(); + Application.set(app); + + TestPage page=new TestPage(); + ByteArrayOutputStream out=new ByteArrayOutputStream(); + + // any component in the tree can be rendered at any point, even before a full page render + page.get("container1:panel3").render(out); + + out.write("\n\n\n".getBytes()); + + + page.render(out); + String str=new String(out.toByteArray()); + System.out.println(str); + } + +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPage.html b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPage.html new file mode 100644 index 0000000000..4c993c0e61 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPage.html @@ -0,0 +1,39 @@ +<html> +<head> +<title>Test Page</title> +</head> +<body> +Create User Page:<br/> +Please fill in fields below:<br/><br/> + +<span wicket:id="container1"> + <span wicket:id="label">[labelincontainer]</span> + <span wicket:id="panel3">[panel3 in container]</span> +</span> + + +<span wicket:id="feedback">[feedback]</span> +<span wicket:id="testpanel">[testpanel]</span> +Create User Form:<br/> + +<form wicked:id="create-user-form" method="post"> +<table cellspacing="0" cellpadding="2"> +<tr> + <td><label wicketd:id="firstName-label">[first name]</label>:</td> + <td><input type="text" wicketd:id="firstName"/></td> +</tr> +<tr> + <td><label wicketd:id="lastName-label">[last name]</label>:</td> + <td><input type="text" wicketd:id="lastName"/></td> +</tr> +<tr> + <td> </td> + <td> + <input type="submit" value="create user" wicketd:id="create-button"/> + <input type="submit" value="cancel" wicketd:id="cancel-button"/> + </td> +</tr> +</table> +</form> +</body> +</html> diff --git a/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPage.java b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPage.java new file mode 100644 index 0000000000..7a5b50ce48 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPage.java @@ -0,0 +1,15 @@ +package wicked; + +import wicked.component.Label; + +public class TestPage extends Page { + public TestPage() { + Label label=new Label(this, "feedback", "hello there i am label 1"); + new TestPanel(this, "testpanel"); + + + Container container1=new Container(this, "container1"); + new Label(container1, "label", "label in container1"); + new TestPanel3(container1, "panel3"); + } +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel.html b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel.html new file mode 100644 index 0000000000..91650800df --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel.html @@ -0,0 +1,7 @@ +<wicket:panel> +this is test panel 1 +<span wicket:id="label1">[label1]</span> +<span wicket:id="label2">[label2]</span> +<span wicket:id="testpanel2">[test panel2]</span> +this is end of panel 1 +</wicket:panel> \ No newline at end of file diff --git a/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel.java b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel.java new file mode 100644 index 0000000000..3a86aaeea1 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel.java @@ -0,0 +1,14 @@ +package wicked; + +import wicked.component.Label; + +public class TestPanel extends Panel { + + public TestPanel(Container parent, String id) { + super(parent, id); + new Label(this, "label1", "this is label 1"); + new Label(this, "label2", "this is label 2"); + new TestPanel2(this, "testpanel2"); + } + +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel2.html b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel2.html new file mode 100644 index 0000000000..d0c239c0a3 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel2.html @@ -0,0 +1,16 @@ +<wicket:panel> +this is test panel 2 +<span wicket:id="label1">[label1]</span> + + +before testpanel3========= +<span wicket:id="testpanel3">[testpanel3]</span> +after testpanel3=========== + +before testpanel3 again=========== +<span wicket:id="testpanel3-2">[testpanel3 again]</span> +after testpanel3 again=========== + +this is end of panel 2 + +</wicket:panel> \ No newline at end of file diff --git a/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel2.java b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel2.java new file mode 100644 index 0000000000..f17d5f927e --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel2.java @@ -0,0 +1,14 @@ +package wicked; + +import wicked.component.Label; + +public class TestPanel2 extends Panel { + + public TestPanel2(Container parent, String id) { + super(parent, id); + new Label(this, "label1", "this is label 1 in TestPanel2"); + new TestPanel3(this, "testpanel3"); + new TestPanel3(this, "testpanel3-2"); + } + +} diff --git a/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel3.html b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel3.html new file mode 100644 index 0000000000..fa506579d7 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel3.html @@ -0,0 +1,5 @@ +<wicket:panel> +this is test panel 3 +<span wicket:id="label1">[label1]</span> +this is end of panel 3 +</wicket:panel> \ No newline at end of file diff --git a/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel3.java b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel3.java new file mode 100644 index 0000000000..3081199a24 --- /dev/null +++ b/wicket-sandbox/users/ivaynberg/wicked/test/wicked/TestPanel3.java @@ -0,0 +1,12 @@ +package wicked; + +import wicked.component.Label; + +public class TestPanel3 extends Panel { + + public TestPanel3(Container parent, String id) { + super(parent, id); + new Label(this, "label1", "this is label 1 in TestPanel3"); + } + +} diff --git a/wicket/src/test/wicket/markup/html/basic/SimplePageExpectedResult_7.html b/wicket/src/test/wicket/markup/html/basic/SimplePageExpectedResult_7.html new file mode 100644 index 0000000000..65dba54d49 --- /dev/null +++ b/wicket/src/test/wicket/markup/html/basic/SimplePageExpectedResult_7.html @@ -0,0 +1,12 @@ +<html xmlns:wicket> +<body> + <span attr="" wicket:message="attr=myKeyNotExist">Some text</span> + <span attr="default" wicket:message="attr=myKeyNotExist">Some text</span> + <span attr="myValue" wicket:message="attr=myKey">Some text</span> + <span attr="myValue" wicket:message="attr=myKey">Some text</span> + <wicket:message key="myKeyNotExsts">Default Text</wicket:message> + <wicket:message key="myKey">myValue</wicket:message> + <wicket:message key="myKeyNotExsts"/> + <wicket:message key="myKey">myValue</message> +</body> +</html> diff --git a/wicket/src/test/wicket/markup/html/basic/SimplePage_7.html b/wicket/src/test/wicket/markup/html/basic/SimplePage_7.html new file mode 100644 index 0000000000..a4d213c36e --- /dev/null +++ b/wicket/src/test/wicket/markup/html/basic/SimplePage_7.html @@ -0,0 +1,12 @@ +<html xmlns:wicket> +<body> + <span wicket:message="attr=myKeyNotExist">Some text</span> + <span attr="default" wicket:message="attr=myKeyNotExist">Some text</span> + <span wicket:message="attr=myKey">Some text</span> + <span attr="default" wicket:message="attr=myKey">Some text</span> + <wicket:message key="myKeyNotExsts">Default Text</wicket:message> + <wicket:message key="myKey">Default Text</wicket:message> + <wicket:message key="myKeyNotExsts"/> + <wicket:message key="myKey"/> +</body> +</html> diff --git a/wicket/src/test/wicket/markup/html/basic/SimplePage_7.java b/wicket/src/test/wicket/markup/html/basic/SimplePage_7.java new file mode 100644 index 0000000000..51f2baeda4 --- /dev/null +++ b/wicket/src/test/wicket/markup/html/basic/SimplePage_7.java @@ -0,0 +1,39 @@ +/* + * $Id$ + * $Revision$ + * $Date$ + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package wicket.markup.html.basic; + +import wicket.markup.html.WebPage; + + +/** + * Mock page for testing. + * + * @author Chris Turner + */ +public class SimplePage_7 extends WebPage +{ + private static final long serialVersionUID = 1L; + + /** + * Construct. + */ + public SimplePage_7() + { + } +} diff --git a/wicket/src/test/wicket/markup/html/basic/SimplePage_7.properties b/wicket/src/test/wicket/markup/html/basic/SimplePage_7.properties new file mode 100644 index 0000000000..49400c16b6 --- /dev/null +++ b/wicket/src/test/wicket/markup/html/basic/SimplePage_7.properties @@ -0,0 +1,2 @@ + +myKey = myValue \ No newline at end of file
