Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Fullbright2013-03-15 18:33:57 +0000
committerPaul Fullbright2013-03-19 21:38:00 +0000
commit54b4495ada30001ff0d0c12c70357668e526107d (patch)
treec53f7e3957484d581b44c0fd206c19008b0974c5 /jaxb/plugins
parenta02dd8093a57727926f3e3d31fec528811548ed8 (diff)
downloadwebtools.dali-54b4495ada30001ff0d0c12c70357668e526107d.tar.gz
webtools.dali-54b4495ada30001ff0d0c12c70357668e526107d.tar.xz
webtools.dali-54b4495ada30001ff0d0c12c70357668e526107d.zip
bugs 403489 and 403496 - default XmlElementWrapper name and allow add
for Map attributes
Diffstat (limited to 'jaxb/plugins')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementWrapper.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementWrapper.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementWrapper.java
index 037f401698..85d5c84b34 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementWrapper.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementWrapper.java
@@ -10,6 +10,7 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
+import java.util.Map;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterable.EmptyIterable;
import org.eclipse.jpt.common.utility.internal.iterable.IterableTools;
@@ -196,7 +197,9 @@ public class GenericJavaXmlElementWrapper
public void validate(List<IMessage> messages, IReporter reporter) {
super.validate(messages, reporter);
- if (! getPersistentAttribute().isJavaResourceAttributeCollectionType()) {
+ if (! getPersistentAttribute().isJavaResourceAttributeCollectionType()
+ // bug 403489
+ && ! getPersistentAttribute().isJavaResourceAttributeTypeSubTypeOf(Map.class.getName())) {
messages.add(
this.buildValidationMessage(
getValidationTextRange(),
@@ -256,7 +259,8 @@ public class GenericJavaXmlElementWrapper
@Override
protected String buildDefaultName() {
- return "";
+ // bug 403496
+ return getPersistentAttribute().getJavaResourceAttribute().getName();
}
@Override

Back to the top