[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wsf-java-dev
Subject:    [wsf-java-dev] svn commit r1844 - in
From:       svn () wso2 ! org (svn () wso2 ! org)
Date:       2007-04-16 4:42:51
Message-ID: E1HdPbd-0002be-6G () wso2 ! org
[Download RAW message or body]

Author: sandakith
Date: Mon Apr 16 04:42:17 2007
New Revision: 1844

Added:
   trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/
   trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/.classpath \
(contents, props changed)  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/.project  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/.settings/  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/.settings/org.eclipse.jdt.core.prefs \
(contents, props changed)  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/META-INF/  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/META-INF/MANIFEST.MF
  trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/build.properties \
(contents, props changed)  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/plugin.properties \
(contents, props changed)  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/plugin.xml   \
(contents, props changed)  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/ \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/
  trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/
  trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/
  trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/
  trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/plugin/
  trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/plugin/WebServiceWSASCreationUIPlugin.java \
(contents, props changed)  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/widgets/
  trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/widgets/bean/
  trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/widgets/bean/ServicesXMLSelectBeanWidget.java \
(contents, props changed)  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/widgets/skeleton/
  trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/widgets/skeleton/WSDL2JAVASkelConfigWidget.java \
(contents, props changed)  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/
  trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASBeanConfigWidgetFactory.java \
(contents, props changed)  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASSkelConfigWidgetFactory.java \
(contents, props changed)  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASWebService.java \
(contents, props changed)  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASWebServiceInfo.java \
(contents, props changed)  \
trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASWebServiceRuntime.java \
(contents, props changed) Log:
wsf eclipse creation ui plugin


Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/.classpath
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/.classpath	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/.project
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/.project	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.wso2.wsf.wtp.creation.ui</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/.settings/org.eclipse.jdt.core.prefs
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/.settings/org.eclipse.jdt.core.prefs	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,52 @@
+#Wed Jan 17 13:16:38 LKT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
 +org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
 +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
 +org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
 +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
 +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/META-INF/MANIFEST.MF
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/META-INF/MANIFEST.MF	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: WSF Creation Ui Plug-in
+Bundle-SymbolicName: org.wso2.wsf.wtp.creation.ui;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: org.wso2.wsf.wtp.creation.ui.plugin.WebServiceWSASCreationUIPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.wso2.wsas,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.jst.ws.consumption.ui,
+ org.eclipse.wst.ws,
+ org.eclipse.wst.common.environment,
+ org.eclipse.wst.command.env.core,
+ org.eclipse.emf.common,
+ org.eclipse.wst.common.frameworks,
+ org.eclipse.wst.command.env.ui,
+ org.eclipse.jst.ws,
+ org.eclipse.wst.command.env,
+ org.eclipse.jdt.core,
+ org.wso2.wsf.wtp.consumption.core,
+ org.wso2.wsf.wtp.core,
+ org.wso2.wsf.wtp.creation.core,
+ org.wso2.wsf.wtp.consumption.ui
+Eclipse-LazyStart: true
+Export-Package: org.wso2.wsf.wtp.creation.ui.plugin,
+ org.wso2.wsf.wtp.creation.ui.widgets.bean,
+ org.wso2.wsf.wtp.creation.ui.widgets.skeleton,
+ org.wso2.wsf.wtp.creation.ui.wsrt

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/build.properties
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/build.properties	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,23 @@
+###############################################################################
+# Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               plugin.properties,\
+               build.properties

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/plugin.properties
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/plugin.properties	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,20 @@
+###############################################################################
+# Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+
+#
+# Messages in plugin.xml.
+#
+LABEL_RUNTIME_WSAS=WSO2 WSAS

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/plugin.xml
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/plugin.xml	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+	<extension point="org.eclipse.wst.command.env.ui.widgetRegistry">
+      <widgetFactory   
+        id="BeanExampleConfig"
+        insertBeforeCommandId="org.wso2.wsf.wtp.creation.core.command.WSASBUCommand"
+        class="org.wso2.wsf.wtp.creation.ui.wsrt.WSASBeanConfigWidgetFactory"/>
+    </extension> 
+    
+	<extension point="org.eclipse.wst.command.env.ui.widgetRegistry">
+      <widgetFactory   
+        id="SkelExampleConfig"
+        insertBeforeCommandId="org.wso2.wsf.wtp.creation.core.command.WSASTDCommand"
+        class="org.wso2.wsf.wtp.creation.ui.wsrt.WSASSkelConfigWidgetFactory" />
+    </extension> 
+    
+    <extension point="org.eclipse.jst.ws.consumption.ui.runtimes">
+      <runtime
+        id="org.wso2.wsf.wtp.creation.wsasWebServiceRT"
+        label="%LABEL_RUNTIME_WSAS"
+        serverRequired="false"/>
+    </extension>
+
+
+	<!-- define support for WSAS Java bean bottom up and top-down support in web \
projects --> +    <extension \
point="org.eclipse.jst.ws.consumption.ui.serviceRuntimes"> +      <serviceRuntime
+        id="org.wso2.wsf.wtp.creation.java" 
+        serviceImplementationTypeId="org.eclipse.jst.ws.wsImpl.java"
+        runtimeId="org.wso2.wsf.wtp.creation.wsasWebServiceRT"
+        bottomUp="true"
+        topDown="true"
+        class="org.wso2.wsf.wtp.creation.ui.wsrt.WSASWebServiceRuntime">
+
+        <required-facet-version facet="jst.web" version="2.3" allow-newer="true"/>
+
+      </serviceRuntime>
+    </extension>   
+        
+    <!-- define support for Axis Java clients in Web projects -->
+    <extension point="org.eclipse.jst.ws.consumption.ui.clientRuntimes">
+      <clientRuntime
+        id="org.wso2.wsf.wtp.consumption.web"
+        clientImplementationTypeId="org.eclipse.jst.ws.client.type.java"
+        runtimeId="org.wso2.wsf.wtp.creation.wsasWebServiceRT"
+        class="org.wso2.wsf.wtp.creation.ui.wsrt.WSASWebServiceRuntime">
+
+        <required-facet-version facet="jst.web" version="2.3" allow-newer="true" />
+        <required-facet-version facet="wsas.core" version="1.1" allow-newer="true" \
/> +
+      </clientRuntime>
+    </extension>     
+    
+</plugin>

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/plugin/WebServiceWSASCreationUIPlugin.java
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/plugin/WebServiceWSASCreationUIPlugin.java	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,63 @@
+/*
+ * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.wsf.wtp.creation.ui.plugin;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class WebServiceWSASCreationUIPlugin extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.wso2.wsf.wtp.creation.ui";
+
+	// The shared instance
+	private static WebServiceWSASCreationUIPlugin plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public WebServiceWSASCreationUIPlugin() {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
 +	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
 +	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * @return the shared instance
+	 */
+	public static WebServiceWSASCreationUIPlugin getDefault() {
+		return plugin;
+	}
+
+}

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/widgets/bean/ServicesXMLSelectBeanWidget.java
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/widgets/bean/ServicesXMLSelectBeanWidget.java	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,223 @@
+/*
+ * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.wsf.wtp.creation.ui.widgets.bean;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents;
+import org.wso2.wsf.wtp.creation.core.data.DataModel;
+import org.wso2.wsf.wtp.creation.core.messages.WSASCreationUIMessages;
+
+
+public class ServicesXMLSelectBeanWidget extends SimpleWidgetDataContributor 
+{
+	private DataModel 	model;
+	private Button	 	browseButton;
+	private Text 		servicesXMLPath;
+	private Button 		generateServicesXML;
+	private Button 		haveServicesXML;
+
+	public ServicesXMLSelectBeanWidget( DataModel model )
+	{
+		this.model = model;  
+	}
+
+	public WidgetDataEvents addControls( Composite parent, final Listener \
statusListener ) +	{
+		final Composite  mainComp = new Composite( parent, SWT.NONE );
+		GridLayout layout   = new GridLayout();
+		layout.numColumns = 3;
+		GridData   griddata = new GridData( GridData.FILL_HORIZONTAL );
+		Label      label    = new Label( mainComp, SWT.NONE );
+
+		griddata = new GridData( GridData.FILL_HORIZONTAL );
+		griddata.horizontalSpan = 3;
+		mainComp.setLayout( layout );
+		mainComp.setLayoutData( griddata );
+		label.setText( WSASCreationUIMessages.LABEL_WSAS_PREFERENCE_PAGE );
+		model.setGenerateServicesXML(true);
+		model.setServicesXML(false);
+
+		griddata = new GridData( GridData.FILL_HORIZONTAL );
+		griddata.horizontalSpan = 3;
+		haveServicesXML = new Button( mainComp, SWT.CHECK );
+		haveServicesXML.setText(WSASCreationUIMessages.LABEL_HAVE_SERVICES_XML_FILE);	
+		haveServicesXML.setLayoutData(griddata);
+		haveServicesXML.addSelectionListener( new SelectionAdapter()
+		{
+			public void widgetSelected(SelectionEvent e)
+			{
+				if (haveServicesXML.getSelection()){
+					haveServicesXML.setSelection(true);
+					generateServicesXML.setSelection(false);
+					enableServicesXMLBrowse();
+				}else{
+					if (!generateServicesXML.getSelection()){
+						haveServicesXML.setSelection(true); 
+						generateServicesXML.setSelection(false);
+						enableServicesXMLBrowse();
+					}else{
+						haveServicesXML.setSelection(false);
+						disableServicesXMLBrowse();
+					}
+				}
+				model.setGenerateServicesXML(false);
+				model.setServicesXML(true);
+
+				// Need to trigger a validation at this point to ensure
+				// that the next button is enabled properly just in case
+				// this is the last page in the wizard.
+				statusListener.handleEvent( null );
+			}     
+		});
+		griddata = new GridData( GridData.FILL_HORIZONTAL );
+		griddata.horizontalSpan = 2;
+
+		servicesXMLPath = new Text( mainComp, SWT.CHECK );
+		servicesXMLPath.setText("");
+		servicesXMLPath.setLayoutData(griddata);
+		servicesXMLPath.addModifyListener( new ModifyListener()
+		{
+			public void modifyText(ModifyEvent e)
+			{
+				model.setPathToServicesXML( servicesXMLPath.getText() );
+				// Need to trigger a validation at this point to ensure
+				// that the next button is enabled properly just in case
+				// this is the last page in the wizard.
+				statusListener.handleEvent( null );
+			}
+		});
+
+		griddata = new GridData( GridData.FILL_HORIZONTAL );
+		griddata.horizontalSpan = 1;
+		browseButton = new Button( mainComp, SWT.NULL );
+		browseButton.setText(WSASCreationUIMessages.LABEL_BROWSE);
+		browseButton.setLayoutData(griddata);
+		browseButton.addSelectionListener( new SelectionAdapter()
+		{
+			public void widgetSelected(SelectionEvent e)
+			{
+				handleBrowse(mainComp.getShell());
+				// Need to trigger a validation at this point to ensure
+				// that the next button is enabled properly just in case
+				// this is the last page in the wizard.
+				statusListener.handleEvent( null );
+			}     
+		}); 
+
+
+		griddata = new GridData( GridData.FILL_HORIZONTAL );
+		griddata.horizontalSpan = 3;
+		generateServicesXML = new Button( mainComp, SWT.CHECK );
+		generateServicesXML.setText( \
WSASCreationUIMessages.LABEL_DEFAULT_SERVICES_XML_FILE ); \
+		generateServicesXML.setLayoutData(griddata); \
+		generateServicesXML.setSelection(true); \
+		generateServicesXML.addSelectionListener( new SelectionAdapter() +		{
+			public void widgetSelected(SelectionEvent e)
+			{
+				if (generateServicesXML.getSelection()){
+					generateServicesXML.setSelection(true); 
+					haveServicesXML.setSelection(false);
+					disableServicesXMLBrowse();
+				}else{
+					if (!haveServicesXML.getSelection()){
+						generateServicesXML.setSelection(true); 
+						haveServicesXML.setSelection(false);
+					}else{
+						generateServicesXML.setSelection(false);
+					}
+				}
+				model.setGenerateServicesXML(true);
+				model.setServicesXML(false);
+				// Need to trigger a validation at this point to ensure
+				// that the next button is enabled properly just in case
+				// this is the last page in the wizard.
+				statusListener.handleEvent( null );
+			}     
+		}); 
+
+		disableServicesXMLBrowse();
+
+		return this;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.wst.command.env.ui.widgets.WidgetContributor#getStatus()
+	 */
+	public IStatus getStatus() 
+	{
+		IStatus result = null;
+
+		if( haveServicesXML.getSelection() && servicesXMLPath.getText().equals("") )
+		{
+			result = new Status( IStatus.ERROR, 
+								"id", 
+								0, 
+								WSASCreationUIMessages.ERROR_INVALID_SERVICES_XML, 
+								null ); 
+		}
+
+		return result;
+	}
+
+	/**
+	 * enable the services.xml text and browse button
+	 */
+	private void enableServicesXMLBrowse(){
+		browseButton.setEnabled(true);
+		servicesXMLPath.setEnabled(true);
+	}
+
+	/**
+	 * disable the services.xml text and browse button
+	 */
+	private void disableServicesXMLBrowse(){
+		browseButton.setEnabled(false);
+		servicesXMLPath.setEnabled(false);
+	}
+
+	/**
+	 * Pops up the file browse dialog box
+	 */
+	private void handleBrowse(Shell parent) {
+		FileDialog fileDialog = new FileDialog(parent);
+		fileDialog.setFilterExtensions(new String[] { WSASCreationUIMessages.FILE_XML });
+		String fileName = fileDialog.open();
+		if (fileName != null) {
+			servicesXMLPath.setText(fileName);
+			model.setPathToServicesXML( servicesXMLPath.getText() );
+		}
+	}
+}
+
+
+

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/widgets/skeleton/WSDL2JAVASkelConfigWidget.java
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/widgets/skeleton/WSDL2JAVASkelConfigWidget.java	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,485 @@
+/*
+ * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.wsf.wtp.creation.ui.widgets.skeleton;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.wsdl.WSDLException;
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.util.URLProcessor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.TableEditor;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.command.internal.env.core.common.StatusUtils;
+import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetDataContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataEvents;
+import org.wso2.wsf.wtp.consumption.core.utils.WSDLPropertyReader;
+import org.wso2.wsf.wtp.creation.core.data.DataModel;
+import org.wso2.wsf.wtp.creation.core.messages.WSASCreationUIMessages;
+
+
+public class WSDL2JAVASkelConfigWidget extends SimpleWidgetDataContributor 
+{
+	private DataModel model;
+	IStatus status = Status.OK_STATUS;
+
+	//controls
+	//check box for server side interface
+	private Button generateServerSideInterfaceCheckBoxButton;
+	private Button generateAllCheckBoxButton;
+	private Button testCaseCheckBoxButton;
+	private Combo databindingTypeCombo;
+	// Text box to have the portname
+	private Combo portNameCombo;
+	//Text box to have the service name
+	private Combo serviceNameCombo;
+	private WSDLPropertyReader reader;
+	private java.util.List serviceQNameList = null;
+	private Table namespace2packageTable = null;
+	//Label holding the full qualified package name for generated code
+	private Text packageText;
+	//Checkbox to enable the generation of test case classes for the generated \
implementation of the webservice. +	Label      label, fillLabel, fillLabel1, \
fillLabel2, fillLabel3, fillLabel4, fillLabel5, fillLabel6; +
+	public WSDL2JAVASkelConfigWidget( DataModel model )	{
+		this.model = model;  
+	}
+
+	public WidgetDataEvents addControls( Composite parent, final Listener \
statusListener ){ +		Composite  mainComp = new Composite( parent, SWT.NONE );
+		GridLayout layout   = new GridLayout();
+		mainComp.setLayout(layout);
+
+		layout.numColumns = 3;
+		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+		mainComp.setLayoutData( gd );
+
+		// service name
+		label = new Label(mainComp, SWT.NULL);
+		label.setText(WSASCreationUIMessages.LABEL_SERVICE_NAME_CAPTION);
+
+		serviceNameCombo = new Combo(mainComp, SWT.DROP_DOWN | SWT.BORDER
+				| SWT.READ_ONLY);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+		serviceNameCombo.setLayoutData(gd);
+		serviceNameCombo.addSelectionListener(new SelectionListener() {
+			public void widgetSelected(SelectionEvent e) {
+				model.setServiceName(serviceNameCombo.getText());
+			}
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		// port name
+		label = new Label(mainComp, SWT.NULL);
+		label.setText(WSASCreationUIMessages.LABEL_PORTNAME);
+		portNameCombo = new Combo(mainComp, SWT.DROP_DOWN | SWT.BORDER
+				| SWT.READ_ONLY);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+		portNameCombo.setLayoutData(gd);
+		portNameCombo.addSelectionListener(new SelectionListener() {
+			public void widgetSelected(SelectionEvent e) {
+				model.setPortName(portNameCombo.getText());
+			}
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		// Databinding
+		label = new Label(mainComp, SWT.NULL);
+		label.setText(WSASCreationUIMessages.LABEL_DATABINDING_CAPTION);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+		databindingTypeCombo = new Combo(mainComp, SWT.DROP_DOWN | SWT.BORDER | \
SWT.READ_ONLY); +		databindingTypeCombo.setLayoutData(gd);
+		fillDatabinderCombo();
+		databindingTypeCombo.select(0);
+		databindingTypeCombo.addSelectionListener(new SelectionListener() {
+			public void widgetSelected(SelectionEvent e) {
+				model.setDatabindingType(databindingTypeCombo.getText());
+			};
+			public void widgetDefaultSelected(SelectionEvent e) {
+			};
+		});
+
+		// package name
+		label = new Label(mainComp, SWT.NULL);
+		label.setText(WSASCreationUIMessages.LABEL_PACKEGE_NAME);
+		packageText = new Text(mainComp, SWT.BORDER);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+
+		packageText.setLayoutData(gd);
+		packageText.setText(""); // get this text from the
+		packageText.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				model.setPackageText(packageText.getText());
+			}
+		});
+
+		//filling label 
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 3;
+		fillLabel = new Label(mainComp, SWT.HORIZONTAL | SWT.NULL);
+
+		//filling label 
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 3;
+		fillLabel2 = new Label(mainComp, SWT.HORIZONTAL | SWT.NULL);
+
+		//filling label 
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 3;
+		fillLabel3 = new Label(mainComp, SWT.HORIZONTAL | SWT.NULL);
+
+		//filling label 
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 3;
+		fillLabel4 = new Label(mainComp, SWT.HORIZONTAL | SWT.NULL);
+
+		// generate test case option
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 3;
+		testCaseCheckBoxButton = new Button(mainComp, SWT.CHECK);
+		testCaseCheckBoxButton.setLayoutData(gd);
+		testCaseCheckBoxButton
+		.setText(WSASCreationUIMessages.LABEL_GENERATE_TESTCASE_CAPTION);
+		model.setTestCaseCheck(false);
+		testCaseCheckBoxButton.addSelectionListener(new SelectionListener() {
+			public void widgetSelected(SelectionEvent e) {
+				model.setTestCaseCheck(true);
+			}
+
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		model.setServerXMLCheck(true);
+
+		//the server side interface option
+		generateServerSideInterfaceCheckBoxButton = new Button(mainComp, SWT.CHECK);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 3;
+		generateServerSideInterfaceCheckBoxButton.setLayoutData(gd);
+		generateServerSideInterfaceCheckBoxButton.setSelection(false);
+		generateServerSideInterfaceCheckBoxButton.setText(WSASCreationUIMessages.
+														  LABEL_GENERATE_SERVERSIDE_INTERFACE);
+		model.setGenerateAllCheck(false);
+		generateServerSideInterfaceCheckBoxButton.addSelectionListener(new \
SelectionListener() { +			public void widgetSelected(SelectionEvent e) {
+				model.setGenerateServerSideInterface(true);
+			}
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		// generate all
+		generateAllCheckBoxButton = new Button(mainComp, SWT.CHECK);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 3;
+		generateAllCheckBoxButton.setLayoutData(gd);
+		generateAllCheckBoxButton.setSelection(false);
+		generateAllCheckBoxButton.setText(WSASCreationUIMessages.LABEL_GENERATE_ALL);
+		generateAllCheckBoxButton.addSelectionListener(new SelectionListener() {
+			public void widgetSelected(SelectionEvent e) {
+				model.setGenerateAllCheck(true);
+			}
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+		
+		//filling label 
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 3;
+		fillLabel5 = new Label(mainComp, SWT.HORIZONTAL | SWT.NULL);
+
+		//filling label 
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 3;
+		fillLabel6 = new Label(mainComp, SWT.HORIZONTAL | SWT.NULL);
+		
+		//add a table to set namespace to package mapping
+		gd = new GridData(GridData.FILL_BOTH);
+        gd.horizontalSpan = 3;
+        gd.verticalSpan = 5;
+        
+        namespace2packageTable = new Table(mainComp,SWT.BORDER|SWT.MULTI);
+        namespace2packageTable.setLinesVisible(true);
+        namespace2packageTable.setHeaderVisible(true); 
+        namespace2packageTable.setEnabled(true);
+        namespace2packageTable.setLayoutData(gd);
+       
+        declareColumn(namespace2packageTable,
+        		350, //a default width until we adjust
+        		WSASCreationUIMessages.LABEL_NAMESPACE);
+        declareColumn(namespace2packageTable,
+        		200,//a default width until we adjust
+        		WSASCreationUIMessages.LABEL_PACKAGE);
+        
+        namespace2packageTable.setVisible(true);
+        
+        // add the table editor
+        final TableEditor editor = new TableEditor(namespace2packageTable);
+        editor.setColumn(1);
+        editor.horizontalAlignment = SWT.LEFT;
+        editor.grabHorizontal = true;
+
+        namespace2packageTable.addListener(SWT.MouseDown, new Listener() {
+            public void handleEvent(Event event) {
+              Rectangle clientArea = namespace2packageTable.getClientArea();
+              Point pt = new Point(event.x, event.y);
+              int index = namespace2packageTable.getTopIndex();
+              while (index < namespace2packageTable.getItemCount()) {
+                boolean visible = false;
+                final TableItem item = namespace2packageTable.getItem(index);
+                for (int i = 0; i < namespace2packageTable.getColumnCount(); i++) {
+                  Rectangle rect = item.getBounds(i);
+                  if (rect.contains(pt)) {
+                    final int column = i;
+                    final Text text = new Text(namespace2packageTable, SWT.NONE);
+                    Listener textListener = new Listener() {
+                      public void handleEvent(final Event e) {
+                        switch (e.type) {
+                        case SWT.FocusOut:
+                          item.setText(column, text.getText());
+                          text.dispose();
+                          break;
+                        case SWT.Traverse:
+                          switch (e.detail) {
+                          case SWT.TRAVERSE_RETURN:
+                            item
+                                .setText(column, text
+                                    .getText());
+                          case SWT.TRAVERSE_ESCAPE:
+                            text.dispose();
+                            e.doit = false;
+                          }
+                          break;
+                        }
+                      }
+                    };
+                    text.addListener(SWT.FocusOut, textListener);
+                    text.addListener(SWT.Traverse, textListener);
+                    editor.setEditor(text, item, i);
+                    text.setText(item.getText(i));
+                    text.selectAll();
+                    text.setFocus();
+                    return;
+                  }
+                  if (!visible && rect.intersects(clientArea)) {
+                    visible = true;
+                  }
+                }
+                if (!visible)
+                  return;
+                index++;
+              }
+              model.setNamespaseToPackageMapping(getNs2PkgMapping());
+            }
+          });
+        
+		populateParamsFromWSDL();
+		populateModel();
+
+		return this;
+	}
+
+	private void populateModel() {
+		model.setServiceName(serviceNameCombo.getText());
+		model.setPortName(portNameCombo.getText());
+		model.setPackageText(packageText.getText());
+		model.setDatabindingType(databindingTypeCombo.getText());
+		model.setGenerateAllCheck(generateAllCheckBoxButton.getSelection());
+		model.setGenerateServerSideInterface(generateServerSideInterfaceCheckBoxButton.getSelection());
 +		model.setTestCaseCheck(testCaseCheckBoxButton.getSelection());
+		model.setNamespaseToPackageMapping(getNs2PkgMapping());
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.wst.command.env.ui.widgets.WidgetContributor#getStatus()
+	 */
+	public IStatus getStatus() 
+	{
+		IStatus result = null;
+		return result;
+	}
+
+	private void populatePackageName() {
+		this.packageText.setText(reader.packageFromTargetNamespace());
+	}
+
+	/**
+	 * populate the service and the port from the WSDL this needs to be public
+	 * since the WSDLselection page may call this
+	 */
+	public void populateParamsFromWSDL() {
+		if (reader == null)
+			reader = new WSDLPropertyReader();
+		try {
+			String lname = model.getWsdlURI();
+			if (!"".equals(lname.trim())) {
+
+				reader.readWSDL(lname);
+
+				this.serviceQNameList = reader.getServiceList();
+				if (!serviceQNameList.isEmpty()) {
+					serviceNameCombo.removeAll();
+					for (int i = 0; i < serviceQNameList.size(); i++) {
+						// add the local part of the
+						serviceNameCombo.add(((QName) serviceQNameList.get(i))
+								.getLocalPart());
+					}
+					;
+					// select the first one as the default
+					serviceNameCombo.select(0);
+
+					// load the ports
+					loadPortNames();
+
+				} else {
+					// service name list being empty means we are switching to
+					// the interface mode
+					if (serviceNameCombo!=null) serviceNameCombo.removeAll();
+					if (portNameCombo!=null) portNameCombo.removeAll();
+
+				}
+
+				populatePackageName();
+
+				//populate the namespacess
+				loadNamespaces(reader.getDefinitionNamespaceMap());
+			}
+		} catch (WSDLException e) {
+			status = StatusUtils.errorStatus(NLS.bind(WSASCreationUIMessages.ERROR_INVALID_WSDL_FILE_READ_WRITEL,new \
String[]{e.getLocalizedMessage()}), e); +		}
+	}
+
+	private void loadPortNames() {
+		int selectionIndex = serviceNameCombo.getSelectionIndex();
+		if (selectionIndex != -1) {
+			java.util.List ports = reader.getPortNameList((QName) serviceQNameList
+					.get(selectionIndex));
+			if (!ports.isEmpty()) {
+				portNameCombo.removeAll();
+				for (int i = 0; i < ports.size(); i++) {
+					// add the local part of the
+					portNameCombo.add(ports.get(i).toString());
+				}
+				portNameCombo.select(0);
+			} else {
+				// TODO error no ports found
+			}
+		}
+	}
+
+	/**
+	 * Fill the combo with proper databinding names
+	 */
+	private void fillDatabinderCombo() {
+		databindingTypeCombo.add(WSASCreationUIMessages.DATA_BINDING_ADB);
+		databindingTypeCombo.add(WSASCreationUIMessages.DATA_BINDING_NONE);
+		databindingTypeCombo.select(0);
+	}
+	
+	
+	/**
+	 * A util method to create a new column
+	 * @param table
+	 * @param width
+	 * @param colName
+	 */
+	private void declareColumn(Table table, int width,String colName){
+        TableColumn column = new TableColumn(table,SWT.NONE);
+        column.setWidth(width);
+        column.setText(colName);
+    }
+	
+	/**
+	 * Loads the namespaces
+	 * @param namespaceMap
+	 */
+	private void loadNamespaces(Map namespaceMap){
+		Iterator namespaces = namespaceMap.values().iterator();
+		namespace2packageTable.removeAll();
+        TableItem[] items = new TableItem[namespaceMap.size()]; // An item for each \
field +        
+        int i = 0;
+        while(namespaces.hasNext()){
+        	
+           items[i] = new TableItem(namespace2packageTable, SWT.NULL);
+           String namespace = (String)namespaces.next();
+           items[i].setText(0,namespace);
+           items[i].setText(1,getPackageFromNamespace(namespace));
+           i++;
+        }
+
+        namespace2packageTable.setVisible(true);
+		
+	}
+	
+	/**
+	 * get the package to namespace mappings
+	 * @return
+	 */
+	public String getNs2PkgMapping(){
+		String returnList="";
+		TableItem[] items = namespace2packageTable.getItems();
+		String packageValue; 
+		for (int i=0;i<items.length;i++){
+			packageValue = items[i].getText(1);
+			if (packageValue!=null && !"".equals(packageValue)){
+				returnList = returnList +
+				             ("".equals(returnList)?"":",") +
+				             items[i].getText(0)+ "=" + packageValue;
+			}
+			
+		}
+		return "".equals(returnList)?null:returnList;
+	}
+	
+	
+	/**
+	 * get the package derived by  Namespace
+	 */
+	public String getPackageFromNamespace(String namespace){
+		return  URLProcessor.makePackageName(namespace);
+	}
+
+}

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASBeanConfigWidgetFactory.java
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASBeanConfigWidgetFactory.java	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,87 @@
+/*
+ * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.wsf.wtp.creation.ui.wsrt;
+
+import org.eclipse.wst.command.internal.env.core.data.DataMappingRegistry;
+import org.eclipse.wst.command.internal.env.ui.widgets.INamedWidgetContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.INamedWidgetContributorFactory;
 +import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributorFactory;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataContributor;
+import org.wso2.wsf.wtp.creation.core.command.WSASDefaultingCommand;
+import org.wso2.wsf.wtp.creation.core.data.DataModel;
+import org.wso2.wsf.wtp.creation.core.messages.WSASCreationUIMessages;
+import org.wso2.wsf.wtp.creation.ui.widgets.bean.ServicesXMLSelectBeanWidget;
+
+public class WSASBeanConfigWidgetFactory implements INamedWidgetContributorFactory {
+
+	private SimpleWidgetContributor  servicesXMLSelectWidgetContrib;
+	private DataModel                model;
+
+	public WSASBeanConfigWidgetFactory(){	  
+	}
+
+	public INamedWidgetContributor getFirstNamedWidget(){
+		if( servicesXMLSelectWidgetContrib == null ) init();
+		return servicesXMLSelectWidgetContrib;
+	}
+
+	public INamedWidgetContributor getNextNamedWidget( INamedWidgetContributor \
widgetContributor){ +		if( servicesXMLSelectWidgetContrib == null ) init();
+		INamedWidgetContributor nextWidgetContrib = null;
+		return nextWidgetContrib;
+	}
+
+	public void registerDataMappings(DataMappingRegistry dataRegistry) 
+	{
+		// Map the data model from the defaulting command to this widget factory.
+		// The framework will actually to the call to getWebServiceDataModel in
+		// the ExampleDefaultingCommand class and then call the setWebServiceDataModel
+		// method in this class.
+		dataRegistry.addMapping(WSASDefaultingCommand.class, 
+								WSASCreationUIMessages.LABEL_DATA_MODEL, 
+								WSASBeanConfigWidgetFactory.class );
+	}
+
+	public void setWebServiceDataModel( DataModel model ){
+		this.model = model;
+	}
+
+	private void init(){
+		//Pages of WSAS Web Services Java Bean Scenario
+		ServicesXMLSelectBeanWidget servicesXMLSelectWidget = new \
ServicesXMLSelectBeanWidget(model); +		servicesXMLSelectWidgetContrib  = \
createWidgetContributor(  \
+				WSASCreationUIMessages.LABEL_WSAS_PREFERENCE_PAGE_HEADING, \
+				WSASCreationUIMessages.LABEL_WSAS_PREFERENCE_PAGE_SUB_HEADING,  \
+				servicesXMLSelectWidget ); +	}
+
+	private SimpleWidgetContributor createWidgetContributor(String title, 
+															String description, 
+															final WidgetDataContributor contributor){
+		SimpleWidgetContributor widgetContrib  = new SimpleWidgetContributor();
+		widgetContrib.setTitle(title);
+		widgetContrib.setDescription(description);
+		widgetContrib.setFactory( new WidgetContributorFactory(){
+			public WidgetContributor create(){
+				return contributor;
+			}
+		});
+		return widgetContrib;
+	}   
+}

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASSkelConfigWidgetFactory.java
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASSkelConfigWidgetFactory.java	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,87 @@
+/*
+ * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.wsf.wtp.creation.ui.wsrt;
+
+import org.eclipse.wst.command.internal.env.core.data.DataMappingRegistry;
+import org.eclipse.wst.command.internal.env.ui.widgets.INamedWidgetContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.INamedWidgetContributorFactory;
 +import org.eclipse.wst.command.internal.env.ui.widgets.SimpleWidgetContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributor;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetContributorFactory;
+import org.eclipse.wst.command.internal.env.ui.widgets.WidgetDataContributor;
+import org.wso2.wsf.wtp.creation.core.command.WSASDefaultingCommand;
+import org.wso2.wsf.wtp.creation.core.data.DataModel;
+import org.wso2.wsf.wtp.creation.core.messages.WSASCreationUIMessages;
+import org.wso2.wsf.wtp.creation.ui.widgets.skeleton.WSDL2JAVASkelConfigWidget;
+
+public class WSASSkelConfigWidgetFactory implements INamedWidgetContributorFactory {
+
+	private SimpleWidgetContributor  skelConfig1WidgetContrib;
+	private DataModel                model;
+
+	public WSASSkelConfigWidgetFactory(){	  
+	}
+
+	public INamedWidgetContributor getFirstNamedWidget(){
+		if( skelConfig1WidgetContrib == null ) init();
+		return skelConfig1WidgetContrib;
+	}
+
+	public INamedWidgetContributor getNextNamedWidget( INamedWidgetContributor \
widgetContributor){ +		if( skelConfig1WidgetContrib == null ) init();
+		INamedWidgetContributor nextWidgetContrib = null;
+		return nextWidgetContrib;
+	}
+
+	public void registerDataMappings(DataMappingRegistry dataRegistry){
+		// Map the data model from the defaulting command to this widget factory.
+		// The framework will actually to the call to getWebServiceDataModel in
+		// the ExampleDefaultingCommand class and then call the setWebServiceDataModel
+		// method in this class.
+		dataRegistry.addMapping( WSASDefaultingCommand.class, 
+								 WSASCreationUIMessages.LABEL_DATA_MODEL, 
+								 WSASSkelConfigWidgetFactory.class );
+	}
+
+	public void setWebServiceDataModel( DataModel model ){
+		this.model = model;
+	}
+
+	private void init(){
+		WSDL2JAVASkelConfigWidget  skel1 = new WSDL2JAVASkelConfigWidget( model );
+
+		skelConfig1WidgetContrib  = createWidgetContributor( 
+				WSASCreationUIMessages.LABEL_JAVA_2_WSDL_PAGE_HEADING,
+				WSASCreationUIMessages.LABEL_JAVA_2_WSDL_PAGE_SUB_HEADING, 
+				skel1 );
+	}
+
+	private SimpleWidgetContributor createWidgetContributor(String title, 
+															String description, 
+															final WidgetDataContributor contributor){
+		SimpleWidgetContributor widgetContrib  = new SimpleWidgetContributor();
+		widgetContrib.setTitle(title);
+		widgetContrib.setDescription(description);
+		widgetContrib.setFactory( new WidgetContributorFactory(){
+			public WidgetContributor create(){
+				return contributor;
+			}
+		});
+
+		return widgetContrib;
+	}   
+}

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASWebService.java
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASWebService.java	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,108 @@
+/*
+ * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.wsf.wtp.creation.ui.wsrt;
+
+import java.util.Vector;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.wst.command.internal.env.core.ICommandFactory;
+import org.eclipse.wst.command.internal.env.core.SimpleCommandFactory;
+import org.eclipse.wst.common.environment.IEnvironment;
+import org.eclipse.wst.ws.internal.wsrt.AbstractWebService;
+import org.eclipse.wst.ws.internal.wsrt.IContext;
+import org.eclipse.wst.ws.internal.wsrt.ISelection;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
+import org.wso2.wsf.wtp.creation.core.command.WSASBUCommand;
+import org.wso2.wsf.wtp.creation.core.command.WSASBUServiceCreationCommand;
+import org.wso2.wsf.wtp.creation.core.command.WSASBuildProjectCommand;
+import org.wso2.wsf.wtp.creation.core.command.WSASDefaultingCommand;
+import org.wso2.wsf.wtp.creation.core.command.WSASServicesXMLValidationCommand;
+import org.wso2.wsf.wtp.creation.core.command.WSASSkelImplCommand;
+import org.wso2.wsf.wtp.creation.core.command.WSASTDCommand;
+import org.wso2.wsf.wtp.creation.core.command.WSASTDServiceCreationCommand;
+import org.wso2.wsf.wtp.creation.core.command.WSASWSDL2JavaCommand;
+import org.wso2.wsf.wtp.creation.core.command.WSASWebservicesServerCommand;
+import org.wso2.wsf.wtp.creation.core.data.DataModel;
+
+public class WSASWebService extends AbstractWebService
+{
+//	private WSASWebServiceInfo wsasWebServiceInfo;
+
+	public WSASWebService(WebServiceInfo info)
+	{
+		super(info);
+	}
+
+	public ICommandFactory assemble(IEnvironment env, IContext ctx,
+			ISelection sel, String project, String earProject)
+	{
+		return null;
+	}
+
+	public ICommandFactory deploy(IEnvironment env, IContext ctx, ISelection sel,
+			String project, String earProject)
+	{
+		return null;
+	}
+
+	public ICommandFactory develop(IEnvironment env, IContext ctx, ISelection sel,
+			String project, String earProject)
+	{
+		Vector commands = new Vector();
+		DataModel model = new DataModel();
+		//EclipseEnvironment environment = (EclipseEnvironment)env;
+
+		model.setWebProjectName(project);
+
+		if (ctx.getScenario().getValue() == WebServiceScenario.BOTTOMUP)	{ 
+			commands.add(new WSASDefaultingCommand( model,this, ctx.getScenario().getValue() \
) ); +			commands.add(new WSASBUCommand( model ) );
+			commands.add(new WSASServicesXMLValidationCommand());
+			commands.add(new WSASBUServiceCreationCommand(model,this,project));
+			commands.add(new WSASWebservicesServerCommand(model, ctx.getScenario().getValue() \
)); +		} 
+		else if (ctx.getScenario().getValue() == WebServiceScenario.TOPDOWN) {  
+			commands.add(new WSASDefaultingCommand( model,this, ctx.getScenario().getValue()  \
) ); +			commands.add(new WSASTDCommand( model) );
+			commands.add(new WSASWSDL2JavaCommand( model) );
+			commands.add( new \
WSASBuildProjectCommand(ResourcesPlugin.getWorkspace().getRoot().getProject(project),true));
 +			commands.add(new WSASTDServiceCreationCommand(model,this,project));
+			commands.add(new WSASWebservicesServerCommand(model, \
ctx.getScenario().getValue())); +			//yes, again invoke the build command to redeploy \
the service after complete full build +			commands.add( new \
WSASBuildProjectCommand(ResourcesPlugin.getWorkspace().getRoot().getProject(project),true));
 +			commands.add(new WSASSkelImplCommand(this.getWebServiceInfo(),model));
+		} 
+		else 
+		{
+			return null;
+		}
+
+		return new SimpleCommandFactory(commands);
+	}
+
+	public ICommandFactory install(IEnvironment env, IContext ctx, ISelection sel,
+			String project, String earProject)
+	{
+		return null;
+	}
+
+	public ICommandFactory run(IEnvironment env, IContext ctx, ISelection sel,
+			String project, String earProject)
+	{
+		return null;
+	}
+}

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASWebServiceInfo.java
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASWebServiceInfo.java	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,21 @@
+/*
+ * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.wsf.wtp.creation.ui.wsrt;
+
+public class WSASWebServiceInfo {
+
+}

Added: trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASWebServiceRuntime.java
 ==============================================================================
--- (empty file)
+++ trunk/wsf/java/modules/eclipse-wtp-plugins/org.wso2.wsf.wtp.creation.ui/src/org/wso2/wsf/wtp/creation/ui/wsrt/WSASWebServiceRuntime.java	Mon \
Apr 16 04:42:17 2007 @@ -0,0 +1,37 @@
+/*
+ * Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.wsf.wtp.creation.ui.wsrt;
+
+import org.eclipse.wst.ws.internal.wsrt.AbstractWebServiceRuntime;
+import org.eclipse.wst.ws.internal.wsrt.IWebService;
+import org.eclipse.wst.ws.internal.wsrt.IWebServiceClient;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceClientInfo;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo;
+import org.wso2.wsf.wtp.consumption.ui.wsrt.WSASWebServiceClient;
+
+public class WSASWebServiceRuntime extends AbstractWebServiceRuntime
+{
+
+	public IWebService getWebService(WebServiceInfo info){
+		return new WSASWebService(info);
+	}
+
+	public IWebServiceClient getWebServiceClient(WebServiceClientInfo info){
+		return new WSASWebServiceClient(info);
+	}
+	
+}


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic