diff options
author | pfullbright | 2011-04-07 20:47:09 +0000 |
---|---|---|
committer | pfullbright | 2011-04-07 20:47:09 +0000 |
commit | 705d9f95e0a72361c990f035bfb938005cb92491 (patch) | |
tree | 1518a0f876c7ec6a1040df79bad42c3d1315f448 /jaxb | |
parent | bad0bb05dab01276f5c9831eed09f75e3bb88698 (diff) | |
download | webtools.dali-705d9f95e0a72361c990f035bfb938005cb92491.tar.gz webtools.dali-705d9f95e0a72361c990f035bfb938005cb92491.tar.xz webtools.dali-705d9f95e0a72361c990f035bfb938005cb92491.zip |
added name/namespaceTouches(..)
Diffstat (limited to 'jaxb')
5 files changed, 60 insertions, 8 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/binary/BinaryXmlAttributeAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/binary/BinaryXmlAttributeAnnotation.java index 44f0d3e9f9..7b43009b50 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/binary/BinaryXmlAttributeAnnotation.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/binary/BinaryXmlAttributeAnnotation.java @@ -76,7 +76,12 @@ public final class BinaryXmlAttributeAnnotation public TextRange getNameTextRange(CompilationUnit astRoot) { throw new UnsupportedOperationException(); } - + + public boolean nameTouches(int pos, CompilationUnit astRoot) { + throw new UnsupportedOperationException(); + } + + // ***** namespace public String getNamespace() { return this.namespace; @@ -99,7 +104,12 @@ public final class BinaryXmlAttributeAnnotation public TextRange getNamespaceTextRange(CompilationUnit astRoot) { throw new UnsupportedOperationException(); } - + + public boolean namespaceTouches(int pos, CompilationUnit astRoot) { + throw new UnsupportedOperationException(); + } + + // ***** required public Boolean getRequired() { return this.required; diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/binary/BinaryXmlElementAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/binary/BinaryXmlElementAnnotation.java index 7e83bef0b4..605c610f6a 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/binary/BinaryXmlElementAnnotation.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/binary/BinaryXmlElementAnnotation.java @@ -85,7 +85,12 @@ public final class BinaryXmlElementAnnotation public TextRange getNameTextRange(CompilationUnit astRoot) { throw new UnsupportedOperationException(); } - + + public boolean nameTouches(int pos, CompilationUnit astRoot) { + throw new UnsupportedOperationException(); + } + + // ***** namespace public String getNamespace() { return this.namespace; @@ -108,7 +113,12 @@ public final class BinaryXmlElementAnnotation public TextRange getNamespaceTextRange(CompilationUnit astRoot) { throw new UnsupportedOperationException(); } - + + public boolean namespaceTouches(int pos, CompilationUnit astRoot) { + throw new UnsupportedOperationException(); + } + + // ***** default value public String getDefaultValue() { return this.defaultValue; diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlAttributeAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlAttributeAnnotation.java index 26391d1a39..2897d56dc3 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlAttributeAnnotation.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlAttributeAnnotation.java @@ -130,7 +130,12 @@ public final class SourceXmlAttributeAnnotation public TextRange getNameTextRange(CompilationUnit astRoot) { return this.getElementTextRange(this.nameDeclarationAdapter, astRoot); } - + + public boolean nameTouches(int pos, CompilationUnit astRoot) { + return elementTouches(this.nameDeclarationAdapter, pos, astRoot); + } + + // ***** namespace public String getNamespace() { return this.namespace; @@ -156,7 +161,12 @@ public final class SourceXmlAttributeAnnotation public TextRange getNamespaceTextRange(CompilationUnit astRoot) { return this.getElementTextRange(this.namespaceDeclarationAdapter, astRoot); } - + + public boolean namespaceTouches(int pos, CompilationUnit astRoot) { + return elementTouches(this.namespaceDeclarationAdapter, pos, astRoot); + } + + // ***** required public Boolean getRequired() { return this.required; diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlElementAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlElementAnnotation.java index 9052b33bf5..f10ddd2b7e 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlElementAnnotation.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlElementAnnotation.java @@ -197,7 +197,12 @@ public final class SourceXmlElementAnnotation public TextRange getNameTextRange(CompilationUnit astRoot) { return this.getElementTextRange(this.nameDeclarationAdapter, astRoot); } - + + public boolean nameTouches(int pos, CompilationUnit astRoot) { + return elementTouches(this.nameDeclarationAdapter, pos, astRoot); + } + + // ***** namespace public String getNamespace() { return this.namespace; @@ -223,7 +228,12 @@ public final class SourceXmlElementAnnotation public TextRange getNamespaceTextRange(CompilationUnit astRoot) { return this.getElementTextRange(this.namespaceDeclarationAdapter, astRoot); } - + + public boolean namespaceTouches(int pos, CompilationUnit astRoot) { + return elementTouches(this.namespaceDeclarationAdapter, pos, astRoot); + } + + // ***** nillable public Boolean getNillable() { return this.nillable; diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/java/JaxbContainmentAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/java/JaxbContainmentAnnotation.java index d5a606aa56..02aa8ed5b6 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/java/JaxbContainmentAnnotation.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/java/JaxbContainmentAnnotation.java @@ -47,6 +47,12 @@ public interface JaxbContainmentAnnotation TextRange getNameTextRange(CompilationUnit astRoot); /** + * Return whether the specified position touches the 'name' element. + * Return false if the element does not exist. + */ + boolean nameTouches(int pos, CompilationUnit astRoot); + + /** * Corresponds to the 'namespace' element of the XmlAttribute annotation. * Return null if the element does not exist in Java. */ @@ -64,6 +70,12 @@ public interface JaxbContainmentAnnotation * does not exist return the {@link TextRange} for the XmlAttribute annotation. */ TextRange getNamespaceTextRange(CompilationUnit astRoot); + + /** + * Return whether the specified position touches the 'namespace' element. + * Return false if the element does not exist. + */ + boolean namespaceTouches(int pos, CompilationUnit astRoot); /** * Corresponds to the 'required' element of the XmlAttribute annotation. |