diff options
author | pfullbright | 2011-08-25 21:35:50 +0000 |
---|---|---|
committer | pfullbright | 2011-08-25 21:35:50 +0000 |
commit | 7e906d64d99f6681f2759b2ac9cd81169d2c48de (patch) | |
tree | 7ab54861b6a81fe7186ec69cb384b8fc67278256 | |
parent | 3e96439d2b7743b7610c7e2e84fb258eda15b150 (diff) | |
download | webtools.dali-7e906d64d99f6681f2759b2ac9cd81169d2c48de.tar.gz webtools.dali-7e906d64d99f6681f2759b2ac9cd81169d2c48de.tar.xz webtools.dali-7e906d64d99f6681f2759b2ac9cd81169d2c48de.zip |
added back content assit and validation for name/namespace
-rw-r--r-- | jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttributeMapping.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttributeMapping.java index f4b1b04d57..0c838bcc24 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttributeMapping.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttributeMapping.java @@ -13,6 +13,7 @@ import java.util.List; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jpt.common.core.utility.TextRange; import org.eclipse.jpt.common.utility.Filter; +import org.eclipse.jpt.common.utility.internal.CollectionTools; import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable; import org.eclipse.jpt.common.utility.internal.iterables.SingleElementIterable; import org.eclipse.jpt.jaxb.core.MappingKeys; @@ -118,6 +119,34 @@ public class GenericJavaXmlAttributeMapping } + // ***** content assist ***** + + @Override + public Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) { + Iterable<String> result = super.getJavaCompletionProposals(pos, filter, astRoot); + if (! CollectionTools.isEmpty(result)) { + return result; + } + + result = this.qName.getJavaCompletionProposals(pos, filter, astRoot); + if (! CollectionTools.isEmpty(result)) { + return result; + } + + return EmptyIterable.instance(); + } + + + // ***** validation ***** + + @Override + public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) { + super.validate(messages, reporter, astRoot); + + this.qName.validate(messages, reporter, astRoot); + } + + protected class XmlAttributeQName extends AbstractJavaQName { |