[jbosstools-commits] JBoss Tools SVN: r23630 - in branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration: editors and 1 other directory.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Wed Jul 21 06:02:55 EDT 2010
Author: DartPeng
Date: 2010-07-21 06:02:54 -0400 (Wed, 21 Jul 2010)
New Revision: 23630
Added:
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java
Removed:
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/GraphicsConstants.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/ProcessNodeType.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeDependency.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksInputType.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksModelUtils.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksUIUtils.java
Log:
Deleted: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/GraphicsConstants.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/GraphicsConstants.java 2010-07-21 09:51:36 UTC (rev 23629)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/GraphicsConstants.java 2010-07-21 10:02:54 UTC (rev 23630)
@@ -1,115 +0,0 @@
-package org.jboss.tools.smooks.configuration;
-
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.forms.FormColors;
-import org.eclipse.ui.forms.IFormColors;
-
-public final class GraphicsConstants {
-
- public static Color BORDER_CORLOR;
-
- public static Color TB_BG_CORLOR;
-
- public static Color FONT_COLOR ;
-
- static {
- FormColors toolkit = new FormColors(Display.getDefault());
- BORDER_CORLOR = toolkit.getBorderColor();
- TB_BG_CORLOR = toolkit.getColor(IFormColors.TB_BG);
- FONT_COLOR = toolkit.getColor(IFormColors.TITLE);
-// toolkit.dispose();
- }
-
- public static final String IMAGE_JAVA_AMPPING_TASK = "icons/full/obj32/java_mapping_task.jpg"; //$NON-NLS-1$
-
- public static final String IMAGE_DRAG_LINK = "icons/full/obj16/drag_link.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_ADD_TASK_BUTTON = "icons/full/obj16/add_task_button.png"; //$NON-NLS-1$
-
- public static final String IMAGE_LINK16 = "icons/full/obj16/connection16.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_LINK24 = "icons/full/obj16/connection24.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_APPLY_XSL_TASK = "icons/full/obj32/xsl_task.png"; //$NON-NLS-1$
-
- public static final String IMAGE_APPLY_FREEMARKER_TASK = "icons/full/obj32/freemarker_task.jpg"; //$NON-NLS-1$
-
- public static final String IMAGE_INPUT_TASK = "icons/full/obj32/input_task.jpg"; //$NON-NLS-1$
-
- public static final String IMAGE_JAVA_ATTRIBUTE = "icons/full/obj16/att_obj.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_VALIDATED_TAG = "icons/full/obj16/validated_tag.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_PROPERTY_SHEET_PAGE = "icons/full/prop_ps.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_JAVA_OBJECT = "icons/full/obj16/class_obj.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_PACKAGE_OBJECT = "icons/full/obj16/package_obj.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_XSL_CHOICE = "icons/full/obj16/xsl_choice.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_XSL_TEMPLATE_APPLY = "icons/full/obj16/xsl_template_apply.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_XSL_FOREACH = "icons/full/obj16/xsl_foreach.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_XSL_SORT = "icons/full/obj16/xsl_sort.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_XSL_IF = "icons/full/obj16/xsl_if.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_XSL_STYLESHEET = "icons/full/obj16/xsl_stylesheet.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_XSL_TEMPLATE = "icons/full/obj16/xsl_template.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_OVR_ERROR = "icons/full/ovr16/error_co.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_OVR_WARING = "icons/full/ovr16/warning_co.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_JAVA_INTERFACE = "icons/full/obj16/int_obj.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_JAVA_COLLECTION = "icons/full/obj16/javalistmodel.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_JAVA_BEAN = "icons/full/obj16/java_bean.png"; //$NON-NLS-1$
-
- public static final String IMAGE_INPUT_DATA_HEADER = "icons/full/obj16/input_data_header.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_JAVA_ARRAY = "icons/full/obj16/javaarraymodel.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_CHECKBOX_CHECK = "icons/full/obj16/checkbox_checked.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_CHECKBOX_UNCHECK = "icons/full/obj16/checkbox_uncheck.gif"; //$NON-NLS-1$
-
- public static final String JAVA_PROPERTY_ICON_PATH = IMAGE_JAVA_ATTRIBUTE;
-
- public static final String JAVA_PROPERTY_ICON = JAVA_PROPERTY_ICON_PATH;
-
- public static final String IMAGE_PATH_ERROR = "icons/full/obj16/error_obj.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_PATH_WARNING = "icons/full/obj16/warning_obj.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_PATH_BLANK = "icons/full/obj16/blank.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_WARNING = IMAGE_PATH_WARNING;
-
- public static final String IMAGE_ERROR = IMAGE_PATH_ERROR;
-
- public static final String IMAGE_EMPTY = IMAGE_PATH_BLANK;
-
- public static final String IMAGE_XML_ELEMENT = "icons/full/obj16/element_obj.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_XML_ATTRIBUTE = "icons/full/obj16/attribute_obj.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_MAPPING_LINE = "icons/full/obj16/mapping_line.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_BINDING_LINE = "icons/full/obj16/binding_line.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_UNKNOWN_OBJ = "icons/full/obj16/unknown_obj.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_JAVA_FILE = "icons/full/obj16/jcu_obj.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_CSV_FILE = "icons/full/obj16/csvfile.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_XML_FILE = "icons/full/obj16/XMLFile.gif"; //$NON-NLS-1$
-
- public static final String IMAGE_XSD_FILE = "icons/full/obj16/XSDFile.gif"; //$NON-NLS-1$
-}
Deleted: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/ProcessNodeType.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/ProcessNodeType.java 2010-07-21 09:51:36 UTC (rev 23629)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/ProcessNodeType.java 2010-07-21 10:02:54 UTC (rev 23630)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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) 2005-2006, JBoss Inc.
- */
-package org.jboss.tools.smooks.configuration;
-
-/**
- * Configuration process node type enumeration.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public enum ProcessNodeType {
- INPUT_CSV,
- INPUT_EDI,
- INPUT_JSON,
-
- BASE,
- CORE,
- CALC,
- DATASOURCE,
- FIXED_LENGTH,
- JAVA_BINDING,
- PERSISTENCE,
- ROUTING,
- RULES,
- SCRIPTING,
- TEMPLATING,
- VALIDATION,
-}
\ No newline at end of file
Deleted: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeDependency.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeDependency.java 2010-07-21 09:51:36 UTC (rev 23629)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeDependency.java 2010-07-21 10:02:54 UTC (rev 23630)
@@ -1,215 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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) 2005-2006, JBoss Inc.
- */
-package org.jboss.tools.smooks.configuration;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.milyn.Smooks;
-import org.milyn.SmooksException;
-import org.milyn.container.ExecutionContext;
-import org.milyn.delivery.sax.SAXElement;
-import org.milyn.delivery.sax.SAXVisitBefore;
-
-/**
- * Smooks runtime dependency.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class RuntimeDependency {
-
- /**
- * Smooks runtime versions.
- */
- public static enum SmooksVersion {
- v1_0,
- v1_1,
- v1_2,
- v1_3,
- }
-
- /**
- * The Maven Artfact ID of the Smooks dependency.
- */
- private String artifactId;
- /**
- * The configuration namespace URI for the config..
- */
- private URI namespaceURI;
- /**
- * If the namepsaceURI is unsupported by the editor, this property can contain a change-to/upgrade/downgrade namepsace.
- */
- private URI changeToNS;
- /**
- * Whether or not the configuration is supported by the Editor. Note that this property being 'false' is not the
- * same as saying the config is not supported by the Smooks Runtime (see the 'runtimeVersions' property).
- */
- private boolean supportedByEditor;
- /**
- * The list of Smooks Runtimes that can support this configuration. Note this does not mean
- * the editor can support the configuration (see the 'supportedByEditor' property).
- */
- private List<SmooksVersion> runtimeVersions;
-
- private static final String GROUP_ID = "org.milyn"; //$NON-NLS-1$
- private static final String META_INF = "META-INF"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_CORE = "milyn-smooks-core"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_CSV = "milyn-smooks-csv"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_EDI = "milyn-smooks-edi"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_JSON = "milyn-smooks-json"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_TEMPLATING = "milyn-smooks-templating"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_JAVABEAN = "milyn-smooks-javabean"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_FIXED_LENGTH = "milyn-smooks-fixed-length"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_CALC = "milyn-smooks-calc"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_PERSISTENCE = "milyn-smooks-persistence"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_ROUTING = "milyn-smooks-routing"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_RULES = "milyn-smooks-rules"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_SCRIPTING = "milyn-smooks-scripting"; //$NON-NLS-1$
- private static final String MILYN_SMOOKS_VALIDATION = "milyn-smooks-validation"; //$NON-NLS-1$
-
- private RuntimeDependency(String artifactId, URI namespaceURI, URI changeToNS, boolean supportedByEditor, List<SmooksVersion> runtimeVersions) {
- this.artifactId = artifactId;
- this.namespaceURI = namespaceURI;
- this.changeToNS = changeToNS;
- this.supportedByEditor = supportedByEditor;
- }
-
- public String getGroupId() {
- return GROUP_ID;
- }
- public String getArtifactId() {
- return artifactId;
- }
- public URI getNamespaceURI() {
- return namespaceURI;
- }
- public URI getChangeToNS() {
- return changeToNS;
- }
- public boolean isSupportedByEditor() {
- return supportedByEditor;
- }
- public boolean isSupportedBySmooksVersion(SmooksVersion smooksVersion) {
- return runtimeVersions.contains(smooksVersion);
- }
- public boolean isOnProjectClasspath(ClassLoader projectClassloader) {
- String resourcePath = META_INF + namespaceURI.getPath();
- return (projectClassloader.getResource(resourcePath) != null);
- }
-
- public static void addDependencyChecklist(Smooks metadataExtractor) {
- // Add the supported feature dependency details...
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.BASE, "smooks-1.1.xsd", null, true, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CSV, ProcessNodeType.INPUT_CSV, "smooks/csv-1.2.xsd", null, true, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_EDI, ProcessNodeType.INPUT_EDI, "smooks/edi-1.2.xsd", null, true, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_JSON, ProcessNodeType.INPUT_JSON, "smooks/json-1.2.xsd", null, true, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_TEMPLATING, ProcessNodeType.TEMPLATING, "smooks/freemarker-1.1.xsd", null, true, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/freemarker"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_JAVABEAN, ProcessNodeType.JAVA_BINDING, "smooks/javabean-1.2.xsd", null, true, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/bean"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // Add the unsupported feature dependency details...
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.BASE, "smooks-1.0.xsd", "smooks-1.1.xsd", false, SmooksVersion.v1_0, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CSV, ProcessNodeType.INPUT_CSV, "smooks/csv-1.1.xsd", "smooks/csv-1.2.xsd", false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CSV, ProcessNodeType.INPUT_CSV, "smooks/csv-1.3.xsd", "smooks/csv-1.2.xsd", false, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_EDI, ProcessNodeType.INPUT_EDI, "smooks/edi-1.1.xsd", "smooks/edi-1.2.xsd", false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_JSON, ProcessNodeType.INPUT_JSON, "smooks/json-1.1.xsd", "smooks/json-1.2.xsd", false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_FIXED_LENGTH, ProcessNodeType.FIXED_LENGTH, "smooks/fixed-length-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.DATASOURCE, "smooks/datasource-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/direct"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.DATASOURCE, "smooks/datasource-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/JNDI"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.DATASOURCE, "smooks/datasource-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/direct"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.DATASOURCE, "smooks/datasource-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/JNDI"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.CORE, "smooks/core-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/filterSettings"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.CORE, "smooks/core-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/namespaces"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.CORE, "smooks/core-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/terminate"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_TEMPLATING, ProcessNodeType.TEMPLATING, "smooks/xsl-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/xsl"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_JAVABEAN, ProcessNodeType.JAVA_BINDING, "smooks/javabean-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/binding"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_JAVABEAN, ProcessNodeType.JAVA_BINDING, "smooks/javabean-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/bean"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CALC, ProcessNodeType.CALC, "smooks/calc-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/counter"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_PERSISTENCE, ProcessNodeType.PERSISTENCE, "smooks/persistence-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/inserter"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_PERSISTENCE, ProcessNodeType.PERSISTENCE, "smooks/persistence-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/updater"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_PERSISTENCE, ProcessNodeType.PERSISTENCE, "smooks/persistence-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/deleter"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_PERSISTENCE, ProcessNodeType.PERSISTENCE, "smooks/persistence-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/deleter"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_PERSISTENCE, ProcessNodeType.PERSISTENCE, "smooks/persistence-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/flusher"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_PERSISTENCE, ProcessNodeType.PERSISTENCE, "smooks/persistence-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/locator"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_ROUTING, ProcessNodeType.ROUTING, "smooks/db-routing-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/executor"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_ROUTING, ProcessNodeType.ROUTING, "smooks/db-routing-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/resultSetRowSelector"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_ROUTING, ProcessNodeType.ROUTING, "smooks/file-routing-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/outputStream"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_ROUTING, ProcessNodeType.ROUTING, "smooks/io-routing-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/router"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_ROUTING, ProcessNodeType.ROUTING, "smooks/jms-routing-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/router"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_ROUTING, ProcessNodeType.ROUTING, "smooks/jms-routing-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/router"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_RULES, ProcessNodeType.RULES, "smooks/rules-1.0.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/ruleBases"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_SCRIPTING, ProcessNodeType.SCRIPTING, "smooks/groovy-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/groovy"); //$NON-NLS-1$ //$NON-NLS-2$
- metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_VALIDATION, ProcessNodeType.VALIDATION, "smooks/validation-1.0.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/rule"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- private static class RuntimeDependencyTracker implements SAXVisitBefore {
-
- private String artifactId;
- private ProcessNodeType nodeType;
- private URI namespaceURI;
- private URI changeToNS;
- /**
- * Whether or not the configuration is supported by the Editor. Note that this property being 'false' is not the
- * same as saying the config is not supported by the Smooks Runtime (see the 'runtimeVersions' property).
- */
- private boolean supportedByEditor;
- /**
- * The list of Smooks Runtimes that can support this configuration. Note this does not mean
- * the editor can support the configuration (see the 'supportedByEditor' property).
- */
- private List<SmooksVersion> runtimeVersions = new ArrayList<SmooksVersion>();
-
- public RuntimeDependencyTracker(String artifactId, ProcessNodeType nodeType, String xsd, String changeToXSD, boolean supportedByEditor, SmooksVersion... runtimeVersions) {
- this.artifactId = artifactId;
- this.nodeType = nodeType;
- this.namespaceURI = URI.create("http://www.milyn.org/xsd/" + xsd); //$NON-NLS-1$
- if(changeToXSD != null) {
- this.changeToNS = URI.create("http://www.milyn.org/xsd/" + changeToXSD); //$NON-NLS-1$
- }
- this.supportedByEditor = supportedByEditor;
- if(runtimeVersions != null) {
- this.runtimeVersions.addAll(Arrays.asList(runtimeVersions));
- }
- }
-
- public void visitBefore(SAXElement configElement, ExecutionContext execContext) throws SmooksException, IOException {
- RuntimeMetadata metadata = (RuntimeMetadata) execContext.getAttribute(RuntimeMetadata.class);
- Set<URI> alreadyProcessed = (Set<URI>) execContext.getAttribute(RuntimeDependencyTracker.class);
-
- metadata.getNodeTypes().add(nodeType);
-
- if(alreadyProcessed == null) {
- alreadyProcessed = new HashSet<URI>();
- execContext.setAttribute(RuntimeDependencyTracker.class, alreadyProcessed);
- }
-
- // If the config namespace hasn't already been added, we need to add it...
- String configNS = configElement.getName().getNamespaceURI();
- if(configNS.equals(namespaceURI.toString()) && !alreadyProcessed.contains(namespaceURI)) {
- metadata.getDependencies().add(new RuntimeDependency(artifactId, namespaceURI, changeToNS, supportedByEditor, runtimeVersions));
- alreadyProcessed.add(namespaceURI);
- }
- }
- }
-}
Deleted: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java 2010-07-21 09:51:36 UTC (rev 23629)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java 2010-07-21 10:02:54 UTC (rev 23630)
@@ -1,250 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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) 2005-2006, JBoss Inc.
- */
-package org.jboss.tools.smooks.configuration;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.xml.transform.stream.StreamSource;
-
-import org.eclipse.core.resources.IResource;
-import org.milyn.Smooks;
-import org.milyn.SmooksException;
-import org.milyn.container.ExecutionContext;
-import org.milyn.delivery.sax.SAXElement;
-import org.milyn.delivery.sax.SAXVisitAfter;
-import org.milyn.delivery.sax.SAXVisitBefore;
-
-/**
- * Smooks configuration runtime metadata.
- * <p/>
- * Verifies the specified config is a Smooks configuration and extracts metadata
- * from the config e.g. input file, dependencies.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class RuntimeMetadata {
-
- private Smooks metadataExtractor;
- private boolean isSmooksConfig;
- private boolean isValidSmooksConfig;
- private File configFile;
- private String inputType;
- private File inputFile;
- private Set<ProcessNodeType> processNodeTypes = new HashSet<ProcessNodeType>();
- private List<RuntimeDependency> dependencies = new ArrayList<RuntimeDependency>();
-
- public RuntimeMetadata() {
- metadataExtractor = new Smooks();
- metadataExtractor.addVisitor(new SmooksConfigAsserter(), "/smooks-resource-list", //$NON-NLS-1$
- "http://www.milyn.org/xsd/smooks-1.1.xsd"); //$NON-NLS-1$
- metadataExtractor.addVisitor(new InputParamExtractor(), "/smooks-resource-list/params/param", //$NON-NLS-1$
- "http://www.milyn.org/xsd/smooks-1.1.xsd"); //$NON-NLS-1$
-
- // Build dependency map...
- RuntimeDependency.addDependencyChecklist(metadataExtractor);
- }
-
- public boolean isSmooksConfig() {
- return isSmooksConfig;
- }
-
- public boolean isValidSmooksConfig() {
- return isValidSmooksConfig;
- }
-
- public String getErrorMessage() {
- if (isValidSmooksConfig) {
- throw new IllegalStateException(
- Messages.RuntimeMetadata_Error_Invalid_GetErrorMessage_Call);
- }
-
- if (configFile == null) {
- return Messages.RuntimeMetadata_Error_SmooksFile_Does_Not_Exist;
- } else if (!configFile.exists()) {
- return Messages.RuntimeMetadata_Error_SmooksFile_Not_Found;
- } else if (!configFile.isFile()) {
- return Messages.RuntimeMetadata_Error_SmooksFile_Not_Readable;
- } else if (!isSmooksConfig) {
- return Messages.RuntimeMetadata_Error_SmooksFile_Not_Valid;
- } else if (inputFile == null) {
- return Messages.RuntimeMetadata_Error_Input_Task_No_Input_File;
- } else if (!inputFile.exists()) {
- return Messages.RuntimeMetadata_Error_Input_Task_Input_File_Not_Found;
- } else if (!inputFile.isFile()) {
- return Messages.RuntimeMetadata_Error_Input_Task_Input_File_Cannot_Be_Read;
- }
-
- return ""; //$NON-NLS-1$
- }
-
- public File getConfigFile() {
- return configFile;
- }
-
- public String getInputType() {
- return inputType;
- }
-
- public File getInputFile() {
- return inputFile;
- }
-
- public List<RuntimeDependency> getDependencies() {
- return dependencies;
- }
-
- public Set<ProcessNodeType> getNodeTypes() {
- return processNodeTypes;
- }
-
- public String getNodeTypesString() {
- StringBuilder builder = new StringBuilder();
- for (ProcessNodeType nodeType : processNodeTypes) {
- if (builder.length() > 0) {
- builder.append(',');
- }
- builder.append(nodeType.toString());
- }
- return builder.toString();
- }
-
- public void setSmooksConfig(IResource smooksConfig) {
- reset();
-
- if (smooksConfig != null) {
- setSmooksConfig(new File(smooksConfig.getRawLocation().toOSString().trim()));
- }
- }
-
- public void setSmooksConfig(File file) {
- reset();
-
- if (file != null) {
- configFile = file;
- if (configFile.exists() && configFile.isFile()) {
- try {
- digestSmooksConfig(new FileInputStream(configFile));
- } catch (Exception e) {
- // Not a valid Smooks config file
- }
- }
- }
- }
-
- public void setSmooksConfig(File file, InputStream inputStream) {
- if (inputStream == null) {
- setSmooksConfig(file);
- } else {
- configFile = file;
- if (configFile.exists() && configFile.isFile()) {
- digestSmooksConfig(inputStream);
- }
- }
- }
-
- private void digestSmooksConfig(InputStream inputStream) {
- ExecutionContext execContext = metadataExtractor.createExecutionContext();
- Properties inputParams = new Properties();
-
- try {
- // Filter the config and capture the input params...
- execContext.setAttribute(InputParamExtractor.class, inputParams);
- execContext.setAttribute(RuntimeMetadata.class, this);
-
- metadataExtractor.filterSource(execContext, new StreamSource(inputStream));
-
- inputType = inputParams.getProperty(SmooksModelUtils.INPUT_TYPE);
- if (inputType != null) {
- String inputPath = inputParams.getProperty(inputType);
- if (inputPath != null) {
- String resolvedFilePath;
- try {
- resolvedFilePath = SmooksUIUtils.parseFilePath(inputPath.trim());
- } catch (Exception e) {
- // It's not a valid config...
- inputFile = new File(inputPath.trim());
- return;
- }
-
- inputFile = new File(resolvedFilePath);
- if (inputFile.exists() && inputFile.isFile()) {
- isValidSmooksConfig = true;
- }
- }
- }
- } catch (Exception e) {
- // Not a valid Smooks config file
- }
- }
-
-
- private void reset() {
- isSmooksConfig = false;
- isValidSmooksConfig = false;
- configFile = null;
- inputType = null;
- inputFile = null;
- processNodeTypes.clear();
- }
-
- private static class SmooksConfigAsserter implements SAXVisitBefore {
- public void visitBefore(SAXElement paramElement, ExecutionContext execContext) throws SmooksException,
- IOException {
- RuntimeMetadata metadata = (RuntimeMetadata) execContext.getAttribute(RuntimeMetadata.class);
- metadata.isSmooksConfig = true;
- }
- }
-
- private static class InputParamExtractor implements SAXVisitBefore, SAXVisitAfter {
-
- public void visitBefore(SAXElement paramElement, ExecutionContext execContext) throws SmooksException,
- IOException {
- paramElement.accumulateText();
- }
-
- public void visitAfter(SAXElement paramElement, ExecutionContext execContext) throws SmooksException,
- IOException {
- Properties inputParams = (Properties) execContext.getAttribute(InputParamExtractor.class);
-
- if (inputParams != null) {
- String paramName = paramElement.getAttribute("name"); //$NON-NLS-1$
-
- if (paramName != null) {
- if (paramName.equals(SmooksModelUtils.INPUT_TYPE)) {
- inputParams.setProperty(SmooksModelUtils.INPUT_TYPE, paramElement.getTextContent());
- } else {
- String paramType = paramElement.getAttribute("type"); //$NON-NLS-1$
- if (paramType != null && paramType.equals(SmooksModelUtils.INPUT_ACTIVE_TYPE)) {
- inputParams.setProperty(paramName, paramElement.getTextContent());
- }
- }
- }
- }
- }
- }
-}
Deleted: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java 2010-07-21 09:51:36 UTC (rev 23629)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java 2010-07-21 10:02:54 UTC (rev 23630)
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.configuration;
-
-/**
- * @author Dart Peng (dpeng at redhat.com)
- * Date Apr 1, 2009
- */
-public class SmooksConstants {
- public static final String SMOOKS_EXTENTION_NAME = "xml"; //$NON-NLS-1$
-
- public static final String SMOOKS_GRAPHICSEXT_EXTENTION_NAME = "ext"; //$NON-NLS-1$
-
- public static final String SMOOKS_EXTENTION_NAME_WITHDOT = "." + SMOOKS_EXTENTION_NAME; //$NON-NLS-1$
-
- public static final String SMOOKS_GRAPHICSEXT_EXTENTION_NAME_WITHDOT = "." + SMOOKS_GRAPHICSEXT_EXTENTION_NAME; //$NON-NLS-1$
-
-// public static final String VERSION_1_1 = "1.1"; //$NON-NLS-1$
-
- public static final String VERSION_1_2 = "1.2"; //$NON-NLS-1$
-
- public static final String[] SMOOKS_VERSIONS = new String[]{VERSION_1_2};
-}
Deleted: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksInputType.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksInputType.java 2010-07-21 09:51:36 UTC (rev 23629)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksInputType.java 2010-07-21 10:02:54 UTC (rev 23630)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, 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) 2005-2006, JBoss Inc.
- */
-package org.jboss.tools.smooks.configuration;
-
-/**
- * Smooks Input Type Enumeration.
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class SmooksInputType {
-
- public static final String INPUT_TYPE_JAVA = "input.java"; //$NON-NLS-1$
-
- public static final String INPUT_TYPE_CUSTOM = "input.custom"; //$NON-NLS-1$
-
- public static final String INPUT_TYPE_JSON = "input.json"; //$NON-NLS-1$
-
- public static final String INPUT_TYPE_CSV = "input.csv"; //$NON-NLS-1$
-
- public static final String INPUT_TYPE_XML = "input.xml"; //$NON-NLS-1$
-
- public static final String INPUT_TYPE_XSD = "input.xsd"; //$NON-NLS-1$
-
- public static final String INPUT_TYPE_EDI = "input.edi"; //$NON-NLS-1$
-}
Deleted: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksModelUtils.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksModelUtils.java 2010-07-21 09:51:36 UTC (rev 23629)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksModelUtils.java 2010-07-21 10:02:54 UTC (rev 23630)
@@ -1,89 +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.smooks.configuration;
-
-/**
- * @author Dart Peng
- *
- */
-
-public class SmooksModelUtils {
-
- public static final String KEY_TEMPLATE_TYPE = "messageType"; //$NON-NLS-1$
-
- public static final String FREEMARKER_TEMPLATE_TYPE_CSV = "CSV"; //$NON-NLS-1$
-
- public static final String FREEMARKER_TEMPLATE_TYPE_XML = "XML"; //$NON-NLS-1$
-
- public static final String KEY_CSV_FIELDS = "csvFields"; //$NON-NLS-1$
-
- public static final String KEY_INCLUDE_FIELD_NAMES = "includeFieldNames"; //$NON-NLS-1$
-
- public static final String KEY_TASK_ID_REF = "idref"; //$NON-NLS-1$
-
- public static final String KEY_OBJECT_ID = "id"; //$NON-NLS-1$
-
- public static final String KEY_XML_FILE_TYPE = "modelSrcType"; //$NON-NLS-1$
-
- public static final String KEY_XML_FILE_PATH = "modelSrc"; //$NON-NLS-1$
-
- public static final String KEY_XML_ROOT_NAME = "rootElementName"; //$NON-NLS-1$
-
- public static final String KEY_XML_FILE_TYPE_XSD = "XSD"; //$NON-NLS-1$
-
- public static final String KEY_XML_FILE_TYPE_XML = "XML"; //$NON-NLS-1$
-
- public static final String KEY_CSV_SEPERATOR = "seperator"; //$NON-NLS-1$
-
- public static final String KEY_CSV_QUOTE = "quote"; //$NON-NLS-1$
-
- public static final String INPUT_TYPE_JAVA = SmooksInputType.INPUT_TYPE_JAVA;
-
- public static final String INPUT_TYPE = "inputType"; //$NON-NLS-1$
-
- public static final String INPUT_TYPE_CUSTOME = SmooksInputType.INPUT_TYPE_CUSTOM;
-
- public static final String INPUT_TYPE_JSON_1_1 = SmooksInputType.INPUT_TYPE_JSON;
-
- public static final String INPUT_TYPE_CSV = SmooksInputType.INPUT_TYPE_CSV;
-
- public static final String INPUT_ACTIVE_TYPE = "input.type.actived"; //$NON-NLS-1$
-
- public static final String INPUT_DEACTIVE_TYPE = "input.type.deactived"; //$NON-NLS-1$
-
- public static final String INPUT_TYPE_CSV_1_2 = SmooksInputType.INPUT_TYPE_CSV;
-
- public static final String PARAM_NAME_CLASS = "class"; //$NON-NLS-1$
-
- public static final String PARAM_NAME_PATH = "path"; //$NON-NLS-1$
-
- public static final String PARAM_NAME_ACTIVED = "actived"; //$NON-NLS-1$
-
- public static final String INPUT_TYPE_XML = SmooksInputType.INPUT_TYPE_XML;
-
- public static final String INPUT_TYPE_XSD = SmooksInputType.INPUT_TYPE_XSD;
-
- public static final String TYPE_XSL = "xsl"; //$NON-NLS-1$
-
- public static final String[] TEMPLATE_TYPES = new String[] { "xsl", "ftl" }; //$NON-NLS-1$ //$NON-NLS-2$
-
- public static final String BEAN_CLASS = "beanClass"; //$NON-NLS-1$
-
- public static final String BEAN_ID = "beanId"; //$NON-NLS-1$
-
- public static final String BINDINGS = "bindings"; //$NON-NLS-1$
-
- public static final String INPUT_TYPE_EDI_1_1 = SmooksInputType.INPUT_TYPE_EDI;
-
- public static final String INPUT_TYPE_EDI_1_2 = SmooksInputType.INPUT_TYPE_EDI;
-
- public static final String INPUT_TYPE_JSON_1_2 = SmooksInputType.INPUT_TYPE_JSON;
-}
Deleted: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksUIUtils.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksUIUtils.java 2010-07-21 09:51:36 UTC (rev 23629)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksUIUtils.java 2010-07-21 10:02:54 UTC (rev 23630)
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.configuration;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Path;
-
-/**
- *
- * @author Dart Peng (dpeng at redhat.com) Date Apr 10, 2009
- */
-public class SmooksUIUtils {
-
- public static String[] SMOOKS_PLATFORM_1_1_CONFLICT_NAMESPACES = new String[] {};
-
- public static final String FILE_PRIX = "File:/"; //$NON-NLS-1$
-
- public static final String WORKSPACE_PRIX = "Workspace:/"; //$NON-NLS-1$
-
- public static final String RESOURCE = "Resource:/"; //$NON-NLS-1$
-
- public static final String XSL_NAMESPACE = " xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" "; //$NON-NLS-1$
-
- public static int VALUE_TYPE_VALUE = 1;
-
- public static int VALUE_TYPE_TEXT = 2;
-
- public static int VALUE_TYPE_COMMENT = 3;
-
- public static int VALUE_TYPE_CDATA = 0;
-
- public static final int SELECTOR_EXPAND_MAX_LEVEL = 5;
-
- public static final String[] SELECTOR_SPERATORS = new String[] { " ", "/" }; //$NON-NLS-1$ //$NON-NLS-2$
-
- public static String parseFilePath(String path) throws InvocationTargetException {
- if (path == null)
- return null;
- if (new File(path).exists()) {
- return path;
- }
- int index = path.indexOf(FILE_PRIX);
- if (index != -1) {
- path = path.substring(index + FILE_PRIX.length(), path.length());
- } else {
- index = path.indexOf(WORKSPACE_PRIX);
- if (index != -1) {
- path = path.substring(index + WORKSPACE_PRIX.length(), path.length());
- Path wpath = new Path(path);
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(wpath);
- if (file.exists()) {
- path = file.getLocation().toOSString();
- } else {
- throw new InvocationTargetException(new Exception("File : " + path + " isn't exsit")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- } else {
- throw new InvocationTargetException(new Exception("This path is un-support" + path + ".")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- return path;
- }
-}
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java 2010-07-21 10:02:54 UTC (rev 23630)
@@ -0,0 +1,115 @@
+package org.jboss.tools.smooks.configuration.editors;
+
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.forms.FormColors;
+import org.eclipse.ui.forms.IFormColors;
+
+public final class GraphicsConstants {
+
+ public static Color BORDER_CORLOR;
+
+ public static Color TB_BG_CORLOR;
+
+ public static Color FONT_COLOR ;
+
+ static {
+ FormColors toolkit = new FormColors(Display.getDefault());
+ BORDER_CORLOR = toolkit.getBorderColor();
+ TB_BG_CORLOR = toolkit.getColor(IFormColors.TB_BG);
+ FONT_COLOR = toolkit.getColor(IFormColors.TITLE);
+// toolkit.dispose();
+ }
+
+ public static final String IMAGE_JAVA_AMPPING_TASK = "icons/full/obj32/java_mapping_task.jpg"; //$NON-NLS-1$
+
+ public static final String IMAGE_DRAG_LINK = "icons/full/obj16/drag_link.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_ADD_TASK_BUTTON = "icons/full/obj16/add_task_button.png"; //$NON-NLS-1$
+
+ public static final String IMAGE_LINK16 = "icons/full/obj16/connection16.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_LINK24 = "icons/full/obj16/connection24.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_APPLY_XSL_TASK = "icons/full/obj32/xsl_task.png"; //$NON-NLS-1$
+
+ public static final String IMAGE_APPLY_FREEMARKER_TASK = "icons/full/obj32/freemarker_task.jpg"; //$NON-NLS-1$
+
+ public static final String IMAGE_INPUT_TASK = "icons/full/obj32/input_task.jpg"; //$NON-NLS-1$
+
+ public static final String IMAGE_JAVA_ATTRIBUTE = "icons/full/obj16/att_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_VALIDATED_TAG = "icons/full/obj16/validated_tag.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_PROPERTY_SHEET_PAGE = "icons/full/prop_ps.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_JAVA_OBJECT = "icons/full/obj16/class_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_PACKAGE_OBJECT = "icons/full/obj16/package_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_XSL_CHOICE = "icons/full/obj16/xsl_choice.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_XSL_TEMPLATE_APPLY = "icons/full/obj16/xsl_template_apply.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_XSL_FOREACH = "icons/full/obj16/xsl_foreach.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_XSL_SORT = "icons/full/obj16/xsl_sort.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_XSL_IF = "icons/full/obj16/xsl_if.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_XSL_STYLESHEET = "icons/full/obj16/xsl_stylesheet.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_XSL_TEMPLATE = "icons/full/obj16/xsl_template.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_OVR_ERROR = "icons/full/ovr16/error_co.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_OVR_WARING = "icons/full/ovr16/warning_co.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_JAVA_INTERFACE = "icons/full/obj16/int_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_JAVA_COLLECTION = "icons/full/obj16/javalistmodel.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_JAVA_BEAN = "icons/full/obj16/java_bean.png"; //$NON-NLS-1$
+
+ public static final String IMAGE_INPUT_DATA_HEADER = "icons/full/obj16/input_data_header.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_JAVA_ARRAY = "icons/full/obj16/javaarraymodel.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_CHECKBOX_CHECK = "icons/full/obj16/checkbox_checked.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_CHECKBOX_UNCHECK = "icons/full/obj16/checkbox_uncheck.gif"; //$NON-NLS-1$
+
+ public static final String JAVA_PROPERTY_ICON_PATH = IMAGE_JAVA_ATTRIBUTE;
+
+ public static final String JAVA_PROPERTY_ICON = JAVA_PROPERTY_ICON_PATH;
+
+ public static final String IMAGE_PATH_ERROR = "icons/full/obj16/error_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_PATH_WARNING = "icons/full/obj16/warning_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_PATH_BLANK = "icons/full/obj16/blank.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_WARNING = IMAGE_PATH_WARNING;
+
+ public static final String IMAGE_ERROR = IMAGE_PATH_ERROR;
+
+ public static final String IMAGE_EMPTY = IMAGE_PATH_BLANK;
+
+ public static final String IMAGE_XML_ELEMENT = "icons/full/obj16/element_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_XML_ATTRIBUTE = "icons/full/obj16/attribute_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_MAPPING_LINE = "icons/full/obj16/mapping_line.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_BINDING_LINE = "icons/full/obj16/binding_line.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_UNKNOWN_OBJ = "icons/full/obj16/unknown_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_JAVA_FILE = "icons/full/obj16/jcu_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_CSV_FILE = "icons/full/obj16/csvfile.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_XML_FILE = "icons/full/obj16/XMLFile.gif"; //$NON-NLS-1$
+
+ public static final String IMAGE_XSD_FILE = "icons/full/obj16/XSDFile.gif"; //$NON-NLS-1$
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
More information about the jbosstools-commits
mailing list