diff options
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/GlobalAttributeRenamer.java')
-rw-r--r-- | bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/GlobalAttributeRenamer.java | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/GlobalAttributeRenamer.java b/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/GlobalAttributeRenamer.java deleted file mode 100644 index d1b3e68b74..0000000000 --- a/bundles/org.eclipse.wst.xsd.ui/src/org/eclipse/wst/xsd/ui/internal/refactor/rename/GlobalAttributeRenamer.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 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.refactor.rename; - -import java.util.Iterator; - -import org.eclipse.xsd.XSDAttributeDeclaration; -import org.eclipse.xsd.XSDAttributeGroupContent; -import org.eclipse.xsd.XSDAttributeUse; -import org.eclipse.xsd.XSDComplexTypeDefinition; -import org.eclipse.xsd.XSDNamedComponent; -import org.eclipse.xsd.util.XSDConstants; - -public class GlobalAttributeRenamer extends BaseRenamer -{ - /** - * Constructor for GlobalAttributeRenamer. - * @param globalComponent - */ - public GlobalAttributeRenamer(XSDNamedComponent globalComponent, String newName) - { - super(globalComponent, newName); - } - - /** - * @see org.eclipse.wst.xsd.ui.internal.refactor.XSDVisitor#visitComplexTypeDefinition(XSDComplexTypeDefinition) - */ - public void visitComplexTypeDefinition(XSDComplexTypeDefinition type) - { - super.visitComplexTypeDefinition(type); - if (type.getAttributeContents() != null) - { - for (Iterator iter = type.getAttributeContents().iterator(); iter.hasNext(); ) - { - XSDAttributeGroupContent attrGroupContent = (XSDAttributeGroupContent) iter.next(); - if (attrGroupContent instanceof XSDAttributeUse) - { - XSDAttributeUse attrUse = (XSDAttributeUse) attrGroupContent; - XSDAttributeDeclaration attrDecl = attrUse.getContent(); - - // now is this a reference? - if (attrDecl != null && attrDecl.isAttributeDeclarationReference()) - { - if (globalComponent.equals(attrDecl.getResolvedAttributeDeclaration())) - { - attrDecl.getElement().setAttribute(XSDConstants.REF_ATTRIBUTE, getNewQName()); - } - } - } - } - } - } - - - - - -} |