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:
authorkchong2008-01-16 16:46:35 +0000
committerkchong2008-01-16 16:46:35 +0000
commit545b48f7544df6f40435832c26820900eebfce60 (patch)
tree544d33fb760826559241f4f191cf3b1f6167ff8d
parent2ed47ecbb7a543fb3b88ec0a7e52b9dc9290711b (diff)
downloadwebtools.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.java8
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())

Back to the top