diff options
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeDeclarationAdapter.java')
-rw-r--r-- | bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeDeclarationAdapter.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeDeclarationAdapter.java b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeDeclarationAdapter.java index c4200ef61a..9399572eae 100644 --- a/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeDeclarationAdapter.java +++ b/bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeDeclarationAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2006 IBM Corporation and others. + * 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 @@ -11,6 +11,7 @@ package org.eclipse.wst.xsd.ui.internal.adapters; import org.eclipse.xsd.XSDAttributeDeclaration; +import org.eclipse.xsd.XSDTypeDefinition; 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.IModel; @@ -42,5 +43,16 @@ public class XSDAttributeDeclarationAdapter extends XSDBaseAttributeAdapter impl public boolean isFocusAllowed() { return isGlobal(); - } + } + + public String getTypeNameQualifier() + { + XSDTypeDefinition type = getResolvedXSDAttributeDeclaration().getTypeDefinition(); + if (type != null) + { + return type.getTargetNamespace(); + } + return ""; + } + } |