diff options
author | kchong | 2008-01-16 16:46:35 +0000 |
---|---|---|
committer | kchong | 2008-01-16 16:46:35 +0000 |
commit | 545b48f7544df6f40435832c26820900eebfce60 (patch) | |
tree | 544d33fb760826559241f4f191cf3b1f6167ff8d | |
parent | 2ed47ecbb7a543fb3b88ec0a7e52b9dc9290711b (diff) | |
download | webtools.sourceediting-545b48f7544df6f40435832c26820900eebfce60.tar.gz webtools.sourceediting-545b48f7544df6f40435832c26820900eebfce60.tar.xz webtools.sourceediting-545b48f7544df6f40435832c26820900eebfce60.zip |
[214804] Enumerations in complex types with simple content not showing in content model
-rw-r--r-- | bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/XSDImpl.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/XSDImpl.java b/bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/XSDImpl.java index 709a7c9f33..3658e83d9f 100644 --- a/bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/XSDImpl.java +++ b/bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/XSDImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2007 IBM Corporation and others. + * Copyright (c) 2001, 2008 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 @@ -358,6 +358,12 @@ public class XSDImpl public static String[] getEnumeratedValuesForType(XSDTypeDefinition type) { List result = new ArrayList(); + // See bug 214804 - Content assist not showing valid values when it's a complex + // type with simple content + if (type instanceof XSDComplexTypeDefinition) + { + type = ((XSDComplexTypeDefinition)type).getSimpleType(); + } if (type instanceof XSDSimpleTypeDefinition) { if (TYPE_NAME_BOOLEAN.equals(type.getName()) && type.getSchema().getSchemaForSchema() == type.getSchema()) |