Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkchong2007-02-28 23:07:37 +0000
committerkchong2007-02-28 23:07:37 +0000
commit72d75361f394323f9ac20ac3a8c8efa2fe3bdcc0 (patch)
tree78ba707ea25747fd01e9db58b1205d7e67222599 /bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeDeclarationAdapter.java
parent9eb5defc7dfad948257344ad054c79720cf5f85d (diff)
downloadwebtools.sourceediting-72d75361f394323f9ac20ac3a8c8efa2fe3bdcc0.tar.gz
webtools.sourceediting-72d75361f394323f9ac20ac3a8c8efa2fe3bdcc0.tar.xz
webtools.sourceediting-72d75361f394323f9ac20ac3a8c8efa2fe3bdcc0.zip
[175943] Attribute and element's type namespace should be from the resolved declaration
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.java16
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 "";
+ }
+
}

Back to the top