You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2009/03/25 14:38:10 UTC
svn commit: r758251 - in /incubator/pivot/trunk: build.xml pivot.bat
pivot.sh tutorials/src/pivot/tutorials/lists.wtkx
wtk/src/pivot/wtkx/WTKXSerializer.java
Author: gbrown
Date: Wed Mar 25 13:38:04 2009
New Revision: 758251
URL: http://svn.apache.org/viewvc?rev=758251&view=rev
Log:
Eliminate hard dependency on StAX libraries.
Added:
incubator/pivot/trunk/pivot.bat (with props)
incubator/pivot/trunk/pivot.sh (with props)
Modified:
incubator/pivot/trunk/build.xml
incubator/pivot/trunk/tutorials/src/pivot/tutorials/lists.wtkx
incubator/pivot/trunk/wtk/src/pivot/wtkx/WTKXSerializer.java
Modified: incubator/pivot/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/build.xml?rev=758251&r1=758250&r2=758251&view=diff
==============================================================================
--- incubator/pivot/trunk/build.xml (original)
+++ incubator/pivot/trunk/build.xml Wed Mar 25 13:38:04 2009
@@ -376,9 +376,6 @@
<attribute name="Built-On" value="${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
- <metainf dir="${wtk}">
- <include name="services/**"/>
- </metainf>
<fileset dir="${wtk}/${bin}">
<exclude name="pivot/wtk/skin/terra/**"/>
<exclude name="pivot/wtk/skin/obsidian/**"/>
@@ -391,6 +388,18 @@
</fileset>
</jar>
+ <delete file="${wtk}/${ant.project.name}-wtk.stax.jar"/>
+ <jar jarfile="${wtk}/${ant.project.name}-wtk.stax.jar">
+ <manifest>
+ <attribute name="Sealed" value="true"/>
+ <attribute name="Built-On" value="${DSTAMP}-${TSTAMP}"/>
+ <attribute name="Implementation-Version" value="${version}"/>
+ </manifest>
+ <metainf dir="${wtk}">
+ <include name="services/**"/>
+ </metainf>
+ </jar>
+
<delete file="${wtk}/${ant.project.name}-wtk.terra.jar"/>
<jar jarfile="${wtk}/${ant.project.name}-wtk.terra.jar">
<manifest>
@@ -620,9 +629,12 @@
<target name="package" depends="trim-whitespace, clean, build, doc">
<delete file="${ant.project.name}_${version}.zip"/>
<zip destfile="${ant.project.name}_${version}.zip">
+ <fileset dir=".">
+ <include name="pivot.sh"/>
+ <include name="pivot.bat"/>
+ </fileset>
<fileset dir="${charts}">
<include name="${ant.project.name}-charts.jar"/>
- <include name="${ant.project.name}-charts.signed.jar"/>
</fileset>
<fileset dir="${core}">
<include name="${ant.project.name}-core.jar"/>
@@ -633,6 +645,7 @@
</fileset>
<fileset dir="${wtk}">
<include name="${ant.project.name}-wtk.jar"/>
+ <include name="${ant.project.name}-wtk.stax.jar"/>
<include name="${ant.project.name}-wtk.terra.jar"/>
</fileset>
<fileset dir="${tools}">
@@ -672,6 +685,10 @@
<signjar jar="${deploy}/${ant.project.name}-wtk.jar" signedjar="${deploy}/${ant.project.name}-wtk.signed.jar"
keystore="${keystore}" storepass="${storepass}" alias="${alias}"/>
+ <copy file="${wtk}/${ant.project.name}-wtk.stax.jar" todir="${deploy}"/>
+ <signjar jar="${deploy}/${ant.project.name}-wtk.stax.jar" signedjar="${deploy}/${ant.project.name}-wtk.stax.signed.jar"
+ keystore="${keystore}" storepass="${storepass}" alias="${alias}"/>
+
<copy file="${wtk}/${ant.project.name}-wtk.terra.jar" todir="${deploy}"/>
<signjar jar="${deploy}/${ant.project.name}-wtk.terra.jar" signedjar="${deploy}/${ant.project.name}-wtk.terra.signed.jar"
keystore="${keystore}" storepass="${storepass}" alias="${alias}"/>
Added: incubator/pivot/trunk/pivot.bat
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/pivot.bat?rev=758251&view=auto
==============================================================================
--- incubator/pivot/trunk/pivot.bat (added)
+++ incubator/pivot/trunk/pivot.bat Wed Mar 25 13:38:04 2009
@@ -0,0 +1 @@
+java -cp %CLASSPATH%;pivot-core.jar;pivot-web.jar;pivot-wtk.jar;pivot-wtk.terra.jar pivot.wtk.DesktopApplicationContext pivot.wtk.ScriptApplication src:%1
Propchange: incubator/pivot/trunk/pivot.bat
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/pivot/trunk/pivot.sh
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/pivot.sh?rev=758251&view=auto
==============================================================================
--- incubator/pivot/trunk/pivot.sh (added)
+++ incubator/pivot/trunk/pivot.sh Wed Mar 25 13:38:04 2009
@@ -0,0 +1,2 @@
+#!/bin/sh
+java -cp $CLASSPATH:pivot-core.jar:pivot-web.jar:pivot-wtk.jar:pivot-wtk.terra.jar pivot.wtk.DesktopApplicationContext pivot.wtk.ScriptApplication src:$1
Propchange: incubator/pivot/trunk/pivot.sh
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/pivot/trunk/tutorials/src/pivot/tutorials/lists.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/pivot/tutorials/lists.wtkx?rev=758251&r1=758250&r2=758251&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/pivot/tutorials/lists.wtkx (original)
+++ incubator/pivot/trunk/tutorials/src/pivot/tutorials/lists.wtkx Wed Mar 25 13:38:04 2009
@@ -24,7 +24,7 @@
<Label text="Editable" styles="{fontBold:true}"/>
<Border styles="{padding:0, color:10}">
<content>
- <ScrollPane preferredHeight="80">
+ <ScrollPane preferredWidth="62" preferredHeight="80" horizontalScrollBarPolicy="fill">
<view>
<ListView selectMode="single" selectedIndex="0">
<listData>
Modified: incubator/pivot/trunk/wtk/src/pivot/wtkx/WTKXSerializer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtkx/WTKXSerializer.java?rev=758251&r1=758250&r2=758251&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtkx/WTKXSerializer.java (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtkx/WTKXSerializer.java Wed Mar 25 13:38:04 2009
@@ -96,6 +96,7 @@
private HashMap<String, Object> namedObjects = new HashMap<String, Object>();
private HashMap<String, WTKXSerializer> includeSerializers = new HashMap<String, WTKXSerializer>();
+ private XMLInputFactory xmlInputFactory;
private Object scriptEngineManager;
private Class<?> scriptEngineManagerClass;
@@ -123,6 +124,9 @@
public WTKXSerializer(Resources resources) {
this.resources = resources;
+ xmlInputFactory = XMLInputFactory.newInstance();
+ xmlInputFactory.setProperty("javax.xml.stream.isCoalescing", true);
+
try {
scriptEngineManagerClass = Class.forName("javax.script.ScriptEngineManager");
scriptEngineManager = scriptEngineManagerClass.newInstance();
@@ -165,11 +169,8 @@
// Parse the XML stream
Element element = null;
- XMLInputFactory factory = XMLInputFactory.newInstance();
- factory.setProperty("javax.xml.stream.isCoalescing", true);
-
try {
- XMLStreamReader reader = factory.createXMLStreamReader(inputStream);
+ XMLStreamReader reader = xmlInputFactory.createXMLStreamReader(inputStream);
while (reader.hasNext()) {
int event = reader.next();