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:
Diffstat (limited to 'bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/wizards/PortWizard.java')
-rw-r--r--bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/wizards/PortWizard.java162
1 files changed, 0 insertions, 162 deletions
diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/wizards/PortWizard.java b/bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/wizards/PortWizard.java
deleted file mode 100644
index f1466fdc6..000000000
--- a/bundles/org.eclipse.wst.wsdl.ui/src-asd-wsdl11/org/eclipse/wst/wsdl/ui/internal/wizards/PortWizard.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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
- *******************************************************************************/
-package org.eclipse.wst.wsdl.ui.internal.wizards;
-
-import java.util.List;
-
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.wsdl.Service;
-import org.eclipse.wst.wsdl.internal.generator.PortGenerator;
-import org.eclipse.wst.wsdl.ui.internal.Messages;
-import org.eclipse.wst.wsdl.ui.internal.WSDLEditorPlugin;
-import org.eclipse.wst.wsdl.ui.internal.asd.ASDEditorCSHelpIds;
-import org.eclipse.wst.wsdl.ui.internal.dialogs.ProtocolComponentControl;
-import org.eclipse.wst.wsdl.ui.internal.util.ComponentReferenceUtil;
-import org.eclipse.wst.wsdl.ui.internal.util.NameUtil;
-
-public class PortWizard extends Wizard
-{
- protected final static int STYLE_NEW_BINDING = 1;
- protected final static int STYLE_EXISTING_BINDING = 1 << 1;
- protected final static int STYLE_DEFAULT = STYLE_NEW_BINDING | STYLE_EXISTING_BINDING;
-
- protected PortGenerator portGenerator;
- protected PortWizardOptionsPage specifyBindingPage;
- protected int style;
-
- /**
- * Constructor for PortWizard.
- */
- public PortWizard(Service service)
- {
- this(service, 0);
- }
-
- public PortWizard(Service service, int style)
- {
- super();
- portGenerator = new PortGenerator(service);
- setWindowTitle(Messages._UI_PORT_WIZARD); //$NON-NLS-1$
- //setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(WSDLEditorPlugin.class, "icons/NewXML.gif"));
- }
-
- /**
- * Return true if wizard setup is successful, false otherwise
- */
- public boolean setup()
- {
- return true;
- }
-
- public void addPages()
- {
- specifyBindingPage = new PortWizardOptionsPage(style);
- addPage(specifyBindingPage);
- }
-
- public boolean performFinish()
- {
- Object object = portGenerator.generatePort();
-
- try
- {
- if (object != null)
- {
- IEditorPart editorPart = WSDLEditorPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- ISelectionProvider selectionProvider = (ISelectionProvider) editorPart.getAdapter(ISelectionProvider.class);
- if (selectionProvider != null)
- {
- selectionProvider.setSelection(new StructuredSelection(object));
- }
- }
- }
- catch (Exception e)
- {
- }
- return true;
- }
-
- class PortWizardOptionsPage extends WizardPage
- {
-
- protected ProtocolComponentControl protocolComponentControl;
-
- public PortWizardOptionsPage(int style)
- {
- super("SpecifyPortPage"); //$NON-NLS-1$
- setTitle(Messages._UI_SPECIFY_PORT_DETAILS); //$NON-NLS-1$
- setDescription(Messages._UI_SPECIFY_PORT_DETAILS_TO_BE_CREATED); //$NON-NLS-1$
- }
-
- public PortGenerator getGenerator()
- {
- return portGenerator;
- }
-
- public void createControl(Composite parent)
- {
- ProtocolComponentControl protocolComponentControl = new PortProtocolComponentControl(parent, portGenerator);
- protocolComponentControl.initFields();
- setControl(protocolComponentControl);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(protocolComponentControl, ASDEditorCSHelpIds.PORT_WIZARD);
- }
- }
-
- class PortProtocolComponentControl extends ProtocolComponentControl
- {
-
- public PortProtocolComponentControl(Composite parent, PortGenerator generator)
- {
- super(parent, generator, false);
- }
-
- public String getRefNameLabelText()
- {
- return Messages._UI_BINDING; //$NON-NLS-1$
- }
-
- public List getRefNames()
- {
- return new ComponentReferenceUtil(portGenerator.getDefinition()).getBindingNames();
- }
-
- public String getDefaultName()
- {
- Service service = portGenerator.getService();
- return NameUtil.buildUniquePortName(service, null);
- }
-
- public ContentGeneratorOptionsPage createContentGeneratorOptionsPage(String protocol)
- {
- ContentGeneratorOptionsPage optionsPage = null;
- String protocolSelection = protocolCombo.getItem(protocolCombo.getSelectionIndex());
- if (protocolSelection.equals("SOAP")) { //$NON-NLS-1$
- optionsPage = new SoapBindingOptionsPage();
- }
- else if (protocolSelection.equals("HTTP")) { //$NON-NLS-1$
- optionsPage = new HttpBindingOptionsPage();
- }
- // TODO: We need to eventually put this back in
-// ContentGeneratorExtension extension = WSDLEditorPlugin.getInstance().getContentGeneratorExtensionRegistry().getContentGeneratorExtension(protocol);
-// if (extension != null)
-// {
-// optionsPage = extension.createPortContentGeneratorOptionsPage();
-// }
- return optionsPage;
- }
- }
-} \ No newline at end of file

Back to the top