diff options
author | nitind | 2008-10-22 03:40:52 +0000 |
---|---|---|
committer | nitind | 2008-10-22 03:40:52 +0000 |
commit | 4878c62d9d3ce454897379c8d2bf133e9ec32b68 (patch) | |
tree | b62ad063e449deceaf21e6a239f99d8b702ce09e /bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeUseAdapter.java | |
parent | 54a3d563c583a3766f9e3d11d3a5d2109877de2a (diff) | |
download | webtools.sourceediting-200810220345.tar.gz webtools.sourceediting-200810220345.tar.xz webtools.sourceediting-200810220345.zip |
This commit was manufactured by cvs2svn to create tag 'v200810220345'.v200810220345
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeUseAdapter.java')
-rw-r--r-- | bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeUseAdapter.java | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeUseAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeUseAdapter.java deleted file mode 100644 index 668365c990..0000000000 --- a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeUseAdapter.java +++ /dev/null @@ -1,101 +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.xsd.ui.internal.adapters; - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.IActionProvider; -import org.eclipse.wst.xsd.ui.internal.adt.facade.IADTObject; -import org.eclipse.wst.xsd.ui.internal.adt.facade.IModel; -import org.eclipse.xsd.XSDAttributeDeclaration; -import org.eclipse.xsd.XSDAttributeUse; -import org.eclipse.xsd.XSDTypeDefinition; - -public class XSDAttributeUseAdapter extends XSDBaseAttributeAdapter implements IActionProvider -{ - protected XSDAttributeDeclaration getXSDAttributeDeclaration() - { - return getXSDAttributeUse().getAttributeDeclaration(); - } - - protected XSDAttributeDeclaration getResolvedXSDAttributeDeclaration() - { - return getXSDAttributeDeclaration().getResolvedAttributeDeclaration(); - } - - protected XSDAttributeUse getXSDAttributeUse() - { - return (XSDAttributeUse)target; - } - - public XSDAttributeUseAdapter() - { - super(); - } - - public String getText() - { - return getTextForAttributeUse(getXSDAttributeUse(), true); - } - - public String getTextForAttributeUse(XSDAttributeUse attributeUse, boolean showType) - { - XSDAttributeDeclaration ad = attributeUse.getAttributeDeclaration(); - - StringBuffer result = new StringBuffer(); - result.append(getTextForAttribute(ad, showType)); - /* - if (xsdAttributeUse.isSetConstraint()) - { - if (result.length() != 0) - { - result.append(" "); - } - result.append('<'); - result.append(xsdAttributeUse.getConstraint()); - result.append("=\""); - result.append(xsdAttributeUse.getLexicalValue()); - result.append("\">"); - } - */ - return result.toString(); - } - - public boolean isGlobal() - { - return false; - } - - public IModel getModel() - { - Adapter adapter = XSDAdapterFactory.getInstance().adapt(getXSDAttributeDeclaration().getSchema()); - return (IModel)adapter; - } - - public String getTypeNameQualifier() - { - XSDTypeDefinition type = getResolvedXSDAttributeDeclaration().getTypeDefinition(); - if (type != null) - { - return type.getTargetNamespace(); - } - return ""; - } - - public IADTObject getTopContainer() - { - return getGlobalXSDContainer(getXSDAttributeUse()); - } - - public boolean isReference() - { - return getXSDAttributeUse().getAttributeDeclaration().isAttributeDeclarationReference(); - } -}
\ No newline at end of file |