diff options
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentFinder.java')
-rw-r--r-- | bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentFinder.java | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentFinder.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentFinder.java deleted file mode 100644 index 7f9fc7d20b..0000000000 --- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/dialogs/types/xsd/XSDComponentFinder.java +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 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.xsd.ui.internal.dialogs.types.xsd; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.core.runtime.Path; -import org.eclipse.wst.xsd.ui.internal.dialogs.types.xml.XMLComponentFinder; -import org.eclipse.wst.xsd.ui.internal.dialogs.types.xml.XMLQuickScan; - -public class XSDComponentFinder extends XMLComponentFinder { - public XSDComponentFinder() { - validExtensions.add("xsd"); - } - - public List getWorkbenchResourceComponents(int scope) { - List components = new ArrayList(); - List filePaths = new ArrayList(); - - // We don't want to search through the current file we're working on. - if (currentIFile != null) { - excludeFiles.add(currentIFile.getLocation().toOSString()); - } - - // Find files matching the search criteria specified in List extensions and - // List excludeFiles. - switch (scope) { - case ENCLOSING_PROJECT_SCOPE: - filePaths = getEnclosingProjectFiles(); - break; - - case ENTIRE_WORKSPACE_SCOPE: - filePaths = getWorkspaceFiles(); - break; - - default: - break; - } - - // Search for the components in each of the files specified in the path. - List paths = new ArrayList(); - paths.add("/schema/complexType"); - paths.add("/schema/simpleType"); - - List attributes = new ArrayList(); - String[] nameAttr = new String[1]; - nameAttr[0] = "name"; - attributes.add(nameAttr); - attributes.add(nameAttr); - - Iterator pathsIterator = filePaths.iterator(); - while (pathsIterator.hasNext()) { -// String stringPath = ((Path) pathsIterator.next()).toOSString(); - String stringPath = ((Path) pathsIterator.next()).toString(); - components.addAll(XMLQuickScan.getTagInfo(stringPath, paths, attributes)); - } - - return components; - } -} |