diff options
author | Paul Fullbright | 2013-04-29 20:05:02 +0000 |
---|---|---|
committer | Paul Fullbright | 2013-04-29 20:05:02 +0000 |
commit | 345c147cb96b286aac78f2345d85ec8c7ccf0e69 (patch) | |
tree | cbde11fb15f265b07b700fee0ddfac7fec49e5a2 /jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlPathAnnotation.java | |
parent | 66e5158236bb3e6db1d0e382abe854e2c5e9daec (diff) | |
download | webtools.dali-345c147cb96b286aac78f2345d85ec8c7ccf0e69.tar.gz webtools.dali-345c147cb96b286aac78f2345d85ec8c7ccf0e69.tar.xz webtools.dali-345c147cb96b286aac78f2345d85ec8c7ccf0e69.zip |
fixed jaxb content assist (bug 403390)v201304300138
Diffstat (limited to 'jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlPathAnnotation.java')
-rw-r--r-- | jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlPathAnnotation.java | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlPathAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlPathAnnotation.java index 173473e6b5..e2dd62d3f0 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlPathAnnotation.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlPathAnnotation.java @@ -43,6 +43,7 @@ public class SourceXmlPathAnnotation private final AnnotationElementAdapter<String> valueAdapter; private String value; private TextRange valueTextRange; + private TextRange valueValidationTextRange; public static SourceXmlPathAnnotation buildSourceXmlPathAnnotation( @@ -90,14 +91,16 @@ public class SourceXmlPathAnnotation public void initialize(Annotation astAnnotation) { super.initialize(astAnnotation); this.value = buildValue(astAnnotation); - this.valueTextRange = this.buildValueTextRange(astAnnotation); + this.valueTextRange = buildValueTextRange(astAnnotation); + this.valueValidationTextRange = buildValueValidationTextRange(astAnnotation); } @Override public void synchronizeWith(Annotation astAnnotation) { super.synchronizeWith(astAnnotation); syncValue(buildValue(astAnnotation)); - this.valueTextRange = this.buildValueTextRange(astAnnotation); + this.valueTextRange = buildValueTextRange(astAnnotation); + this.valueValidationTextRange = buildValueValidationTextRange(astAnnotation); } @Override @@ -128,13 +131,21 @@ public class SourceXmlPathAnnotation private String buildValue(Annotation astAnnotation) { return this.valueAdapter.getValue(astAnnotation); } - + + private TextRange buildValueTextRange(Annotation astAnnotation) { + return getAnnotationElementTextRange(this.valueDeclarationAdapter, astAnnotation); + } + + private TextRange buildValueValidationTextRange(Annotation astAnnotation) { + return getElementTextRange(this.valueDeclarationAdapter, astAnnotation); + } + public TextRange getValueTextRange() { return this.valueTextRange; } - - private TextRange buildValueTextRange(Annotation astAnnotation) { - return this.getElementTextRange(this.valueDeclarationAdapter, astAnnotation); + + public TextRange getValueValidationTextRange() { + return this.valueValidationTextRange; } public boolean valueTouches(int pos) { |