JBoss Tools SVN: r16461 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-07-07 07:56:15 -0400 (Tue, 07 Jul 2009)
New Revision: 16461
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
Log:
https://jira.jboss.org/jira/browse/JBIDE-4549 - delete unused keys
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 2009-07-07 11:54:26 UTC (rev 16460)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2009-07-07 11:56:15 UTC (rev 16461)
@@ -199,34 +199,17 @@
public static String NewConfigurationWizardPage_user_name;
public static String NewHibernateMappingElementsSelectionPage_select;
- public static String NewHibernateMappingFilePage_browse;
public static String NewHibernateMappingFilePage_class_name_column;
-
- public static String NewHibernateMappingFilePage_class_to_map;
- public static String NewHibernateMappingFilePage_container;
- public static String NewHibernateMappingFilePage_file_container_must_be_specified;
- public static String NewHibernateMappingFilePage_file_container_must_exist;
- public static String NewHibernateMappingFilePage_file_name;
public static String NewHibernateMappingFilePage_file_name_column;
- public static String NewHibernateMappingFilePage_file_name_must_be_specified;
- public static String NewHibernateMappingFilePage_file_name_must_be_valid;
public static String NewHibernateMappingFilePage_hibernate_xml_mapping_file;
- public static String NewHibernateMappingFilePage_project_must_be_writable;
public static String NewHibernateMappingFilePage_project_name_column;
- public static String NewHibernateMappingFilePage_select_class_to_map;
- public static String NewHibernateMappingFilePage_select_new_file_container;
- public static String NewHibernateMappingFilePage_the_class_will_be_used_when;
public static String NewHibernateMappingFilePage_this_wizard_creates;
public static String NewHibernateMappingFileWizard_create_hibernate_xml_mapping_file;
public static String NewHibernateMappingFileWizard_create_new_xml_mapping_file;
- public static String NewHibernateMappingFileWizard_creating;
- public static String NewHibernateMappingFileWizard_error;
-
public static String NewHibernateMappingFileWizard_finding_dependent_cu;
- public static String NewHibernateMappingFileWizard_opening_file_for_editing;
public static String NewHibernateMappingFileWizard_selection_cant_be_empty;
public static String NewReverseEngineeringFileWizard_create_hibernate_reverse_engineering_file;
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 2009-07-07 11:54:26 UTC (rev 16460)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2009-07-07 11:56:15 UTC (rev 16461)
@@ -194,29 +194,14 @@
NewConfigurationWizardPage_this_wizard_creates=This wizard creates a new configuration file to use with Hibernate.
NewConfigurationWizardPage_user_name=User&name:
NewHibernateMappingElementsSelectionPage_select=Select compilation units or containers.
-NewHibernateMappingFilePage_browse=Browse...
NewHibernateMappingFilePage_class_name_column=Class name
-NewHibernateMappingFilePage_class_to_map=Class to &map:
-NewHibernateMappingFilePage_container=&Container:
-NewHibernateMappingFilePage_file_container_must_be_specified=File container must be specified
-NewHibernateMappingFilePage_file_container_must_exist=File container must exist
-NewHibernateMappingFilePage_file_name=&File name:
NewHibernateMappingFilePage_file_name_column=File name
-NewHibernateMappingFilePage_file_name_must_be_specified=File name must be specified
-NewHibernateMappingFilePage_file_name_must_be_valid=File name must be valid
NewHibernateMappingFilePage_hibernate_xml_mapping_file=Hibernate XML Mapping file
-NewHibernateMappingFilePage_project_must_be_writable=Project must be writable
NewHibernateMappingFilePage_project_name_column=Project name
-NewHibernateMappingFilePage_select_class_to_map=Select class to map
-NewHibernateMappingFilePage_select_new_file_container=Select new file container
-NewHibernateMappingFilePage_the_class_will_be_used_when=The class will be used when generating the hbm.xml file
NewHibernateMappingFilePage_this_wizard_creates=This wizard creates a new Hibernate XML Mapping file
NewHibernateMappingFileWizard_create_hibernate_xml_mapping_file=Create Hibernate XML Mapping file (hbm.xml)
NewHibernateMappingFileWizard_create_new_xml_mapping_file=Create new XML Mapping files.
-NewHibernateMappingFileWizard_creating=Creating
-NewHibernateMappingFileWizard_error=Must use WizardDialog implementation as WizardContainer
NewHibernateMappingFileWizard_finding_dependent_cu=Search for dependent compilation units...
-NewHibernateMappingFileWizard_opening_file_for_editing=Opening file for editing...
NewHibernateMappingFileWizard_selection_cant_be_empty=Selection can't be empty
NewReverseEngineeringFileWizard_create_hibernate_reverse_engineering_file=Create Hibernate Reverse Engineering file (reveng.xml)
NewReverseEngineeringFileWizard_create_new_hibernate_reveng_xml=Create a new hibernate.reveng.xml.
14 years, 11 months
JBoss Tools SVN: r16460 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: hqleditor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-07-07 07:54:26 -0400 (Tue, 07 Jul 2009)
New Revision: 16460
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditorActionContributor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4549 - setup right resource bundle prefix
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java 2009-07-07 09:03:31 UTC (rev 16459)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java 2009-07-07 11:54:26 UTC (rev 16460)
@@ -88,7 +88,7 @@
protected void createActions() {
super.createActions();
- Action action = new TextOperationAction(getResourceBundle(), "ContentAssistProposal.", this, ISourceViewer.CONTENTASSIST_PROPOSALS); //$NON-NLS-1$
+ Action action = new TextOperationAction(getResourceBundle(), "HQLEditor_ContentAssistProposal_", this, ISourceViewer.CONTENTASSIST_PROPOSALS); //$NON-NLS-1$
action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
setAction("ContentAssistProposal", action);//$NON-NLS-1$
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditorActionContributor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditorActionContributor.java 2009-07-07 09:03:31 UTC (rev 16459)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditorActionContributor.java 2009-07-07 11:54:26 UTC (rev 16460)
@@ -59,9 +59,9 @@
super();
ResourceBundle bundle = ResourceBundle.getBundle(HibernateConsoleMessages.BUNDLE_NAME);
- contentAssistProposalAction = new RetargetTextEditorAction( bundle, "ContentAssistProposal." );//$NON-NLS-1$
- contentAssistTipAction = new RetargetTextEditorAction( bundle, "ContentAssistTip." ); //$NON-NLS-1$
- contentFormatAction = new RetargetTextEditorAction( bundle, "ContentFormat." ); //$NON-NLS-1$
+ contentAssistProposalAction = new RetargetTextEditorAction( bundle, "HQLEditor_ContentAssistProposal_" );//$NON-NLS-1$
+ contentAssistTipAction = new RetargetTextEditorAction( bundle, "HQLEditor_ContentAssistTip_" ); //$NON-NLS-1$
+ contentFormatAction = new RetargetTextEditorAction( bundle, "HQLEditor_ContentFormat_" ); //$NON-NLS-1$
executeHQLAction = new ExecuteQueryAction();
}
14 years, 11 months
JBoss Tools SVN: r16459 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: context and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-07-07 05:03:31 -0400 (Tue, 07 Jul 2009)
New Revision: 16459
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/UpdateJobGroup.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3793
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/UpdateJobGroup.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/UpdateJobGroup.java 2009-07-07 07:50:27 UTC (rev 16458)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/UpdateJobGroup.java 2009-07-07 09:03:31 UTC (rev 16459)
@@ -1,60 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2007 Red Hat, Inc.
-* Distributed under license by Red Hat, Inc. All rights reserved.
-* This program is made available under the terms of the
-* Eclipse Public License v1.0 which accompanies this distribution,
-* and is available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* Red Hat, Inc. - initial API and implementation
-******************************************************************************/
-package org.jboss.tools.vpe.editor;
-
-
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * @author mareshkau
- *
- * Creates a group of jobs for updating vpe content
- */
-
-public abstract class UpdateJobGroup extends UIJob {
-
- /**
- * Current job identification
- */
- private String jobName;
- /**
- * Contains indetification for job group
- */
- public static final String UPDATE_JOB="UPDATE_JOB"; //$NON-NLS-1$
-
- /**
- * Update Job
- * @param name
- * @param jobName
- */
- public UpdateJobGroup(String name, String jobName) {
- super(name);
- setJobName(jobName);
- }
-
- public boolean belongsTo(Object family) {
-
- return UPDATE_JOB.equals(getJobName());
- }
- /**
- * @return the jobName
- */
- private String getJobName() {
- return jobName;
- }
- /**
- * @param jobName the jobName to set
- */
- private void setJobName(String jobName) {
- this.jobName = jobName;
- }
-
-}
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2009-07-07 07:50:27 UTC (rev 16458)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2009-07-07 09:03:31 UTC (rev 16459)
@@ -205,18 +205,6 @@
return editPart;
}
- public void openIncludeFile(String file) {
- IEditorInput input = editPart.getEditorInput();
- IWorkbenchPage workbenchPage = VpePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
- try{
- IFile f = FileUtil.getFile(input, file);
- if (f != null) {
- IDE.openEditor(workbenchPage, f, true);
- }
- }catch(PartInitException ex){
- VpePlugin.reportProblem(ex);
- }
- }
public List<TaglibData> getIncludeTaglibs() {
if (getEditPart() == null) {
@@ -239,32 +227,6 @@
return taglibData;
}
- public ResourceReference[] getIncludeCss() {
- IEditorInput input = getEditPart().getEditorInput();
- IFile file = null;
- if (input instanceof IFileEditorInput) {
- file = ((IFileEditorInput)input).getFile();
- }
- ResourceReference[] resourceReferences = new ResourceReference[0];
- if (file != null) {
- resourceReferences = CSSReferenceList.getInstance().getAllResources(file);
- }
- return resourceReferences;
- }
-
- public void installIncludeElements() {
-// ResourceReference[] list = getIncludeTaglibs();
-// for (int i = 0; i < list.length; i++) {
-// ResourceReference reference = list[i];
-//// setTaglib(i, reference.getLocation(), reference.getProperties(), false);
-// }
-
- ResourceReference[] list = getIncludeCss();
- for (int i = 0; i < list.length; i++) {
- visualBuilder.addLinkNodeToHead(list[i].getLocation(), "yes", false);
- }
- }
-
public ResourceReference getRuntimeRelativeFolder(IFile file) {
ResourceReference[] list = RelativeFolderReferenceList.getInstance().getAllResources(file);
if (list.length > 0) {
@@ -309,16 +271,6 @@
return XmlUtil.getTaglibsForNode(sourceNode, this);
}
- public void removeTaglibListener(VpeTaglibListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- public void setReferenceNode(Node node) {
- // TODO Auto-generated method stub
-
- }
-
/**
* @return the currentVisualNode
*/
14 years, 11 months
JBoss Tools SVN: r16458 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-07-07 03:50:27 -0400 (Tue, 07 Jul 2009)
New Revision: 16458
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/ValueWiringBindingSelectionDialog.java
Log:
JBIDE-4578
Done
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-07-07 07:46:36 UTC (rev 16457)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-07-07 07:50:27 UTC (rev 16458)
@@ -141,7 +141,7 @@
gd.horizontalSpan = 2;
separator.setLayoutData(gd);
- Hyperlink link = toolkit.createHyperlink(parent, "Add Value binding and Wiring binidng", SWT.NONE);
+ Hyperlink link = toolkit.createHyperlink(parent, "Add Value binding and Bean binding automatically", SWT.NONE);
final Composite fp = parent;
final BindingsType fb = (BindingsType)model;
final SmooksMultiFormEditor ff = formEditor;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java 2009-07-07 07:46:36 UTC (rev 16457)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java 2009-07-07 07:50:27 UTC (rev 16458)
@@ -1,5 +1,7 @@
package org.jboss.tools.smooks.configuration.editors.javabean;
+import java.util.Collection;
+
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
@@ -37,6 +39,10 @@
if (arg0 instanceof JavaBeanList) {
return ((JavaBeanList) arg0).getChildren().toArray();
}
+
+ if (arg0 instanceof Collection) {
+ return ((Collection<?>) arg0).toArray();
+ }
return new Object[]{};
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/ValueWiringBindingSelectionDialog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/ValueWiringBindingSelectionDialog.java 2009-07-07 07:46:36 UTC (rev 16457)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/ValueWiringBindingSelectionDialog.java 2009-07-07 07:50:27 UTC (rev 16458)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.javabean;
+import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.CheckboxTableViewer;
@@ -86,11 +88,11 @@
// TableColumn nameColumn = new TableColumn(viewer.getTable(),SWT.NONE);
viewer.setContentProvider(new JavabeanContentProvider());
viewer.setLabelProvider(new JavaBeanTableLabelProvider());
- JavaBeanList list = new JavaBeanList();
+ List<JavaBeanModel> list = new ArrayList<JavaBeanModel>();
for (Iterator<?> iterator = beanModel.getChildren().iterator(); iterator.hasNext();) {
Object child = (Object) iterator.next();
if (child instanceof JavaBeanModel && !ignoreProperty((JavaBeanModel) child)) {
- list.addJavaBean((JavaBeanModel) child);
+ list.add((JavaBeanModel) child);
}
}
viewer.setInput(list);
14 years, 11 months
JBoss Tools SVN: r16457 - branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-07-07 03:46:36 -0400 (Tue, 07 Jul 2009)
New Revision: 16457
Modified:
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/ValueWiringBindingSelectionDialog.java
Log:
JBIDE-4578
Done
Modified: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-07-07 06:06:34 UTC (rev 16456)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-07-07 07:46:36 UTC (rev 16457)
@@ -141,7 +141,7 @@
gd.horizontalSpan = 2;
separator.setLayoutData(gd);
- Hyperlink link = toolkit.createHyperlink(parent, "Add Value binding and Wiring binidng", SWT.NONE);
+ Hyperlink link = toolkit.createHyperlink(parent, "Add Value binding and Bean binding automatically", SWT.NONE);
final Composite fp = parent;
final BindingsType fb = (BindingsType)model;
final SmooksMultiFormEditor ff = formEditor;
Modified: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java 2009-07-07 06:06:34 UTC (rev 16456)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanContentProvider.java 2009-07-07 07:46:36 UTC (rev 16457)
@@ -1,5 +1,7 @@
package org.jboss.tools.smooks.configuration.editors.javabean;
+import java.util.Collection;
+
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
@@ -37,6 +39,9 @@
if (arg0 instanceof JavaBeanList) {
return ((JavaBeanList) arg0).getChildren().toArray();
}
+ if(arg0 instanceof Collection){
+ return ((Collection<?>)arg0).toArray();
+ }
return new Object[]{};
}
Modified: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/ValueWiringBindingSelectionDialog.java
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/ValueWiringBindingSelectionDialog.java 2009-07-07 06:06:34 UTC (rev 16456)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/ValueWiringBindingSelectionDialog.java 2009-07-07 07:46:36 UTC (rev 16457)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.javabean;
+import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.CheckboxTableViewer;
@@ -86,11 +88,11 @@
// TableColumn nameColumn = new TableColumn(viewer.getTable(),SWT.NONE);
viewer.setContentProvider(new JavabeanContentProvider());
viewer.setLabelProvider(new JavaBeanTableLabelProvider());
- JavaBeanList list = new JavaBeanList();
+ List<JavaBeanModel> list = new ArrayList<JavaBeanModel>();
for (Iterator<?> iterator = beanModel.getChildren().iterator(); iterator.hasNext();) {
Object child = (Object) iterator.next();
if (child instanceof JavaBeanModel && !ignoreProperty((JavaBeanModel) child)) {
- list.addJavaBean((JavaBeanModel) child);
+ list.add((JavaBeanModel) child);
}
}
viewer.setInput(list);
14 years, 11 months
JBoss Tools SVN: r16456 - in branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2: META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-07-07 02:06:34 -0400 (Tue, 07 Jul 2009)
New Revision: 16456
Removed:
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/css/
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/csvtoxml/
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/editojava/
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/editoxml/
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/FileRouterMain.java
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/FileRouterMain1.java
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/InputOrderGenerator.java
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/ToFileRoutingTest.java
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/order-message.xml
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/orderitem-split.ftl
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/smooks-config.xml
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/target/input-message.xml
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/target/orders/
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/javatojava/
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/model/
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/srcmodel/
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/trgmodel/
Modified:
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/.classpath
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/META-INF/MANIFEST.MF
branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/build.properties
Log:
JBIDE-4536
Remove useless libraries and codes
Modified: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/.classpath
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/.classpath 2009-07-07 05:55:43 UTC (rev 16455)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/.classpath 2009-07-07 06:06:34 UTC (rev 16456)
@@ -3,33 +3,5 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="lib" path="libs/flute-1.3.jar"/>
- <classpathentry kind="lib" path="libs/freemarker-2.3.9.jar"/>
- <classpathentry kind="lib" path="libs/groovy-all-1.5.0.jar"/>
- <classpathentry kind="lib" path="libs/jackson-lgpl-0.9.3.jar"/>
- <classpathentry kind="lib" path="libs/jline-0.9.93.jar"/>
- <classpathentry kind="lib" path="libs/milyn-commons-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-edisax-parser-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-magger-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-smooks-core-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-smooks-css-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-smooks-csv-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-smooks-edi-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-smooks-javabean-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-smooks-json-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-smooks-misc-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-smooks-routing-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-smooks-scripting-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-smooks-servlet-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-smooks-templating-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-tinak-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/mvel-1.3.12-java1.5.jar"/>
- <classpathentry kind="lib" path="libs/nekohtml-0.9.5.jar"/>
- <classpathentry kind="lib" path="libs/ognl-2.6.9.jar"/>
- <classpathentry kind="lib" path="libs/opencsv-1.8.jar"/>
- <classpathentry kind="lib" path="libs/stringtemplate-2.2.jar"/>
- <classpathentry kind="lib" path="libs/xml-apis-1.3.04.jar"/>
- <classpathentry kind="lib" path="libs/xpp3_min-1.1.3.4.O.jar"/>
- <classpathentry kind="lib" path="libs/xstream-1.2.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/META-INF/MANIFEST.MF 2009-07-07 05:55:43 UTC (rev 16455)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/META-INF/MANIFEST.MF 2009-07-07 06:06:34 UTC (rev 16456)
@@ -17,34 +17,12 @@
org.w3c.css.sac
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ClassPath: libs/flute-1.3.jar,
- libs/freemarker-2.3.9.jar,
- libs/groovy-all-1.5.0.jar,
- libs/jackson-lgpl-0.9.3.jar,
- libs/jline-0.9.93.jar,
+Bundle-ClassPath: libs/jackson-lgpl-0.9.3.jar,
libs/milyn-commons-1.1.2.jar,
- libs/milyn-edisax-parser-1.1.2.jar,
- libs/milyn-magger-1.1.2.jar,
libs/milyn-smooks-core-1.1.2.jar,
- libs/milyn-smooks-css-1.1.2.jar,
libs/milyn-smooks-csv-1.1.2.jar,
- libs/milyn-smooks-edi-1.1.2.jar,
- libs/milyn-smooks-javabean-1.1.2.jar,
libs/milyn-smooks-json-1.1.2.jar,
- libs/milyn-smooks-misc-1.1.2.jar,
- libs/milyn-smooks-routing-1.1.2.jar,
- libs/milyn-smooks-scripting-1.1.2.jar,
- libs/milyn-smooks-servlet-1.1.2.jar,
- libs/milyn-smooks-templating-1.1.2.jar,
- libs/milyn-tinak-1.1.2.jar,
- libs/mvel-1.3.12-java1.5.jar,
- libs/nekohtml-0.9.5.jar,
- libs/ognl-2.6.9.jar,
libs/opencsv-1.8.jar,
- libs/stringtemplate-2.2.jar,
- libs/xml-apis-1.3.04.jar,
- libs/xpp3_min-1.1.3.4.O.jar,
- libs/xstream-1.2.2.jar,
.
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Modified: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/build.properties
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/build.properties 2009-07-07 05:55:43 UTC (rev 16455)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/build.properties 2009-07-07 06:06:34 UTC (rev 16456)
@@ -1,32 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .,\
- libs/flute-1.3.jar,\
- libs/freemarker-2.3.9.jar,\
- libs/groovy-all-1.5.0.jar,\
- libs/jackson-lgpl-0.9.3.jar,\
- libs/jline-0.9.93.jar,\
- libs/milyn-commons-1.1.2.jar,\
- libs/milyn-edisax-parser-1.1.2.jar,\
- libs/milyn-magger-1.1.2.jar,\
- libs/milyn-smooks-core-1.1.2.jar,\
- libs/milyn-smooks-css-1.1.2.jar,\
- libs/milyn-smooks-csv-1.1.2.jar,\
- libs/milyn-smooks-edi-1.1.2.jar,\
- libs/milyn-smooks-javabean-1.1.2.jar,\
- libs/milyn-smooks-json-1.1.2.jar,\
- libs/milyn-smooks-misc-1.1.2.jar,\
- libs/milyn-smooks-routing-1.1.2.jar,\
- libs/milyn-smooks-scripting-1.1.2.jar,\
- libs/milyn-smooks-servlet-1.1.2.jar,\
- libs/milyn-smooks-templating-1.1.2.jar,\
- libs/milyn-tinak-1.1.2.jar,\
- libs/mvel-1.3.12-java1.5.jar,\
- libs/nekohtml-0.9.5.jar,\
- libs/ognl-2.6.9.jar,\
- libs/opencsv-1.8.jar,\
- libs/stringtemplate-2.2.jar,\
- libs/xml-apis-1.3.04.jar,\
- libs/xpp3_min-1.1.3.4.O.jar,\
- libs/xstream-1.2.2.jar
+ .
Deleted: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/FileRouterMain.java
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/FileRouterMain.java 2009-07-07 05:55:43 UTC (rev 16455)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/FileRouterMain.java 2009-07-07 06:06:34 UTC (rev 16456)
@@ -1,119 +0,0 @@
-/*
- Milyn - Copyright (C) 2006
-
- 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 example.filerouter;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.List;
-
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.milyn.Smooks;
-import org.milyn.SmooksException;
-import org.milyn.container.ExecutionContext;
-import org.milyn.routing.file.FileListAccessor;
-import org.xml.sax.SAXException;
-
-/**
- * This is a simple example that demonstrates how Smooks can be
- * configured to "route" the output of a transform to file(s).
- *
- * @author <a href="mailto:daniel.bevenius@gmail.com">Daniel Bevenius</a>
- *
- */
-public class FileRouterMain
-{
- private static final String LINE_SEP = System.getProperty( "line.separator" );
-
- protected void runSmooksTransform() throws IOException, SAXException, ClassNotFoundException
- {
- final Smooks smooks = new Smooks( "example/filerouter/smooks-config.xml" );
- final ExecutionContext executionContext = smooks.createExecutionContext();
-
- // create the source and result
- final StreamSource source = new StreamSource( FileRouterMain.class.getResourceAsStream("target/input-message.xml" ) );
- final StreamResult result = null;
-
- //executionContext.setEventListener(new HtmlReportGenerator("target/report.html"));
-
- // perform the transform
- smooks.filter( source, result, executionContext );
-
- // display the output from the transform
- System.out.println( LINE_SEP );
- System.out.println( "List file : [" + FileListAccessor.getListFileNames( executionContext ) + "]" );
-
- // uncomment to print the files
- printFiles( executionContext );
-
- }
-
- public static void main(String[] args) throws IOException, SAXException, SmooksException, InterruptedException, ClassNotFoundException
- {
- String fileName = "src/example/filerouter/target/input-message.xml";
- System.out.println(fileName);
- System.out.println();
- String nrofLineItems = pause("Please specify number of order-items to generate in the input message > ");
- InputOrderGenerator.main( new String[] { fileName, nrofLineItems } );
-
- final FileRouterMain smooksMain = new FileRouterMain();
-
- System.out.println( LINE_SEP );
- System.out.println("input-message.xml needs to be transformed and appended to a file");
- System.out.println( LINE_SEP );
- pause("Press 'enter' to display the transformed message...");
- smooksMain.runSmooksTransform();
- System.out.println( LINE_SEP );
- pause("That's it ");
- }
-
- /*
- * Can be used to print the list of files and their contents.
- * Beware that this can cause memory issues as the whole list file will be
- * read into memory. This method should only be used with smaller transforms.
- */
- @SuppressWarnings ("unused")
- private void printFiles( ExecutionContext executionContext ) throws IOException, ClassNotFoundException
- {
- List<String> allListFiles = FileListAccessor.getListFileNames( executionContext );
- for (String listFile : allListFiles)
- {
- List<String> fileNames = (List<String>) FileListAccessor.getFileList( executionContext, listFile );
- System.out.println( "Contains [" + fileNames.size() + "] files");
- for (String fileName : fileNames)
- {
- System.out.println( "fileName : [" + fileName + "]" );
- }
- }
- }
-
- private static String pause(String message) {
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
- System.out.print("> " + message);
- return in.readLine();
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- System.out.println( LINE_SEP );
- return null;
- }
-
-}
\ No newline at end of file
Deleted: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/FileRouterMain1.java
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/FileRouterMain1.java 2009-07-07 05:55:43 UTC (rev 16455)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/FileRouterMain1.java 2009-07-07 06:06:34 UTC (rev 16456)
@@ -1,78 +0,0 @@
-/*
- Milyn - Copyright (C) 2006
-
- 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 example.filerouter;
-
-import org.milyn.io.StreamUtils;
-import org.milyn.util.DollarBraceDecoder;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-
-/**
- * Simple file consumer.
- * <p/>
- * Eats the files produced by the Smooks file splitter.
- *
- * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
- */
-public class FileRouterMain1 {
-
- public static void main(String[] args) throws Exception {
- File fileDir = new File("/splitter-router/target/orders");
- SplitFilenameFilter filter = new SplitFilenameFilter();
-
- fileDir.mkdirs();
- System.out.println(fileDir.getAbsolutePath());
- (new File(fileDir, "order-332.lst")).delete();
- (new File(fileDir, "order-332.lst")).deleteOnExit();
-
- System.out.println("Started!");
- System.out.println("Waiting...\n");
- while (true) {
- File[] files = fileDir.listFiles(filter);
-
- if(files.length > 0) {
- for (File file : files) {
- if(file.getName().endsWith(".xml")) {
- System.out.println("Consuming File: " + file.getName());
- System.out.println(new String(StreamUtils.readFile(file)));
- System.out.println("\n");
- file.delete();
- }
-
- Thread.sleep(500);
- }
- System.out.println("Waiting...");
- }else{
- break;
- }
-
- Thread.sleep(1000);
- }
- }
-
- public static class SplitFilenameFilter implements FileFilter {
-
- private Pattern regexPattern = Pattern.compile("order-.*.xml");
-
- public boolean accept(File file) {
- Matcher matcher = regexPattern.matcher(file.getName());
- return matcher.matches();
- }
- }
-}
\ No newline at end of file
Deleted: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/InputOrderGenerator.java
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/InputOrderGenerator.java 2009-07-07 05:55:43 UTC (rev 16455)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/InputOrderGenerator.java 2009-07-07 06:06:34 UTC (rev 16456)
@@ -1,112 +0,0 @@
-package example.filerouter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-
-/**
- * Simply generates an sample xml
- * </p>
- * Usage: <br>
- * InputOrderGenerator filename <nrOfOrderRows>
- * </br>
- * <pre>
- *Will generate a file that looks like this:
- *<order>
- * <header>
- * <date>Wed Nov 15 13:45:28 EST 2006</date>
- * <customer number="123123">Joe</customer>
- * </header>
- * <order-items>
- * <order-item>
- * <product>111</product>
- * <quantity>2</quantity>
- * <price>8.90</price>
- * </order-item>
- * ...
- * </order-item>
- * </order-items>
- *<order>
- * </pre>
- * The number of order-items is controlled by the 'nrOfOrderRows' argument.
- *
- * @author <a href="mailto:daniel.bevenius@gmail.com">Daniel Bevenius</a>
- *
- */
-public class InputOrderGenerator
-{
- private static final String LINE_SEP = System.getProperty( "line.separator" );
-
- public static void main( String[] args ) throws IOException
- {
- if ( args.length != 2 )
- {
- printUsage();
- return;
- }
-
- String fileName = args[0];
- String nrOfOrderItemRows = args[1];
- int nrOfOrderItems = Integer.parseInt( nrOfOrderItemRows );
-
- File file = new File (fileName);
- deleteFile( file );
- FileWriter writer = new FileWriter( file, true );
- writer.write( "<order id='332'>" + LINE_SEP );
- writer.write( "<header>" + LINE_SEP);
- writer.write( "<customer number=\"123\">Joe</customer>" + LINE_SEP );
- writer.write( "</header>" + LINE_SEP);
- writer.flush();
- writer.write( "<order-items>" + LINE_SEP );
- System.out.print("Generating " + file.getName() + "...");
- for ( int i = 1 ; i <= nrOfOrderItems ; i ++ )
- {
- writer.write( "<order-item id='" + i + "'>" + LINE_SEP );
- writer.write( "<product>" + i + "</product>" + LINE_SEP );
- writer.write( "<quantity>2</quantity>" + LINE_SEP );
- writer.write( "<price>8.80</price>" + LINE_SEP );
- writer.write( "</order-item>" + LINE_SEP );
- writer.flush();
- }
- writer.write( "</order-items>" + LINE_SEP);
- writer.write( "</order>" + LINE_SEP );
- writer.close();
- System.out.println();
- System.out.println("Generated " + file.getName() + " size = [" + getFileLength( file ) + "]" );
- }
-
- private static String getFileLength( final File file )
- {
- long fileLength = file.length();
- int digits = String.valueOf( fileLength ).length();
- if ( digits < 4 )
- {
- return fileLength + " Byte(s)";
- }
- else if ( digits >= 4 && digits <= 6 )
- {
- return fileLength / 1024 + " KB";
- }
- else
- {
- return fileLength / (1024 * 1024 ) + " MB";
- }
- }
-
- private static void deleteFile( final File file ) throws IOException
- {
- if ( file.exists() )
- {
- boolean delete = file.delete();
- if ( !delete )
- {
- throw new IOException ("Could not delete file [" + file.getAbsolutePath() + "]" );
- }
- }
- }
-
- public static void printUsage()
- {
- System.err.println( "Usage: InputOrderGenerator filename <nrOfOrderRows>");
- }
-
-}
Deleted: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/ToFileRoutingTest.java
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/ToFileRoutingTest.java 2009-07-07 05:55:43 UTC (rev 16455)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/ToFileRoutingTest.java 2009-07-07 06:06:34 UTC (rev 16456)
@@ -1,158 +0,0 @@
-/*
- Milyn - Copyright (C) 2006
-
- 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 example.filerouter;
-
-import java.io.File;
-import java.io.IOException;
-
-import javax.xml.transform.stream.StreamSource;
-
-import junit.framework.TestCase;
-
-import org.milyn.Smooks;
-import org.milyn.container.ExecutionContext;
-import org.milyn.delivery.Filter;
-import org.xml.sax.SAXException;
-
-/**
- * @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
- */
-public class ToFileRoutingTest extends TestCase {
-
- private File targetDir = new File("src/example/filerouter/target/orders");
- private File file1 = new File(targetDir, "order-231-1.xml");
- private File file2 = new File(targetDir, "order-231-2.xml");
- private File file3 = new File(targetDir, "order-231-3.xml");
- private File file4 = new File(targetDir, "order-231-4.xml");
- private File file5 = new File(targetDir, "order-231-5.xml");
- private File file6 = new File(targetDir, "order-231-6.xml");
- private File file7 = new File(targetDir, "order-231-7.xml");
- private File listFile = new File(targetDir, "order-231.lst");
-
- protected void setUp() throws Exception {
- deleteFiles();
- }
-
- protected void tearDown() throws Exception {
- deleteFiles();
- }
-
- private void deleteFiles() {
- file1.delete();
- file2.delete();
- file3.delete();
- file4.delete();
- file5.delete();
- file6.delete();
- file7.delete();
- listFile.delete();
- }
-
- public void test_dom() throws IOException, SAXException {
- test(Filter.StreamFilterType.DOM);
- }
-
- public void test_sax() throws IOException, SAXException {
- test(Filter.StreamFilterType.SAX);
- }
-
- public void test(Filter.StreamFilterType filterType) throws IOException, SAXException {
- startSmooksThread(filterType);
-
- // The highWaterMark is set to 3 in the smooks config...
- waitForFile(file1, 5000);
- waitForFile(file2, 5000);
- waitForFile(file3, 5000);
-
- sleep(500);
- // file4 shouldn't be there...
- assertTrue("file4 exists!", !file4.exists());
-
- // delete file1 and file4 should appear then...
- file1.delete();
- waitForFile(file4, 5000);
- // file4 should be there...
- assertTrue("file4 doesn't exists!", file4.exists());
-
- sleep(1000);
- // file5 shouldn't be there...
- assertTrue("file5 exists!", !file5.exists());
-
- // delete file2, file3, file4 and file5, file6 and file7 should appear then...
- file2.delete();
- file3.delete();
- file4.delete();
- sleep(2000);
- waitForFile(file7, 5000);
- assertTrue(file5.exists());
- assertTrue(file6.exists());
- assertTrue(file7.exists());
- assertTrue(listFile.exists());
-
- System.out.println("File router test case succuess!");
- }
-
- private void startSmooksThread(Filter.StreamFilterType filterType) {
- SmooksThread thread = new SmooksThread(filterType);
-
- thread.start();
- while(!thread.running) {
- sleep(100);
- }
- }
-
- private void waitForFile(File file, int maxWait) {
- long start = Math.max(500, System.currentTimeMillis());
-
- while(!file.exists() && (System.currentTimeMillis() < start + maxWait)) {
- sleep(100);
- }
- }
-
- private void sleep(long duration) {
- try {
- Thread.sleep(duration);
- } catch (InterruptedException e) {
- TestCase.fail(e.getMessage());
- }
- }
-
- private class SmooksThread extends Thread {
- boolean running = false;
- private Filter.StreamFilterType filterType;
-
- public SmooksThread(Filter.StreamFilterType filterType) {
- this.filterType = filterType;
- }
-
- public void run() {
- Smooks smooks = null;
- try {
- smooks = new Smooks(getClass().getResourceAsStream("smooks-config.xml"));
- } catch (IOException e) {
- TestCase.fail(e.getMessage());
- } catch (SAXException e) {
- TestCase.fail(e.getMessage());
- }
-
- ExecutionContext execCtx = smooks.createExecutionContext();
- //execCtx.setEventListener(new HtmlReportGenerator("/zap/x.html"));
- Filter.setFilterType(smooks, filterType);
- running = true;
- smooks.filter(new StreamSource(getClass().getResourceAsStream("order-message.xml")), null, execCtx);
- }
- }
-}
Deleted: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/order-message.xml
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/order-message.xml 2009-07-07 05:55:43 UTC (rev 16455)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/order-message.xml 2009-07-07 06:06:34 UTC (rev 16456)
@@ -1,42 +0,0 @@
-<order id="231">
- <header>
- <customer number="123123">Joe</customer>
- </header>
- <order-items>
- <order-item id="1">
- <product>111</product>
- <quantity>1</quantity>
- <price>1.00</price>
- </order-item>
- <order-item id="2">
- <product>222</product>
- <quantity>2</quantity>
- <price>2.00</price>
- </order-item>
- <order-item id="3">
- <product>333</product>
- <quantity>3</quantity>
- <price>3.00</price>
- </order-item>
- <order-item id="4">
- <product>444</product>
- <quantity>4</quantity>
- <price>4.00</price>
- </order-item>
- <order-item id="5">
- <product>555</product>
- <quantity>5</quantity>
- <price>5.00</price>
- </order-item>
- <order-item id="6">
- <product>666</product>
- <quantity>6</quantity>
- <price>6.00</price>
- </order-item>
- <order-item id="7">
- <product>777</product>
- <quantity>7</quantity>
- <price>7.00</price>
- </order-item>
- </order-items>
-</order>
\ No newline at end of file
Deleted: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/orderitem-split.ftl
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/orderitem-split.ftl 2009-07-07 05:55:43 UTC (rev 16455)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/orderitem-split.ftl 2009-07-07 06:06:34 UTC (rev 16456)
@@ -1,11 +0,0 @@
-<orderitem id="${order.orderItem.itemId}" order="${order.orderId}">
- <customer>
- <name>${order.customerName}</name>
- <number>${order.customerNumber?c}</number>
- </customer>
- <details>
- <productId>${order.orderItem.productId}</productId>
- <quantity>${order.orderItem.quantity}</quantity>
- <price>${order.orderItem.price}</price>
- </details>
-</orderitem>
\ No newline at end of file
Deleted: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/smooks-config.xml
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/smooks-config.xml 2009-07-07 05:55:43 UTC (rev 16455)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/smooks-config.xml 2009-07-07 06:06:34 UTC (rev 16456)
@@ -1,52 +0,0 @@
-<?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:file="http://www.milyn.org/xsd/smooks/file-routing-1.1.xsd"
- xmlns:ftl="http://www.milyn.org/xsd/smooks/freemarker-1.1.xsd">
-
- <!--
- Filter the message using the SAX Filter (i.e. not DOM, so no
- intermediate DOM, so we can process huge messages...
- -->
- <params>
- <param name="stream.filter.type">SAX</param>
- </params>
-
- <!-- Extract and decode data from the message. Used in the freemarker template (below).
- Note that we could also use a NodeModel here... -->
- <jb:bindings beanId="order" class="java.util.Hashtable" createOnElement="order">
- <jb:value property="orderId" decoder="Integer" data="order/@id"/>
- <jb:value property="customerNumber" decoder="Long" data="header/customer/@number"/>
- <jb:value property="customerName" data="header/customer"/>
- <jb:wiring property="orderItem" beanIdRef="orderItem"/>
- </jb:bindings>
- <jb:bindings beanId="orderItem" class="java.util.Hashtable" createOnElement="order-item">
- <jb:value property="itemId" decoder="Integer" data="order-item/@id"/>
- <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>
-
- <!-- Create/open a file output stream. This is writen to by the freemarker template (below).. -->
- <file:outputStream openOnElement="order-item" resourceName="orderItemSplitStream">
- <file:fileNamePattern>order-${order.orderId}-${order.orderItem.itemId}.xml</file:fileNamePattern>
- <file:destinationDirectoryPattern>src/example/filerouter/target/orders</file:destinationDirectoryPattern>
- <file:listFileNamePattern>order-${order.orderId}.lst</file:listFileNamePattern>
-
- <file:highWaterMark mark="3"/>
- </file:outputStream>
-
- <!--
- Every time we hit the end of an <order-item> element, apply this freemarker template,
- outputting the result to the "orderItemSplitStream" OutputStream, which is the file
- output stream configured above.
- -->
- <ftl:freemarker applyOnElement="order-item">
- <ftl:template>example/filerouter/orderitem-split.ftl</ftl:template>
- <ftl:use>
- <!-- Output the templating result to the "orderItemSplitStream" file output stream... -->
- <ftl:outputTo outputStreamResource="orderItemSplitStream"/>
- </ftl:use>
- </ftl:freemarker>
-
-</smooks-resource-list>
\ No newline at end of file
Deleted: branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/target/input-message.xml
===================================================================
--- branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/target/input-message.xml 2009-07-07 05:55:43 UTC (rev 16455)
+++ branches/jbosstools-3.1.0.M2/smooks/plugins/org.jboss.tools.milyn.smooks1_1_2/src/example/filerouter/target/input-message.xml 2009-07-07 06:06:34 UTC (rev 16456)
@@ -1,12 +0,0 @@
-<order id='332'>
-<header>
-<customer number="123">Joe</customer>
-</header>
-<order-items>
-<order-item id='1'>
-<product>1</product>
-<quantity>2</quantity>
-<price>8.80</price>
-</order-item>
-</order-items>
-</order>
14 years, 11 months
JBoss Tools SVN: r16455 - in trunk/smooks/plugins/org.jboss.tools.smooks.runtime: META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-07-07 01:55:43 -0400 (Tue, 07 Jul 2009)
New Revision: 16455
Removed:
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/xml-apis-1.3.04.jar
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/.classpath
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/META-INF/MANIFEST.MF
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/build.properties
Log:
JBIDE-4536
Remove useless libraries.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/.classpath
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.runtime/.classpath 2009-07-07 05:50:32 UTC (rev 16454)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.runtime/.classpath 2009-07-07 05:55:43 UTC (rev 16455)
@@ -1,14 +1,13 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry exported="true" kind="lib" path="libs/jackson-lgpl-0.9.3.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/xml-apis-1.3.04.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-core-1.1.2.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-commons-1.1.2.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-csv-1.1.2.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-json-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/opencsv-1.8.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry exported="true" kind="lib" path="libs/jackson-lgpl-0.9.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-core-1.1.2.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry exported="true" kind="lib" path="libs/milyn-commons-1.1.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-csv-1.1.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-json-1.1.2.jar"/>
+ <classpathentry kind="lib" path="libs/opencsv-1.8.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.runtime/META-INF/MANIFEST.MF 2009-07-07 05:50:32 UTC (rev 16454)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.runtime/META-INF/MANIFEST.MF 2009-07-07 05:55:43 UTC (rev 16455)
@@ -22,7 +22,6 @@
libs/milyn-smooks-json-1.1.2.jar,
libs/opencsv-1.8.jar,
libs/milyn-smooks-core-1.1.2.jar,
- libs/xml-apis-1.3.04.jar,
libs/jackson-lgpl-0.9.3.jar
Bundle-Localization: plugin
Bundle-Vendor: %providerName
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/build.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.runtime/build.properties 2009-07-07 05:50:32 UTC (rev 16454)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.runtime/build.properties 2009-07-07 05:55:43 UTC (rev 16455)
@@ -4,6 +4,5 @@
libs/milyn-smooks-json-1.1.2.jar,\
libs/opencsv-1.8.jar,\
libs/milyn-smooks-core-1.1.2.jar,\
- libs/xml-apis-1.3.04.jar,\
libs/jackson-lgpl-0.9.3.jar
jars.compile.order =
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/xml-apis-1.3.04.jar
===================================================================
(Binary files differ)
14 years, 11 months
JBoss Tools SVN: r16454 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-07-07 01:50:32 -0400 (Tue, 07 Jul 2009)
New Revision: 16454
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv/CSVDataParser.java
Log:
JBIDE-4217
Add CSV parser test case
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv/CSVDataParser.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv/CSVDataParser.java 2009-07-07 05:36:21 UTC (rev 16453)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv/CSVDataParser.java 2009-07-07 05:50:32 UTC (rev 16454)
@@ -153,9 +153,9 @@
Smooks smooks = new Smooks();
SmooksResourceConfiguration readerConfig = new SmooksResourceConfiguration("org.xml.sax.driver",
CSVReader.class.getName());
-// if(quoteChar == null) quoteChar = "\"";
-// if(skiplines == null) skiplines = "0";
-// if(encoding == null) encoding = "UTF-8";
+ if(quoteChar == null) quoteChar = "\"";
+ if(skiplines == null) skiplines = "0";
+ if(encoding == null) encoding = "UTF-8";
readerConfig.setParameter("fields", fields);
readerConfig.setParameter("separator", separator);
readerConfig.setParameter("quote-char", quoteChar);
14 years, 11 months
JBoss Tools SVN: r16453 - in trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test: csvparser and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-07-07 01:36:21 -0400 (Tue, 07 Jul 2009)
New Revision: 16453
Added:
trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/
trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/CsvParserTest.java
trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/input-message.csv
trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/smooks-config.xml
trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/smooks-config.xml.ext
Modified:
trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/jsonparse/JsonParserTest.java
Log:
JBIDE-4217
Add CSV parser test case
Added: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/CsvParserTest.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/CsvParserTest.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/CsvParserTest.java 2009-07-07 05:36:21 UTC (rev 16453)
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.test.csvparser;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.dom4j.DocumentException;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
+import org.jboss.tools.smooks.configuration.editors.csv.CSVDataParser;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.configuration.editors.xml.TagList;
+import org.jboss.tools.smooks.model.graphics.ext.DocumentRoot;
+import org.jboss.tools.smooks.model.graphics.ext.InputType;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+import org.jboss.tools.smooks.model.graphics.ext.util.SmooksGraphicsExtResourceFactoryImpl;
+import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
+import org.jboss.tools.smooks.model.smooks.util.SmooksResourceFactoryImpl;
+import org.jboss.tools.smooks.test.model11.BaseTestCase;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ *
+ */
+public class CsvParserTest extends BaseTestCase {
+
+ public void testCsvParser() throws IOException, DocumentException, ParserConfigurationException {
+ Resource extResource = new SmooksGraphicsExtResourceFactoryImpl().createResource(null);
+ extResource.load(CsvParserTest.class.getResourceAsStream("smooks-config.xml.ext"), null);
+ SmooksGraphicsExtType extType = ((DocumentRoot) extResource.getContents().get(0)).getSmooksGraphicsExt();
+ Resource smooksResource = new SmooksResourceFactoryImpl().createResource(null);
+
+ assertNotNull(extType);
+ InputType inputType = null;
+ List<?> ilist = extType.getInput();
+ for (Iterator<?> iterator = ilist.iterator(); iterator.hasNext();) {
+ Object object = (Object) iterator.next();
+ if (object instanceof InputType) {
+ if ("csv".equalsIgnoreCase(((InputType) object).getType())) {
+ inputType = (InputType) object;
+ break;
+ }
+ }
+ }
+ assertNotNull(inputType);
+
+ smooksResource.load(CsvParserTest.class.getResourceAsStream("smooks-config.xml"), null);
+
+ SmooksResourceListType resourceList = ((org.jboss.tools.smooks.model.smooks.DocumentRoot) smooksResource
+ .getContents().get(0)).getSmooksResourceList();
+ assertNotNull(resourceList);
+
+ CSVDataParser parser = new CSVDataParser();
+ TagList tagList = parser.parseCSV(CsvParserTest.class.getResourceAsStream("input-message.csv"), inputType,
+ resourceList);
+ assertNotNull(tagList);
+ checkTagList1(tagList);
+
+ for (Iterator<?> iterator = ilist.iterator(); iterator.hasNext();) {
+ Object object = (Object) iterator.next();
+ if (object instanceof InputType) {
+ if ("csv".equalsIgnoreCase(((InputType) object).getType()) && object != inputType) {
+ inputType = (InputType) object;
+ break;
+ }
+ }
+ }
+
+ parser = new CSVDataParser();
+ tagList = parser.parseCSV(CsvParserTest.class.getResourceAsStream("input-message.csv"), inputType,
+ resourceList);
+ assertNotNull(tagList);
+ checkTagList2(tagList);
+ }
+
+ private void checkNode(String nodeName , IXMLStructuredObject tag){
+ IXMLStructuredObject node1 = SmooksUIUtils.localXMLNodeWithNodeName(nodeName, tag);
+ assertNotNull(node1);
+ String selector = SmooksUIUtils.generateFullPath(node1, "/");
+ assertEquals("/csv-set/csv-record/"+nodeName, selector);
+
+ }
+
+ private void checkTagList2(TagList tagList){
+ assertEquals(1, tagList.getChildren().size());
+ IXMLStructuredObject tag = tagList.getChildren().get(0);
+ assertEquals("csv-set",tag.getNodeName());
+
+ IXMLStructuredObject child = tag.getChildren().get(0);
+ assertEquals("csv-record", child.getNodeName());
+
+ checkNode("a",tag);
+ checkNode("b",tag);
+ checkNode("c",tag);
+ checkNode("d",tag);
+ checkNode("e",tag);
+ }
+
+ private void checkTagList1(TagList tagList){
+ assertEquals(1, tagList.getChildren().size());
+ IXMLStructuredObject tag = tagList.getChildren().get(0);
+ assertEquals("csv-set",tag.getNodeName());
+
+ IXMLStructuredObject child = tag.getChildren().get(0);
+ assertEquals("csv-record", child.getNodeName());
+
+ checkNode("firstname",tag);
+ checkNode("lastname",tag);
+ checkNode("gender",tag);
+ checkNode("age",tag);
+ checkNode("country",tag);
+ }
+}
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/CsvParserTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/input-message.csv
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/input-message.csv (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/input-message.csv 2009-07-07 05:36:21 UTC (rev 16453)
@@ -0,0 +1,2 @@
+Tom,Fennelly,Male,4,Ireland
+Mike,Fennelly,Male,2,Ireland
\ No newline at end of file
Added: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/smooks-config.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/smooks-config.xml (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/smooks-config.xml 2009-07-07 05:36:21 UTC (rev 16453)
@@ -0,0 +1,11 @@
+<?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.1.xsd">
+
+ <!--
+ Configure the CSV Reader to read the message and change it into a stream of SAX events.
+ -->
+ <csv:reader fields="firstname,lastname,gender,age,country" />
+
+</smooks-resource-list>
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/smooks-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/smooks-config.xml.ext
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/smooks-config.xml.ext (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/csvparser/smooks-config.xml.ext 2009-07-07 05:36:21 UTC (rev 16453)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<smooks-graphics-ext xmlns="http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd">
+ <input type="csv">
+ <param name="path">Workspace://java_project/csv-to-xml/input-message.csv</param>
+ <param name="linkCSVReader">true</param>
+ </input>
+ <input type="csv">
+ <param name="path">Workspace://java_project/csv-to-xml/input-message.csv</param>
+ <param name="fields">a,b,c,d,e</param>
+ <param name="quoteChar">"</param>
+ <param name="encoding">UTF-8</param>
+ <param name="separator">,</param>
+ </input>
+</smooks-graphics-ext>
\ No newline at end of file
Modified: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/jsonparse/JsonParserTest.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/jsonparse/JsonParserTest.java 2009-07-07 05:34:35 UTC (rev 16452)
+++ trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/jsonparse/JsonParserTest.java 2009-07-07 05:36:21 UTC (rev 16453)
@@ -55,7 +55,9 @@
reader = (JsonReader)object;
}
}
+ try{
IXMLStructuredObject model = parser.parseJsonFile(JsonParserTest.class.getResourceAsStream("input-message.jsn"), reader);
+
List<IXMLStructuredObject> children = model.getChildren();
assertEquals(children.size(), 1);
IXMLStructuredObject rootModel = children.get(0);
@@ -68,6 +70,9 @@
assertEquals(children.size(), 1);
rootModel = children.get(0);
checkModel(rootModel);
+ }catch(Throwable t){
+ t.printStackTrace();
+ }
}
private void checkModel(IXMLStructuredObject model){
14 years, 11 months
JBoss Tools SVN: r16452 - in trunk/smooks/plugins: org.jboss.tools.smooks.runtime/META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-07-07 01:34:35 -0400 (Tue, 07 Jul 2009)
New Revision: 16452
Removed:
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/antlr-2.7.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/commons-codec-1.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/commons-httpclient-3.1.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/commons-lang-2.1.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/commons-logging-1.1.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/commons-net-20030805.205232.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/flute-1.3.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/freemarker-2.3.9.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/groovy-all-1.5.0.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/jline-0.9.93.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-edisax-parser-1.1.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-magger-1.1.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-css-1.1.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-edi-1.1.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-javabean-1.1.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-misc-1.1.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-routing-1.1.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-scripting-1.1.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-servlet-1.1.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-templating-1.1.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-tinak-1.1.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/mvel-1.3.12-java1.5.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/nekohtml-0.9.5.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/ognl-2.6.9.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/sac-1.3.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/stringtemplate-2.2.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/xercesImpl-2.9.1.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/xpp3_min-1.1.3.4.O.jar
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/xstream-1.2.2.jar
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/.classpath
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/META-INF/MANIFEST.MF
trunk/smooks/plugins/org.jboss.tools.smooks.runtime/build.properties
trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
Log:
JBIDE-4536
Remove some useless libraries.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/.classpath
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.runtime/.classpath 2009-07-07 00:25:27 UTC (rev 16451)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.runtime/.classpath 2009-07-07 05:34:35 UTC (rev 16452)
@@ -1,35 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry exported="true" kind="lib" path="libs/jackson-lgpl-0.9.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="libs/xml-apis-1.3.04.jar"/>
+ <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-core-1.1.2.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="lib" path="libs/flute-1.3.jar"/>
- <classpathentry kind="lib" path="libs/freemarker-2.3.9.jar"/>
- <classpathentry kind="lib" path="libs/groovy-all-1.5.0.jar"/>
- <classpathentry kind="lib" path="libs/jackson-lgpl-0.9.3.jar"/>
- <classpathentry kind="lib" path="libs/jline-0.9.93.jar"/>
<classpathentry exported="true" kind="lib" path="libs/milyn-commons-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-edisax-parser-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/milyn-magger-1.1.2.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-core-1.1.2.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-css-1.1.2.jar"/>
<classpathentry exported="true" kind="lib" path="libs/milyn-smooks-csv-1.1.2.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-edi-1.1.2.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-javabean-1.1.2.jar"/>
<classpathentry exported="true" kind="lib" path="libs/milyn-smooks-json-1.1.2.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-misc-1.1.2.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-routing-1.1.2.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-scripting-1.1.2.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-servlet-1.1.2.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-smooks-templating-1.1.2.jar"/>
- <classpathentry exported="true" kind="lib" path="libs/milyn-tinak-1.1.2.jar"/>
- <classpathentry kind="lib" path="libs/mvel-1.3.12-java1.5.jar"/>
- <classpathentry kind="lib" path="libs/nekohtml-0.9.5.jar"/>
- <classpathentry kind="lib" path="libs/ognl-2.6.9.jar"/>
<classpathentry kind="lib" path="libs/opencsv-1.8.jar"/>
- <classpathentry kind="lib" path="libs/stringtemplate-2.2.jar"/>
- <classpathentry kind="lib" path="libs/xml-apis-1.3.04.jar"/>
- <classpathentry kind="lib" path="libs/xpp3_min-1.1.3.4.O.jar"/>
- <classpathentry kind="lib" path="libs/xstream-1.2.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.runtime/META-INF/MANIFEST.MF 2009-07-07 00:25:27 UTC (rev 16451)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.runtime/META-INF/MANIFEST.MF 2009-07-07 05:34:35 UTC (rev 16452)
@@ -17,40 +17,17 @@
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .,
- libs/flute-1.3.jar,
- libs/freemarker-2.3.9.jar,
- libs/groovy-all-1.5.0.jar,
- libs/jackson-lgpl-0.9.3.jar,
- libs/jline-0.9.93.jar,
libs/milyn-commons-1.1.2.jar,
- libs/milyn-edisax-parser-1.1.2.jar,
- libs/milyn-magger-1.1.2.jar,
- libs/milyn-smooks-core-1.1.2.jar,
- libs/milyn-smooks-css-1.1.2.jar,
libs/milyn-smooks-csv-1.1.2.jar,
- libs/milyn-smooks-edi-1.1.2.jar,
- libs/milyn-smooks-javabean-1.1.2.jar,
libs/milyn-smooks-json-1.1.2.jar,
- libs/milyn-smooks-misc-1.1.2.jar,
- libs/milyn-smooks-routing-1.1.2.jar,
- libs/milyn-smooks-scripting-1.1.2.jar,
- libs/milyn-smooks-servlet-1.1.2.jar,
- libs/milyn-smooks-templating-1.1.2.jar,
- libs/milyn-tinak-1.1.2.jar,
- libs/mvel-1.3.12-java1.5.jar,
- libs/nekohtml-0.9.5.jar,
- libs/ognl-2.6.9.jar,
libs/opencsv-1.8.jar,
- libs/stringtemplate-2.2.jar,
+ libs/milyn-smooks-core-1.1.2.jar,
libs/xml-apis-1.3.04.jar,
- libs/xpp3_min-1.1.3.4.O.jar,
- libs/xstream-1.2.2.jar
+ libs/jackson-lgpl-0.9.3.jar
Bundle-Localization: plugin
Bundle-Vendor: %providerName
Export-Package: org.milyn,
org.milyn.cdr,
- org.milyn.css,
org.milyn.csv,
org.milyn.json,
- org.milyn.smooks.edi,
org.milyn.xml
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/build.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.runtime/build.properties 2009-07-07 00:25:27 UTC (rev 16451)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.runtime/build.properties 2009-07-07 05:34:35 UTC (rev 16452)
@@ -1,30 +1,9 @@
bin.includes = META-INF/,\
- libs/flute-1.3.jar,\
- libs/freemarker-2.3.9.jar,\
- libs/groovy-all-1.5.0.jar,\
- libs/jackson-lgpl-0.9.3.jar,\
- libs/jline-0.9.93.jar,\
libs/milyn-commons-1.1.2.jar,\
- libs/milyn-edisax-parser-1.1.2.jar,\
- libs/milyn-magger-1.1.2.jar,\
- libs/milyn-smooks-core-1.1.2.jar,\
- libs/milyn-smooks-css-1.1.2.jar,\
libs/milyn-smooks-csv-1.1.2.jar,\
- libs/milyn-smooks-edi-1.1.2.jar,\
- libs/milyn-smooks-javabean-1.1.2.jar,\
libs/milyn-smooks-json-1.1.2.jar,\
- libs/milyn-smooks-misc-1.1.2.jar,\
- libs/milyn-smooks-routing-1.1.2.jar,\
- libs/milyn-smooks-scripting-1.1.2.jar,\
- libs/milyn-smooks-servlet-1.1.2.jar,\
- libs/milyn-smooks-templating-1.1.2.jar,\
- libs/milyn-tinak-1.1.2.jar,\
- libs/mvel-1.3.12-java1.5.jar,\
- libs/nekohtml-0.9.5.jar,\
- libs/ognl-2.6.9.jar,\
libs/opencsv-1.8.jar,\
- libs/stringtemplate-2.2.jar,\
+ libs/milyn-smooks-core-1.1.2.jar,\
libs/xml-apis-1.3.04.jar,\
- libs/xpp3_min-1.1.3.4.O.jar,\
- libs/xstream-1.2.2.jar
+ libs/jackson-lgpl-0.9.3.jar
jars.compile.order =
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/antlr-2.7.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/commons-codec-1.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/commons-httpclient-3.1.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/commons-lang-2.1.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/commons-logging-1.1.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/commons-net-20030805.205232.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/flute-1.3.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/freemarker-2.3.9.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/groovy-all-1.5.0.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/jline-0.9.93.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-edisax-parser-1.1.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-magger-1.1.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-css-1.1.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-edi-1.1.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-javabean-1.1.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-misc-1.1.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-routing-1.1.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-scripting-1.1.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-servlet-1.1.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-smooks-templating-1.1.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/milyn-tinak-1.1.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/mvel-1.3.12-java1.5.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/nekohtml-0.9.5.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/ognl-2.6.9.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/sac-1.3.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/stringtemplate-2.2.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/xercesImpl-2.9.1.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/xpp3_min-1.1.3.4.O.jar
===================================================================
(Binary files differ)
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.runtime/libs/xstream-1.2.2.jar
===================================================================
(Binary files differ)
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2009-07-07 00:25:27 UTC (rev 16451)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2009-07-07 05:34:35 UTC (rev 16452)
@@ -34,6 +34,7 @@
Bundle-ClassPath: libs/dom4j-1.6.1.jar,
.
Export-Package: org.jboss.tools.smooks.configuration.editors,
+ org.jboss.tools.smooks.configuration.editors.csv,
org.jboss.tools.smooks.configuration.editors.javabean,
org.jboss.tools.smooks.configuration.editors.uitls,
org.jboss.tools.smooks.configuration.editors.xml
14 years, 11 months