diff options
Diffstat (limited to 'bundles/org.eclipse.wst.wsdl.ui/src-refactor/org/eclipse/wst/wsdl/ui/internal/search')
3 files changed, 0 insertions, 241 deletions
diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-refactor/org/eclipse/wst/wsdl/ui/internal/search/IWSDLSearchConstants.java b/bundles/org.eclipse.wst.wsdl.ui/src-refactor/org/eclipse/wst/wsdl/ui/internal/search/IWSDLSearchConstants.java deleted file mode 100644 index 236c5c710..000000000 --- a/bundles/org.eclipse.wst.wsdl.ui/src-refactor/org/eclipse/wst/wsdl/ui/internal/search/IWSDLSearchConstants.java +++ /dev/null @@ -1,34 +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.search; - -import org.eclipse.wst.common.core.search.pattern.QualifiedName; - - -public interface IWSDLSearchConstants { - - public static final String WSDL_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/"; //$NON-NLS-1$ - public static final String XMLSCHEMA_NAMESPACE = "http://www.w3.org/2001/XMLSchema"; //$NON-NLS-1$ - - public static String WSDL_CONTENT_TYPE_ID = "org.eclipse.wst.wsdl.wsdlsource"; //$NON-NLS-1$ - - public static final QualifiedName MESSAGE_META_NAME = new QualifiedName( - WSDL_NAMESPACE, "message"); //$NON-NLS-1$ - - public static final QualifiedName PORT_TYPE_META_NAME = new QualifiedName( - WSDL_NAMESPACE, "portType"); //$NON-NLS-1$ - - public static final QualifiedName BINDING_META_NAME = new QualifiedName( - WSDL_NAMESPACE, "binding"); //$NON-NLS-1$ - - - -} diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-refactor/org/eclipse/wst/wsdl/ui/internal/search/WSDLSearchContributor.java b/bundles/org.eclipse.wst.wsdl.ui/src-refactor/org/eclipse/wst/wsdl/ui/internal/search/WSDLSearchContributor.java deleted file mode 100644 index fcd230ed8..000000000 --- a/bundles/org.eclipse.wst.wsdl.ui/src-refactor/org/eclipse/wst/wsdl/ui/internal/search/WSDLSearchContributor.java +++ /dev/null @@ -1,77 +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.search; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.wst.common.core.search.pattern.SearchPattern; -import org.eclipse.wst.xml.core.internal.search.ComponentSearchContributor; -import org.eclipse.wst.xml.core.internal.search.XMLSearchPattern; -import org.eclipse.wst.xsd.ui.internal.search.IXSDSearchConstants; - -public class WSDLSearchContributor extends ComponentSearchContributor { - - - protected void initializeDeclarations() { - - declarations = new HashMap(); - String ns = IWSDLSearchConstants.WSDL_NAMESPACE; - - SearchPattern pattern = new XMLSearchPattern(ns, "message", "name"); //$NON-NLS-1$ //$NON-NLS-2$ - declarations.put(IWSDLSearchConstants.MESSAGE_META_NAME, pattern); - - pattern = new XMLSearchPattern( ns, "portType", "name"); //$NON-NLS-1$ //$NON-NLS-2$ - declarations.put(IWSDLSearchConstants.PORT_TYPE_META_NAME, pattern); - - pattern = new XMLSearchPattern(ns, "binding", "name"); //$NON-NLS-1$ //$NON-NLS-2$ - declarations.put(IWSDLSearchConstants.BINDING_META_NAME, pattern); - - } - - protected void initializeReferences() { - - references = new HashMap(); - String ns = IWSDLSearchConstants.WSDL_NAMESPACE; - - List patterns = new ArrayList(); - patterns.add(new XMLSearchPattern( ns, "part", "element")); //$NON-NLS-1$ //$NON-NLS-2$ - references.put(IXSDSearchConstants.ELEMENT_META_NAME, patterns); - - patterns = new ArrayList(); - patterns.add(new XMLSearchPattern(ns, "part", "type")); //$NON-NLS-1$ //$NON-NLS-2$ - references.put(IXSDSearchConstants.COMPLEX_TYPE_META_NAME, patterns); - - patterns = new ArrayList(); - patterns.add(new XMLSearchPattern(ns, "part", "type")); //$NON-NLS-1$ //$NON-NLS-2$ - references.put(IXSDSearchConstants.SIMPLE_TYPE_META_NAME, patterns); - - patterns = new ArrayList(); - patterns.add(new XMLSearchPattern(ns, "input", "message")); //$NON-NLS-1$ //$NON-NLS-2$ - patterns.add(new XMLSearchPattern(ns, "output", "message")); //$NON-NLS-1$ //$NON-NLS-2$ - patterns.add(new XMLSearchPattern(ns, "fault", "message")); //$NON-NLS-1$ //$NON-NLS-2$ - references.put(IWSDLSearchConstants.MESSAGE_META_NAME, patterns); - - patterns = new ArrayList(); - patterns.add(new XMLSearchPattern(ns, "binding", "type")); //$NON-NLS-1$ //$NON-NLS-2$ - references.put(IWSDLSearchConstants.PORT_TYPE_META_NAME, patterns); - - patterns = new ArrayList(); - patterns.add(new XMLSearchPattern( ns, "port", "binding")); //$NON-NLS-1$ //$NON-NLS-2$ - references.put(IWSDLSearchConstants.BINDING_META_NAME, patterns); - } - - protected void initializeSupportedNamespaces() { - namespaces = new String[]{ IXSDSearchConstants.XMLSCHEMA_NAMESPACE, IWSDLSearchConstants.WSDL_NAMESPACE}; - } - -} diff --git a/bundles/org.eclipse.wst.wsdl.ui/src-refactor/org/eclipse/wst/wsdl/ui/internal/search/WSDLSearchParticipant.java b/bundles/org.eclipse.wst.wsdl.ui/src-refactor/org/eclipse/wst/wsdl/ui/internal/search/WSDLSearchParticipant.java deleted file mode 100644 index 1025523e0..000000000 --- a/bundles/org.eclipse.wst.wsdl.ui/src-refactor/org/eclipse/wst/wsdl/ui/internal/search/WSDLSearchParticipant.java +++ /dev/null @@ -1,130 +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.search; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import org.eclipse.wst.common.core.search.SearchParticipant; -import org.eclipse.wst.common.core.search.SearchPlugin; -import org.eclipse.wst.common.core.search.pattern.SearchPattern; -import org.eclipse.wst.xml.core.internal.search.ComponentSearchContributor; -import org.eclipse.wst.xml.core.internal.search.XMLComponentDeclarationPattern; -import org.eclipse.wst.xml.core.internal.search.XMLComponentReferencePattern; -import org.eclipse.wst.xml.core.internal.search.XMLComponentSearchPattern; -import org.eclipse.wst.xml.core.internal.search.XMLSearchParticipant; -import org.eclipse.wst.xml.core.internal.search.XMLSearchPattern; -import org.eclipse.wst.xsd.ui.internal.search.IXSDSearchConstants; - -public class WSDLSearchParticipant extends XMLSearchParticipant { - - private static String ID = "org.eclipse.wst.wsdl.search.WSDLSearchParticipant"; //$NON-NLS-1$ - private static String XSD_PARTICIPANNT_ID = "org.eclipse.wst.xsd.search.XSDSearchParticipant"; //$NON-NLS-1$ - - - public WSDLSearchParticipant() - { - super(); - id = ID; - } - - public String[] getSupportedContentTypes() - { - String[] result = { "org.eclipse.wst.wsdl.wsdlsource" }; //$NON-NLS-1$ - return result; - } - - public boolean isApplicable(SearchPattern pattern, Map searchOptions) - { - if(pattern instanceof XMLComponentSearchPattern ){ - XMLComponentSearchPattern componentPattern = (XMLComponentSearchPattern)pattern; - String namespace = componentPattern.getMetaName().getNamespace(); - if(IWSDLSearchConstants.WSDL_NAMESPACE.equals(namespace) || - IXSDSearchConstants.XMLSCHEMA_NAMESPACE.equals(namespace)){ - return true; - } - } - return false; - } - - public ComponentSearchContributor getSearchContributor() { - - return new WSDLSearchContributor(); - } - - public void beginSearching(SearchPattern pattern, Map searchOptions) { - - super.beginSearching(pattern, searchOptions); - List patterns = new ArrayList(); - if(pattern instanceof XMLComponentDeclarationPattern){ - - XMLComponentDeclarationPattern componentPattern = (XMLComponentDeclarationPattern)pattern; - if(IWSDLSearchConstants.WSDL_NAMESPACE.equals(componentPattern.getMetaName().getNamespace())){ - XMLSearchPattern childPattern = getSearchContributor().getDeclarationPattern(componentPattern.getMetaName()); - if(childPattern != null){ - childPattern.setSearchName(componentPattern.getName().getLocalName()); - childPattern.setSearchNamespace(componentPattern.getName().getNamespace()); - patterns.add(childPattern); - } - } - else if(IXSDSearchConstants.XMLSCHEMA_NAMESPACE.equals(componentPattern.getMetaName().getNamespace())){ - SearchParticipant xsdParticipant = SearchPlugin.getDefault().getSearchParticipant(XSD_PARTICIPANNT_ID); - if(xsdParticipant instanceof XMLSearchParticipant){ - ComponentSearchContributor xsdContributor = ((XMLSearchParticipant)xsdParticipant).getSearchContributor(); - if(xsdContributor != null){ - XMLSearchPattern childPattern = xsdContributor.getDeclarationPattern(componentPattern.getMetaName()); - if(childPattern != null){ - childPattern.setSearchName(componentPattern.getName().getLocalName()); - childPattern.setSearchNamespace(componentPattern.getName().getNamespace()); - patterns.add(childPattern); - } - } - } - } - componentPattern.setChildren((XMLSearchPattern[]) patterns.toArray(new XMLSearchPattern[patterns.size()])); - - } - else if(pattern instanceof XMLComponentReferencePattern){ - XMLComponentReferencePattern componentPattern = (XMLComponentReferencePattern)pattern; - XMLSearchPattern[] childPatterns = getSearchContributor().getReferencesPatterns(componentPattern.getMetaName()); - for (int i = 0; i < childPatterns.length; i++) { - XMLSearchPattern childPattern = childPatterns[i]; - childPattern.setSearchName(componentPattern.getName().getLocalName()); - childPattern.setSearchNamespace(componentPattern.getName().getNamespace()); - patterns.add(childPattern); - } - SearchParticipant xsdParticipant = SearchPlugin.getDefault().getSearchParticipant(XSD_PARTICIPANNT_ID); - if(xsdParticipant instanceof XMLSearchParticipant){ - ComponentSearchContributor xsdContributor = ((XMLSearchParticipant)xsdParticipant).getSearchContributor(); - if(xsdContributor != null){ - childPatterns = xsdContributor.getReferencesPatterns(componentPattern.getMetaName()); - for (int i = 0; i < childPatterns.length; i++) { - XMLSearchPattern childPattern = childPatterns[i]; - childPattern.setSearchName(componentPattern.getName().getLocalName()); - childPattern.setSearchNamespace(componentPattern.getName().getNamespace()); - patterns.add(childPattern); - } - } - } - componentPattern.setChildren((XMLSearchPattern[]) patterns.toArray(new XMLSearchPattern[patterns.size()])); - - } - - } - - - - - - - -} |