diff options
Diffstat (limited to 'bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse')
4 files changed, 0 insertions, 279 deletions
diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse/wst/wsdl/ui/internal/soap/customizations/Messages.java b/bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse/wst/wsdl/ui/internal/soap/customizations/Messages.java deleted file mode 100644 index b71c21717..000000000 --- a/bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse/wst/wsdl/ui/internal/soap/customizations/Messages.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 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.soap.customizations; - -import org.eclipse.osgi.util.NLS; - -public class Messages extends NLS { - private static final String BUNDLE_NAME = "org.eclipse.wst.wsdl.ui.internal.soap.customizations.messages"; //$NON-NLS-1$ - - public static String UI_SPECIFY_PARTS_DIALOG_TITLE; - public static String UI_PARTS_BUTTON; - - static { - // load message values from bundle file - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } - - private Messages() { - // cannot create new instance - } -} diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse/wst/wsdl/ui/internal/soap/customizations/SOAPNodeEditorProvider.java b/bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse/wst/wsdl/ui/internal/soap/customizations/SOAPNodeEditorProvider.java deleted file mode 100644 index 69669104e..000000000 --- a/bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse/wst/wsdl/ui/internal/soap/customizations/SOAPNodeEditorProvider.java +++ /dev/null @@ -1,96 +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.soap.customizations; - -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.PlatformUI; -import org.eclipse.wst.wsdl.Definition; -import org.eclipse.wst.wsdl.Part; -import org.eclipse.wst.wsdl.binding.soap.SOAPBody; -import org.eclipse.wst.wsdl.ui.internal.util.NodeAssociationManager; -import org.eclipse.wst.xsd.ui.internal.common.properties.sections.appinfo.custom.DialogNodeEditorConfiguration; -import org.eclipse.wst.xsd.ui.internal.common.properties.sections.appinfo.custom.NodeEditorConfiguration; -import org.eclipse.wst.xsd.ui.internal.common.properties.sections.appinfo.custom.NodeEditorProvider; -import org.w3c.dom.Element; -import org.w3c.dom.Node; - -/** - * This class is provided as an example of how a NodeEditorProvider can utilize the WSDL model if required - * (and is not limited to the DOM model). It's hope that potential adopters can provide feedback and open - * bugs where they find support is lacking or inconvenient. - */ -public class SOAPNodeEditorProvider extends NodeEditorProvider -{ - public NodeEditorConfiguration getNodeEditorConfiguration(String parentName, String nodeName) - { - // TODO (cs) this extension is only designed to work when used via the WSDL Editor context. - // Reuse from other context is possible too if the editor provides the appropriate 'getAdapter' behaviour. - // We need to revisit this and get more feedback from adopters to see if different approach is required - // in order to obtain a WSDL model. -// / - IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor(); - final Definition definition = (Definition)editor.getAdapter(Definition.class); - if (definition != null) - { - if (parentName.equals("body") && nodeName.equals("parts")) //$NON-NLS-1$ //$NON-NLS-2$ - { - // gee... this case sounds sorta morbid eh? - // - return new DialogNodeEditorConfiguration() - { - public void invokeDialog() - { - Node parentNode = getParentNode(); - if (parentNode instanceof Element) - { - Element element = (Element)getParentNode(); - - // TODO (cs) I think we should push this function down to the WSDL model (ala XSD model) - // - NodeAssociationManager nodeAssociationManager = new NodeAssociationManager(); - Object o = nodeAssociationManager.getModelObjectForNode(definition, element); - if (o instanceof SOAPBody) - { - SOAPSelectPartsDialog dialog = new SOAPSelectPartsDialog(Display.getCurrent().getActiveShell(), definition, (SOAPBody)o); - dialog.create(); - dialog.getShell().setText(Messages.UI_SPECIFY_PARTS_DIALOG_TITLE); //$NON-NLS-1$ - int rc = dialog.open(); - if (rc == Dialog.OK) - { - String value = ""; //$NON-NLS-1$ - Part[] parts = dialog.getSelectedParts(); - for (int i = 0; i < parts.length; i++) - { - Part part = parts[i]; - value += part.getName(); - value += " "; //$NON-NLS-1$ - } - - // TODO (cs) we need to provide 'command' support so that we can handle undo properly - // - element.setAttribute("parts", value); //$NON-NLS-1$ - } - } - } - } - public String getButonText() - { - return Messages.UI_PARTS_BUTTON; //$NON-NLS-1$ - } - }; - } - } - return null; - } -} - diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse/wst/wsdl/ui/internal/soap/customizations/SOAPSelectPartsDialog.java b/bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse/wst/wsdl/ui/internal/soap/customizations/SOAPSelectPartsDialog.java deleted file mode 100644 index d1de0e2e9..000000000 --- a/bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse/wst/wsdl/ui/internal/soap/customizations/SOAPSelectPartsDialog.java +++ /dev/null @@ -1,142 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2007 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.soap.customizations; - -import java.util.Collections; -import java.util.List; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.viewers.CheckboxTreeViewer; -import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.wst.wsdl.BindingInput; -import org.eclipse.wst.wsdl.BindingOutput; -import org.eclipse.wst.wsdl.Definition; -import org.eclipse.wst.wsdl.MessageReference; -import org.eclipse.wst.wsdl.Part; -import org.eclipse.wst.wsdl.binding.soap.SOAPBody; -import org.eclipse.wst.wsdl.ui.internal.WSDLEditorPlugin; -import org.eclipse.wst.wsdl.ui.internal.util.ComponentReferenceUtil; - -public class SOAPSelectPartsDialog extends Dialog -{ - Definition definition; - SOAPBody body; - CheckboxTreeViewer checkList; - Part[] selectedParts = {}; - - public SOAPSelectPartsDialog(Shell parentShell, Definition definition, SOAPBody body) - { - super(parentShell); - this.definition = definition; - this.body = body; - } - - protected Control createDialogArea(Composite parent) - { - Composite composite = (Composite)super.createDialogArea(parent); - checkList = new CheckboxTreeViewer(composite, SWT.NONE); - GridData gridData = new GridData(GridData.FILL_BOTH); - gridData.heightHint = 100; - gridData.widthHint = 200; - checkList.getControl().setLayoutData(gridData); - checkList.setContentProvider(new InternalTreeContentProvider()); - checkList.setLabelProvider(new InternalLabelProvider()); - checkList.setInput(""); //$NON-NLS-1$ - - List list = body.getParts(); - checkList.setCheckedElements(list.toArray()); - return composite; - } - - protected void okPressed() - { - Object[] checked = checkList.getCheckedElements(); - selectedParts = new Part[checked.length]; - for (int i = 0; i < checked.length; i++) - { - selectedParts[i] = (Part)checked[i]; - } - super.okPressed(); - } - - - class InternalLabelProvider extends LabelProvider - { - public String getText(Object element) - { - Part part = (Part)element; - return part.getName(); - } - - public Image getImage(Object element) - { - return WSDLEditorPlugin.getInstance().getImage("icons/part_obj.gif"); //$NON-NLS-1$ - } - } - - class InternalTreeContentProvider implements ITreeContentProvider - { - public Object[] getElements(Object inputElement) - { - EObject container = body.eContainer(); - MessageReference messageReference = null; - if (container instanceof BindingInput) - { - messageReference = ComponentReferenceUtil.computeInput((BindingInput)container); - } - else if (container instanceof BindingOutput) - { - messageReference = ComponentReferenceUtil.computeOutput((BindingOutput)container); - } - if (messageReference != null && messageReference.getEMessage() != null) - { - return messageReference.getEMessage().getEParts().toArray(); - } - return Collections.EMPTY_LIST.toArray(); - } - - public Object[] getChildren(Object parentElement) - { - return Collections.EMPTY_LIST.toArray(); - } - - public Object getParent(Object element) - { - return null; - } - - public boolean hasChildren(Object element) - { - return false; - } - - public void dispose() - { - } - - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) - { - } - } - - public Part[] getSelectedParts() - { - return selectedParts; - } -} diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse/wst/wsdl/ui/internal/soap/customizations/messages.properties b/bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse/wst/wsdl/ui/internal/soap/customizations/messages.properties deleted file mode 100644 index 943fa8eb2..000000000 --- a/bundles/org.eclipse.wst.wsdl.ui/src-soap/org/eclipse/wst/wsdl/ui/internal/soap/customizations/messages.properties +++ /dev/null @@ -1,12 +0,0 @@ -############################################################################### -# Copyright (c) 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 -############################################################################### -UI_SPECIFY_PARTS_DIALOG_TITLE=Specify Parts -UI_PARTS_BUTTON=... |