JBoss Tools SVN: r22552 - branches/3.2.helios.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-04 12:09:04 -0400 (Fri, 04 Jun 2010)
New Revision: 22552
Modified:
branches/3.2.helios/parent-pom.xml
Log:
add eclipse 3.6milestones site
Modified: branches/3.2.helios/parent-pom.xml
===================================================================
--- branches/3.2.helios/parent-pom.xml 2010-06-04 16:05:24 UTC (rev 22551)
+++ branches/3.2.helios/parent-pom.xml 2010-06-04 16:09:04 UTC (rev 22552)
@@ -199,7 +199,7 @@
</releases>
</repository>
<repository>
- <id>eclipse36</id>
+ <id>eclipse36r</id>
<url>http://download.eclipse.org/eclipse/updates/3.6/</url>
<layout>p2</layout>
<snapshots>
@@ -210,6 +210,17 @@
</releases>
</repository>
<repository>
+ <id>eclipse36m</id>
+ <url>http://download.eclipse.org/eclipse/updates/3.6milestones/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
<id>birt26r</id>
<url>http://download.eclipse.org/birt/update-site/2.6/</url>
<layout>p2</layout>
14 years, 7 months
JBoss Tools SVN: r22551 - branches/3.2.helios.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-04 12:05:24 -0400 (Fri, 04 Jun 2010)
New Revision: 22551
Modified:
branches/3.2.helios/parent-pom.xml
Log:
remove carbon because 'Missing requirement for filter properties ~= bash: org.eclipse.rcp.feature.group 3.6.0.v20100519-9OAqFKvFtsd7E2Z8uDEdcWTC requires 'org.eclipse.ui.carbon [4.0.100.I20100509-0800]' but it could not be found'
Modified: branches/3.2.helios/parent-pom.xml
===================================================================
--- branches/3.2.helios/parent-pom.xml 2010-06-04 15:33:51 UTC (rev 22550)
+++ branches/3.2.helios/parent-pom.xml 2010-06-04 16:05:24 UTC (rev 22551)
@@ -55,11 +55,11 @@
<ws>cocoa</ws>
<arch>x86</arch>
</environment>
- <environment>
+ <!-- <environment>
<os>macosx</os>
<ws>carbon</ws>
<arch>x86</arch>
- </environment>
+ </environment> -->
<environment>
<os>win32</os>
<ws>win32</ws>
14 years, 7 months
JBoss Tools SVN: r22550 - branches/3.2.helios/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-04 11:33:51 -0400 (Fri, 04 Jun 2010)
New Revision: 22550
Modified:
branches/3.2.helios/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF
Log:
drop ranges
Modified: branches/3.2.helios/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF
===================================================================
--- branches/3.2.helios/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF 2010-06-04 15:33:07 UTC (rev 22549)
+++ branches/3.2.helios/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF 2010-06-04 15:33:51 UTC (rev 22550)
@@ -29,10 +29,10 @@
org.jboss.tools.common.gef,
org.jboss.tools.jst.web.ui,
org.jboss.tools.seam.pages.xml,
- org.eclipse.emf.ecore;bundle-version="2.4.0",
- org.eclipse.pde.ui;bundle-version="3.4.0",
- org.jboss.tools.common.gef;bundle-version="2.0.0",
- org.eclipse.jface.text;bundle-version="3.5.0",
- org.eclipse.core.expressions;bundle-version="3.4.100"
+ org.eclipse.emf.ecore,
+ org.eclipse.pde.ui,
+ org.jboss.tools.common.gef,
+ org.eclipse.jface.text,
+ org.eclipse.core.expressions
Bundle-Version: 3.1.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
14 years, 7 months
JBoss Tools SVN: r22549 - in trunk/hibernatetools/plugins: org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-06-04 11:33:07 -0400 (Fri, 04 Jun 2010)
New Revision: 22549
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
Log:
https://jira.jboss.org/browse/JBIDE-6103 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-06-04 15:25:03 UTC (rev 22548)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-06-04 15:33:07 UTC (rev 22549)
@@ -84,6 +84,9 @@
/* TODO: move this out to the actual users of the configuraiton/sf ? */
private Configuration configuration;
private SessionFactory sessionFactory;
+
+ // internal flag to prohibit long time profile refresh
+ private boolean rejectProfileRefresh = false;
/** Unique name for this configuration */
public String getName() {
@@ -208,6 +211,9 @@
}
protected void refreshProfile(IConnectionProfile profile) {
+ if (rejectProfileRefresh) {
+ return;
+ }
// refresh profile (refresh jpa connection):
// get fresh information about current db structure and update error markers
if (profile.getConnectionState() == IConnectionProfile.CONNECTED_STATE){
@@ -818,4 +824,12 @@
return localCfg;
}
+ public boolean isRejectProfileRefresh() {
+ return rejectProfileRefresh;
+ }
+
+ public void setRejectProfileRefresh(boolean rejectProfileRefresh) {
+ this.rejectProfileRefresh = rejectProfileRefresh;
+ }
+
}
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java 2010-06-04 15:25:03 UTC (rev 22548)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java 2010-06-04 15:33:07 UTC (rev 22549)
@@ -16,6 +16,8 @@
import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.osgi.util.NLS;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.eclipse.console.EclipseLaunchConsoleConfigurationPreferences;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
@@ -58,6 +60,18 @@
if (!resUserClasses) {
setErrorMessage(HibernateConsoleMessages.ConsoleConfigurationTabGroup_classpath_must_be_set_or_restored_to_default);
}
+ if (resUserClasses && resExistArchive) {
+ try {
+ ConsoleConfiguration ccTest = new ConsoleConfiguration(new EclipseLaunchConsoleConfigurationPreferences(launchConfig));
+ // should not try to connect to db - refresh profile try to create db connection
+ // so just reject this
+ ccTest.setRejectProfileRefresh(true);
+ ccTest.buildWith(null, false);
+ } catch (Exception ex) {
+ resUserClasses = false;
+ setErrorMessage(ex.getMessage());
+ }
+ }
return resUserClasses && resExistArchive;
}
14 years, 7 months
JBoss Tools SVN: r22548 - branches/3.2.helios.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-04 11:25:03 -0400 (Fri, 04 Jun 2010)
New Revision: 22548
Modified:
branches/3.2.helios/parent-pom.xml
Log:
copy from trunk
Modified: branches/3.2.helios/parent-pom.xml
===================================================================
--- branches/3.2.helios/parent-pom.xml 2010-06-04 15:10:24 UTC (rev 22547)
+++ branches/3.2.helios/parent-pom.xml 2010-06-04 15:25:03 UTC (rev 22548)
@@ -92,6 +92,7 @@
<forkedProcessTimeoutInSeconds>900</forkedProcessTimeoutInSeconds>
<useUIHarness>true</useUIHarness>
<useUIThread>true</useUIThread>
+ <argLine>-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m</argLine>
<!-- https://docs.sonatype.org/display/TYCHO/How+to+run+SWTBot+tests+with+Tycho -->
<!-- set useUIThread=true for regular ui tests -->
<!-- set useUIThread=false for swtbot tests (?) -->
@@ -168,158 +169,162 @@
<system>jira</system>
<url>https://jira.jboss.org/jira/secure/</url>
</issueManagement>
-
- <repositories>
- <repository>
+ <profiles>
+ <profile>
<id>helios</id>
- <url>http://download.eclipse.org/releases/helios/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>webtools32</id>
- <url>http://download.eclipse.org/webtools/repository/helios</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>eclipse36</id>
- <url>http://download.eclipse.org/eclipse/updates/3.6/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>birt26r</id>
- <url>http://download.eclipse.org/birt/update-site/2.6/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>birt26i</id>
- <url>http://download.eclipse.org/birt/update-site/2.6-interim/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>swtbot-helios</id>
- <url>http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/
- </url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <repositories>
+ <repository>
+ <id>helios</id>
+ <url>http://download.eclipse.org/releases/helios/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>webtools32</id>
+ <url>http://download.eclipse.org/webtools/repository/helios</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>eclipse36</id>
+ <url>http://download.eclipse.org/eclipse/updates/3.6/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>birt26r</id>
+ <url>http://download.eclipse.org/birt/update-site/2.6/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>birt26i</id>
+ <url>http://download.eclipse.org/birt/update-site/2.6-interim/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>swtbot-helios</id>
+ <url>http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/
+ </url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
- <repository>
- <id>galileo</id>
- <url>http://download.eclipse.org/releases/galileo/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>eclipse35</id>
- <url>http://download.eclipse.org/eclipse/updates/3.5/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>birt25r</id>
- <url>http://download.eclipse.org/birt/update-site/2.5</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>swtbot-galileo</id>
- <url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site
- </url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>webtools</id>
- <url>http://download.eclipse.org/webtools/updates/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
+ <repository>
+ <id>galileo</id>
+ <url>http://download.eclipse.org/releases/galileo/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>eclipse35</id>
+ <url>http://download.eclipse.org/eclipse/updates/3.5/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>birt25r</id>
+ <url>http://download.eclipse.org/birt/update-site/2.5</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>swtbot-galileo</id>
+ <url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site
+ </url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>webtools</id>
+ <url>http://download.eclipse.org/webtools/updates/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
- <repository>
- <id>m2eclipse</id>
- <url>http://m2eclipse.sonatype.org/sites/m2e/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>m2eclipse-extras</id>
- <url>http://m2eclipse.sonatype.org/sites/m2e-extras/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- </repositories>
-
- <profiles>
+ <repository>
+ <id>m2eclipse</id>
+ <url>http://m2eclipse.sonatype.org/sites/m2e/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>m2eclipse-extras</id>
+ <url>http://m2eclipse.sonatype.org/sites/m2e-extras/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ </profile>
<!-- TODO: verify that this profile overrides the default profile if BUILD_NUMBER
is set (by a Hudson job) -->
<profile>
@@ -400,6 +405,90 @@
</repository>
</repositories>
</profile>
+ <profile>
+ <id>galileo</id>
+ <repositories>
+ <repository>
+ <id>galileo</id>
+ <url>http://download.eclipse.org/releases/galileo/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>eclipse35</id>
+ <url>http://download.eclipse.org/eclipse/updates/3.5/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>birt25r</id>
+ <url>http://download.eclipse.org/birt/update-site/2.5</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>swtbot-galileo</id>
+ <url>http://download.eclipse.org/technology/swtbot/galileo/dev-build/update-site
+ </url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>webtools</id>
+ <url>http://download.eclipse.org/webtools/updates/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+
+ <repository>
+ <id>m2eclipse</id>
+ <url>http://m2eclipse.sonatype.org/sites/m2e/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
+ <id>m2eclipse-extras</id>
+ <url>http://m2eclipse.sonatype.org/sites/m2e-extras/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ </profile>
</profiles>
<pluginRepositories>
14 years, 7 months
JBoss Tools SVN: r22547 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-06-04 11:10:24 -0400 (Fri, 04 Jun 2010)
New Revision: 22547
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java
Log:
https://jira.jboss.org/browse/JBIDE-6419 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java 2010-06-04 14:49:45 UTC (rev 22546)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewConfigurationWizard.java 2010-06-04 15:10:24 UTC (rev 22547)
@@ -108,7 +108,7 @@
setMessage(NLS.bind(HibernateConsoleMessages.NewConfigurationWizardPage_fileshould_pass_configuration,
fileName), WARNING);
}
- IPath path = getContainerFullPath();
+ IPath path = getContainerFullPath().append(getFileName());
IContainer container = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
try {
@@ -259,13 +259,13 @@
throws CoreException {
// create a sample file
monitor.beginTask(HibernateConsoleMessages.NewConfigurationWizard_creating + file.getName(), 2);
+ InputStream stream = openContentStream(props);
+ if (file.exists() ) {
+ file.setContents(stream, true, true, monitor);
+ } else {
+ file.create(stream, true, monitor);
+ }
try {
- InputStream stream = openContentStream(props);
- if (file.exists() ) {
- file.setContents(stream, true, true, monitor);
- } else {
- file.create(stream, true, monitor);
- }
stream.close();
} catch (IOException e) {
}
14 years, 7 months
JBoss Tools SVN: r22546 - in workspace/smooks-dmb/smooks: plugins/org.jboss.tools.smooks.model and 40 other directories.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2010-06-04 10:49:45 -0400 (Fri, 04 Jun 2010)
New Revision: 22546
Added:
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/MANIFEST.MF
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/org/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/org/jboss/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/org/jboss/tools/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/org/jboss/tools/smooks/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/org/jboss/tools/smooks/model/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/org/jboss/tools/smooks/model/descriptor.properties
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/about.html
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/build.properties
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/libs/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/libs/xstream-1.2.2.jar
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/plugin.properties
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/plugin.xml
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/pom.xml
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/Reader.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/SmooksModel.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/v1.1.ftl
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/v1.1.xml
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/Binding.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/CSVReader.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/ListBinding.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/MapBinding.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/SingleBinding.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_2/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_2/v1.2.ftl
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_2/v1.2.xml
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_3/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_3/v1.3.ftl
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_3/v1.3.xml
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Bean.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Binding.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/DecodeParam.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Expression.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Value.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Wiring.java
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_1/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_1/v1.1.ftl
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_1/v1.1.xml
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_2/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_2/v1.2.ftl
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_2/v1.2.xml
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_3/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_3/v1.3.ftl
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_3/v1.3.xml
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/plugin/
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/plugin/SmooksModelActivator.java
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/META-INF/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/META-INF/MANIFEST.MF
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/build.properties
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/lib/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/lib/xmlunit-1.1.jar
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/plugin.properties
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/pom.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/resources/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/CSVReader_1_2_Test.java
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/CSVReader_1_3_Test.java
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-01.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-02.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-03.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-04.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-01.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-02.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-03.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-04.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-05.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/BeanTest.java
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_1/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_1/config-01.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_2/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_2/config-01.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_2/config-02.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_3/
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_3/config-01.xml
workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_3/config-02.xml
Modified:
workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.runtime/META-INF/MANIFEST.MF
Log:
First chink of the model builder models... from the smooks example... still an issue with the tests... need to figure out how to export the model descriptor file (in META-INF) in the bundle
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/MANIFEST.MF
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/MANIFEST.MF (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/MANIFEST.MF 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.jboss.tools.smooks.model;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime,
+ org.jboss.tools.smooks.runtime
+Bundle-Activator: org.jboss.tools.smooks.model.plugin.SmooksModelActivator
+Export-Package: org.jboss.tools.smooks.model.core,
+ org.jboss.tools.smooks.model.csv,
+ org.jboss.tools.smooks.model.javabean,
+ org.jboss.tools.smooks.model.plugin
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/org/jboss/tools/smooks/model/descriptor.properties
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/org/jboss/tools/smooks/model/descriptor.properties (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/META-INF/org/jboss/tools/smooks/model/descriptor.properties 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,36 @@
+############################################################################################
+#
+# Smooks configuration model descriptor.
+#
+############################################################################################
+
+ # smooks core v1.1
+smooks11.namespace=http://www.milyn.org/xsd/smooks-1.1.xsd
+smooks11.schemaLocation=/META-INF/xsd/smooks-1.1.xsd
+smooks11.bindingConfigLocation=/org/jboss/tools/smooks/model/core/v1.1.xml
+smooks11.order=0
+
+ # csv v1.2
+csv12.namespace=http://www.milyn.org/xsd/smooks/csv-1.2.xsd
+csv12.schemaLocation=/META-INF/xsd/smooks/csv-1.2.xsd
+csv12.bindingConfigLocation=/org/jboss/tools/smooks/model/csv/v1_2/v1.2.xml
+
+ # csv v1.3
+csv13.namespace=http://www.milyn.org/xsd/smooks/csv-1.3.xsd
+csv13.schemaLocation=/META-INF/xsd/smooks/csv-1.3.xsd
+csv13.bindingConfigLocation=/org/jboss/tools/smooks/model/csv/v1_3/v1.3.xml
+
+ # javabean v1.1
+jb11.namespace=http://www.milyn.org/xsd/smooks/javabean-1.1.xsd
+jb11.schemaLocation=/META-INF/xsd/smooks/javabean-1.1.xsd
+jb11.bindingConfigLocation=/org/jboss/tools/smooks/model/javabean/v1_1/v1.1.xml
+
+ # javabean v1.2
+jb12.namespace=http://www.milyn.org/xsd/smooks/javabean-1.2.xsd
+jb12.schemaLocation=/META-INF/xsd/smooks/javabean-1.2.xsd
+jb12.bindingConfigLocation=/org/jboss/tools/smooks/model/javabean/v1_2/v1.2.xml
+
+ # javabean v1.3
+jb13.namespace=http://www.milyn.org/xsd/smooks/javabean-1.3.xsd
+jb13.schemaLocation=/META-INF/xsd/smooks/javabean-1.3.xsd
+jb13.bindingConfigLocation=/org/jboss/tools/smooks/model/javabean/v1_3/v1.3.xml
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/about.html
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/about.html (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/about.html 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Smooks Tools - Templating</title>
+<style type="text/css" media="screen">
+<!--
+ body {
+ font-family: Sans-serif, Arial, Helvetica;
+ }
+
+-->
+</style>
+</head>
+<body>
+<h1>Smooks Tools - Templating</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a href="http://www.jboss.org/tools">JBoss Tools project page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License - Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/build.properties
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/build.properties (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/build.properties 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,8 @@
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/
+source.. = src/
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/libs/xstream-1.2.2.jar
===================================================================
(Binary files differ)
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/libs/xstream-1.2.2.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/plugin.properties
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/plugin.properties (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/plugin.properties 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,8 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+providerName = JBoss by Red Hat
+pluginName = Smooks Model Plug-in
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/plugin.xml
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/plugin.xml (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/plugin.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+</plugin>
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/plugin.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/pom.xml
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/pom.xml (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/pom.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,14 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>../../../parent-pom.xml</relativePath>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.smooks.model</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/Reader.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/Reader.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/Reader.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,28 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.core;
+
+/**
+ * Marker interface for Smooks reader components.
+ *
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public interface Reader {
+}
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/Reader.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/SmooksModel.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/SmooksModel.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/SmooksModel.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,56 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.core;
+
+import org.jboss.tools.smooks.model.javabean.Bean;
+import org.milyn.javabean.dynamic.serialize.DefaultNamespace;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Smooks Model Root.
+ *
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+@DefaultNamespace(uri = "http://www.milyn.org/xsd/smooks-1.1.xsd")
+public class SmooksModel {
+
+ public static final String MODEL_DESCRIPTOR = "META-INF/org/jboss/tools/smooks/model/descriptor.properties";
+
+ private List<Reader> readers = new ArrayList<Reader>();
+ private List<Bean> beans = new ArrayList<Bean>();
+
+ public List<Reader> getReaders() {
+ return readers;
+ }
+
+ public void setReaders(List<Reader> readers) {
+ this.readers = readers;
+ }
+
+ public List<Bean> getBeans() {
+ return beans;
+ }
+
+ public void setBeans(List<Bean> beans) {
+ this.beans = beans;
+ }
+}
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/SmooksModel.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/v1.1.ftl
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/v1.1.ftl (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/v1.1.ftl 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<smooks-resource-list <@writeNamespaces indent="22"/>>
+
+<#list bean.readers as reader><@writeBean bean=reader /></#list>
+<#list bean.beans as bean><@writeBean bean=bean /></#list>
+
+</smooks-resource-list>
\ No newline at end of file
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/v1.1.xml
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/v1.1.xml (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/v1.1.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.4.xsd"
+ xmlns:dmb="http://www.milyn.org/xsd/smooks/dmb-1.4.xsd">
+
+ <!--
+ Main Smooks model bean.
+ -->
+ <jb:bean beanId="smooksModel" class="org.smooks.model.core.SmooksModel" createOnElement="#document">
+ <jb:wiring property="readers" beanIdRef="readers" />
+ <jb:wiring property="beans" beanIdRef="beans" />
+ </jb:bean>
+ <jb:bean beanId="readers" class="java.util.ArrayList" createOnElement="#document">
+ <jb:wiring beanType="org.smooks.model.core.Reader" />
+ </jb:bean>
+ <jb:bean beanId="beans" class="java.util.ArrayList" createOnElement="#document">
+ <jb:wiring beanType="org.smooks.model.javabean.Bean" />
+ </jb:bean>
+
+ <!--
+ Top level writer...
+ -->
+ <dmb:writer beanId="smooksModel" class="org.milyn.javabean.dynamic.serialize.freemarker.FreeMarkerBeanWriter">
+ <param name="template">/org/jboss/tools/smooks/model/core/v1.1.ftl</param>
+ </dmb:writer>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/core/v1.1.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/Binding.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/Binding.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/Binding.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,47 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.csv;
+
+/**
+ * CSV Reader inline binding configuration.
+ *
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public abstract class Binding {
+
+ private String beanId;
+ private String beanClass;
+
+ public String getBeanId() {
+ return beanId;
+ }
+
+ public void setBeanId(String beanId) {
+ this.beanId = beanId;
+ }
+
+ public String getBeanClass() {
+ return beanClass;
+ }
+
+ public void setBeanClass(String beanClass) {
+ this.beanClass = beanClass;
+ }
+}
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/Binding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/CSVReader.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/CSVReader.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/CSVReader.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,143 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.csv;
+
+import org.jboss.tools.smooks.model.core.Reader;
+import org.milyn.javabean.dynamic.serialize.DefaultNamespace;
+
+/**
+ * CSV Reader component.
+ *
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+@DefaultNamespace(uri = "http://www.milyn.org/xsd/smooks/csv-1.3.xsd", prefix = "csv13")
+public class CSVReader implements Reader {
+
+ private String fields;
+ private Character separator;
+ private Character quote;
+ private Integer skipLines;
+ private String rootElementName;
+ private String recordElementName;
+ private Boolean indent;
+ private Boolean strict;
+ private Boolean validateHeader;
+
+ // Only one of the following binding configs will be wired into this bean...
+ private SingleBinding singleBinding;
+ private ListBinding listBinding;
+ private MapBinding mapBinding;
+
+ public String getFields() {
+ return fields;
+ }
+
+ public void setFields(String fields) {
+ this.fields = fields;
+ }
+
+ public Character getSeparator() {
+ return separator;
+ }
+
+ public void setSeparator(Character separator) {
+ this.separator = separator;
+ }
+
+ public Character getQuote() {
+ return quote;
+ }
+
+ public void setQuote(Character quote) {
+ this.quote = quote;
+ }
+
+ public Integer getSkipLines() {
+ return skipLines;
+ }
+
+ public void setSkipLines(Integer skipLines) {
+ this.skipLines = skipLines;
+ }
+
+ public String getRootElementName() {
+ return rootElementName;
+ }
+
+ public void setRootElementName(String rootElementName) {
+ this.rootElementName = rootElementName;
+ }
+
+ public String getRecordElementName() {
+ return recordElementName;
+ }
+
+ public void setRecordElementName(String recordElementName) {
+ this.recordElementName = recordElementName;
+ }
+
+ public Boolean isIndent() {
+ return indent;
+ }
+
+ public void setIndent(Boolean indent) {
+ this.indent = indent;
+ }
+
+ public Boolean isStrict() {
+ return strict;
+ }
+
+ public void setStrict(Boolean strict) {
+ this.strict = strict;
+ }
+
+ public Boolean isValidateHeader() {
+ return validateHeader;
+ }
+
+ public void setValidateHeader(Boolean validateHeader) {
+ this.validateHeader = validateHeader;
+ }
+
+ public SingleBinding getSingleBinding() {
+ return singleBinding;
+ }
+
+ public void setSingleBinding(SingleBinding singleBinding) {
+ this.singleBinding = singleBinding;
+ }
+
+ public ListBinding getListBinding() {
+ return listBinding;
+ }
+
+ public void setListBinding(ListBinding listBinding) {
+ this.listBinding = listBinding;
+ }
+
+ public MapBinding getMapBinding() {
+ return mapBinding;
+ }
+
+ public void setMapBinding(MapBinding mapBinding) {
+ this.mapBinding = mapBinding;
+ }
+}
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/CSVReader.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/ListBinding.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/ListBinding.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/ListBinding.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,27 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.csv;
+
+/**
+ * Object List CSV binding.
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public class ListBinding extends Binding {
+}
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/ListBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/MapBinding.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/MapBinding.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/MapBinding.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,37 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.csv;
+
+/**
+ * {@link java.util.Map} binding.
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public class MapBinding extends Binding {
+
+ private String keyField;
+
+ public String getKeyField() {
+ return keyField;
+ }
+
+ public void setKeyField(String keyField) {
+ this.keyField = keyField;
+ }
+}
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/MapBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/SingleBinding.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/SingleBinding.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/SingleBinding.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,27 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.csv;
+
+/**
+ * Single object CSV binding.
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public class SingleBinding extends Binding {
+}
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/SingleBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_2/v1.2.ftl
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_2/v1.2.ftl (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_2/v1.2.ftl 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,15 @@
+<#if bean.singleBinding??>
+ <${nsp}:reader <@writeAttribs attribs="fields,separator,quote,skipLines,rootElementName,recordElementName,indent" /> >
+ <${nsp}:singleBinding <@writeAttribs attribs="beanId,beanClass@class" bean=bean.singleBinding /> />
+ </${nsp}:reader>
+<#elseif bean.listBinding??>
+ <${nsp}:reader <@writeAttribs attribs="fields,separator,quote,skipLines,rootElementName,recordElementName,indent" /> >
+ <${nsp}:listBinding <@writeAttribs attribs="beanId,beanClass@class" bean=bean.listBinding /> />
+ </${nsp}:reader>
+<#elseif bean.mapBinding??>
+ <${nsp}:reader <@writeAttribs attribs="fields,separator,quote,skipLines,rootElementName,recordElementName,indent" /> >
+ <${nsp}:mapBinding <@writeAttribs attribs="beanId,beanClass@class,keyField" bean=bean.mapBinding /> />
+ </${nsp}:reader>
+<#else>
+ <${nsp}:reader <@writeAttribs attribs="fields,separator,quote,skipLines,rootElementName,recordElementName,indent" /> />
+</#if>
\ No newline at end of file
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_2/v1.2.xml
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_2/v1.2.xml (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_2/v1.2.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.4.xsd"
+ xmlns:dmb="http://www.milyn.org/xsd/smooks/dmb-1.4.xsd">
+
+ <!-- Binding configs (unmarshal)... -->
+
+ <jb:bean beanId="csvReader" class="org.smooks.model.csv.CSVReader" createOnElement="reader">
+ <jb:value property="fields" data="reader/@fields" />
+ <jb:value property="separator" data="reader/@separator" />
+ <jb:value property="quote" data="reader/@quote" />
+ <jb:value property="skipLines" data="reader/@skipLines" />
+ <jb:value property="rootElementName" data="reader/@rootElementName" />
+ <jb:value property="recordElementName" data="reader/@recordElementName" />
+ <jb:value property="indent" data="reader/@indent" />
+
+ <!-- only one of the following will be wired in... -->
+ <jb:wiring property="singleBinding" beanIdRef="singleBinding" />
+ <jb:wiring property="listBinding" beanIdRef="listBinding" />
+ <jb:wiring property="mapBinding" beanIdRef="mapBinding" />
+ </jb:bean>
+ <jb:bean beanId="singleBinding" class="org.smooks.model.csv.SingleBinding" createOnElement="reader/singleBinding">
+ <jb:value property="beanId" data="reader/singleBinding/@beanId" />
+ <jb:value property="beanClass" data="reader/singleBinding/@class" />
+ </jb:bean>
+ <jb:bean beanId="listBinding" class="org.smooks.model.csv.ListBinding" createOnElement="reader/listBinding">
+ <jb:value property="beanId" data="reader/listBinding/@beanId" />
+ <jb:value property="beanClass" data="reader/listBinding/@class" />
+ </jb:bean>
+ <jb:bean beanId="mapBinding" class="org.smooks.model.csv.MapBinding" createOnElement="reader/mapBinding">
+ <jb:value property="beanId" data="reader/mapBinding/@beanId" />
+ <jb:value property="beanClass" data="reader/mapBinding/@class" />
+ <jb:value property="keyField" data="reader/mapBinding/@keyField" />
+ </jb:bean>
+
+ <!-- Writers (marshal)... -->
+
+ <dmb:writer beanId="csvReader" class="org.milyn.javabean.dynamic.serialize.freemarker.FreeMarkerBeanWriter">
+ <param name="template">/org/jboss/tools/smooks/model/csv/v1_2/v1.2.ftl</param>
+ </dmb:writer>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_2/v1.2.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_3/v1.3.ftl
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_3/v1.3.ftl (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_3/v1.3.ftl 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,15 @@
+<#if bean.singleBinding??>
+ <${nsp}:reader <@writeAttribs attribs="fields,separator,quote,skipLines,rootElementName,recordElementName,indent,strict,validateHeader" /> >
+ <${nsp}:singleBinding <@writeAttribs attribs="beanId,beanClass@class" bean=bean.singleBinding /> />
+ </${nsp}:reader>
+<#elseif bean.listBinding??>
+ <${nsp}:reader <@writeAttribs attribs="fields,separator,quote,skipLines,rootElementName,recordElementName,indent,strict,validateHeader" /> >
+ <${nsp}:listBinding <@writeAttribs attribs="beanId,beanClass@class" bean=bean.listBinding /> />
+ </${nsp}:reader>
+<#elseif bean.mapBinding??>
+ <${nsp}:reader <@writeAttribs attribs="fields,separator,quote,skipLines,rootElementName,recordElementName,indent,strict,validateHeader" /> >
+ <${nsp}:mapBinding <@writeAttribs attribs="beanId,beanClass@class,keyField" bean=bean.mapBinding /> />
+ </${nsp}:reader>
+<#else>
+ <${nsp}:reader <@writeAttribs attribs="fields,separator,quote,skipLines,rootElementName,recordElementName,indent,strict,validateHeader" /> />
+</#if>
\ No newline at end of file
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_3/v1.3.xml
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_3/v1.3.xml (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_3/v1.3.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.4.xsd"
+ xmlns:dmb="http://www.milyn.org/xsd/smooks/dmb-1.4.xsd">
+
+ <!-- Binding configs (unmarshal)... -->
+
+ <jb:bean beanId="csvReader" class="org.smooks.model.csv.CSVReader" createOnElement="reader">
+ <jb:value property="fields" data="reader/@fields" />
+ <jb:value property="separator" data="reader/@separator" />
+ <jb:value property="quote" data="reader/@quote" />
+ <jb:value property="skipLines" data="reader/@skipLines" />
+ <jb:value property="rootElementName" data="reader/@rootElementName" />
+ <jb:value property="recordElementName" data="reader/@recordElementName" />
+ <jb:value property="indent" data="reader/@indent" />
+ <jb:value property="strict" data="reader/@strict" />
+ <jb:value property="validateHeader" data="reader/@validateHeader" />
+
+ <!-- only one of the following will be wired in... -->
+ <jb:wiring property="singleBinding" beanIdRef="singleBinding" />
+ <jb:wiring property="listBinding" beanIdRef="listBinding" />
+ <jb:wiring property="mapBinding" beanIdRef="mapBinding" />
+ </jb:bean>
+ <jb:bean beanId="singleBinding" class="org.smooks.model.csv.SingleBinding" createOnElement="reader/singleBinding">
+ <jb:value property="beanId" data="reader/singleBinding/@beanId" />
+ <jb:value property="beanClass" data="reader/singleBinding/@class" />
+ </jb:bean>
+ <jb:bean beanId="listBinding" class="org.smooks.model.csv.ListBinding" createOnElement="reader/listBinding">
+ <jb:value property="beanId" data="reader/listBinding/@beanId" />
+ <jb:value property="beanClass" data="reader/listBinding/@class" />
+ </jb:bean>
+ <jb:bean beanId="mapBinding" class="org.smooks.model.csv.MapBinding" createOnElement="reader/mapBinding">
+ <jb:value property="beanId" data="reader/mapBinding/@beanId" />
+ <jb:value property="beanClass" data="reader/mapBinding/@class" />
+ <jb:value property="keyField" data="reader/mapBinding/@keyField" />
+ </jb:bean>
+
+ <!-- Writers (marshal)... -->
+
+ <dmb:writer beanId="csvReader" class="org.milyn.javabean.dynamic.serialize.freemarker.FreeMarkerBeanWriter">
+ <param name="template">/org/jboss/tools/smooks/model/csv/v1_3/v1.3.ftl</param>
+ </dmb:writer>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/csv/v1_3/v1.3.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Bean.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Bean.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Bean.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,99 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.javabean;
+
+import org.milyn.javabean.dynamic.serialize.DefaultNamespace;
+
+import java.util.List;
+
+/**
+ * Bean configuration.
+ * <p/>
+ * Corresponds to the top level <jb:bean> element.
+ *
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+@DefaultNamespace(uri = "http://www.milyn.org/xsd/smooks/javabean-1.3.xsd", prefix = "jb13")
+public class Bean {
+
+ private String beanId;
+ private String beanClass;
+ private String createOnElement;
+ private String createOnElementNS;
+ private List<Value> valueBindings;
+ private List<Wiring> wireBindings;
+ private List<Expression> expressionBindings;
+
+ public String getBeanId() {
+ return beanId;
+ }
+
+ public void setBeanId(String beanId) {
+ this.beanId = beanId;
+ }
+
+ public String getBeanClass() {
+ return beanClass;
+ }
+
+ public void setBeanClass(String beanClass) {
+ this.beanClass = beanClass;
+ }
+
+ public String getCreateOnElement() {
+ return createOnElement;
+ }
+
+ public void setCreateOnElement(String createOnElement) {
+ this.createOnElement = createOnElement;
+ }
+
+ public String getCreateOnElementNS() {
+ return createOnElementNS;
+ }
+
+ public void setCreateOnElementNS(String createOnElementNS) {
+ this.createOnElementNS = createOnElementNS;
+ }
+
+ public List<Value> getValueBindings() {
+ return valueBindings;
+ }
+
+ public void setValueBindings(List<Value> valueBindings) {
+ this.valueBindings = valueBindings;
+ }
+
+ public List<Wiring> getWireBindings() {
+ return wireBindings;
+ }
+
+ public void setWireBindings(List<Wiring> wireBindings) {
+ this.wireBindings = wireBindings;
+ }
+
+ public List<Expression> getExpressionBindings() {
+ return expressionBindings;
+ }
+
+ public void setExpressionBindings(List<Expression> expressionBindings) {
+ this.expressionBindings = expressionBindings;
+ }
+}
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Bean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Binding.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Binding.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Binding.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,46 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.javabean;
+
+/**
+ * Abstract base class for binding configuration sub types.
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public abstract class Binding {
+
+ private String property;
+ private String setterMethod;
+
+ public String getProperty() {
+ return property;
+ }
+
+ public void setProperty(String property) {
+ this.property = property;
+ }
+
+ public String getSetterMethod() {
+ return setterMethod;
+ }
+
+ public void setSetterMethod(String setterMethod) {
+ this.setterMethod = setterMethod;
+ }
+}
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Binding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/DecodeParam.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/DecodeParam.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/DecodeParam.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,47 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.javabean;
+
+/**
+ * Decode Parameter.
+ *
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public class DecodeParam {
+
+ private String name;
+ private String value;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/DecodeParam.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Expression.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Expression.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Expression.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,56 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.javabean;
+
+/**
+ * Expression based binding configuration.
+ *
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public class Expression extends Binding {
+
+ private String execOnElement;
+ private String execOnElementNS;
+ private String initVal;
+
+ public String getExecOnElement() {
+ return execOnElement;
+ }
+
+ public void setExecOnElement(String execOnElement) {
+ this.execOnElement = execOnElement;
+ }
+
+ public String getExecOnElementNS() {
+ return execOnElementNS;
+ }
+
+ public void setExecOnElementNS(String execOnElementNS) {
+ this.execOnElementNS = execOnElementNS;
+ }
+
+ public String getInitVal() {
+ return initVal;
+ }
+
+ public void setInitVal(String initVal) {
+ this.initVal = initVal;
+ }
+}
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Expression.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Value.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Value.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Value.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,76 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.javabean;
+
+import java.util.List;
+
+/**
+ * Value binding configuration.
+ *
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public class Value extends Binding {
+
+ private String data;
+ private String dataNS;
+ private String decoder;
+ private String defaultVal;
+ private List<DecodeParam> decodeParams;
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getDataNS() {
+ return dataNS;
+ }
+
+ public void setDataNS(String dataNS) {
+ this.dataNS = dataNS;
+ }
+
+ public String getDecoder() {
+ return decoder;
+ }
+
+ public void setDecoder(String decoder) {
+ this.decoder = decoder;
+ }
+
+ public String getDefaultVal() {
+ return defaultVal;
+ }
+
+ public void setDefaultVal(String defaultVal) {
+ this.defaultVal = defaultVal;
+ }
+
+ public List<DecodeParam> getDecodeParams() {
+ return decodeParams;
+ }
+
+ public void setDecodeParams(List<DecodeParam> decodeParams) {
+ this.decodeParams = decodeParams;
+ }
+}
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Value.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Wiring.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Wiring.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Wiring.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,56 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.javabean;
+
+/**
+ * Wiring binding configuration.
+ *
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public class Wiring extends Binding {
+
+ private String beanIdRef;
+ private String wireOnElement;
+ private String wireOnElementNS;
+
+ public String getBeanIdRef() {
+ return beanIdRef;
+ }
+
+ public void setBeanIdRef(String beanIdRef) {
+ this.beanIdRef = beanIdRef;
+ }
+
+ public String getWireOnElement() {
+ return wireOnElement;
+ }
+
+ public void setWireOnElement(String wireOnElement) {
+ this.wireOnElement = wireOnElement;
+ }
+
+ public String getWireOnElementNS() {
+ return wireOnElementNS;
+ }
+
+ public void setWireOnElementNS(String wireOnElementNS) {
+ this.wireOnElementNS = wireOnElementNS;
+ }
+}
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/Wiring.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_1/v1.1.ftl
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_1/v1.1.ftl (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_1/v1.1.ftl 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,25 @@
+<#assign numChildElemenst = (bean.valueBindings?size + bean.wireBindings?size + bean.expressionBindings?size) >
+<#if (numChildElemenst > 0)>
+ <${nsp}:bindings <@writeAttribs attribs="beanId,beanClass@class,createOnElement,createOnElementNS"/>>
+ <#list bean.valueBindings as valueBinding>
+ <#assign numDecodeParams = (valueBinding.decodeParams?size) >
+ <#if (numDecodeParams > 0)>
+ <${nsp}:value <@writeAttribs bean=valueBinding attribs="property,setterMethod,data,dataNS,decoder,defaultVal@default"/>>
+ <#list valueBinding.decodeParams as decodeParam>
+ <${nsp}:decodeParam <@writeAttribs bean=decodeParam attribs="name"/>>${decodeParam.value}</${nsp}:decodeParam>
+ </#list>
+ </${nsp}:value>
+ <#else>
+ <${nsp}:value <@writeAttribs bean=valueBinding attribs="property,setterMethod,data,dataNS,decoder,defaultVal@default"/> />
+ </#if>
+ </#list>
+ <#list bean.wireBindings as wireBinding>
+ <${nsp}:wiring <@writeAttribs bean=wireBinding attribs="property,setterMethod,beanIdRef,wireOnElement,wireOnElementNS"/> />
+ </#list>
+ <#list bean.expressionBindings as expressionBinding>
+ <${nsp}:expression <@writeAttribs bean=expressionBinding attribs="property,setterMethod,execOnElement,execOnElementNS"/> />
+ </#list>
+ </${nsp}:bindings>
+<#else>
+ <${nsp}:bindings <@writeAttribs attribs="beanId,beanClass@class,createOnElement,createOnElementNS"/> />
+</#if>
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_1/v1.1.xml
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_1/v1.1.xml (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_1/v1.1.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.4.xsd"
+ xmlns:dmb="http://www.milyn.org/xsd/smooks/dmb-1.4.xsd">
+
+ <!-- Binding configs (unmarshal)... -->
+
+ <jb:bean beanId="javaBean" class="org.smooks.model.javabean.Bean" createOnElement="bindings">
+ <jb:value property="beanId" data="bindings/@beanId" />
+ <jb:value property="beanClass" data="bindings/@class" />
+ <jb:value property="createOnElement" data="bindings/@createOnElement" />
+ <jb:value property="createOnElementNS" data="bindings/@createOnElementNS" />
+
+ <jb:wiring property="valueBindings" beanIdRef="valueBindings" />
+ <jb:wiring property="expressionBindings" beanIdRef="expressionBindings" />
+ <jb:wiring property="wireBindings" beanIdRef="wireBindings" />
+ </jb:bean>
+
+ <jb:bean beanId="valueBindings" class="java.util.ArrayList" createOnElement="bindings">
+ <jb:wiring beanIdRef="valueBinding" />
+ </jb:bean>
+ <jb:bean beanId="valueBinding" class="org.smooks.model.javabean.Value" createOnElement="bindings/value">
+ <jb:value property="property" data="bindings/value/@property" />
+ <jb:value property="setterMethod" data="bindings/value/@setterMethod" />
+ <jb:value property="data" data="bindings/value/@data" />
+ <jb:value property="dataNS" data="bindings/value/@dataNS" />
+ <jb:value property="decoder" data="bindings/value/@decoder" />
+ <jb:value property="defaultVal" data="bindings/value/@default" />
+ <jb:wiring property="decodeParams" beanIdRef="decodeParams" />
+ </jb:bean>
+ <jb:bean beanId="decodeParams" class="java.util.ArrayList" createOnElement="bindings/value">
+ <jb:wiring beanIdRef="decodeParam" />
+ </jb:bean>
+ <jb:bean beanId="decodeParam" class="org.smooks.model.javabean.DecodeParam" createOnElement="bindings/value/decodeParam">
+ <jb:value property="name" data="decodeParam/@name" />
+ <jb:value property="value" data="decodeParam" />
+ </jb:bean>
+
+ <jb:bean beanId="expressionBindings" class="java.util.ArrayList" createOnElement="bindings">
+ <jb:wiring beanIdRef="expressionBinding" />
+ </jb:bean>
+ <jb:bean beanId="expressionBinding" class="org.smooks.model.javabean.Expression" createOnElement="bindings/expression">
+ <jb:value property="property" data="bindings/expression/@property" />
+ <jb:value property="setterMethod" data="bindings/expression/@setterMethod" />
+ <jb:value property="execOnElement" data="bindings/expression/@execOnElement" />
+ <jb:value property="execOnElementNS" data="bindings/expression/@execOnElementNS" />
+ <jb:value property="initVal" data="bindings/expression/@initVal" />
+ </jb:bean>
+
+ <jb:bean beanId="wireBindings" class="java.util.ArrayList" createOnElement="bindings">
+ <jb:wiring beanIdRef="wireBinding" />
+ </jb:bean>
+ <jb:bean beanId="wireBinding" class="org.smooks.model.javabean.Wiring" createOnElement="bindings/wiring">
+ <jb:value property="property" data="bindings/wiring/@property" />
+ <jb:value property="setterMethod" data="bindings/wiring/@setterMethod" />
+ <jb:value property="beanIdRef" data="bindings/wiring/@beanIdRef" />
+ <jb:value property="wireOnElement" data="bindings/wiring/@wireOnElement" />
+ <jb:value property="wireOnElementNS" data="bindings/wiring/@wireOnElementNS" />
+ </jb:bean>
+
+ <!-- Writers (marshal)... -->
+
+ <dmb:writer beanId="javaBean" class="org.milyn.javabean.dynamic.serialize.freemarker.FreeMarkerBeanWriter">
+ <param name="template">/org/jboss/tools/smooks/model/javabean/v1_1/v1.1.ftl</param>
+ </dmb:writer>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_1/v1.1.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_2/v1.2.ftl
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_2/v1.2.ftl (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_2/v1.2.ftl 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,25 @@
+<#assign numChildElemenst = (bean.valueBindings?size + bean.wireBindings?size + bean.expressionBindings?size) >
+<#if (numChildElemenst > 0)>
+ <${nsp}:bean <@writeAttribs attribs="beanId,beanClass@class,createOnElement,createOnElementNS"/>>
+ <#list bean.valueBindings as valueBinding>
+ <#assign numDecodeParams = (valueBinding.decodeParams?size) >
+ <#if (numDecodeParams > 0)>
+ <${nsp}:value <@writeAttribs bean=valueBinding attribs="property,setterMethod,data,dataNS,decoder,defaultVal@default"/>>
+ <#list valueBinding.decodeParams as decodeParam>
+ <${nsp}:decodeParam <@writeAttribs bean=decodeParam attribs="name"/>>${decodeParam.value}</${nsp}:decodeParam>
+ </#list>
+ </${nsp}:value>
+ <#else>
+ <${nsp}:value <@writeAttribs bean=valueBinding attribs="property,setterMethod,data,dataNS,decoder,defaultVal@default"/> />
+ </#if>
+ </#list>
+ <#list bean.wireBindings as wireBinding>
+ <${nsp}:wiring <@writeAttribs bean=wireBinding attribs="property,setterMethod,beanIdRef,wireOnElement,wireOnElementNS"/> />
+ </#list>
+ <#list bean.expressionBindings as expressionBinding>
+ <${nsp}:expression <@writeAttribs bean=expressionBinding attribs="property,setterMethod,execOnElement,execOnElementNS,initVal"/> />
+ </#list>
+ </${nsp}:bean>
+<#else>
+ <${nsp}:bean <@writeAttribs attribs="beanId,beanClass@class,createOnElement,createOnElementNS"/> />
+</#if>
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_2/v1.2.xml
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_2/v1.2.xml (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_2/v1.2.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.4.xsd"
+ xmlns:dmb="http://www.milyn.org/xsd/smooks/dmb-1.4.xsd">
+
+ <!-- Binding configs (unmarshal)... -->
+
+ <jb:bean beanId="javaBean" class="org.smooks.model.javabean.Bean" createOnElement="bean">
+ <jb:value property="beanId" data="bean/@beanId" />
+ <jb:value property="beanClass" data="bean/@class" />
+ <jb:value property="createOnElement" data="bean/@createOnElement" />
+ <jb:value property="createOnElementNS" data="bean/@createOnElementNS" />
+
+ <jb:wiring property="valueBindings" beanIdRef="valueBindings" />
+ <jb:wiring property="expressionBindings" beanIdRef="expressionBindings" />
+ <jb:wiring property="wireBindings" beanIdRef="wireBindings" />
+ </jb:bean>
+
+ <jb:bean beanId="valueBindings" class="java.util.ArrayList" createOnElement="bean">
+ <jb:wiring beanIdRef="valueBinding" />
+ </jb:bean>
+ <jb:bean beanId="valueBinding" class="org.smooks.model.javabean.Value" createOnElement="bean/value">
+ <jb:value property="property" data="bean/value/@property" />
+ <jb:value property="setterMethod" data="bean/value/@setterMethod" />
+ <jb:value property="data" data="bean/value/@data" />
+ <jb:value property="dataNS" data="bean/value/@dataNS" />
+ <jb:value property="decoder" data="bean/value/@decoder" />
+ <jb:value property="defaultVal" data="bean/value/@default" />
+ <jb:wiring property="decodeParams" beanIdRef="decodeParams" />
+ </jb:bean>
+ <jb:bean beanId="decodeParams" class="java.util.ArrayList" createOnElement="bean/value">
+ <jb:wiring beanIdRef="decodeParam" />
+ </jb:bean>
+ <jb:bean beanId="decodeParam" class="org.smooks.model.javabean.DecodeParam" createOnElement="bean/value/decodeParam">
+ <jb:value property="name" data="decodeParam/@name" />
+ <jb:value property="value" data="decodeParam" />
+ </jb:bean>
+
+ <jb:bean beanId="expressionBindings" class="java.util.ArrayList" createOnElement="bean">
+ <jb:wiring beanIdRef="expressionBinding" />
+ </jb:bean>
+ <jb:bean beanId="expressionBinding" class="org.smooks.model.javabean.Expression" createOnElement="bean/expression">
+ <jb:value property="property" data="bean/expression/@property" />
+ <jb:value property="setterMethod" data="bean/expression/@setterMethod" />
+ <jb:value property="execOnElement" data="bean/expression/@execOnElement" />
+ <jb:value property="execOnElementNS" data="bean/expression/@execOnElementNS" />
+ <jb:value property="initVal" data="bean/expression/@initVal" />
+ </jb:bean>
+
+ <jb:bean beanId="wireBindings" class="java.util.ArrayList" createOnElement="bean">
+ <jb:wiring beanIdRef="wireBinding" />
+ </jb:bean>
+ <jb:bean beanId="wireBinding" class="org.smooks.model.javabean.Wiring" createOnElement="bean/wiring">
+ <jb:value property="property" data="bean/wiring/@property" />
+ <jb:value property="setterMethod" data="bean/wiring/@setterMethod" />
+ <jb:value property="beanIdRef" data="bean/wiring/@beanIdRef" />
+ <jb:value property="wireOnElement" data="bean/wiring/@wireOnElement" />
+ <jb:value property="wireOnElementNS" data="bean/wiring/@wireOnElementNS" />
+ </jb:bean>
+
+ <!-- Writers (marshal)... -->
+
+ <dmb:writer beanId="javaBean" class="org.milyn.javabean.dynamic.serialize.freemarker.FreeMarkerBeanWriter">
+ <param name="template">/org/jboss/tools/smooks/model/javabean/v1_2/v1.2.ftl</param>
+ </dmb:writer>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_2/v1.2.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_3/v1.3.ftl
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_3/v1.3.ftl (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_3/v1.3.ftl 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,25 @@
+<#assign numChildElemenst = (bean.valueBindings?size + bean.wireBindings?size + bean.expressionBindings?size) >
+<#if (numChildElemenst > 0)>
+ <${nsp}:bean <@writeAttribs attribs="beanId,beanClass@class,createOnElement"/>>
+ <#list bean.valueBindings as valueBinding>
+ <#assign numDecodeParams = (valueBinding.decodeParams?size) >
+ <#if (numDecodeParams > 0)>
+ <${nsp}:value <@writeAttribs bean=valueBinding attribs="property,setterMethod,data,decoder,defaultVal@default"/>>
+ <#list valueBinding.decodeParams as decodeParam>
+ <${nsp}:decodeParam <@writeAttribs bean=decodeParam attribs="name"/>>${decodeParam.value}</${nsp}:decodeParam>
+ </#list>
+ </${nsp}:value>
+ <#else>
+ <${nsp}:value <@writeAttribs bean=valueBinding attribs="property,setterMethod,data,decoder,defaultVal@default"/> />
+ </#if>
+ </#list>
+ <#list bean.wireBindings as wireBinding>
+ <${nsp}:wiring <@writeAttribs bean=wireBinding attribs="property,setterMethod,beanIdRef,wireOnElement"/> />
+ </#list>
+ <#list bean.expressionBindings as expressionBinding>
+ <${nsp}:expression <@writeAttribs bean=expressionBinding attribs="property,setterMethod,execOnElement,initVal"/> />
+ </#list>
+ </${nsp}:bean>
+<#else>
+ <${nsp}:bean <@writeAttribs attribs="beanId,beanClass@class,createOnElement"/> />
+</#if>
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_3/v1.3.xml
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_3/v1.3.xml (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_3/v1.3.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.4.xsd"
+ xmlns:dmb="http://www.milyn.org/xsd/smooks/dmb-1.4.xsd">
+
+ <!-- Binding configs (unmarshal)... -->
+
+ <jb:bean beanId="javaBean" class="org.smooks.model.javabean.Bean" createOnElement="bean">
+ <jb:value property="beanId" data="bean/@beanId" />
+ <jb:value property="beanClass" data="bean/@class" />
+ <jb:value property="createOnElement" data="bean/@createOnElement" />
+ <jb:value property="createOnElementNS" data="bean/@createOnElementNS" />
+
+ <jb:wiring property="valueBindings" beanIdRef="valueBindings" />
+ <jb:wiring property="expressionBindings" beanIdRef="expressionBindings" />
+ <jb:wiring property="wireBindings" beanIdRef="wireBindings" />
+ </jb:bean>
+
+ <jb:bean beanId="valueBindings" class="java.util.ArrayList" createOnElement="bean">
+ <jb:wiring beanIdRef="valueBinding" />
+ </jb:bean>
+ <jb:bean beanId="valueBinding" class="org.smooks.model.javabean.Value" createOnElement="bean/value">
+ <jb:value property="property" data="bean/value/@property" />
+ <jb:value property="setterMethod" data="bean/value/@setterMethod" />
+ <jb:value property="data" data="bean/value/@data" />
+ <jb:value property="dataNS" data="bean/value/@dataNS" />
+ <jb:value property="decoder" data="bean/value/@decoder" />
+ <jb:value property="defaultVal" data="bean/value/@default" />
+ <jb:wiring property="decodeParams" beanIdRef="decodeParams" />
+ </jb:bean>
+ <jb:bean beanId="decodeParams" class="java.util.ArrayList" createOnElement="bean/value">
+ <jb:wiring beanIdRef="decodeParam" />
+ </jb:bean>
+ <jb:bean beanId="decodeParam" class="org.smooks.model.javabean.DecodeParam" createOnElement="bean/value/decodeParam">
+ <jb:value property="name" data="decodeParam/@name" />
+ <jb:value property="value" data="decodeParam" />
+ </jb:bean>
+
+ <jb:bean beanId="expressionBindings" class="java.util.ArrayList" createOnElement="bean">
+ <jb:wiring beanIdRef="expressionBinding" />
+ </jb:bean>
+ <jb:bean beanId="expressionBinding" class="org.smooks.model.javabean.Expression" createOnElement="bean/expression">
+ <jb:value property="property" data="bean/expression/@property" />
+ <jb:value property="setterMethod" data="bean/expression/@setterMethod" />
+ <jb:value property="execOnElement" data="bean/expression/@execOnElement" />
+ <jb:value property="execOnElementNS" data="bean/expression/@execOnElementNS" />
+ <jb:value property="initVal" data="bean/expression/@initVal" />
+ </jb:bean>
+
+ <jb:bean beanId="wireBindings" class="java.util.ArrayList" createOnElement="bean">
+ <jb:wiring beanIdRef="wireBinding" />
+ </jb:bean>
+ <jb:bean beanId="wireBinding" class="org.smooks.model.javabean.Wiring" createOnElement="bean/wiring">
+ <jb:value property="property" data="bean/wiring/@property" />
+ <jb:value property="setterMethod" data="bean/wiring/@setterMethod" />
+ <jb:value property="beanIdRef" data="bean/wiring/@beanIdRef" />
+ <jb:value property="wireOnElement" data="bean/wiring/@wireOnElement" />
+ <jb:value property="wireOnElementNS" data="bean/wiring/@wireOnElementNS" />
+ </jb:bean>
+
+ <!-- Writers (marshal)... -->
+
+ <dmb:writer beanId="javaBean" class="org.milyn.javabean.dynamic.serialize.freemarker.FreeMarkerBeanWriter">
+ <param name="template">/org/jboss/tools/smooks/model/javabean/v1_3/v1.3.ftl</param>
+ </dmb:writer>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/javabean/v1_3/v1.3.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/plugin/SmooksModelActivator.java
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/plugin/SmooksModelActivator.java (rev 0)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/plugin/SmooksModelActivator.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,30 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.model.plugin;
+
+import org.eclipse.core.runtime.Plugin;
+
+/**
+ * Plugin Activator.
+ *
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public class SmooksModelActivator extends Plugin {
+}
Property changes on: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.model/src/org/jboss/tools/smooks/model/plugin/SmooksModelActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.runtime/META-INF/MANIFEST.MF
===================================================================
--- workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.runtime/META-INF/MANIFEST.MF 2010-06-04 13:38:00 UTC (rev 22545)
+++ workspace/smooks-dmb/smooks/plugins/org.jboss.tools.smooks.runtime/META-INF/MANIFEST.MF 2010-06-04 14:49:45 UTC (rev 22546)
@@ -41,7 +41,14 @@
org.milyn.delivery.sax,
org.milyn.io,
org.milyn.javabean,
+ org.milyn.javabean.context,
org.milyn.javabean.decoders,
+ org.milyn.javabean.dynamic,
+ org.milyn.javabean.dynamic.ext,
+ org.milyn.javabean.dynamic.resolvers,
+ org.milyn.javabean.dynamic.serialize,
+ org.milyn.javabean.dynamic.serialize.freemarker,
+ org.milyn.javabean.dynamic.visitor,
org.milyn.json,
org.milyn.payload,
org.milyn.smooks.edi,
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/META-INF/MANIFEST.MF
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/META-INF/MANIFEST.MF (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/META-INF/MANIFEST.MF 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.jboss.tools.smooks.model.test
+Bundle-Version: 1.1.0.qualifier
+Bundle-ClassPath: lib/xmlunit-1.1.jar,
+ .
+Bundle-Vendor: %Bundle-Vendor.0
+Bundle-Localization: plugin
+Require-Bundle: org.junit,
+ org.jboss.tools.smooks.runtime,
+ org.eclipse.core.runtime,
+ org.jboss.tools.smooks.model
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/build.properties
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/build.properties (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/build.properties 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,7 @@
+output.. = bin/
+bin.includes = META-INF/,\
+ plugin.properties,\
+ projects/,\
+ lib/xmlunit-1.1.jar,\
+ .
+source.. = src/
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/lib/xmlunit-1.1.jar
===================================================================
(Binary files differ)
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/lib/xmlunit-1.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/plugin.properties
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/plugin.properties (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/plugin.properties 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,3 @@
+#Properties file for org.jboss.tools.smooks.test
+Bundle-Vendor.0 = JBoss by Red Hat
+Bundle-Name.0 = Smooks Tools Model Test Plug-in
\ No newline at end of file
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/pom.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/pom.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/pom.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,14 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>../../../parent-pom.xml</relativePath>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.smooks.model.test</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/pom.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/CSVReader_1_2_Test.java
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/CSVReader_1_2_Test.java (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/CSVReader_1_2_Test.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,103 @@
+/*
+ * Milyn - Copyright (C) 2006 - 2010
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License (version 2.1) as published by the Free Software
+ * Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License for more details:
+ * http://www.gnu.org/licenses/lgpl.txt
+ */
+
+package org.jboss.tools.smooks.model.csv;
+
+import junit.framework.TestCase;
+import org.custommonkey.xmlunit.XMLAssert;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.jboss.tools.smooks.model.core.SmooksModel;
+import org.milyn.javabean.dynamic.Model;
+import org.milyn.javabean.dynamic.ModelBuilder;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+/**
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public class CSVReader_1_2_Test extends TestCase {
+
+ private ModelBuilder modelBuilder;
+
+ public CSVReader_1_2_Test() throws IOException, SAXException {
+ modelBuilder = new ModelBuilder(SmooksModel.MODEL_DESCRIPTOR, false);
+ }
+
+ public void test_01() throws IOException, SAXException {
+ test("v1_2/csv-config-01.xml");
+ }
+
+ public void test_02() throws IOException, SAXException {
+ test("v1_2/csv-config-02.xml");
+ }
+
+ public void test_03() throws IOException, SAXException {
+ test("v1_2/csv-config-03.xml");
+ }
+
+ public void test_04() throws IOException, SAXException {
+ test("v1_2/csv-config-04.xml");
+ }
+
+ public void test(String messageFile) throws IOException, SAXException {
+ Model<SmooksModel> model = modelBuilder.readModel(getClass().getResourceAsStream(messageFile), SmooksModel.class);
+
+ StringWriter modelWriter = new StringWriter();
+ model.writeModel(modelWriter);
+// System.out.println(modelWriter);
+ XMLUnit.setIgnoreWhitespace( true );
+ XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream(messageFile)), new StringReader(modelWriter.toString()));
+ }
+
+ public void test_programmatic_build() throws IOException, SAXException {
+ SmooksModel smooksModel = new SmooksModel();
+ Model<SmooksModel> model = new Model<SmooksModel>(smooksModel, modelBuilder);
+ CSVReader csvReader = new CSVReader();
+
+ // Populate it...
+ csvReader.setFields("name,address,age");
+ csvReader.setRootElementName("people");
+ csvReader.setRecordElementName("person");
+ csvReader.setIndent(true);
+
+ // Set strict on the model... should have no effect as it's not supported in v1.2...
+ csvReader.setStrict(true);
+
+ // Need to register all the "namespace root" bean instances...
+ model.registerBean(csvReader).setNamespace("http://www.milyn.org/xsd/smooks/csv-1.2.xsd").setNamespacePrefix("csv12");
+
+ // Add it in the appropriate place in the object graph....
+ smooksModel.getReaders().add(csvReader);
+
+ ListBinding listBinding = new ListBinding();
+ listBinding.setBeanId("beanX");
+ listBinding.setBeanClass("com.acme.XClass");
+
+ // Add the ListBinding to the CSVReader, but no need to add it to the model since it is
+ // not a "namespace root" object...
+ csvReader.setListBinding(listBinding);
+
+ StringWriter modelWriter = new StringWriter();
+ model.writeModel(modelWriter);
+// System.out.println(modelWriter);
+ XMLUnit.setIgnoreWhitespace( true );
+ XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream("v1_2/csv-config-03.xml")), new StringReader(modelWriter.toString()));
+ }
+}
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/CSVReader_1_2_Test.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/CSVReader_1_3_Test.java
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/CSVReader_1_3_Test.java (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/CSVReader_1_3_Test.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,104 @@
+/*
+ * Milyn - Copyright (C) 2006 - 2010
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License (version 2.1) as published by the Free Software
+ * Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License for more details:
+ * http://www.gnu.org/licenses/lgpl.txt
+ */
+
+package org.jboss.tools.smooks.model.csv;
+
+import junit.framework.TestCase;
+import org.custommonkey.xmlunit.XMLAssert;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.jboss.tools.smooks.model.core.SmooksModel;
+import org.milyn.javabean.dynamic.Model;
+import org.milyn.javabean.dynamic.ModelBuilder;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+/**
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public class CSVReader_1_3_Test extends TestCase {
+
+ private ModelBuilder modelBuilder;
+
+ public CSVReader_1_3_Test() throws IOException, SAXException {
+ modelBuilder = new ModelBuilder(SmooksModel.MODEL_DESCRIPTOR, false);
+ }
+
+ public void test_01() throws IOException, SAXException {
+ test("v1_3/csv-config-01.xml");
+ }
+
+ public void test_02() throws IOException, SAXException {
+ test("v1_3/csv-config-02.xml");
+ }
+
+ public void test_03() throws IOException, SAXException {
+ test("v1_3/csv-config-03.xml");
+ }
+
+ public void test_04() throws IOException, SAXException {
+ test("v1_3/csv-config-04.xml");
+ }
+
+ public void test_05() throws IOException, SAXException {
+ test("v1_3/csv-config-05.xml");
+ }
+
+ public void test(String messageFile) throws IOException, SAXException {
+ Model<SmooksModel> model = modelBuilder.readModel(getClass().getResourceAsStream(messageFile), SmooksModel.class);
+
+ StringWriter modelWriter = new StringWriter();
+ model.writeModel(modelWriter);
+// System.out.println(modelWriter);
+ XMLUnit.setIgnoreWhitespace( true );
+ XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream(messageFile)), new StringReader(modelWriter.toString()));
+ }
+
+ public void test_programmatic_build() throws IOException, SAXException {
+ SmooksModel smooksModel = new SmooksModel();
+ Model<SmooksModel> model = new Model<SmooksModel>(smooksModel, modelBuilder);
+ CSVReader csvReader = new CSVReader();
+
+ // Populate it...
+ csvReader.setFields("name,address,age");
+ csvReader.setRootElementName("people");
+ csvReader.setRecordElementName("person");
+ csvReader.setIndent(true);
+
+ // Need to register all the "namespace root" bean instances...
+ model.registerBean(csvReader);
+
+ // Add it in the appropriate place in the object graph....
+ smooksModel.getReaders().add(csvReader);
+
+ ListBinding listBinding = new ListBinding();
+ listBinding.setBeanId("beanX");
+ listBinding.setBeanClass("com.acme.XClass");
+
+ // Add the ListBinding to the CSVReader, but no need to add it to the model since it is
+ // not a "namespace root" object...
+ csvReader.setListBinding(listBinding);
+
+ StringWriter modelWriter = new StringWriter();
+ model.writeModel(modelWriter);
+// System.out.println(modelWriter);
+ XMLUnit.setIgnoreWhitespace( true );
+ XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream("v1_3/csv-config-03.xml")), new StringReader(modelWriter.toString()));
+ }
+}
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/CSVReader_1_3_Test.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-01.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-01.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-01.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
+
+ <csv:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true"/>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-01.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-02.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-02.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-02.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
+
+ <!-- CSV Reader config... -->
+ <csv:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true">
+ <csv:singleBinding beanId="beanX" class="com.acme.XClass" />
+ </csv:reader>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-02.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-03.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-03.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-03.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
+
+ <csv:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true">
+ <csv:listBinding beanId="beanX" class="com.acme.XClass" />
+ </csv:reader>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-03.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-04.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-04.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-04.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
+
+ <!-- CSV Reader config... -->
+ <csv:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true">
+ <csv:mapBinding beanId="beanX" class="com.acme.XClass" keyField="name" />
+ </csv:reader>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_2/csv-config-04.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-01.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-01.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-01.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.3.xsd">
+
+ <csv:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true"/>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-01.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-02.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-02.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-02.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.3.xsd">
+
+ <!-- CSV Reader config... -->
+ <csv:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true">
+ <csv:singleBinding beanId="beanX" class="com.acme.XClass" />
+ </csv:reader>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-02.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-03.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-03.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-03.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.3.xsd">
+
+ <csv:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true">
+ <csv:listBinding beanId="beanX" class="com.acme.XClass" />
+ </csv:reader>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-03.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-04.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-04.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-04.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.3.xsd">
+
+ <!-- CSV Reader config... -->
+ <csv:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true">
+ <csv:mapBinding beanId="beanX" class="com.acme.XClass" keyField="name" />
+ </csv:reader>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-04.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-05.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-05.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-05.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:csv12="http://www.milyn.org/xsd/smooks/csv-1.2.xsd"
+ xmlns:csv13="http://www.milyn.org/xsd/smooks/csv-1.3.xsd">
+
+ <!-- Mixing configs from 2 versions of the same namespace... -->
+
+ <!-- 1.2 config -->
+ <csv12:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true">
+ <csv12:mapBinding beanId="beanX" class="com.acme.XClass" keyField="name" />
+ </csv12:reader>
+
+ <!-- 1.3 config -->
+ <csv13:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true">
+ <csv13:mapBinding beanId="beanX" class="com.acme.XClass" keyField="name" />
+ </csv13:reader>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/csv/v1_3/csv-config-05.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/BeanTest.java
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/BeanTest.java (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/BeanTest.java 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,74 @@
+/*
+ * Milyn - Copyright (C) 2006 - 2010
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License (version 2.1) as published by the Free Software
+ * Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License for more details:
+ * http://www.gnu.org/licenses/lgpl.txt
+ */
+
+package org.jboss.tools.smooks.model.javabean;
+
+import junit.framework.TestCase;
+import org.custommonkey.xmlunit.XMLAssert;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.jboss.tools.smooks.model.core.SmooksModel;
+import org.milyn.javabean.dynamic.Model;
+import org.milyn.javabean.dynamic.ModelBuilder;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+/**
+ * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
+ */
+public class BeanTest extends TestCase {
+
+ private ModelBuilder modelBuilder;
+
+ public BeanTest() throws IOException, SAXException {
+ modelBuilder = new ModelBuilder(SmooksModel.MODEL_DESCRIPTOR, false);
+ }
+
+ public void test_v11() throws IOException, SAXException {
+ test("v1_1/config-01.xml");
+ }
+
+ public void test_v12_01() throws IOException, SAXException {
+ test("v1_2/config-01.xml");
+ }
+
+ public void test_v12_02() throws IOException, SAXException {
+ // mixed namespaces...
+ test("v1_2/config-02.xml");
+ }
+
+ public void test_v13_01() throws IOException, SAXException {
+ test("v1_3/config-01.xml");
+ }
+
+ public void test_v13_02() throws IOException, SAXException {
+ // mixed namespaces...
+ test("v1_3/config-02.xml");
+ }
+
+ public void test(String messageFile) throws IOException, SAXException {
+ Model<SmooksModel> model = modelBuilder.readModel(getClass().getResourceAsStream(messageFile), SmooksModel.class);
+
+ StringWriter modelWriter = new StringWriter();
+ model.writeModel(modelWriter);
+ System.out.println(modelWriter);
+ XMLUnit.setIgnoreWhitespace( true );
+ XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream(messageFile)), new StringReader(modelWriter.toString()));
+ }
+}
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/BeanTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_1/config-01.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_1/config-01.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_1/config-01.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.1.xsd"
+ xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
+
+ <!-- The reader -->
+ <csv:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true"/>
+
+ <!--
+ Create an "example.beans.Order" bean instance when we visit the start of the <order> element.
+ Assign the new bean instance to the beanId of "order".
+ Wire in the "header" and "orderItems" beans.
+ -->
+ <jb:bindings beanId="order" class="example.model.Order" createOnElement="order">
+ <jb:wiring property="header" beanIdRef="header" />
+ <jb:wiring property="orderItems" beanIdRef="orderItems" />
+ </jb:bindings>
+
+ <!--
+ Create an ArrayList bean instance when we visit the start of the <order> element.
+ This bean is wired into the "order" bean.
+ -->
+ <jb:bindings beanId="orderItems" class="java.util.ArrayList" createOnElement="order" createOnElementNS="http://boohoo">
+ <jb:wiring beanIdRef="orderItem" />
+ </jb:bindings>
+
+ <!--
+ Create an "example.beans.Header" bean instance when we visit the start of the <header> element.
+ This bean is wired into the "order" bean.
+ -->
+ <jb:bindings beanId="header" class="example.model.Header" createOnElement="header">
+ <jb:value property="date" decoder="Date" data="header/date" dataNS="http://boohoo">
+ <jb:decodeParam name="format">EEE MMM dd HH:mm:ss z yyyy</jb:decodeParam>
+ <jb:decodeParam name="locale-language">en</jb:decodeParam>
+ <jb:decodeParam name="locale-country">IE</jb:decodeParam>
+ </jb:value>
+ <jb:value property="customerNumber" decoder="Long" data="header/customer/@number" setterMethod="setCustomerNumber" />
+ <jb:value property="customerName" data="header/customer" />
+ <jb:expression property="x" setterMethod="setX" execOnElement="xEl" execOnElementNS="http://x" />
+ </jb:bindings>
+
+ <!--
+ Create an "example.beans.OrderItem" bean instance when we visit the start of the <order-item> element.
+ This bean is wired into the "orderItems" ArrayList bean.
+ -->
+ <jb:bindings beanId="orderItem" class="example.model.OrderItem" createOnElement="order-item">
+ <jb:value property="productId" decoder="Long" data="order-item/product" />
+ <jb:value property="quantity" decoder="Integer" data="order-item/quantity" />
+ <jb:value property="price" decoder="Double" data="order-item/price" />
+ </jb:bindings>
+
+ <!-- Something else... -->
+ <jb:bindings beanId="somethingX" class="example.model.X" createOnElement="xxx" />
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_1/config-01.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_2/config-01.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_2/config-01.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_2/config-01.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.2.xsd"
+ xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
+
+ <!-- The reader -->
+ <csv:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true"/>
+
+ <!--
+ Create an "example.beans.Order" bean instance when we visit the start of the <order> element.
+ Assign the new bean instance to the beanId of "order".
+ Wire in the "header" and "orderItems" beans.
+ -->
+ <jb:bean beanId="order" class="example.model.Order" createOnElement="order">
+ <jb:wiring property="header" beanIdRef="header" />
+ <jb:wiring property="orderItems" beanIdRef="orderItems" />
+ </jb:bean>
+
+ <!--
+ Create an ArrayList bean instance when we visit the start of the <order> element.
+ This bean is wired into the "order" bean.
+ -->
+ <jb:bean beanId="orderItems" class="java.util.ArrayList" createOnElement="order" createOnElementNS="http://boohoo">
+ <jb:wiring beanIdRef="orderItem" />
+ </jb:bean>
+
+ <!--
+ Create an "example.beans.Header" bean instance when we visit the start of the <header> element.
+ This bean is wired into the "order" bean.
+ -->
+ <jb:bean beanId="header" class="example.model.Header" createOnElement="header">
+ <jb:value property="date" decoder="Date" data="header/date" dataNS="http://boohoo">
+ <jb:decodeParam name="format">EEE MMM dd HH:mm:ss z yyyy</jb:decodeParam>
+ <jb:decodeParam name="locale-language">en</jb:decodeParam>
+ <jb:decodeParam name="locale-country">IE</jb:decodeParam>
+ </jb:value>
+ <jb:value property="customerNumber" decoder="Long" data="header/customer/@number" setterMethod="setCustomerNumber" />
+ <jb:value property="customerName" data="header/customer" />
+ <jb:expression property="x" setterMethod="setX" execOnElement="xEl" execOnElementNS="http://x" />
+ </jb:bean>
+
+ <!--
+ Create an "example.beans.OrderItem" bean instance when we visit the start of the <order-item> element.
+ This bean is wired into the "orderItems" ArrayList bean.
+ -->
+ <jb:bean beanId="orderItem" class="example.model.OrderItem" createOnElement="order-item">
+ <jb:value property="productId" decoder="Long" data="order-item/product" />
+ <jb:value property="quantity" decoder="Integer" data="order-item/quantity" />
+ <jb:value property="price" decoder="Double" data="order-item/price" />
+ </jb:bean>
+
+ <!-- Something else... -->
+ <jb:bean beanId="somethingX" class="example.model.X" createOnElement="xxx" />
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_2/config-01.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_2/config-02.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_2/config-02.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_2/config-02.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:jb11="http://www.milyn.org/xsd/smooks/javabean-1.1.xsd"
+ xmlns:jb12="http://www.milyn.org/xsd/smooks/javabean-1.2.xsd"
+ xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
+
+ <!-- The reader -->
+ <csv:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true"/>
+
+ <!--
+ Create an "example.beans.Order" bean instance when we visit the start of the <order> element.
+ Assign the new bean instance to the beanId of "order".
+ Wire in the "header" and "orderItems" beans.
+ -->
+ <jb12:bean beanId="order" class="example.model.Order" createOnElement="order">
+ <jb12:wiring property="header" beanIdRef="header" />
+ <jb12:wiring property="orderItems" beanIdRef="orderItems" />
+ </jb12:bean>
+
+ <!--
+ Create an ArrayList bean instance when we visit the start of the <order> element.
+ This bean is wired into the "order" bean.
+ -->
+ <jb11:bindings beanId="orderItems" class="java.util.ArrayList" createOnElement="order" createOnElementNS="http://boohoo">
+ <jb11:wiring beanIdRef="orderItem" />
+ </jb11:bindings>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_2/config-02.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_3/config-01.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_3/config-01.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_3/config-01.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.3.xsd"
+ xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
+
+ <!-- The reader -->
+ <csv:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true"/>
+
+ <!--
+ Create an "example.beans.Order" bean instance when we visit the start of the <order> element.
+ Assign the new bean instance to the beanId of "order".
+ Wire in the "header" and "orderItems" beans.
+ -->
+ <jb:bean beanId="order" class="example.model.Order" createOnElement="order">
+ <jb:wiring property="header" beanIdRef="header" />
+ <jb:wiring property="orderItems" beanIdRef="orderItems" />
+ </jb:bean>
+
+ <!--
+ Create an ArrayList bean instance when we visit the start of the <order> element.
+ This bean is wired into the "order" bean.
+ -->
+ <jb:bean beanId="orderItems" class="java.util.ArrayList" createOnElement="order">
+ <jb:wiring beanIdRef="orderItem" />
+ </jb:bean>
+
+ <!--
+ Create an "example.beans.Header" bean instance when we visit the start of the <header> element.
+ This bean is wired into the "order" bean.
+ -->
+ <jb:bean beanId="header" class="example.model.Header" createOnElement="header">
+ <jb:value property="date" decoder="Date" data="header/date">
+ <jb:decodeParam name="format">EEE MMM dd HH:mm:ss z yyyy</jb:decodeParam>
+ <jb:decodeParam name="locale-language">en</jb:decodeParam>
+ <jb:decodeParam name="locale-country">IE</jb:decodeParam>
+ </jb:value>
+ <jb:value property="customerNumber" decoder="Long" data="header/customer/@number" setterMethod="setCustomerNumber" />
+ <jb:value property="customerName" data="header/customer" />
+ <jb:expression property="x" setterMethod="setX" execOnElement="xEl" />
+ </jb:bean>
+
+ <!--
+ Create an "example.beans.OrderItem" bean instance when we visit the start of the <order-item> element.
+ This bean is wired into the "orderItems" ArrayList bean.
+ -->
+ <jb:bean beanId="orderItem" class="example.model.OrderItem" createOnElement="order-item">
+ <jb:value property="productId" decoder="Long" data="order-item/product" />
+ <jb:value property="quantity" decoder="Integer" data="order-item/quantity" />
+ <jb:value property="price" decoder="Double" data="order-item/price" />
+ </jb:bean>
+
+ <!-- Something else... -->
+ <jb:bean beanId="somethingX" class="example.model.X" createOnElement="xxx" />
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_3/config-01.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_3/config-02.xml
===================================================================
--- workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_3/config-02.xml (rev 0)
+++ workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_3/config-02.xml 2010-06-04 14:49:45 UTC (rev 22546)
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+ xmlns:jb11="http://www.milyn.org/xsd/smooks/javabean-1.1.xsd"
+ xmlns:jb12="http://www.milyn.org/xsd/smooks/javabean-1.2.xsd"
+ xmlns:jb13="http://www.milyn.org/xsd/smooks/javabean-1.3.xsd"
+ xmlns:csv12="http://www.milyn.org/xsd/smooks/csv-1.2.xsd"
+ xmlns:csv13="http://www.milyn.org/xsd/smooks/csv-1.3.xsd">
+
+ <!-- Reader from v1.2 -->
+ <csv12:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true"/>
+
+ <!-- Reader from v1.3 -->
+ <csv13:reader fields="name,address,age" rootElementName="people" recordElementName="person" indent="true" strict="true"/>
+
+ <!--
+ Create an "example.beans.Order" bean instance when we visit the start of the <order> element.
+ Assign the new bean instance to the beanId of "order".
+ Wire in the "header" and "orderItems" beans.
+ -->
+ <jb12:bean beanId="order" class="example.model.Order" createOnElement="order">
+ <jb12:wiring property="header" beanIdRef="header" />
+ <jb12:wiring property="orderItems" beanIdRef="orderItems" />
+ </jb12:bean>
+
+ <!--
+ Create an ArrayList bean instance when we visit the start of the <order> element.
+ This bean is wired into the "order" bean.
+ -->
+ <jb11:bindings beanId="orderItems" class="java.util.ArrayList" createOnElement="order" createOnElementNS="http://boohoo">
+ <jb11:wiring beanIdRef="orderItem" />
+ </jb11:bindings>
+
+ <!--
+ Create an ArrayList bean instance when we visit the start of the <order> element.
+ This bean is wired into the "order" bean.
+ -->
+ <jb13:bean beanId="orderItems" class="java.util.ArrayList" createOnElement="order">
+ <jb13:wiring beanIdRef="orderItem" />
+ </jb13:bean>
+
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/smooks-dmb/smooks/tests/org.jboss.tools.smooks.model.test/src/org/jboss/tools/smooks/model/javabean/v1_3/config-02.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
14 years, 7 months
JBoss Tools SVN: r22545 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor/mozilla and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-06-04 09:38:00 -0400 (Fri, 04 Jun 2010)
New Revision: 22545
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizard.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
Log:
https://jira.jboss.org/browse/JBIDE-6287 , New File creation was added, table with content of properties file was added.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizard.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizard.java 2010-06-04 13:35:48 UTC (rev 22544)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizard.java 2010-06-04 13:38:00 UTC (rev 22545)
@@ -10,14 +10,26 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.dialog;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+import org.jboss.tools.common.model.ui.ModelUIImages;
import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.messages.VpeUIMessages;
public class ExternalizeStringsWizard extends Wizard {
+ public String ExternalizeStringsWizardPageName = "ExternalizeStringsWizardPage";
+ public String NewFileCreationPageName = "NewFileCreationPage";
+
VpeController vpeController = null;
- ExternalizeStringsWizardPage page = null;
+ ExternalizeStringsWizardPage page1 = null;
+ WizardNewFileCreationPage page2 = null;
public ExternalizeStringsWizard(VpeController vpeController) {
super();
@@ -28,18 +40,56 @@
@Override
public void addPages() {
- page = new ExternalizeStringsWizardPage(vpeController);
- addPage(page);
+ super.addPages();
+ page1 = new ExternalizeStringsWizardPage(
+ ExternalizeStringsWizardPageName, vpeController);
+ page2 = new WizardNewFileCreationPage(NewFileCreationPageName,
+ (IStructuredSelection) vpeController
+ .getSourceEditor().getSelectionProvider().getSelection());
+ page2.setTitle(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_TITLE);
+ page2.setDescription(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_DESCRIPTION);
+ page2.setImageDescriptor(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_DEFAULT));
+ addPage(page1);
+ addPage(page2);
}
@Override
public boolean canFinish() {
- return page.isPageComplete();
+ return (!page1.isNewFile() && page1.isPageComplete())
+ || (page1.isNewFile() && page2.isPageComplete());
}
@Override
public boolean performFinish() {
- return page.performFinish();
+ IFile bundleFile = null;
+ if (page1.isNewFile()) {
+ bundleFile = page2.createNewFile();
+ } else {
+ bundleFile = page1.getBundleFile();
+ }
+ /*
+ * Exit when the file is null
+ */
+ if (bundleFile == null) {
+ return false;
+ }
+ /*
+ * Add "key=value" to the bundle
+ */
+ if (bundleFile.exists()) {
+ InputStream is = new ByteArrayInputStream(page1.getKeyValuePair().getBytes());
+ try {
+ bundleFile.appendContents(is, false, true, null);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+ /*
+ * Replace text in the editor
+ */
+ page1.replaceText();
+
+ return true;
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizardPage.java 2010-06-04 13:35:48 UTC (rev 22544)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsWizardPage.java 2010-06-04 13:38:00 UTC (rev 22545)
@@ -10,16 +10,26 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.dialog;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.DialogPage;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ColumnLayoutData;
+import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -28,10 +38,14 @@
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
@@ -47,26 +61,37 @@
public class ExternalizeStringsWizardPage extends WizardPage {
private final int DIALOG_WIDTH = 450;
- private final int DIALOG_HEIGHT = 300;
+ private final int DIALOG_HEIGHT = 650;
private VpeController vpeController;
private Text textStringValue;
private Text propsKey;
private Text propsValue;
+ private Button newFile;
+ private Label propsFileLabel;
private Text propsFile;
+ private Label rbListLabel;
private Combo rbCombo;
private BundleMap bm;
+ private Group propsFilesGroup;
+ private Status propsKeyStatus;
+ private Status propsValueStatus;
+ private Status selectedTextStatus;
+ private Table tagsTable;
- public ExternalizeStringsWizardPage(VpeController vpeController) {
+ public ExternalizeStringsWizardPage(String pageName, VpeController vpeController) {
/*
* Setting dialog Title, Description, Image.
*/
- super(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_TITLE,
+ super(pageName,
VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_TITLE,
ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_DEFAULT));
setDescription(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_DESCRIPTION);
setPageComplete(false);
this.vpeController = vpeController;
this.bm = vpeController.getPageContext().getBundle();
+ propsKeyStatus = new Status(IStatus.OK, VpePlugin.PLUGIN_ID, Constants.EMPTY);
+ propsValueStatus = new Status(IStatus.OK, VpePlugin.PLUGIN_ID, Constants.EMPTY);
+ selectedTextStatus = new Status(IStatus.OK, VpePlugin.PLUGIN_ID, Constants.EMPTY);
}
public ExternalizeStringsWizardPage(String pageName) {
@@ -102,7 +127,7 @@
*/
textStringValue = new Text(propsStringGroup, SWT.BORDER);
textStringValue.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));
- textStringValue.setText("Not initialized"); //$NON-NLS-1$
+ textStringValue.setText(Constants.EMPTY);
textStringValue.setEditable(false);
/*
@@ -116,16 +141,19 @@
*/
propsKey = new Text(propsStringGroup, SWT.BORDER);
propsKey.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));
- propsKey.setText("key"); //$NON-NLS-1$
+ propsKey.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_DEFAULT_KEY);
propsKey.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
if ((propsKey.getText() == null)
|| (Constants.EMPTY.equalsIgnoreCase(propsKey.getText().trim()))) {
- setErrorMessage(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_KEY_MUST_BE_SET);
+ propsKeyStatus = new Status(
+ IStatus.ERROR,
+ VpePlugin.PLUGIN_ID,
+ VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_KEY_MUST_BE_SET);
} else {
- setErrorMessage(null);
+ propsKeyStatus = new Status(IStatus.OK, VpePlugin.PLUGIN_ID, Constants.EMPTY);
}
- setPageComplete(isPageComplete());
+ updateStatus();
}
});
/*
@@ -139,31 +167,59 @@
*/
propsValue = new Text(propsStringGroup, SWT.BORDER);
propsValue.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));
- propsValue.setText("value"); //$NON-NLS-1$
+ propsValue.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_DEFAULT_VALUE);
propsValue.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
if ((propsValue.getText() == null)
|| (Constants.EMPTY.equalsIgnoreCase(propsValue.getText().trim()))) {
- setErrorMessage(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_VALUE_MUST_BE_SET);
+ propsValueStatus = new Status(
+ IStatus.ERROR,
+ VpePlugin.PLUGIN_ID,
+ VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_VALUE_MUST_BE_SET);
} else {
- setErrorMessage(null);
+ propsValueStatus = new Status(IStatus.OK, VpePlugin.PLUGIN_ID, Constants.EMPTY);
}
- setPageComplete(isPageComplete());
+ updateStatus();
}
});
/*
+ * Create New File Checkbox
+ */
+ newFile = new Button(composite, SWT.CHECK);
+ newFile.setLayoutData(new GridData(SWT.LEFT, SWT.NONE, false, false, 1, 1));
+ newFile.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_NEW_FILE);
+
+ /*
* Create properties string group
*/
- Group propsFilesGroup = new Group(composite, SWT.SHADOW_ETCHED_IN);
+ propsFilesGroup = new Group(composite, SWT.SHADOW_ETCHED_IN);
propsFilesGroup.setLayout(new GridLayout(3, false));
- propsFilesGroup.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1));
+ gd = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
+ gd.heightHint = 300;
+ propsFilesGroup.setLayoutData(gd);
propsFilesGroup.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPS_FILES_GROUP);
+
+ /*
+ * Add selection listener to New File button
+ */
+ newFile.addSelectionListener( new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ boolean selected = ((Button)e.getSource()).getSelection();
+ if (selected) {
+ enableBundleGroup(false);
+ } else {
+ enableBundleGroup(true);
+ }
+ setPageComplete(isPageComplete());
+ }
+ });
/*
* Create Resource Bundles List label
*/
- Label rbListLabel = new Label(propsFilesGroup, SWT.NONE);
+ rbListLabel = new Label(propsFilesGroup, SWT.NONE);
rbListLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false, false, 1, 1));
rbListLabel.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_RESOURCE_BUNDLE_LIST);
/*
@@ -171,8 +227,6 @@
*/
rbCombo = new Combo(propsFilesGroup, SWT.NONE);
rbCombo.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));
- rbCombo.add(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PLEASE_SELECT_BUNDLE);
- rbCombo.select(0);
rbCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -180,6 +234,7 @@
String bundlePath = Constants.EMPTY;
if (bundleFile != null) {
bundlePath = bundleFile.getFullPath().toString();
+ updateTable(bundleFile);
}
propsFile.setText(bundlePath);
setPageComplete(isPageComplete());
@@ -189,7 +244,7 @@
/*
* Create Properties File label
*/
- Label propsFileLabel = new Label(propsFilesGroup, SWT.NONE);
+ propsFileLabel = new Label(propsFilesGroup, SWT.NONE);
propsFileLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false,false, 1, 1));
propsFileLabel.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_FILE);
/*
@@ -199,7 +254,26 @@
propsFile.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true,false, 2, 1));
propsFile.setText(Constants.EMPTY);
propsFile.setEditable(false);
+ /*
+ * Create properties file table of content
+ */
+ tagsTable = new Table(propsFilesGroup, SWT.BORDER);
+ TableLayout layout = new TableLayout();
+ tagsTable.setLayout(layout);
+ tagsTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
+ tagsTable.setHeaderVisible(true);
+ tagsTable.setLinesVisible(true);
+ ColumnLayoutData columnLayoutData;
+ TableColumn propNameColumn = new TableColumn(tagsTable, SWT.NONE);
+ propNameColumn.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPERTY_NAME);
+ columnLayoutData = new ColumnWeightData(200, true);
+ layout.addColumnData(columnLayoutData);
+ TableColumn propValueColumn = new TableColumn(tagsTable, SWT.NONE);
+ propValueColumn.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPERTY_VALUE);
+ columnLayoutData = new ColumnWeightData(200, true);
+ layout.addColumnData(columnLayoutData);
+
/*
* Initialize all fields with real values.
*/
@@ -219,6 +293,10 @@
ISelection sel = vpeController.getSourceEditor().getSelectionProvider().getSelection();
if ((textStringValue != null) && (propsKey != null)
&& isSelectionCorrect(sel)) {
+ /*
+ * TODO: One must add functionality
+ * for convenient text replacement
+ */
String stringToUpdate = Constants.EMPTY;
TextSelection textSelection = null;
String text = null;
@@ -226,10 +304,23 @@
textSelection = (TextSelection) sel;
text = textSelection.getText();
if (text.trim().length() < 1) {
- setErrorMessage(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_SELECTED_TEXT_IS_EMPTY);
+ selectedTextStatus = new Status(
+ IStatus.ERROR,
+ VpePlugin.PLUGIN_ID,
+ VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_SELECTED_TEXT_IS_EMPTY);
} else if ((text.indexOf(Constants.GT) != -1) || (text.indexOf(Constants.LT) != -1)) {
- setErrorMessage(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_WRONG_SELECTED_TEXT);
+ selectedTextStatus = new Status(
+ IStatus.ERROR,
+ VpePlugin.PLUGIN_ID,
+ VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_WRONG_SELECTED_TEXT);
+ } else {
+ selectedTextStatus = new Status(IStatus.OK, VpePlugin.PLUGIN_ID, Constants.EMPTY);
}
+ /*
+ * Update status message.
+ */
+ updateStatus();
+
Object selectedElement = structuredSelection.getFirstElement();
/*
* Parse selected element and find a string to replace
@@ -283,23 +374,56 @@
}
}
- @Override
- public boolean isPageComplete() {
- boolean isPageComplete = false;
- /*
- * The page is ready when there are no error messages
- * and the bundle is selected
- * and "key=value" exists.
- */
- if ((getErrorMessage() == null)
- && (!VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PLEASE_SELECT_BUNDLE
- .equalsIgnoreCase(rbCombo.getItem(rbCombo.getSelectionIndex())))) {
- isPageComplete = true;
+ private void updateTable(IFile file) {
+ if ((file != null) && file.exists()) {
+ try {
+ BufferedReader in = new BufferedReader(new InputStreamReader(
+ file.getContents()));
+ String line = in.readLine();
+ int i = 0;
+ while (line != null) {
+ TableItem tableItem = null;
+ String[] propertie = null;
+ if (line.trim().length() > 0) {
+ tableItem = new TableItem(tagsTable, SWT.BORDER, i);
+ propertie = line.trim().split("="); //$NON-NLS-1$
+ if (propertie.length < 3) {
+ tableItem.setText(propertie);
+ i++;
+ }
+ }
+ line = in.readLine();
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
}
- return isPageComplete;
}
- public boolean performFinish() {
+ private void enableBundleGroup(boolean enabled) {
+ propsFilesGroup.setEnabled(enabled);
+ propsFileLabel.setEnabled(enabled);
+ propsFile.setEnabled(enabled);
+ rbListLabel.setEnabled(enabled);
+ rbCombo.setEnabled(enabled);
+ tagsTable.setEnabled(enabled);
+ }
+
+ public String getKeyValuePair() {
+ return "\n" + propsKey.getText() + Constants.EQUAL + propsValue.getText() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public IFile getBundleFile() {
+ return bm.getBundleFile(rbCombo.getText());
+ }
+
+ public boolean isNewFile() {
+ return newFile.getSelection();
+ }
+
+ public boolean replaceText() {
StructuredTextEditor editor = vpeController.getSourceEditor();
IDocumentProvider prov = editor.getDocumentProvider();
IDocument doc = prov.getDocument(editor.getEditorInput());
@@ -310,31 +434,86 @@
* Get source text and new text
*/
final TextSelection textSel = (TextSelection) sel;
- String newText = "\n" + propsKey.getText() + Constants.EQUAL + propsValue.getText() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
/*
- * Add "key=value" to the bundle
- */
- IFile bundleFile = bm.getBundleFile(rbCombo.getText());
- if ((bundleFile != null) && (bundleFile.exists())) {
- InputStream is = new ByteArrayInputStream(newText.getBytes());
- bundleFile.appendContents(is, false, true, null);
- }
- /*
* Replace text in the editor with "key.value"
*/
String bundlePrefix = Constants.EMPTY;
- for (BundleEntry be : bm.getBundles()) {
- if (be.uri.equalsIgnoreCase(rbCombo.getText())) {
- bundlePrefix = be.prefix;
+ if (!isNewFile()) {
+ for (BundleEntry be : bm.getBundles()) {
+ if (be.uri.equalsIgnoreCase(rbCombo.getText())) {
+ bundlePrefix = be.prefix;
+ }
}
}
- newText = "#{" + bundlePrefix + Constants.DOT + propsKey.getText() + "}"; //$NON-NLS-1$ //$NON-NLS-2$
+ String newText = "#{" + bundlePrefix + Constants.DOT + propsKey.getText() + "}"; //$NON-NLS-1$ //$NON-NLS-2$
doc.replace(textSel.getOffset(), textSel.getLength(), newText);
- } catch (Exception ex) {
+ } catch (BadLocationException ex) {
ex.printStackTrace();
}
}
- return false;
+ return true;
}
+ private void updateStatus() {
+ applyStatus(this, new IStatus[] {selectedTextStatus, propsKeyStatus, propsValueStatus});
+ setPageComplete(isPageComplete());
+ }
+
+ private void applyStatus(DialogPage page, IStatus[] statuses) {
+ IStatus severeStatus = statuses[0];
+ for (IStatus status : statuses) {
+ severeStatus = severeStatus.getSeverity() >= status.getSeverity()
+ ? severeStatus : status;
+ }
+
+ String message = severeStatus.getMessage();
+ switch (severeStatus.getSeverity()) {
+ case IStatus.OK:
+ page.setMessage(null, IMessageProvider.NONE);
+ page.setErrorMessage(null);
+ break;
+
+ case IStatus.WARNING:
+ page.setMessage(message, IMessageProvider.WARNING);
+ page.setErrorMessage(null);
+ break;
+
+ case IStatus.INFO:
+ page.setMessage(message, IMessageProvider.INFORMATION);
+ page.setErrorMessage(null);
+ break;
+
+ default:
+ if (message.length() == 0) {
+ message = null;
+ }
+ page.setMessage(null);
+ page.setErrorMessage(message);
+ break;
+ }
+ }
+
+ @Override
+ public boolean isPageComplete() {
+ boolean isPageComplete = false;
+ /*
+ * The page is ready when there are no error messages
+ * and the bundle is selected
+ * and "key=value" exists.
+ */
+ if ((getErrorMessage() == null)
+ && (getMessage() == null)
+ && ((rbCombo.getSelectionIndex() != -1) || isNewFile())) {
+ isPageComplete = true;
+ }
+ return isPageComplete;
+ }
+
+ @Override
+ public boolean canFlipToNextPage() {
+ return isPageComplete() && (getNextPage() != null)
+ && (newFile.getSelection() == true);
+ }
+
+
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2010-06-04 13:35:48 UTC (rev 22544)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2010-06-04 13:38:00 UTC (rev 22545)
@@ -480,7 +480,7 @@
* otherwise show warning message.
*/
ISelection sel = controller.getSourceEditor().getSelectionProvider().getSelection();
-
+
if ((sel instanceof TextSelection)
&& (sel instanceof IStructuredSelection)
&& (((IStructuredSelection) sel).size() == 1)) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-06-04 13:35:48 UTC (rev 22544)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-06-04 13:38:00 UTC (rev 22545)
@@ -174,6 +174,11 @@
public static String EXTRNALIZE_STRINGS_DIALOG_SELECTED_TEXT_IS_EMPTY;
public static String EXTRNALIZE_STRINGS_DIALOG_KEY_MUST_BE_SET;
public static String EXTRNALIZE_STRINGS_DIALOG_VALUE_MUST_BE_SET;
+ public static String EXTRNALIZE_STRINGS_DIALOG_NEW_FILE;
+ public static String EXTRNALIZE_STRINGS_DIALOG_DEFAULT_KEY;
+ public static String EXTRNALIZE_STRINGS_DIALOG_DEFAULT_VALUE;
+ public static String EXTRNALIZE_STRINGS_DIALOG_PROPERTY_NAME;
+ public static String EXTRNALIZE_STRINGS_DIALOG_PROPERTY_VALUE;
public static String COULD_NOT_OPEN_VPE_RESOURCES_DIALOG;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-06-04 13:35:48 UTC (rev 22544)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-06-04 13:38:00 UTC (rev 22545)
@@ -162,6 +162,11 @@
EXTRNALIZE_STRINGS_DIALOG_SELECTED_TEXT_IS_EMPTY=Selected text is empty
EXTRNALIZE_STRINGS_DIALOG_KEY_MUST_BE_SET=Key must be set
EXTRNALIZE_STRINGS_DIALOG_VALUE_MUST_BE_SET=Value must be set
+EXTRNALIZE_STRINGS_DIALOG_NEW_FILE=Create a new properties file (See details on the next page)
+EXTRNALIZE_STRINGS_DIALOG_DEFAULT_KEY=key
+EXTRNALIZE_STRINGS_DIALOG_DEFAULT_VALUE=value
+EXTRNALIZE_STRINGS_DIALOG_PROPERTY_NAME=Property name
+EXTRNALIZE_STRINGS_DIALOG_PROPERTY_VALUE=Property value
# Other messages
CANNOT_LOAD_TAGLIBS_FROM_PAGE_CONTEXT=Cannot load taglibs from PageContext!
14 years, 7 months
JBoss Tools SVN: r22544 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console: views/properties and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-06-04 09:35:48 -0400 (Fri, 04 Jun 2010)
New Revision: 22544
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/EntityPropertySource.java
Log:
https://jira.jboss.org/browse/JBIDE-6407 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2010-06-04 11:39:42 UTC (rev 22543)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2010-06-04 13:35:48 UTC (rev 22544)
@@ -157,6 +157,7 @@
//
public static String EntityPropertySource_identifier;
public static String EntityPropertySource_properties;
+ public static String EntityPropertySource_unable_to_resolve_property;
public static String QueryPagePropertySource_console_configuration;
public static String QueryPagePropertySource_millisec;
public static String QueryPagePropertySource_query_run_time;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2010-06-04 11:39:42 UTC (rev 22543)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2010-06-04 13:35:48 UTC (rev 22544)
@@ -150,6 +150,7 @@
EntityPropertySource_identifier=Identifier
EntityPropertySource_properties=Properties
+EntityPropertySource_unable_to_resolve_property=<Unable to resolve property>
QueryPagePropertySource_console_configuration=Console configuration
# {0}=count in millisec
QueryPagePropertySource_millisec={0} millisec
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/EntityPropertySource.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/EntityPropertySource.java 2010-06-04 11:39:42 UTC (rev 22543)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/EntityPropertySource.java 2010-06-04 13:35:48 UTC (rev 22544)
@@ -27,6 +27,7 @@
import org.eclipse.ui.views.properties.IPropertySource2;
import org.eclipse.ui.views.properties.PropertyDescriptor;
import org.hibernate.EntityMode;
+import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.KnownConfigurations;
@@ -35,7 +36,9 @@
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.metadata.CollectionMetadata;
+import org.hibernate.persister.entity.AbstractEntityPersister;
import org.hibernate.proxy.HibernateProxyHelper;
+import org.hibernate.tuple.entity.EntityMetamodel;
@@ -124,7 +127,21 @@
if(id.equals(classMetadata.getIdentifierPropertyName())) {
propertyValue = classMetadata.getIdentifier(reflectedObject, EntityMode.POJO);
} else {
- propertyValue = classMetadata.getPropertyValue(reflectedObject, (String)id, EntityMode.POJO);
+ try {
+ propertyValue = classMetadata.getPropertyValue(reflectedObject, (String)id, EntityMode.POJO);
+ } catch (HibernateException he) {
+ propertyValue = HibernateConsoleMessages.EntityPropertySource_unable_to_resolve_property;
+ if (classMetadata instanceof AbstractEntityPersister) {
+ AbstractEntityPersister aep = (AbstractEntityPersister)classMetadata;
+ EntityMetamodel emm = aep.getEntityMetamodel();
+ if (emm != null) {
+ Integer idx = emm.getPropertyIndexOrNull((String)id);
+ if (idx != null) {
+ propertyValue = emm.getTuplizer(EntityMode.POJO).getPropertyValue(reflectedObject, idx);
+ }
+ }
+ }
+ }
}
if (propertyValue instanceof Collection<?>) {
14 years, 7 months
JBoss Tools SVN: r22543 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-06-04 07:39:42 -0400 (Fri, 04 Jun 2010)
New Revision: 22543
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java
Log:
https://jira.jboss.org/browse/JBIDE-6314
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java 2010-06-04 10:39:41 UTC (rev 22542)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java 2010-06-04 11:39:42 UTC (rev 22543)
@@ -200,7 +200,14 @@
String encoding = null;
boolean first = true;
try {
- InputStream is = jar.getInputStream(jar.getEntry(path));
+ ZipEntry entry = jar.getEntry(path);
+ if(entry == null) {
+ String error = "JarAccess: cannot obtain entry for path '" + path + "' from jar '" + location + "'."; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ ModelPlugin.getDefault().logError(error);
+ return ""; //$NON-NLS-1$
+ }
+
+ InputStream is = jar.getInputStream(entry);
bs = new BufferedInputStream(is);
while ((length = bs.available()) > 0) {
if (length > size)
14 years, 7 months