Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkchan2006-04-07 18:59:32 +0000
committerkchan2006-04-07 18:59:32 +0000
commit27a2886951e2a1b8fe10d65297b99fce1eba0ce7 (patch)
tree6e07657f579fba935453602963fb59a4c47acf30 /bundles/org.eclipse.jst.ws.creation.ui
parent94b524fc7d8c5ef493d560360d9f7e1d71fc7c9d (diff)
downloadwebtools.webservices-27a2886951e2a1b8fe10d65297b99fce1eba0ce7.tar.gz
webtools.webservices-27a2886951e2a1b8fe10d65297b99fce1eba0ce7.tar.xz
webtools.webservices-27a2886951e2a1b8fe10d65297b99fce1eba0ce7.zip
[135415] ClassCastException resulting from service implementation not filled in with initial selection.
Diffstat (limited to 'bundles/org.eclipse.jst.ws.creation.ui')
-rw-r--r--bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java37
-rw-r--r--bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java24
2 files changed, 40 insertions, 21 deletions
diff --git a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java
index a8e3f6fb0..cc738eecd 100644
--- a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java
+++ b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/ServerWizardWidget.java
@@ -1,12 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
+ * Copyright (c) 2004, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are 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:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * yyyymmdd bug Email and other contact information
+ * -------- -------- -----------------------------------------------------------
+ * 20060407 135415 rsinha@ca.ibm.com - Rupam Kuehner
*******************************************************************************/
package org.eclipse.jst.ws.internal.creation.ui.widgets;
@@ -107,7 +110,6 @@ public class ServerWizardWidget extends SimpleWidgetDataContributor {
private String serviceRuntimeId_;
private boolean needEar_;
- private IStructuredSelection initialSelection_;
private IStructuredSelection objectSelection_;
private boolean displayPreferences_;
@@ -551,29 +553,30 @@ public class ServerWizardWidget extends SimpleWidgetDataContributor {
public void setResourceContext(ResourceContext context) {
resourceContext_ = context;
}
-
- public IStructuredSelection getInitialSelection()
- {
- return initialSelection_;
- }
public IStructuredSelection getObjectSelection()
{
return objectSelection_;
}
- private void setObjectSelection(IStructuredSelection selection)
- {
- objectSelection_ = selection;
- clientWidget_.setObjectSelection(selection);
- }
- public void setInitialSelection(IStructuredSelection selection)
+ public void setObjectSelection(IStructuredSelection selection )
{
- initialSelection_ = selection;
- setObjectSelection(selection);
+ objectSelection_ = selection;
+ if (selection != null && selection.size()==1)
+ {
+ //Update the serviceImpl_ field.
+ Object[] selectionArray = selection.toArray();
+ Object selectedObject = selectionArray[0];
+ if (selectedObject instanceof String)
+ {
+ serviceImpl_.setText((String)selectedObject);
+ }
+ }
+
}
+
public WebServicesParser getWebServicesParser()
{
return parser_;
diff --git a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java
index d4b3ca586..b8bf686f2 100644
--- a/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java
+++ b/bundles/org.eclipse.jst.ws.creation.ui/src/org/eclipse/jst/ws/internal/creation/ui/widgets/binding/ServerWidgetBinding.java
@@ -12,6 +12,7 @@
* 20060204 124408 rsinha@ca.ibm.com - Rupam Kuehner
* 20060204 121605 rsinha@ca.ibm.com - Rupam Kuehner
* 20060221 119111 rsinha@ca.ibm.com - Rupam Kuehner
+ * 20060407 135415 rsinha@ca.ibm.com - Rupam Kuehner
*******************************************************************************/
package org.eclipse.jst.ws.internal.creation.ui.widgets.binding;
@@ -35,6 +36,7 @@ import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ClientExten
import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ServerExtensionDefaultingCommand;
import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ServerExtensionFragment;
import org.eclipse.jst.ws.internal.consumption.ui.widgets.extensions.ServerExtensionOutputCommand;
+import org.eclipse.jst.ws.internal.consumption.ui.widgets.object.ObjectSelectionOutputCommand;
import org.eclipse.jst.ws.internal.consumption.ui.widgets.test.ClientTestDelegateCommand;
import org.eclipse.jst.ws.internal.consumption.ui.widgets.test.ClientTestFragment;
import org.eclipse.jst.ws.internal.consumption.ui.widgets.test.ClientTestWidget;
@@ -111,7 +113,7 @@ public class ServerWidgetBinding implements CommandWidgetBinding
dataMappingRegistry_ = dataRegistry;
// Before ServerWizardWidget
- dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "InitialSelection", ServerWizardWidget.class );
+ dataRegistry.addMapping(ObjectSelectionOutputCommand.class, "ObjectSelection", ServerWizardWidget.class);
dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "ServiceTypeRuntimeServer", ServerWizardWidget.class);
dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "ServiceGeneration", ServerWizardWidget.class);
dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "MonitorService", ServerWizardWidget.class);
@@ -358,6 +360,7 @@ public class ServerWidgetBinding implements CommandWidgetBinding
add( new SimpleFragment( new ScenarioCleanupCommand(), "" ));
add( new SimpleFragment( new ServerWizardWidgetDefaultingCommand(), ""));
+ add (new SimpleFragment( new ObjectSelectionOutputCommand(), ""));
add( new SimpleFragment( new ServerRuntimeSelectionWidgetDefaultingCommand(), ""));
add( new SimpleFragment( "ServerWizardWidget" ) );
add( new SimpleFragment( new ServerWizardWidgetOutputCommand(), "" ));
@@ -387,8 +390,12 @@ public class ServerWidgetBinding implements CommandWidgetBinding
publishToPrivateUDDICmdFrag.registerDataMappings(dataMappingRegistry_);
dataRegistry.addMapping(SelectionCommand.class, "InitialSelection", ServerWizardWidgetDefaultingCommand.class );
+
+ // Map ServerWizardWidgetDefaultingCommand to ObjectSelectionOutputCommand
+ dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "InitialSelection", ObjectSelectionOutputCommand.class, "ObjectSelection", null);
+ dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "ServiceTypeRuntimeServer", ObjectSelectionOutputCommand.class, "TypeRuntimeServer", null);
- // Map ServerWizardWidgetDefaultingCommand
+ // Map ServerWizardWidgetDefaultingCommand to ServerWizardWidgetOutputCommand
dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "ClientTypeRuntimeServer", ServerWizardWidgetOutputCommand.class);
dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "ServiceTypeRuntimeServer", ServerWizardWidgetOutputCommand.class);
dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "GenerateProxy", ServerWizardWidgetOutputCommand.class);
@@ -397,8 +404,8 @@ public class ServerWidgetBinding implements CommandWidgetBinding
dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "TestService", ServerWizardWidgetOutputCommand.class);
dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "PublishService", ServerWizardWidgetOutputCommand.class);
dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "GenerateProxy", ServerWizardWidgetOutputCommand.class);
- dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "ResourceContext", ServerWizardWidgetOutputCommand.class);
-
+ dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "ResourceContext", ServerWizardWidgetOutputCommand.class);
+
// Map ServerWizardWidgetOutputCommand.
dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "InitialProject", ServerRuntimeSelectionWidgetDefaultingCommand.class);
dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "ClientTypeRuntimeServer", ServerRuntimeSelectionWidgetDefaultingCommand.class);
@@ -415,6 +422,15 @@ public class ServerWidgetBinding implements CommandWidgetBinding
dataRegistry.addMapping(ServerWizardWidgetOutputCommand.class, "GenerateProxy", ClientExtensionDefaultingCommand.class); // KSC
dataRegistry.addMapping(ServerWizardWidgetDefaultingCommand.class, "ResourceContext", ClientExtensionDefaultingCommand.class);
+ //Map ObjectSelectionOutputCommand to ServerRuntimeSelectionWidgetDefaultingCommand
+ dataRegistry.addMapping(ObjectSelectionOutputCommand.class, "ObjectSelection", ServerRuntimeSelectionWidgetDefaultingCommand.class, "InitialSelection", null);
+ dataRegistry.addMapping(ObjectSelectionOutputCommand.class, "ObjectSelection", ServerRuntimeSelectionWidgetDefaultingCommand.class, "ClientInitialSelection", null);
+ dataRegistry.addMapping(ObjectSelectionOutputCommand.class, "Project", ServerRuntimeSelectionWidgetDefaultingCommand.class, "InitialProject", null);
+ dataRegistry.addMapping(ObjectSelectionOutputCommand.class, "Project", ServerRuntimeSelectionWidgetDefaultingCommand.class, "ClientInitialProject", null);
+
+ //Map ObjectSelectionOutputCommand to ServerWizardWidgetOutputCommand
+ dataRegistry.addMapping(ObjectSelectionOutputCommand.class, "ObjectSelection", ServerWizardWidgetOutputCommand.class);
+
//to the test wizard
dataRegistry.addMapping(ServerWizardWidgetOutputCommand.class, "GenerateProxy", ServiceTestFragment.class);
dataRegistry.addMapping(ServerExtensionOutputCommand.class, "WsdlURI", WSDLTestLaunchCommand.class);

Back to the top