JBoss Tools SVN: r20040 - trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-01-31 18:05:57 -0500 (Sun, 31 Jan 2010)
New Revision: 20040
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5767 JBoss Maven JSF configurator unnecessarily adds JSF Faces servlet mapping
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java 2010-01-31 22:48:35 UTC (rev 20039)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java 2010-01-31 23:05:57 UTC (rev 20040)
@@ -920,6 +920,9 @@
ILibraryProvider provider = LibraryProviderFramework.getProvider("jsf-no-op-library-provider"); //$NON-NLS-1$
libraryDelegate.setLibraryProvider(provider);
config.setProperty(IJSFFacetInstallDataModelProperties.LIBRARY_PROVIDER_DELEGATE, libraryDelegate);
+ config.setProperty(IJSFFacetInstallDataModelProperties.SERVLET_NAME, "");
+ config.setProperty(IJSFFacetInstallDataModelProperties.SERVLET_URL_PATTERNS, new String[0]);
+
return config;
}
}
14 years, 10 months
JBoss Tools SVN: r20039 - trunk/common/releng/hudson.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-01-31 17:48:35 -0500 (Sun, 31 Jan 2010)
New Revision: 20039
Modified:
trunk/common/releng/hudson/run.sh
Log:
add support for -relengBuilderDir
Modified: trunk/common/releng/hudson/run.sh
===================================================================
--- trunk/common/releng/hudson/run.sh 2010-01-31 22:46:11 UTC (rev 20038)
+++ trunk/common/releng/hudson/run.sh 2010-01-31 22:48:35 UTC (rev 20039)
@@ -155,18 +155,25 @@
if [[ $PROJRELENGBRANCH ]]; then
projRelengBranch="$PROJRELENGBRANCH"
else
- projRelengBranch="";
+ projRelengBranch=""
fi
# optional override
if [[ $PROJRELENGNAME ]]; then
projRelengName="$PROJRELENGNAME"
else
- projRelengName="";
+ projRelengName=""
fi
+# optional override
+if [[ ${RELENGBUILDERDIR} ]]; then
+ relengBuilderDir="${RELENGBUILDERDIR}"
+else
+ relengBuilderDir=""
+fi
+
if [[ $haderror -gt 0 ]]; then
- exit 1;
+ exit 1
fi
# pass in additional flags like -buildAlias=1.0.0RC2 using the $EXTRAFLAGS Hudson parameter
@@ -201,10 +208,6 @@
ln -s ${cvsProjectBaseDir}/org.eclipse.releng.basebuilder ${writableBuildRoot}/
ln -s ${cvsProjectBaseDir}/org.eclipse.dash.common.releng ${writableBuildRoot}/
-if [[ ${RELENGBUILDERDIR} ]]; then
- relengBuilderDir="-relengBuilderDir ${RELENGBUILDERDIR}"
-fi
-
# symlink 3rdPartyJars (reuse existing content)
ln -s ${thirdPartyJarsDir} ${writableBuildRoot}/
thirdPartyJarsDir="${writableBuildRoot}/3rdPartyJars"
14 years, 10 months
JBoss Tools SVN: r20038 - trunk/common/releng/hudson.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-01-31 17:46:11 -0500 (Sun, 31 Jan 2010)
New Revision: 20038
Modified:
trunk/common/releng/hudson/run.sh
Log:
add support for -relengBuilderDir
Modified: trunk/common/releng/hudson/run.sh
===================================================================
--- trunk/common/releng/hudson/run.sh 2010-01-31 18:41:52 UTC (rev 20037)
+++ trunk/common/releng/hudson/run.sh 2010-01-31 22:46:11 UTC (rev 20038)
@@ -201,6 +201,10 @@
ln -s ${cvsProjectBaseDir}/org.eclipse.releng.basebuilder ${writableBuildRoot}/
ln -s ${cvsProjectBaseDir}/org.eclipse.dash.common.releng ${writableBuildRoot}/
+if [[ ${RELENGBUILDERDIR} ]]; then
+ relengBuilderDir="-relengBuilderDir ${RELENGBUILDERDIR}"
+fi
+
# symlink 3rdPartyJars (reuse existing content)
ln -s ${thirdPartyJarsDir} ${writableBuildRoot}/
thirdPartyJarsDir="${writableBuildRoot}/3rdPartyJars"
@@ -212,7 +216,7 @@
cd ${writableBuildRoot}/org.eclipse.dash.common.releng/tools/scripts
./start.sh -projectid ${projectid} -version ${version} -buildType ${buildType} -buildTimestamp ${buildTimestamp} \
-writableBuildRoot ${writableBuildRoot} -thirdPartyJarsDir ${thirdPartyJarsDir} -downloadsDir ${downloadsDir} -buildDir ${buildDir} \
- ${projRelengName} ${projRelengRoot} ${projRelengPath} ${projRelengBranch} \
+ ${projRelengName} ${projRelengRoot} ${projRelengPath} ${projRelengBranch} ${relengBuilderDir} \
-thirdPartyDownloadLicenseAcceptance -javaHome ${JAVA_HOME} ${EXTRAFLAGS} 2>&1
# remove file so workspace navigation is one click simpler
14 years, 10 months
JBoss Tools SVN: r20037 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-01-31 13:41:52 -0500 (Sun, 31 Jan 2010)
New Revision: 20037
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
Log:
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2010-01-31 16:54:30 UTC (rev 20036)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2010-01-31 18:41:52 UTC (rev 20037)
@@ -18,6 +18,7 @@
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
import org.jboss.tools.common.reporting.ProblemReportingHelper;
+import org.jboss.tools.vpe.editor.util.ProjectNaturesChecker;
import org.jboss.tools.vpe.xulrunner.browser.XulRunnerBrowser;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -53,6 +54,11 @@
* This method is called when the plug-in is stopped
*/
public void stop(BundleContext context) throws Exception {
+ ProjectNaturesChecker naturesChecker = ProjectNaturesChecker.getInstance();
+ if (naturesChecker != null) {
+ naturesChecker.dispose();
+ naturesChecker = null;
+ }
super.stop(context);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2010-01-31 16:54:30 UTC (rev 20036)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2010-01-31 18:41:52 UTC (rev 20037)
@@ -913,10 +913,6 @@
@Override
public void dispose() {
deactivateServices();
- if (naturesChecker != null) {
- naturesChecker.dispose();
- naturesChecker = null;
- }
sourceActivation = null;
sourceMaxmin = null;
visualActivation = null;
14 years, 10 months
JBoss Tools SVN: r20036 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-01-31 11:54:30 -0500 (Sun, 31 Jan 2010)
New Revision: 20036
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5701 - ProjectNaturesCheaker as a singleton.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2010-01-30 15:09:06 UTC (rev 20035)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2010-01-31 16:54:30 UTC (rev 20036)
@@ -12,14 +12,12 @@
import java.io.IOException;
import java.net.URL;
-
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
import org.eclipse.ui.IStartup;
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
import org.jboss.tools.common.reporting.ProblemReportingHelper;
-import org.jboss.tools.vpe.editor.util.ProjectNaturesChecker;
import org.jboss.tools.vpe.xulrunner.browser.XulRunnerBrowser;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -35,7 +33,6 @@
//The shared instance.
private static VpePlugin plugin;
- private ProjectNaturesChecker projectNaturesChecker;
/**
* The constructor.
@@ -56,10 +53,6 @@
* This method is called when the plug-in is stopped
*/
public void stop(BundleContext context) throws Exception {
- if (projectNaturesChecker != null) {
- projectNaturesChecker.dispose();
- projectNaturesChecker = null;
- }
super.stop(context);
}
@@ -122,11 +115,4 @@
return (url == null) ? null : url.getPath();
}
- public ProjectNaturesChecker getProjectNaturesChecker() {
- return projectNaturesChecker;
- }
-
- public void setProjectNaturesChecker(ProjectNaturesChecker naturesChecker) {
- this.projectNaturesChecker = naturesChecker;
- }
}
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2010-01-30 15:09:06 UTC (rev 20035)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2010-01-31 16:54:30 UTC (rev 20036)
@@ -913,6 +913,10 @@
@Override
public void dispose() {
deactivateServices();
+ if (naturesChecker != null) {
+ naturesChecker.dispose();
+ naturesChecker = null;
+ }
sourceActivation = null;
sourceMaxmin = null;
visualActivation = null;
@@ -1013,11 +1017,7 @@
try {
IEditorInput editorInput = multiPageEditor.getEditorInput();
if (editorInput instanceof IFileEditorInput) {
- naturesChecker = VpePlugin.getDefault().getProjectNaturesChecker();
- if (naturesChecker == null) {
- naturesChecker = new ProjectNaturesChecker();
- VpePlugin.getDefault().setProjectNaturesChecker(naturesChecker);
- }
+ naturesChecker = ProjectNaturesChecker.getInstance();
naturesChecker.checkNatures(((IFileEditorInput)editorInput).getFile().getProject());
}
} catch (CoreException e) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java 2010-01-30 15:09:06 UTC (rev 20035)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ProjectNaturesChecker.java 2010-01-31 16:54:30 UTC (rev 20036)
@@ -46,7 +46,16 @@
private static final String JSF_NATURE = "JavaServer Faces Nature"; //$NON-NLS-1$
private static final String KB_NATURE = "Knowledge Base Nature"; //$NON-NLS-1$
- public ProjectNaturesChecker() {
+ private static ProjectNaturesChecker checker;
+
+ public static ProjectNaturesChecker getInstance(){
+ if (checker == null) {
+ checker = new ProjectNaturesChecker();
+ }
+ return checker;
+ }
+
+ private ProjectNaturesChecker() {
projectsCollection = new HashSet<IProject>(0);
ResourcesPlugin.getWorkspace().addResourceChangeListener(this,
IResourceChangeEvent.POST_CHANGE);
14 years, 10 months
JBoss Tools SVN: r20035 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2010-01-30 10:09:06 -0500 (Sat, 30 Jan 2010)
New Revision: 20035
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksJavaMappingGraphicalEditor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5755
Invalid java binding connection warnings "Decoder is required"
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksJavaMappingGraphicalEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksJavaMappingGraphicalEditor.java 2010-01-30 14:37:31 UTC (rev 20034)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksJavaMappingGraphicalEditor.java 2010-01-30 15:09:06 UTC (rev 20035)
@@ -106,11 +106,7 @@
connection.setSeverity(IFieldMarker.TYPE_NONE);
continue;
}
- if (decoder == null) {
- connection.addMessage("Decoder is required.");
- connection.setSeverity(IFieldMarker.TYPE_WARINING);
- changed = true;
- } else {
+ if (decoder != null) {
if (!decoder.equals(defaultDecoder)) {
connection.addMessage("Decoder should be '" + defaultDecoder + "'.");
connection.setSeverity(IFieldMarker.TYPE_WARINING);
14 years, 10 months
JBoss Tools SVN: r20034 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks: graphical/editors/model/javamapping and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2010-01-30 09:37:31 -0500 (Sat, 30 Jan 2010)
New Revision: 20034
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/DecodeParamMetaData.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/DecodeParamMetaDataFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaNode.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5687
Improve Decode Param support
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/DecodeParamMetaData.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/DecodeParamMetaData.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/DecodeParamMetaData.java 2010-01-30 14:37:31 UTC (rev 20034)
@@ -0,0 +1,54 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.editor.propertySections;
+
+/**
+ * Java value binding data decode parameter metadata.
+ *
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public class DecodeParamMetaData {
+
+ private String name;
+ private String defaultVal;
+ private boolean requiresConfiguration;
+
+ public DecodeParamMetaData(String name, String defaultVal) {
+ this.name = name;
+ this.defaultVal = defaultVal;
+ }
+
+ public DecodeParamMetaData(String name, String defaultVal, boolean requiresConfiguration) {
+ this(name, defaultVal);
+ this.requiresConfiguration = requiresConfiguration;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getDefaultVal() {
+ return defaultVal;
+ }
+
+ public boolean isRequiresConfiguration() {
+ return requiresConfiguration;
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/DecodeParamMetaData.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/DecodeParamMetaDataFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/DecodeParamMetaDataFactory.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/DecodeParamMetaDataFactory.java 2010-01-30 14:37:31 UTC (rev 20034)
@@ -0,0 +1,58 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.editor.propertySections;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.milyn.javabean.DataDecoder;
+import org.milyn.javabean.decoders.CalendarDecoder;
+import org.milyn.javabean.decoders.DateDecoder;
+import org.milyn.javabean.decoders.LocaleAwareDateDecoder;
+import org.milyn.javabean.decoders.SqlDateDecoder;
+import org.milyn.javabean.decoders.SqlTimeDecoder;
+
+/**
+ * Factory class for storing decode parameter metadata..
+ *
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public class DecodeParamMetaDataFactory {
+
+ private static Map<Class<? extends DataDecoder>, DecodeParamMetaData[]> configMap = new HashMap<Class<? extends DataDecoder>, DecodeParamMetaData[]>();
+
+ static {
+ DecodeParamMetaData[] dateDecodeMD = new DecodeParamMetaData[] {
+ new DecodeParamMetaData(LocaleAwareDateDecoder.FORMAT, LocaleAwareDateDecoder.DEFAULT_DATE_FORMAT),
+ new DecodeParamMetaData(LocaleAwareDateDecoder.LOCALE_COUNTRY_CODE, null),
+ new DecodeParamMetaData(LocaleAwareDateDecoder.LOCALE_LANGUAGE_CODE, null)
+ };
+
+ // The date decoders all have the same basic configuration...
+ configMap.put(DateDecoder.class, dateDecodeMD);
+ configMap.put(CalendarDecoder.class, dateDecodeMD);
+ configMap.put(SqlDateDecoder.class, dateDecodeMD);
+ configMap.put(SqlTimeDecoder.class, dateDecodeMD);
+ }
+
+ public static DecodeParamMetaData[] getDecodeParamMetaData(Class<? extends DataDecoder> decoder) {
+ return configMap.get(decoder);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/DecodeParamMetaDataFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/Messages.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/Messages.java 2010-01-29 23:30:31 UTC (rev 20033)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/Messages.java 2010-01-30 14:37:31 UTC (rev 20034)
@@ -22,6 +22,8 @@
public static String ValueDecodeParamSection_NullText;
public static String ValueDecodeParamSection_ParamNameColumnText;
public static String ValueDecodeParamSection_ParamValueColumnText;
+ public static String ValueDecodeParamSection_EnumParamNameColumnText;
+ public static String ValueDecodeParamSection_EnumParamValueColumnText;
public static String ValueDecodeParamSection_SectionTitle;
static {
// initialize resource bundle
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java 2010-01-29 23:30:31 UTC (rev 20033)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java 2010-01-30 14:37:31 UTC (rev 20034)
@@ -17,17 +17,16 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Map.Entry;
-import org.eclipse.core.resources.IProject;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.edit.command.RemoveCommand;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.jface.viewers.IStructuredContentProvider;
@@ -50,23 +49,21 @@
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.jboss.tools.smooks.configuration.editors.SelectorCreationDialog;
-import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModel;
-import org.jboss.tools.smooks.configuration.editors.uitls.ProjectClassLoader;
-import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel;
import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection;
+import org.jboss.tools.smooks.graphical.editors.model.javamapping.JavaBeanChildGraphModel;
import org.jboss.tools.smooks.model.javabean12.DecodeParamType;
-import org.jboss.tools.smooks.model.javabean12.Javabean12Factory;
import org.jboss.tools.smooks.model.javabean12.Javabean12Package;
import org.jboss.tools.smooks.model.javabean12.ValueType;
import org.milyn.javabean.DataDecoder;
+import org.milyn.javabean.decoders.EnumDecoder;
+import org.milyn.javabean.decoders.IntegerDecoder;
/**
* @author Dart
@@ -77,6 +74,9 @@
private Composite controlComposite;
private TableViewer paramterViewer;
private CCombo decoderCombo;
+ boolean isEnumTarget;
+ private TableColumn nameColumn;
+ private TableColumn valueColumn;
private static List<String> DECODERS = new ArrayList<String>();
@@ -189,74 +189,6 @@
}
}
- private String[] getDecoderParametersName(String decoder) {
- if (decoder != null) {
- if ("Date".equals(decoder)) {
- return new String[] { "format", "locale-language", "locale-country" };
- }
-
- if ("Enum".equals(decoder)) {
- TreeNodeConnection lineModel = (TreeNodeConnection) getPresentSelectedGraphModel();
- Object model = lineModel.getTargetNode().getData();
- model = AdapterFactoryEditingDomain.unwrap(model);
- if (model != null && model instanceof ValueType) {
- String[] enumFieldsString = null;
- List<Object> inputs = SelectorCreationDialog.generateInputData(SmooksUIUtils
- .getSmooks11ResourceListType(getSmooksModelProvider().getSmooksModel()));
- if (inputs != null && !inputs.isEmpty()) {
- Object input = inputs.get(0);
- if (input instanceof JavaBeanModel) {
- String path = ((ValueType) model).getData();
- JavaBeanModel beanModel = (JavaBeanModel) SmooksUIUtils.localXMLNodeWithPath(path,
- (JavaBeanModel) input);
- if (beanModel != null) {
- String clazz = beanModel.getBeanClassString();
- if (clazz != null) {
- clazz = clazz.trim();
- IProject project = ((IFileEditorInput) getEditorPart().getEditorInput()).getFile()
- .getProject();
- try {
- ProjectClassLoader classLoader = new ProjectClassLoader(JavaCore
- .create(project));
- Class<?> enumType = classLoader.loadClass(clazz);
- if (enumType.isEnum()) {
- Field[] fields = enumType.getDeclaredFields();
- if (fields != null) {
- List<String> enumList = new ArrayList<String>();
- enumFieldsString = new String[fields.length + 1];
- for (int i = 0; i < fields.length; i++) {
- Field enumField = fields[i];
- if (enumField.isEnumConstant()) {
- enumList.add(enumField.getName());
- }
- }
- enumFieldsString = new String[enumList.size() + 1];
- System.arraycopy(enumList.toArray(new String[] {}), 0,
- enumFieldsString, 1, enumList.size());
- enumList.clear();
- }
- }
- } catch (JavaModelException e) {
- } catch (ClassNotFoundException e) {
- } catch (SecurityException e) {
- }
- }
- }
- }
- }
- String[] result = new String[] { "enumType" };
- if (enumFieldsString != null) {
- enumFieldsString[0] = result[0];
- return enumFieldsString;
- } else {
- return result;
- }
- }
- }
- }
- return null;
- }
-
private void createDecodeParamViewer(TabbedPropertySheetWidgetFactory factory, Composite sashForm) {
GridData gd = new GridData(GridData.FILL_BOTH);
@@ -279,6 +211,7 @@
FillLayout layout = new FillLayout();
+
layout.marginHeight = 1;
layout.marginWidth = 1;
viewerComposite.setLayout(layout);
@@ -289,84 +222,18 @@
paramterViewer.setFilters(new ViewerFilter[] { new DecodeParamTypeFilter() });
- TableColumn nameColumn = new TableColumn(paramterViewer.getTable(), SWT.NONE);
+ nameColumn = new TableColumn(paramterViewer.getTable(), SWT.NONE);
+ valueColumn = new TableColumn(paramterViewer.getTable(), SWT.NONE);
+ nameColumn.setText(Messages.ValueDecodeParamSection_ParamNameColumnText);
+ valueColumn.setText(Messages.ValueDecodeParamSection_ParamValueColumnText);
nameColumn.setWidth(150);
- nameColumn.setText(Messages.ValueDecodeParamSection_ParamNameColumnText);
- TableColumn valueColumn = new TableColumn(paramterViewer.getTable(), SWT.NONE);
valueColumn.setWidth(150);
- valueColumn.setText(Messages.ValueDecodeParamSection_ParamValueColumnText);
- paramterViewer.setCellEditors(new CellEditor[] { new TextCellEditor(paramterViewer.getTable()),
- new TextCellEditor(paramterViewer.getTable()) });
+ paramterViewer.setCellEditors(new CellEditor[] { new TextCellEditor(paramterViewer.getTable()), new TextCellEditor(paramterViewer.getTable()) });
paramterViewer.setColumnProperties(new String[] { "name", "value" }); //$NON-NLS-1$ //$NON-NLS-2$
- paramterViewer.setCellModifier(new ICellModifier() {
+ paramterViewer.setCellModifier(new DecodeParamCellModifier());
- public void modify(Object element, String property, Object value) {
- if (element instanceof TableItem) {
- Object currentElement = ((TableItem) element).getData();
- TreeNodeConnection lineModel = (TreeNodeConnection) getPresentSelectedGraphModel();
- Object model = lineModel.getTargetNode().getData();
- model = AdapterFactoryEditingDomain.unwrap(model);
- if (model != null && model instanceof ValueType && currentElement instanceof DecodeParam) {
- String pname = ((DecodeParam) currentElement).getName();
- DecodeParamType paramType = findDecodeParamType(pname, (ValueType) model);
- Command command = null;
- EditingDomain editingDomain = getSmooksModelProvider().getEditingDomain();
- if (property.equals("value")) {
- if (value != null) {
- String svalue = ((String) value).trim();
- if ("".equals(svalue)) {
- if (paramType != null) {
- command = RemoveCommand.create(editingDomain, paramType);
- }
- } else {
- // if param is empty , add it
- if (paramType == null) {
- paramType = Javabean12Factory.eINSTANCE.createDecodeParamType();
- paramType.setName(pname);
- paramType.setValue((String) value);
- command = AddCommand.create(editingDomain, (ValueType) model,
- Javabean12Package.Literals.VALUE_TYPE__DECODE_PARAM, paramType);
- } else {
- command = SetCommand.create(editingDomain, paramType,
- Javabean12Package.Literals.DECODE_PARAM_TYPE__VALUE, value);
- }
- }
- }
- }
- if (command != null) {
- editingDomain.getCommandStack().execute(command);
- ((DecodeParam) currentElement).setValue((String) value);
- paramterViewer.update(currentElement, new String[] { property });
- }
- }
- }
- }
-
- public Object getValue(Object element, String property) {
- element = AdapterFactoryEditingDomain.unwrap(element);
- if (property.equals("value")) { //$NON-NLS-1$
- if (element instanceof DecodeParam) {
- String name = ((DecodeParam) element).getValue();
- if (name == null)
- name = ""; //$NON-NLS-1$
- return name;
- }
- }
- return null;
- }
-
- public boolean canModify(Object element, String property) {
- if (property.equals("value")) { //$NON-NLS-1$
- if (element instanceof DecodeParam) {
- return true;
- }
- }
- return false;
- }
- });
-
paramterViewer.getTable().setHeaderVisible(true);
paramterViewer.getTable().setLinesVisible(true);
@@ -375,14 +242,32 @@
private void initDecoderCombo() {
decoderCombo.select(-1);
TreeNodeConnection lineModel = (TreeNodeConnection) getPresentSelectedGraphModel();
- Object model = lineModel.getTargetNode().getData();
- model = AdapterFactoryEditingDomain.unwrap(model);
- if (model != null && model instanceof ValueType) {
- String decoder = ((ValueType) model).getDecoder();
- if (decoder != null) {
- decoder = decoder.trim();
- int index = DECODERS.indexOf(decoder);
- decoderCombo.select(index);
+ AbstractSmooksGraphicalModel targetNode = lineModel.getTargetNode();
+
+ if(targetNode instanceof JavaBeanChildGraphModel) {
+ JavaBeanChildGraphModel javaBeanChildGraphModel = (JavaBeanChildGraphModel)targetNode;
+ Object bindingTypeObj = javaBeanChildGraphModel.getBindingTypeObj();
+
+ if (bindingTypeObj != null && bindingTypeObj instanceof ValueType) {
+ Class<?> targetPropertyType = javaBeanChildGraphModel.getJavaType();
+ String decoderAlias = ((ValueType) bindingTypeObj).getDecoder();
+
+ if(decoderAlias != null) {
+ // The decoder is configured...
+ int index = DECODERS.indexOf(decoderAlias.trim());
+ decoderCombo.select(index);
+ } else {
+ // Try work out the decoder based on the target property type...
+ DataDecoder decoder = DataDecoder.Factory.create(targetPropertyType);
+ if(decoder.getClass().getPackage() == IntegerDecoder.class.getPackage()) {
+ String decoderName = decoder.getClass().getSimpleName();
+ if(decoderName.endsWith("Decoder")) {
+ decoderAlias = decoderName.substring(0, decoderName.length() - "Decoder".length());
+ int index = DECODERS.indexOf(decoderAlias);
+ decoderCombo.select(index);
+ }
+ }
+ }
}
}
}
@@ -390,17 +275,106 @@
private void initDecodeParamViewer() {
paramterViewer.setInput("NULL");
TreeNodeConnection lineModel = (TreeNodeConnection) getPresentSelectedGraphModel();
- Object model = lineModel.getTargetNode().getData();
- model = AdapterFactoryEditingDomain.unwrap(model);
- if (model != null && model instanceof ValueType) {
- String decoder = ((ValueType) model).getDecoder();
- String[] params = getDecoderParametersName(decoder);
- if (params != null) {
- paramterViewer.setInput(newDecodeParam(params, ((ValueType) model)));
+ AbstractSmooksGraphicalModel targetNode = lineModel.getTargetNode();
+
+ if(targetNode instanceof JavaBeanChildGraphModel) {
+ JavaBeanChildGraphModel javaBeanChildGraphModel = (JavaBeanChildGraphModel)targetNode;
+ Object bindingTypeObj = javaBeanChildGraphModel.getBindingTypeObj();
+
+ if (bindingTypeObj != null && bindingTypeObj instanceof ValueType) {
+ Class<?> targetPropertyType = javaBeanChildGraphModel.getJavaType();
+ String decoderAlias = ((ValueType) bindingTypeObj).getDecoder();
+ DataDecoder decoder;
+ DecodeParamMetaData[] decodeParamMetaData;
+
+ if(decoderAlias != null) {
+ // The decoder is configured...
+ decoder = DataDecoder.Factory.create(decoderAlias);
+ } else {
+ // Try work out the decoder based on the target property type...
+ decoder = DataDecoder.Factory.create(targetPropertyType);
+ }
+
+ if(decoder instanceof EnumDecoder) {
+ // Get the enum values based on the targetPropertyType enum etc...
+ isEnumTarget = true;
+ paramterViewer.setInput(newEnumDecodeParamSet(targetPropertyType, (ValueType) bindingTypeObj, javaBeanChildGraphModel));
+ nameColumn.setText(Messages.ValueDecodeParamSection_EnumParamNameColumnText);
+ valueColumn.setText(Messages.ValueDecodeParamSection_EnumParamValueColumnText);
+ } else {
+ isEnumTarget = false;
+ nameColumn.setText(Messages.ValueDecodeParamSection_ParamNameColumnText);
+ valueColumn.setText(Messages.ValueDecodeParamSection_ParamValueColumnText);
+ decodeParamMetaData = DecodeParamMetaDataFactory.getDecodeParamMetaData(decoder.getClass());
+ if(decodeParamMetaData != null) {
+ paramterViewer.setInput(newDecodeParam(decodeParamMetaData, ((ValueType) bindingTypeObj)));
+ }
+ }
}
}
}
+ private List<DecodeParam> newDecodeParam(DecodeParamMetaData[] decodeParamMetaData, ValueType valueType) {
+ List<DecodeParam> list = new ArrayList<DecodeParam>();
+ for (int i = 0; i < decodeParamMetaData.length; i++) {
+ DecodeParamMetaData decodeParamMD = decodeParamMetaData[i];
+ DecodeParam p = new DecodeParam();
+ DecodeParamType dp = findDecodeParamType(decodeParamMD.getName(), valueType);
+
+ p.setName(decodeParamMD.getName());
+ if (dp != null) {
+ String dpv = dp.getValue();
+ if (dpv != null) {
+ dpv = dpv.trim();
+ }
+ p.setValue(dpv);
+ } else if(decodeParamMD.getDefaultVal() != null) {
+ p.setValue(decodeParamMD.getDefaultVal());
+ } else if(decodeParamMD.isRequiresConfiguration()) {
+ // TODO: We need to raise a warning...
+ }
+
+ list.add(p);
+ }
+ return list;
+ }
+
+ private List<DecodeParam> newEnumDecodeParamSet(Class<?> enumType, ValueType valueType, JavaBeanChildGraphModel enumValueModelNode) {
+ List<DecodeParam> list = new ArrayList<DecodeParam>();
+ Properties configuredParams = JavaBeanChildGraphModel.getDecoderParams(valueType);
+
+ if(!configuredParams.isEmpty()) {
+ // Already configured...
+ Set<Entry<Object, Object>> paramSet = configuredParams.entrySet();
+ for(Entry<Object, Object> param : paramSet) {
+ String paramName = param.getKey().toString();
+
+ if(!paramName.equals("enumType")) {
+ DecodeParam p = new DecodeParam();
+ p.setName(paramName);
+ p.setValue(param.getValue().toString());
+ list.add(p);
+ }
+ }
+ } else {
+ Field[] enumFields = enumType.getDeclaredFields();
+
+ for(Field enumField : enumFields) {
+ if(enumField.isEnumConstant()) {
+ DecodeParam p = new DecodeParam();
+ p.setName(enumField.getName());
+ p.setValue(enumField.getName());
+ list.add(p);
+ }
+ }
+
+ // And add them to the model...
+ enumValueModelNode.newEnumDecodeParamSet(enumType, valueType);
+ }
+
+ return list;
+ }
+
private DecodeParamType findDecodeParamType(String name, ValueType valueType) {
List<?> ps = valueType.getDecodeParam();
for (Iterator<?> iterator = ps.iterator(); iterator.hasNext();) {
@@ -416,24 +390,6 @@
return null;
}
- private List<DecodeParam> newDecodeParam(String[] params, ValueType valueType) {
- List<DecodeParam> list = new ArrayList<DecodeParam>();
- for (int i = 0; i < params.length; i++) {
- String name = params[i];
- DecodeParam p = new DecodeParam();
- p.setName(name);
- DecodeParamType dp = findDecodeParamType(name, valueType);
- if (dp != null) {
- String dpv = dp.getValue();
- if (dpv != null)
- dpv = dpv.trim();
- p.setValue(dpv);
- }
- list.add(p);
- }
- return list;
- }
-
protected void createDecodeParamGUIContents(Object model, ISmooksModelProvider provider, IEditorPart part,
FormToolkit factory, Composite controlComposite) {
// ModelPanelCreator creator = new ModelPanelCreator();
@@ -594,4 +550,91 @@
}
}
+
+ private class DecodeParamCellModifier implements ICellModifier {
+
+ public void modify(Object element, String property, Object value) {
+ if (element instanceof TableItem) {
+ Object currentElement = ((TableItem) element).getData();
+ TreeNodeConnection lineModel = (TreeNodeConnection) getPresentSelectedGraphModel();
+ EditingDomain editingDomain = getSmooksModelProvider().getEditingDomain();
+ Object model = lineModel.getTargetNode().getData();
+
+ model = AdapterFactoryEditingDomain.unwrap(model);
+ if (model != null && model instanceof ValueType && currentElement instanceof DecodeParam) {
+ String pname = ((DecodeParam) currentElement).getName();
+ DecodeParamType paramType = findDecodeParamType(pname, (ValueType) model);
+ Command command = null;
+ if (!isEnumTarget && property.equals("value")) {
+ if (value != null) {
+ String svalue = ((String) value).trim();
+ if ("".equals(svalue)) {
+ if (paramType != null) {
+ command = RemoveCommand.create(editingDomain, paramType);
+ }
+ } else {
+ // if param is empty , add it
+ if (paramType == null) {
+ AbstractSmooksGraphicalModel targetNode = lineModel.getTargetNode();
+ if(targetNode instanceof JavaBeanChildGraphModel) {
+ command = ((JavaBeanChildGraphModel)targetNode).addDecodeParam(pname, (String) value, (ValueType) model);
+ }
+ } else {
+ command = SetCommand.create(editingDomain, paramType,
+ Javabean12Package.Literals.DECODE_PARAM_TYPE__VALUE, value);
+ }
+ }
+ }
+ if (command != null) {
+ editingDomain.getCommandStack().execute(command);
+ ((DecodeParam) currentElement).setValue((String) value);
+ paramterViewer.update(currentElement, new String[] { property });
+ }
+ } else if (isEnumTarget && property.equals("name")) {
+ if (value != null) {
+ String svalue = ((String) value).trim();
+ if ("".equals(svalue)) {
+ // Can't blank it for an enum... ignore...
+ } else {
+ command = SetCommand.create(editingDomain, paramType,
+ Javabean12Package.Literals.DECODE_PARAM_TYPE__NAME, value);
+ editingDomain.getCommandStack().execute(command);
+ ((DecodeParam) currentElement).setName((String) value);
+ paramterViewer.update(currentElement, new String[] { property });
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public Object getValue(Object element, String property) {
+ element = AdapterFactoryEditingDomain.unwrap(element);
+ if (!isEnumTarget && property.equals("value")) { //$NON-NLS-1$
+ if (element instanceof DecodeParam) {
+ String name = ((DecodeParam) element).getValue();
+ if (name == null)
+ name = ""; //$NON-NLS-1$
+ return name;
+ }
+ } else if (isEnumTarget && property.equals("name")) { //$NON-NLS-1$
+ if (element instanceof DecodeParam) {
+ String name = ((DecodeParam) element).getName();
+ if (name == null)
+ name = ""; //$NON-NLS-1$
+ return name;
+ }
+ }
+ return null;
+ }
+
+ public boolean canModify(Object element, String property) {
+ if (property.equals(isEnumTarget?"name":"value")) { //$NON-NLS-1$ //$NON-NLS-2$
+ if (element instanceof DecodeParam) {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/messages.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/messages.properties 2010-01-29 23:30:31 UTC (rev 20033)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/messages.properties 2010-01-30 14:37:31 UTC (rev 20034)
@@ -16,4 +16,6 @@
ValueDecodeParamSection_NullText=<null>
ValueDecodeParamSection_ParamNameColumnText=Name
ValueDecodeParamSection_ParamValueColumnText=Value
+ValueDecodeParamSection_EnumParamNameColumnText=From Data Value
+ValueDecodeParamSection_EnumParamValueColumnText=To Enum Value
ValueDecodeParamSection_SectionTitle=Decode Configuration
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java 2010-01-29 23:30:31 UTC (rev 20033)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java 2010-01-30 14:37:31 UTC (rev 20034)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.smooks.graphical.editors.model.javamapping;
+import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
@@ -50,8 +51,11 @@
import org.jboss.tools.smooks.graphical.editors.template.SmooksFreemarkerTemplateGraphicalEditor;
import org.jboss.tools.smooks.model.javabean12.BeanType;
import org.jboss.tools.smooks.model.javabean12.DecodeParamType;
+import org.jboss.tools.smooks.model.javabean12.ExpressionType;
+import org.jboss.tools.smooks.model.javabean12.Javabean12Factory;
import org.jboss.tools.smooks.model.javabean12.Javabean12Package;
import org.jboss.tools.smooks.model.javabean12.ValueType;
+import org.jboss.tools.smooks.model.javabean12.WiringType;
import org.jboss.tools.smooks.templating.model.ModelBuilder;
import org.jboss.tools.smooks.templating.template.TemplateBuilder;
import org.jboss.tools.smooks.templating.template.ValueMapping;
@@ -62,7 +66,7 @@
* @author Dart
*
*/
-public class JavaBeanChildGraphModel extends AbstractResourceConfigChildNodeGraphModel {
+public class JavaBeanChildGraphModel extends AbstractResourceConfigChildNodeGraphModel implements JavaNode {
private IGraphicalEditorPart editorPart;
@@ -278,6 +282,15 @@
Command addParamsCommand = AddCommand.create(domainProvider.getEditingDomain(), owner,
Javabean12Package.Literals.VALUE_TYPE__DECODE_PARAM, oldParameters);
compoundCommand.append(addParamsCommand);
+ } else {
+ // If the target is an Enum type, we want to configure the decode parameters...
+ Class<?> targetType = getJavaType();
+ if(targetType.isEnum()) {
+ if(dataDecoder == null) {
+ dataDecoder = "Enum";
+ }
+ compoundCommand.append(_newEnumDecodeParamSet(targetType, (ValueType) model));
+ }
}
if (dataDecoder != null) {
@@ -298,6 +311,34 @@
}
}
+ public void newEnumDecodeParamSet(Class<?> enumType, ValueType valueType) {
+ Command compoundCommand = _newEnumDecodeParamSet(enumType, valueType);
+ domainProvider.getEditingDomain().getCommandStack().execute(compoundCommand);
+ }
+
+ private Command _newEnumDecodeParamSet(Class<?> enumType, ValueType valueType) {
+ CompoundCommand compoundCommand = new CompoundCommand();
+ Field[] enumFields = enumType.getDeclaredFields();
+
+ compoundCommand.append(addDecodeParam("enumType", enumType.getName(), valueType));
+ for(Field enumField : enumFields) {
+ if(enumField.isEnumConstant()) {
+ compoundCommand.append(addDecodeParam(enumField.getName(), enumField.getName(), valueType));
+ }
+ }
+
+ return compoundCommand;
+ }
+
+ public Command addDecodeParam(String paramName, String paramValue, ValueType valueType) {
+ DecodeParamType paramType = Javabean12Factory.eINSTANCE.createDecodeParamType();
+
+ paramType.setName(paramName);
+ paramType.setValue(paramValue);
+
+ return AddCommand.create(domainProvider.getEditingDomain(), valueType, Javabean12Package.Literals.VALUE_TYPE__DECODE_PARAM, paramType);
+ }
+
protected String getDataDecoder(TreeNodeConnection connection) {
Object data = getData();
data = AdapterFactoryEditingDomain.unwrap(data);
@@ -398,7 +439,42 @@
}
}
+
+ public Class<?> getJavaType() {
+ if(getData() instanceof WrapperItemProvider) {
+ WrapperItemProvider sourceData = (WrapperItemProvider) getData();
+ Object binding = ((ContainmentUpdatingFeatureMapEntry)sourceData.getValue()).getValue();
+
+ if(binding instanceof ValueType) {
+ return getPropertyType(getParentBean(), ((ValueType)binding).getProperty());
+ } else if(binding instanceof WiringType) {
+ return getPropertyType(getParentBean(), ((WiringType)binding).getProperty());
+ } else if(binding instanceof ExpressionType) {
+ return getPropertyType(getParentBean(), ((ExpressionType)binding).getProperty());
+ }
+ }
+ throw new IllegalStateException("Unexpected error. GraphModel data expected to implement WrapperItemProvider.");
+ }
+
+ public BeanType getParentBean() {
+ if(getData() instanceof WrapperItemProvider) {
+ WrapperItemProvider sourceData = (WrapperItemProvider) getData();
+ return (BeanType) sourceData.getOwner();
+ }
+
+ throw new IllegalStateException("Unexpected error. GraphModel data expected to implement WrapperItemProvider.");
+ }
+
+ public Object getBindingTypeObj() {
+ if(getData() instanceof WrapperItemProvider) {
+ WrapperItemProvider sourceData = (WrapperItemProvider) getData();
+ return ((ContainmentUpdatingFeatureMapEntry) sourceData.getValue()).getValue();
+ }
+
+ throw new IllegalStateException("Unexpected error. GraphModel data expected to implement WrapperItemProvider.");
+ }
+
/* (non-Javadoc)
* @see org.jboss.tools.smooks.graphical.editors.model.AbstractResourceConfigGraphModel#addMappingTypeInfo(org.jboss.tools.smooks.templating.template.ValueMapping)
*/
@@ -406,22 +482,22 @@
public void addMappingTypeInfo(ValueMapping mapping) {
if(getData() instanceof WrapperItemProvider) {
WrapperItemProvider sourceData = (WrapperItemProvider) getData();
- BeanType bean = (BeanType) sourceData.getOwner();
- ValueType valueBinding = (ValueType) ((ContainmentUpdatingFeatureMapEntry)sourceData.getValue()).getValue();
+ Object binding = ((ContainmentUpdatingFeatureMapEntry)sourceData.getValue()).getValue();
- mapping.setValueType(getPropertyType(bean, valueBinding));
- if(mapping.getEncodeProperties() == null) {
- mapping.setEncodeProperties(getDecoderParams(valueBinding));
+ if(binding instanceof ValueType) {
+ mapping.setValueType(getJavaType());
+ if(mapping.getEncodeProperties() == null) {
+ mapping.setEncodeProperties(getDecoderParams((ValueType) binding));
+ }
}
}
}
- private Class<?> getPropertyType(BeanType bean, ValueType valueBinding) {
+ private Class<?> getPropertyType(BeanType bean, String targetProperty) {
try {
IJavaProject project = SmooksUIUtils.getJavaProject(bean);
ProjectClassLoader classLoader = new ProjectClassLoader(project);
Class<?> beanClass = classLoader.loadClass(bean.getClass_());
- String targetProperty = valueBinding.getProperty();
if(targetProperty != null && !targetProperty.trim().equals("")) {
StringBuilder getterNameBuilder = new StringBuilder();
@@ -446,7 +522,7 @@
return null;
}
- private Properties getDecoderParams(ValueType valueBinding) {
+ public static Properties getDecoderParams(ValueType valueBinding) {
Properties decodeParams = new Properties();
EList decodeParamsList = valueBinding.getDecodeParam();
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaNode.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaNode.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaNode.java 2010-01-30 14:37:31 UTC (rev 20034)
@@ -0,0 +1,30 @@
+/**
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2009, JBoss Inc.
+ */
+package org.jboss.tools.smooks.graphical.editors.model.javamapping;
+
+/**
+ * Java Node type.
+ *
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public interface JavaNode {
+
+ Class<?> getJavaType();
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaNode.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 10 months
JBoss Tools SVN: r20033 - trunk/bpel/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-01-29 18:30:31 -0500 (Fri, 29 Jan 2010)
New Revision: 20033
Modified:
trunk/bpel/releng/build.properties
trunk/bpel/releng/build.properties.example.hudson.qa.jboss.com
trunk/bpel/releng/build.properties.example.linux
trunk/bpel/releng/build.properties.example.windows
Log:
comment out wtp update sites, and add org.jboss.tools.project.examples to required IUs
Modified: trunk/bpel/releng/build.properties
===================================================================
--- trunk/bpel/releng/build.properties 2010-01-29 23:28:20 UTC (rev 20032)
+++ trunk/bpel/releng/build.properties 2010-01-29 23:30:31 UTC (rev 20033)
@@ -37,7 +37,8 @@
org.eclipse.wst.ws_core.feature.feature.group+org.eclipse.wst.web_ui.feature.feature.group+org.eclipse.wst.ws_wsdl15.feature.feature.group+\
org.eclipse.wst.xml_ui.feature.feature.group+org.eclipse.wst.common_ui.feature.feature.group+org.eclipse.wst.common_core.feature.feature.group+\
org.eclipse.xsd.feature.group+org.eclipse.gef.feature.group+\
-org.mozilla.xpcom+org.jboss.tools.vpe.resref+org.jboss.tools.jst.web.ui+org.jboss.ide.eclipse.as.core+org.jboss.ide.eclipse.archives.webtools+org.jboss.tools.jmx.feature.feature.group
+org.mozilla.xpcom+org.jboss.tools.vpe.resref+org.jboss.tools.jst.web.ui+org.jboss.ide.eclipse.as.core+org.jboss.ide.eclipse.archives.webtools+org.jboss.tools.jmx.feature.feature.group+\
+org.jboss.tools.project.examples
flattenDependencies=true
parallelCompilation=true
Modified: trunk/bpel/releng/build.properties.example.hudson.qa.jboss.com
===================================================================
--- trunk/bpel/releng/build.properties.example.hudson.qa.jboss.com 2010-01-29 23:28:20 UTC (rev 20032)
+++ trunk/bpel/releng/build.properties.example.hudson.qa.jboss.com 2010-01-29 23:30:31 UTC (rev 20033)
@@ -26,9 +26,10 @@
http://repository.jboss.org/eclipse/galileo/repos/eclipse-Update-R-3.5.1-...
http://repository.jboss.org/eclipse/galileo/repos/GEF-Update-3.5.1.zip,\
http://repository.jboss.org/eclipse/galileo/repos/dtp-Updates-1.7-2009090...
-http://repository.jboss.org/eclipse/galileo/repos/emf-xsd-Update-2.5.0.zip,\
-http://repository.jboss.org/eclipse/galileo/repos/jst-buildrepo-R-3.1.1-20090917225226.zip,\
-http://repository.jboss.org/eclipse/galileo/repos/wst-buildrepo-R-3.1.1-20090917225226.zip
+http://repository.jboss.org/eclipse/galileo/repos/emf-xsd-Update-2.5.0.zip
+#,\
+#http://repository.jboss.org/eclipse/galileo/repos/jst-buildrepo-R-3.1.1-20090917225226.zip,\
+#http://repository.jboss.org/eclipse/galileo/repos/wst-buildrepo-R-3.1.1-20090917225226.zip
# required if building bpel.compare.ui: org.eclipse.gmf.runtime.diagram.ui+org.eclipse.emf.compare.match+org.eclipse.emf.compare.diff+org.eclipse.emf.compare.ui+\
IUsToInstall=org.eclipse.sdk.feature.group+org.eclipse.sdk.ide+org.eclipse.core.net+org.eclipse.equinox.common+org.eclipse.core.runtime+org.eclipse.debug.core+org.eclipse.rcp.feature.group+\
@@ -36,7 +37,8 @@
org.eclipse.wst.ws_core.feature.feature.group+org.eclipse.wst.web_ui.feature.feature.group+org.eclipse.wst.ws_wsdl15.feature.feature.group+\
org.eclipse.wst.xml_ui.feature.feature.group+org.eclipse.wst.common_ui.feature.feature.group+org.eclipse.wst.common_core.feature.feature.group+\
org.eclipse.xsd.feature.group+org.eclipse.gef.feature.group+\
-org.mozilla.xpcom+org.jboss.tools.vpe.resref+org.jboss.tools.jst.web.ui+org.jboss.ide.eclipse.as.core+org.jboss.ide.eclipse.archives.webtools+org.jboss.tools.jmx.feature.feature.group
+org.mozilla.xpcom+org.jboss.tools.vpe.resref+org.jboss.tools.jst.web.ui+org.jboss.ide.eclipse.as.core+org.jboss.ide.eclipse.archives.webtools+org.jboss.tools.jmx.feature.feature.group+\
+org.jboss.tools.project.examples
flattenDependencies=true
parallelCompilation=true
Modified: trunk/bpel/releng/build.properties.example.linux
===================================================================
--- trunk/bpel/releng/build.properties.example.linux 2010-01-29 23:28:20 UTC (rev 20032)
+++ trunk/bpel/releng/build.properties.example.linux 2010-01-29 23:30:31 UTC (rev 20033)
@@ -45,9 +45,10 @@
http://repository.jboss.org/eclipse/galileo/repos/eclipse-Update-R-3.5.1-...
http://repository.jboss.org/eclipse/galileo/repos/GEF-Update-3.5.1.zip,\
http://repository.jboss.org/eclipse/galileo/repos/dtp-Updates-1.7-2009090...
-http://repository.jboss.org/eclipse/galileo/repos/emf-xsd-Update-2.5.0.zip,\
-http://repository.jboss.org/eclipse/galileo/repos/jst-buildrepo-R-3.1.1-20090917225226.zip,\
-http://repository.jboss.org/eclipse/galileo/repos/wst-buildrepo-R-3.1.1-20090917225226.zip
+http://repository.jboss.org/eclipse/galileo/repos/emf-xsd-Update-2.5.0.zip
+#,\
+#http://repository.jboss.org/eclipse/galileo/repos/jst-buildrepo-R-3.1.1-20090917225226.zip,\
+#http://repository.jboss.org/eclipse/galileo/repos/wst-buildrepo-R-3.1.1-20090917225226.zip
# required if building bpel.compare.ui: org.eclipse.gmf.runtime.diagram.ui+org.eclipse.emf.compare.match+org.eclipse.emf.compare.diff+org.eclipse.emf.compare.ui+\
IUsToInstall=org.eclipse.sdk.feature.group+org.eclipse.sdk.ide+org.eclipse.core.net+org.eclipse.equinox.common+org.eclipse.core.runtime+org.eclipse.debug.core+org.eclipse.rcp.feature.group+\
@@ -55,7 +56,8 @@
org.eclipse.wst.ws_core.feature.feature.group+org.eclipse.wst.web_ui.feature.feature.group+org.eclipse.wst.ws_wsdl15.feature.feature.group+\
org.eclipse.wst.xml_ui.feature.feature.group+org.eclipse.wst.common_ui.feature.feature.group+org.eclipse.wst.common_core.feature.feature.group+\
org.eclipse.xsd.feature.group+org.eclipse.gef.feature.group+\
-org.mozilla.xpcom+org.jboss.tools.vpe.resref+org.jboss.tools.jst.web.ui+org.jboss.ide.eclipse.as.core+org.jboss.ide.eclipse.archives.webtools+org.jboss.tools.jmx.feature.feature.group
+org.mozilla.xpcom+org.jboss.tools.vpe.resref+org.jboss.tools.jst.web.ui+org.jboss.ide.eclipse.as.core+org.jboss.ide.eclipse.archives.webtools+org.jboss.tools.jmx.feature.feature.group+\
+org.jboss.tools.project.examples
flattenDependencies=true
parallelCompilation=true
Modified: trunk/bpel/releng/build.properties.example.windows
===================================================================
--- trunk/bpel/releng/build.properties.example.windows 2010-01-29 23:28:20 UTC (rev 20032)
+++ trunk/bpel/releng/build.properties.example.windows 2010-01-29 23:30:31 UTC (rev 20033)
@@ -40,9 +40,10 @@
http://repository.jboss.org/eclipse/galileo/repos/eclipse-Update-R-3.5.1-...
http://repository.jboss.org/eclipse/galileo/repos/GEF-Update-3.5.1.zip,\
http://repository.jboss.org/eclipse/galileo/repos/dtp-Updates-1.7-2009090...
-http://repository.jboss.org/eclipse/galileo/repos/emf-xsd-Update-2.5.0.zip,\
-http://repository.jboss.org/eclipse/galileo/repos/jst-buildrepo-R-3.1.1-20090917225226.zip,\
-http://repository.jboss.org/eclipse/galileo/repos/wst-buildrepo-R-3.1.1-20090917225226.zip
+http://repository.jboss.org/eclipse/galileo/repos/emf-xsd-Update-2.5.0.zip
+#,\
+#http://repository.jboss.org/eclipse/galileo/repos/jst-buildrepo-R-3.1.1-20090917225226.zip,\
+#http://repository.jboss.org/eclipse/galileo/repos/wst-buildrepo-R-3.1.1-20090917225226.zip
# required if building bpel.compare.ui: org.eclipse.gmf.runtime.diagram.ui+org.eclipse.emf.compare.match+org.eclipse.emf.compare.diff+org.eclipse.emf.compare.ui+\
IUsToInstall=org.eclipse.sdk.feature.group+org.eclipse.sdk.ide+org.eclipse.core.net+org.eclipse.equinox.common+org.eclipse.core.runtime+org.eclipse.debug.core+org.eclipse.rcp.feature.group+\
@@ -50,7 +51,8 @@
org.eclipse.wst.ws_core.feature.feature.group+org.eclipse.wst.web_ui.feature.feature.group+org.eclipse.wst.ws_wsdl15.feature.feature.group+\
org.eclipse.wst.xml_ui.feature.feature.group+org.eclipse.wst.common_ui.feature.feature.group+org.eclipse.wst.common_core.feature.feature.group+\
org.eclipse.xsd.feature.group+org.eclipse.gef.feature.group+\
-org.mozilla.xpcom+org.jboss.tools.vpe.resref+org.jboss.tools.jst.web.ui+org.jboss.ide.eclipse.as.core+org.jboss.ide.eclipse.archives.webtools+org.jboss.tools.jmx.feature.feature.group
+org.mozilla.xpcom+org.jboss.tools.vpe.resref+org.jboss.tools.jst.web.ui+org.jboss.ide.eclipse.as.core+org.jboss.ide.eclipse.archives.webtools+org.jboss.tools.jmx.feature.feature.group+\
+org.jboss.tools.project.examples
flattenDependencies=true
parallelCompilation=true
14 years, 10 months
JBoss Tools SVN: r20032 - trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/META-INF.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-01-29 18:28:20 -0500 (Fri, 29 Jan 2010)
New Revision: 20032
Modified:
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/META-INF/MANIFEST.MF
Log:
drop version range - examples plugin already at 1.1.0
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/META-INF/MANIFEST.MF 2010-01-29 22:44:07 UTC (rev 20031)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/META-INF/MANIFEST.MF 2010-01-29 23:28:20 UTC (rev 20032)
@@ -30,7 +30,7 @@
org.jboss.tools.jmx.core;resolution:=optional,
org.eclipse.wst.server.ui;resolution:=optional,
org.eclipse.ui.navigator,
- org.jboss.tools.project.examples;bundle-version="1.0.1"
+ org.jboss.tools.project.examples
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.bpel.runtimes,
org.jboss.tools.bpel.runtimes.facets,
14 years, 10 months
JBoss Tools SVN: r20031 - in trunk/ws/plugins: org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2010-01-29 17:44:07 -0500 (Fri, 29 Jan 2010)
New Revision: 20031
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizardValidator.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/ServletDescriptor.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java
trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JBossWSUIPlugin.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateSampleClassWizardPage.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWebXmlWizardPage.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizard.java
Log:
OPEN - issue JBIDE-5715: Dynamic Web Service Project Wizard
https://jira.jboss.org/jira/browse/JBIDE-5715
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2010-01-29 22:05:14 UTC (rev 20030)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2010-01-29 22:44:07 UTC (rev 20031)
@@ -17,8 +17,8 @@
org.eclipse.wst.command.env,
org.apache.ant,
org.apache.xerces,
- org.eclipse.jst.j2ee,
- org.eclipse.jst.j2ee.core,
+ org.eclipse.jst.j2ee;visibility:=reexport,
+ org.eclipse.jst.j2ee.core;visibility:=reexport,
org.eclipse.emf.common,
org.eclipse.emf.ecore,
org.eclipse.jdt.core,
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java 2010-01-29 22:05:14 UTC (rev 20030)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/data/ServiceModel.java 2010-01-29 22:44:07 UTC (rev 20031)
@@ -20,6 +20,7 @@
private int wsScenario;
private boolean extension;
private String serviceName;
+ private String customClassName;
public int getWsScenario() {
return wsScenario;
@@ -174,4 +175,12 @@
public String getServiceName() {
return serviceName;
}
+
+ public void setCustomClassName(String className) {
+ this.customClassName = className;
+ }
+
+ public String getCustomClassName() {
+ return customClassName;
+ }
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF 2010-01-29 22:05:14 UTC (rev 20030)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/META-INF/MANIFEST.MF 2010-01-29 22:44:07 UTC (rev 20031)
@@ -23,5 +23,6 @@
org.jboss.tools.ws.ui.preferences
Bundle-Vendor: %PLUGIN_PROVIDER
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.jboss.tools.ws.creation.core.commands,
+Import-Package: org.eclipse.jst.javaee.web,
+ org.jboss.tools.ws.creation.core.commands,
org.jboss.tools.ws.creation.core.data
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JBossWSUIPlugin.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JBossWSUIPlugin.java 2010-01-29 22:05:14 UTC (rev 20030)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/JBossWSUIPlugin.java 2010-01-29 22:44:07 UTC (rev 20031)
@@ -11,8 +11,12 @@
package org.jboss.tools.ws.ui;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
import org.osgi.framework.BundleContext;
/**
@@ -63,4 +67,28 @@
path = "icons/" + path; //$NON-NLS-1$
return AbstractUIPlugin.imageDescriptorFromPlugin("org.jboss.tools.ws.ui", path); //$NON-NLS-1$
}
+
+ public static boolean isDebugEnabled() {
+ return plugin.isDebugging();
+ }
+
+ public static void log(String msg) {
+ if(isDebugEnabled()) plugin.getLog().log(new Status(Status.INFO, PLUGIN_ID, Status.OK, msg, null));
+ }
+
+ public static void log(IStatus status) {
+ if(isDebugEnabled() || !status.isOK()) plugin.getLog().log(status);
+ }
+
+ public static void log(String message, Throwable exception) {
+ plugin.getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, message, exception));
+ }
+
+ public static void log(Throwable ex) {
+ plugin.getLog().log(new Status(Status.ERROR, PLUGIN_ID, Status.OK, JBossWSUIMessages.JBossWS_UI_PLUGIN_NO_MESSAGES, ex));
+ }
+
+ public static Shell getShell() {
+ return plugin.getWorkbench().getActiveWorkbenchWindow().getShell();
+ }
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-01-29 22:05:14 UTC (rev 20030)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-01-29 22:44:07 UTC (rev 20031)
@@ -55,3 +55,8 @@
Error_JBossWS_GenerateWizard_NotDynamicWebProject=The project must be a Dynamic Web Project and contain a web.xml in a right Location
Error_JBossWS_GenerateWizard_ClassName_Same=The class name has been used in the web project.
JBossWS_GenerateWizard_MessageDialog_Title=Error
+Error_JBossWS_GenerateWizard_ServiceName_Empty=The Service Name may not be an empty string.
+Error_JBossWS_GenerateWizard_ClassName_Empty=The Class Name may not be an empty string.
+Error_JBossWS_GenerateWizard_PackageName_Empty=The Package Name may not be an empty string.
+Error_JBossWS_GenerateWizard=Problems encountered while creating the web.xml and Java class entries.
+JBossWS_UI_PLUGIN_NO_MESSAGES=No message
\ No newline at end of file
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2010-01-29 22:05:14 UTC (rev 20030)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2010-01-29 22:44:07 UTC (rev 20031)
@@ -89,8 +89,12 @@
public static String Error_JBossWS_GenerateWizard_NotDynamicWebProject;
public static String Error_JBossWS_GenerateWizard_ClassName_Same;
public static String JBossWS_GenerateWizard_MessageDialog_Title;
+ public static String Error_JBossWS_GenerateWizard_ServiceName_Empty;
+ public static String Error_JBossWS_GenerateWizard_ClassName_Empty;
+ public static String Error_JBossWS_GenerateWizard_PackageName_Empty;
+
+ public static String JBossWS_UI_PLUGIN_NO_MESSAGES;
-
static {
NLS.initializeMessages(BUNDLE_NAME, JBossWSUIMessages.class);
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateSampleClassWizardPage.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateSampleClassWizardPage.java 2010-01-29 22:05:14 UTC (rev 20030)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateSampleClassWizardPage.java 2010-01-29 22:44:07 UTC (rev 20031)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.ws.ui.wizards;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.DialogPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -22,6 +24,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import org.jboss.tools.ws.creation.core.data.ServiceModel;
import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
public class JBossWSGenerateSampleClassWizardPage extends WizardPage {
@@ -51,11 +54,8 @@
packageName.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- if (!"".equals(packageName.getText()) && !"".equals(className.getText())) { //$NON-NLS-1$ //$NON-NLS-2$
- setPageComplete(true);
- } else {
- setPageComplete(false);
- }
+ wizard.setClassName(packageName.getText());
+ setPageComplete(isPageComplete());
}
});
@@ -65,16 +65,13 @@
className = new Text(composite, SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
className.setLayoutData(gd);
- className.setText(wizard.getClassName());
+ className.setText(updateDefaultName());
className.setEnabled(!wizard.isUseDefaultClassName());
className.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- if (!"".equals(packageName.getText()) && !"".equals(className.getText())) { //$NON-NLS-1$ //$NON-NLS-2$
- setPageComplete(true);
- } else {
- setPageComplete(false);
- }
+ wizard.setClassName(className.getText());
+ setPageComplete(isPageComplete());
}
});
@@ -110,13 +107,7 @@
}
public boolean isPageComplete() {
- if (!"".equals(packageName.getText()) && !"".equals(className.getText())) { //$NON-NLS-1$//$NON-NLS-2$
- wizard.setPackageName(packageName.getText());
- wizard.setClassName(className.getText());
- return true;
- }
-
- return false;
+ return validate();
}
private Composite createDialogArea(Composite parent) {
@@ -132,4 +123,36 @@
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
return composite;
}
+
+ private String updateDefaultName () {
+ ServiceModel model = wizard.getServiceModel();
+ JBossWSGenerateWizardValidator.setServiceModel(model);
+ String currentName = wizard.getClassName();
+ String testName = currentName;
+ IStatus status = JBossWSGenerateWizardValidator.isWSClassValid(testName, wizard.getProject());
+ int i = 1;
+ while (status != null) {
+ testName = currentName + i;
+ wizard.setClassName(testName);
+ model = wizard.getServiceModel();
+ JBossWSGenerateWizardValidator.setServiceModel(model);
+ status = JBossWSGenerateWizardValidator.isWSClassValid(testName, wizard.getProject());
+ i++;
+ }
+ return testName;
+ }
+
+ private boolean validate() {
+ ServiceModel model = wizard.getServiceModel();
+ JBossWSGenerateWizardValidator.setServiceModel(model);
+ IStatus status = JBossWSGenerateWizardValidator.isWSClassValid(model.getCustomClassName(), wizard.getProject());
+ if (status != null) {
+ setMessage(status.getMessage(), DialogPage.ERROR);
+ return false;
+ }
+ else {
+ setMessage(null);
+ return true;
+ }
+ }
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWebXmlWizardPage.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWebXmlWizardPage.java 2010-01-29 22:05:14 UTC (rev 20030)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWebXmlWizardPage.java 2010-01-29 22:44:07 UTC (rev 20031)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.ws.ui.wizards;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.DialogPage;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
@@ -23,9 +25,11 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import org.jboss.tools.ws.creation.core.data.ServiceModel;
import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
public class JBossWSGenerateWebXmlWizardPage extends WizardPage {
+
private JBossWSGenerateWizard wizard;
private Text name;
private Button checkDefault;
@@ -46,16 +50,13 @@
name = new Text(composite, SWT.BORDER);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
name.setLayoutData(gd);
- name.setText(wizard.getServiceName());
+ name.setText(updateDefaultName());
name.setEnabled(!wizard.isUseDefaultServiceName());
name.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- if (!"".equals(name.getText())) { //$NON-NLS-1$
- setPageComplete(true);
- } else {
- setPageComplete(false);
- }
+ wizard.setServiceName(name.getText());
+ setPageComplete(isPageComplete());
}
});
@@ -84,9 +85,8 @@
}
});
-
+
setControl(composite);
-
}
public IWizardPage getNextPage() {
@@ -107,4 +107,41 @@
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
return composite;
}
+
+ @Override
+ public boolean isPageComplete() {
+ return validate();
+ }
+
+ private String updateDefaultName () {
+ ServiceModel model = wizard.getServiceModel();
+ JBossWSGenerateWizardValidator.setServiceModel(model);
+ String currentName = wizard.getServiceName();
+ String testName = currentName;
+ IStatus status = JBossWSGenerateWizardValidator.isWSNameValid();
+ int i = 1;
+ while (status != null) {
+ testName = currentName + i;
+ wizard.setServiceName(testName);
+ model = wizard.getServiceModel();
+ JBossWSGenerateWizardValidator.setServiceModel(model);
+ status = JBossWSGenerateWizardValidator.isWSNameValid();
+ i++;
+ }
+ return testName;
+ }
+
+ private boolean validate() {
+ ServiceModel model = wizard.getServiceModel();
+ JBossWSGenerateWizardValidator.setServiceModel(model);
+ IStatus status = JBossWSGenerateWizardValidator.isWSNameValid();
+ if (status != null) {
+ setMessage(status.getMessage(), DialogPage.ERROR);
+ return false;
+ }
+ else {
+ setMessage(null);
+ return true;
+ }
+ }
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizard.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizard.java 2010-01-29 22:05:14 UTC (rev 20030)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizard.java 2010-01-29 22:44:07 UTC (rev 20031)
@@ -15,7 +15,9 @@
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -26,6 +28,7 @@
import org.jboss.tools.ws.creation.core.commands.MergeWebXMLCommand;
import org.jboss.tools.ws.creation.core.commands.ServiceSampleCreationCommand;
import org.jboss.tools.ws.creation.core.data.ServiceModel;
+import org.jboss.tools.ws.ui.JBossWSUIPlugin;
import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
import org.jboss.tools.ws.ui.utils.UIUtils;
@@ -46,6 +49,7 @@
private IStructuredSelection selection;
private IProject project;
+
private static String WEB = "web.xml"; //$NON-NLS-1$
private static String JAVA = ".java"; //$NON-NLS-1$
private static String WEBINF = "WEB-INF"; //$NON-NLS-1$
@@ -93,7 +97,7 @@
MergeWebXMLCommand mergeCommand = new MergeWebXMLCommand(model);
status = mergeCommand.execute(null, null);
} catch (ExecutionException e) {
- e.printStackTrace();
+ JBossWSUIPlugin.log(e);
}
if (status != null && status.getSeverity() == Status.ERROR) {
MessageDialog
@@ -105,8 +109,21 @@
}
try {
new ServiceSampleCreationCommand(model).execute(null, null);
+ getProject().refreshLocal(IProject.DEPTH_INFINITE, new NullProgressMonitor());
} catch (ExecutionException e) {
- e.printStackTrace();
+ JBossWSUIPlugin.log(e);
+ MessageDialog
+ .openError(
+ this.getShell(),
+ JBossWSUIMessages.JBossWS_GenerateWizard_MessageDialog_Title,
+ e.getMessage());
+ } catch (CoreException e) {
+ JBossWSUIPlugin.log(e);
+ MessageDialog
+ .openError(
+ this.getShell(),
+ JBossWSUIMessages.JBossWS_GenerateWizard_MessageDialog_Title,
+ e.getMessage());
}
}
return true;
@@ -196,4 +213,21 @@
public void setUseDefaultClassName(boolean useDefaultClassName) {
this.useDefaultClassName = useDefaultClassName;
}
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public ServiceModel getServiceModel() {
+ ServiceModel model = new ServiceModel();
+ model.setWebProjectName(project.getName());
+ model.addServiceClasses(new StringBuffer().append(getPackageName())
+ .append(".").append(getClassName()).toString()); //$NON-NLS-1$
+ model.setServiceName(getServiceName());
+ model.setUpdateWebxml(true);
+ model.setCustomPackage(getPackageName());
+ model.setCustomClassName(getClassName());
+ return model;
+ }
+
}
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizardValidator.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizardValidator.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizardValidator.java 2010-01-29 22:44:07 UTC (rev 20031)
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.ws.ui.wizards;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jst.j2ee.model.IModelProvider;
+import org.eclipse.jst.j2ee.model.ModelProviderManager;
+import org.eclipse.jst.javaee.core.UrlPatternType;
+import org.eclipse.jst.javaee.web.Servlet;
+import org.eclipse.jst.javaee.web.ServletMapping;
+import org.eclipse.jst.javaee.web.WebApp;
+import org.jboss.tools.ws.core.utils.StatusUtils;
+import org.jboss.tools.ws.creation.core.data.ServiceModel;
+import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
+import org.jboss.tools.ws.creation.core.utils.JBossWSCreationUtils;
+import org.jboss.tools.ws.ui.messages.JBossWSUIMessages;
+
+public class JBossWSGenerateWizardValidator {
+
+ private static ServiceModel model;
+ private static ServletDescriptor[] descriptors;
+
+ private static String JAVA = ".java"; //$NON-NLS-1$
+
+ public static void setServiceModel ( ServiceModel inModel ) {
+ model = inModel;
+
+ descriptors = new ServletDescriptor[model.getServiceClasses().size()];
+ List<String> serviceClasses = model.getServiceClasses();
+ for (int i = 0; i < serviceClasses.size(); i++) {
+ descriptors[i] = getServletDescriptor(serviceClasses.get(i));
+ }
+ }
+
+ public static IStatus isWSNameValid() {
+ final IModelProvider provider = ModelProviderManager
+ .getModelProvider(JBossWSCreationUtils.getProjectByName(model
+ .getWebProjectName()));
+ Object object = provider.getModelObject();
+ if (object instanceof WebApp) {
+ WebApp webApp = (WebApp) object;
+ if (model != null) {
+ for (int i = 0; i < descriptors.length; i++) {
+ if (descriptors[i].getName().trim().length() == 0 ) {
+ return StatusUtils.errorStatus(JBossWSUIMessages.Error_JBossWS_GenerateWizard_ServiceName_Empty);
+ }
+ List<?> theServlets = webApp.getServlets();
+ for (int j = 0; j < theServlets.size(); j++) {
+ Servlet aServlet = (Servlet) theServlets
+ .get(j);
+ if (aServlet.getServletName().equals(descriptors[i].getName())) {
+ return StatusUtils.errorStatus(JBossWSCreationCoreMessages.Error_JBossWS_GenerateWizard_WSName_Same);
+ }
+ }
+ List<?> theServletMappings = webApp.getServletMappings();
+ for (int j = 0; j < theServletMappings.size(); j++) {
+ ServletMapping aServletMapping = (ServletMapping) theServletMappings
+ .get(j);
+ List<?> urlPatterns = aServletMapping.getUrlPatterns();
+ for (int k = 0; k < urlPatterns.size(); k++) {
+ UrlPatternType upt = (UrlPatternType) urlPatterns.get(k);
+ if (aServletMapping.getServletName().equals(descriptors[i].getName()) ||
+ upt.getValue().equals(descriptors[i].getMappings())) {
+ return StatusUtils.errorStatus(JBossWSCreationCoreMessages.Error_JBossWS_GenerateWizard_WSName_Same);
+ }
+ }
+ }
+ }
+ }
+ return null;
+ }
+ return null;
+ }
+
+ public static IStatus isWSClassValid(String className, IProject project) {
+ if (model.getCustomPackage().trim().length() == 0) {
+ // empty package name
+ return StatusUtils.errorStatus(JBossWSUIMessages.Error_JBossWS_GenerateWizard_ClassName_Same);
+ }
+ else if (model.getCustomClassName().trim().length() == 0 ) {
+ // empty class name
+ return StatusUtils.errorStatus(JBossWSUIMessages.Error_JBossWS_GenerateWizard_ClassName_Same);
+ }
+ else {
+ File file = findFileByPath(className + JAVA, project
+ .getLocation().toOSString());
+ if (file != null) {
+ // class already exists
+ return StatusUtils.errorStatus(JBossWSUIMessages.Error_JBossWS_GenerateWizard_ClassName_Same);
+ }
+ }
+ return null;
+ }
+
+ private static ServletDescriptor getServletDescriptor(String clsName) {
+ String servletName = model.getServiceName();
+ if (servletName == null) {
+ servletName = JBossWSCreationUtils
+ .classNameFromQualifiedName(clsName);
+ }
+ if (servletName.endsWith("Impl") && servletName.length() > 4) { //$NON-NLS-1$
+ servletName = servletName.substring(0, servletName.length() - 4);
+ }
+ ServletDescriptor sd = new ServletDescriptor();
+ sd.setName(servletName);
+ sd.setDisplayName(sd.getName());
+ sd.setClassName(clsName);
+ sd.setMappings(JBossWSCreationCoreMessages.Separator_Java + sd.getDisplayName());
+ return sd;
+ }
+
+ private static File findFileByPath(String name, String path) {
+ File ret = null;
+ File folder = new File(path);
+ if (folder.isDirectory()) {
+ File[] files = folder.listFiles();
+ for (File file : files) {
+ ret = findFileByPath(name, file.getAbsolutePath());
+ if (ret != null) {
+ break;
+ }
+ }
+ } else {
+ if (name.equals(folder.getName())) {
+ ret = folder;
+ }
+ }
+ return ret;
+ }
+}
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/JBossWSGenerateWizardValidator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/ServletDescriptor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/ServletDescriptor.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/ServletDescriptor.java 2010-01-29 22:44:07 UTC (rev 20031)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.ws.ui.wizards;
+
+public class ServletDescriptor {
+ private String _name;
+ private String _className;
+ private String _displayName;
+ private String _mappings;
+
+ public ServletDescriptor() {
+ }
+
+ public String getName() {
+ return _name;
+ }
+
+ public void setName(String name) {
+ _name = name;
+ }
+
+ public String getClassName() {
+ return _className;
+ }
+
+ public void setClassName(String className) {
+ _className = className;
+ }
+
+ public String getDisplayName() {
+ return _displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ _displayName = displayName;
+ }
+
+ public String getMappings() {
+ return _mappings;
+ }
+
+ public void setMappings(String mappings) {
+ _mappings = mappings;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/wizards/ServletDescriptor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 10 months