summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Butzke2012-08-27 16:22:03 (EDT)
committerKaren Butzke2012-08-27 16:22:03 (EDT)
commit0c48289ad0c3a335b93ecf3da8e17f96121e0247 (patch)
tree988728136c3583daced4411cc2a7c172a1136e18
parent3f09be219e0653795d242d51ab08ec31d4057011 (diff)
downloadwebtools.dali-0c48289ad0c3a335b93ecf3da8e17f96121e0247.zip
webtools.dali-0c48289ad0c3a335b93ecf3da8e17f96121e0247.tar.gz
webtools.dali-0c48289ad0c3a335b93ecf3da8e17f96121e0247.tar.bz2
Bug 376595 - stop building CompilationUnit
astRoot when validating, moved validate methods up the hierarchy, removed textRange resolvers, removed some owner interfaces
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java2
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryAnnotatedElement.java3
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryNode.java3
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java20
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotation.java76
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceCompilationUnit.java2
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java34
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/IndexedConversionDeclarationAnnotationElementAdapter.java6
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java5
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java5
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/utility/jdt/IndexedDeclarationAnnotationElementAdapter.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextNode.java21
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextRoot.java17
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbPackage.java15
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbQName.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlElement.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/java/JavaContextNode.java19
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextNode.java23
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/GenericPackage.java16
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAttributeMapping.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java20
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaElementQName.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaQName.java34
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java38
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaTypeMapping.java20
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlJavaTypeAdapter.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNamedNodeMapping.java13
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNodeMapping.java27
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java3
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeMappingXmlSchemaType.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeXmlJavaTypeAdapter.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java11
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java64
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java38
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumConstant.java14
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumMapping.java6
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaJaxbClass.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java34
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlJavaTypeAdapter.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlSchemaType.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPersistentAttribute.java12
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java3
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyAttributeMapping.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyElementMapping.java24
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttachmentRef.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttributeMapping.java30
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java32
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementMapping.java20
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java22
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefMapping.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefs.java18
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefsMapping.java16
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementWrapper.java22
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementsMapping.java36
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlID.java19
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlIDREF.java19
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlMixed.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlNs.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java22
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRootElement.java18
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchemaType.java16
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSeeAlso.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlValueMapping.java15
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlNsAnnotation.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlTypeAnnotation.java11
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaClassMapping.java17
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyAttributeMapping.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyElementMapping.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAttributeMapping.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlCDATA.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorNode.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorValue.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElement.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementMapping.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementWrapper.java14
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementsMapping.java22
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlID.java3
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlInverseReferenceMapping.java18
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNode.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNodesMapping.java12
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlKey.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlPath.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/binary/BinaryXmlDiscriminatorValueAnnotation.java3
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlDiscriminatorNodeAnnotation.java1
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/BaseJoinColumnTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/EntityTextRangeResolver.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JoinColumnTextRangeResolver.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/NamedColumnTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/OverrideTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributeTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PrimaryKeyTextRangeResolver.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableColumnTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableTextRangeResolver.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java151
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java86
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumnTextRangeResolver.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityTextRangeResolver.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaJoinColumnTextRangeResolver.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassTextRangeResolver.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNamedColumnTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNullTypeMapping.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOverrideTextRangeResolver.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPersistentAttributeTextRangeResolver.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPrimaryKeyJoinColumnTextRangeResolver.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableColumnTextRangeResolver.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableTextRangeResolver.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingTextRangeResolver.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseColumn.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBasicMapping.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmIdMapping.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinColumnRelationshipStrategy.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumn.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumnTextRangeResolver.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVersionMapping.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualBaseColumn.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedColumn.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedDiscriminatorColumn.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualReferenceTable.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualTable.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinColumnRelationshipStrategy.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinTableRelationshipStrategy.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOverrideJoinColumnRelationshipStrategy.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualJoinTable.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualSecondaryTable.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/NullOrmJoinTableRelationshipStrategy.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityTextRangeResolver.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmJoinColumnTextRangeResolver.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassTextRangeResolver.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmNamedColumnTextRangeResolver.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOverrideTextRangeResolver.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPersistentAttributeTextRangeResolver.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPrimaryKeyJoinColumnTextRangeResolver.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableColumnTextRangeResolver.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableTextRangeResolver.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTypeMappingTextRangeResolver.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentAttribute.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/VirtualOrmPersistentAttribute.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractJoinTableValidator.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractNamedColumnValidator.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPersistentAttributeValidator.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTableValidator.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTemporalConverterValidator.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideInverseJoinColumnValidator.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinColumnValidator.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinTableValidator.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideValidator.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideColumnValidator.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideValidator.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/BaseJoinColumnValidator.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/ConverterTextRangeResolver.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/DiscriminatorColumnValidator.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericTypeMappingValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/InverseJoinColumnValidator.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinColumnValidator.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideColumnValidator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideValidator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyColumnValidator.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/NamedColumnValidator.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OverrideValidator.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentFieldValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentPropertyValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTableValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/TableValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaConverter.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaNamedDiscriminatorColumn.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaOverrideContainer.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaCascade.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinColumn.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinTable.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappingJoinTableRelationshipStrategy.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOrderable.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOverrideRelationship.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryHint.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaReferenceTable.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAssociationOverride.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAttributeOverride.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualJoinColumn.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideRelationship.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualUniqueConstraint.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaElementCollectionTemporalConverterValidator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaTemporalConverterValidator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaConverter.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinColumnRelationshipStrategy.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinTableRelationshipStrategy.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmConverter.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedMapping.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmNamedDiscriminatorColumn.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverride.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverrideContainer.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmVirtualOverride.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinTable.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOrderable.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOverrideRelationship.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAssociationOverride.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAttributeOverride.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualJoinColumn.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualOverrideRelationship.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualPrimaryKeyJoinColumn.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/CollectionTableValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/MapKeyJoinColumnValidator.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/OrderColumnValidator.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java191
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOverrideJoinTableRelationshipStrategy2_0.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMapKeyTemporalConverterValidator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaCacheable2_0.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java58
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOverrideJoinTableRelationshipStrategy2_0.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionTemporalConverterValidator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmMapKeyTemporalConverterValidator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmTemporalConverterValidator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AssociationOverrideContainer2_0.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyAssociationOverride2_0.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyOverrideRelationship2_0.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaDerivedIdentity2_0.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyTemporalConverter2_0.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyEnumeratedConverter2_0.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyTemporalConverter2_0.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverter.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaReadOnlyTenantDiscriminatorColumn2_3.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmReadOnlyTenantDiscriminatorColumn2_3.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/AbstractEclipseLinkTypeMappingValidator.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkConvertValidator.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkDynamicTypeMappingValidator.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkEntityPrimaryKeyValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkMappedSuperclassPrimaryKeyValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkMappedSuperclassValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkPersistentAttributeValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkTypeMappingValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/TenantDiscriminatorColumnValidator2_3.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaTenantDiscriminatorColumn2_3.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaTimeOfDay.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaVirtualTenantDiscriminatorColumn2_3.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkArrayMapping2_3.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkBasicMapping.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCachingImpl.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkChangeTracking.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConversionValue.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConvert.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverter.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverterClassConverter.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverterContainerImpl.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomConverter.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomizer.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkElementCollectionMapping2_0.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkEmbeddableImpl.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkEntityImpl.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkIdMapping.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkJoinFetch.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkManyToManyMapping.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkManyToOneMapping.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMappedSuperclassImpl.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMultitenancyImpl2_3.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMutable.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkObjectTypeConverter.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkOneToManyMapping.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkOneToOneMapping.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkPrivateOwned.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkReadOnly.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkVersionMapping.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/NullJavaEclipseLinkMultitenancy2_3.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/SpecifiedJavaEclipseLinkPersistentAttribute.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkEntityMappingsImpl.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkOrmTenantDiscriminatorColumn2_3.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/GenericOrmVirtualTenantDiscriminatorColumn2_3.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkArrayMapping2_3.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkConvert.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEmbeddableImpl.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEntityImpl.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMappedSuperclassImpl.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMultitenancyImpl2_3.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkPersistenceUnitDefaults.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkPersistentAttribute.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentAttribute.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentType.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/binary/BinaryEclipseLinkConverterAnnotation.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/binary/BinaryEclipseLinkCustomizerAnnotation.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConverterAnnotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCustomizerAnnotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkNamedConverterAnnotation.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkWriteTransformerAnnotation.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/resource/java/EclipseLinkConverterAnnotation.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/resource/java/EclipseLinkCustomizerAnnotation.java9
443 files changed, 2507 insertions, 4574 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java
index 07b4136..ea0242c 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java
@@ -64,7 +64,7 @@ public abstract class NullAnnotation<A extends Annotation>
throw new UnsupportedOperationException();
}
- public TextRange getTextRange(CompilationUnit astRoot) {
+ public TextRange getTextRange() {
return null;
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryAnnotatedElement.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryAnnotatedElement.java
index 6688e14..3c87be5 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryAnnotatedElement.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryAnnotatedElement.java
@@ -15,7 +15,6 @@ import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMemberValuePair;
import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.AnnotationProvider;
import org.eclipse.jpt.common.core.internal.plugin.JptCommonCorePlugin;
import org.eclipse.jpt.common.core.resource.java.Annotation;
@@ -322,7 +321,7 @@ abstract class BinaryAnnotatedElement
throw new UnsupportedOperationException();
}
- public TextRange getTextRange(String nestableAnnotationName, CompilationUnit astRoot) {
+ public TextRange getTextRange(String nestableAnnotationName) {
throw new UnsupportedOperationException();
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryNode.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryNode.java
index b4b4941..2f57c55 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryNode.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryNode.java
@@ -13,7 +13,6 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IMemberValuePair;
import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.plugin.JptCommonCorePlugin;
import org.eclipse.jpt.common.core.internal.resource.java.AbstractJavaResourceNode;
import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
@@ -49,7 +48,7 @@ public abstract class BinaryNode
throw new UnsupportedOperationException();
}
- public TextRange getTextRange(CompilationUnit astRoot) {
+ public TextRange getTextRange() {
throw new UnsupportedOperationException();
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java
index e25c637..55dd5c6 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java
@@ -19,7 +19,6 @@ import java.util.List;
import java.util.Map;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.ASTVisitor;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.IAnnotationBinding;
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.MarkerAnnotation;
@@ -74,6 +73,8 @@ abstract class SourceAnnotatedElement<E extends AnnotatedElement>
protected TextRange nameTextRange;
+ protected TextRange textRange;
+
// ********** construction/initialization **********
SourceAnnotatedElement(JavaResourceNode parent, E annotatedElement) {
@@ -96,6 +97,7 @@ abstract class SourceAnnotatedElement<E extends AnnotatedElement>
// getBinding() : IBinding - SourceMember and its subclasses have an initialize that takes an IBinding
// getTypeBinding() : ITypeBinding - this is for SourceAttribute
protected void initialize(ASTNode node, Name nameNode) {
+ this.textRange = this.buildTextRange(node);
this.nameTextRange = ASTTools.buildTextRange(nameNode);
this.initializeAnnotations(node);
}
@@ -150,10 +152,11 @@ abstract class SourceAnnotatedElement<E extends AnnotatedElement>
/**
* Subclasses are responsible for calling this synchronizeWith method.
- * The ASTNode will be used to sync the annotations and the Name node
- * will be used to cache the name text range.
+ * The ASTNode will be used to sync the annotations and cache the text range
+ * and the Name node will be used to cache the name text range.
*/
protected void synchronizeWith(ASTNode node, Name nameNode) {
+ this.textRange = this.buildTextRange(node);
this.nameTextRange = ASTTools.buildTextRange(nameNode);
this.syncAnnotations(node);
}
@@ -522,18 +525,15 @@ abstract class SourceAnnotatedElement<E extends AnnotatedElement>
// ********** misc **********
- public TextRange getTextRange(CompilationUnit astRoot) {
- // the AST is null for virtual Java attributes
- // TODO remove the AST null check once we start storing text ranges
- // in the resource model
- return (astRoot == null) ? null : this.buildTextRange(this.annotatedElement.getBodyDeclaration(astRoot));
+ public TextRange getTextRange() {
+ return this.textRange;
}
public TextRange getNameTextRange() {
return this.nameTextRange;
}
- public TextRange getTextRange(String nestableAnnotationName, CompilationUnit astRoot) {
+ public TextRange getTextRange(String nestableAnnotationName) {
CombinationAnnotationContainer container = this.annotationContainers.get(nestableAnnotationName);
if (container == null) {
return null;
@@ -542,7 +542,7 @@ abstract class SourceAnnotatedElement<E extends AnnotatedElement>
if (annotation == null) {
annotation = container.getNestedAnnotation(0);
}
- return annotation.getTextRange(astRoot);
+ return annotation.getTextRange();
}
private TextRange buildTextRange(ASTNode astNode) {
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotation.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotation.java
index 1260efa..ee66766 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotation.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotation.java
@@ -42,6 +42,7 @@ public abstract class SourceAnnotation
protected final AnnotationAdapter annotationAdapter;
+ protected TextRange annotationTextRange;
/**
* constructor for straight member annotation
@@ -63,18 +64,20 @@ public abstract class SourceAnnotation
// ********** JavaResourceNode implementation **********
- public TextRange getTextRange(CompilationUnit astRoot) {
- return this.getAnnotationTextRange(astRoot);
+ public TextRange getTextRange() {
+ return this.getAnnotationTextRange();
}
// ********** Annotation implementation **********
public void initialize(org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+ this.annotationTextRange = this.buildTextRange(astAnnotation);
initialize((CompilationUnit) astAnnotation.getRoot());
}
public void synchronizeWith(org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+ this.annotationTextRange = this.buildTextRange(astAnnotation);
synchronizeWith((CompilationUnit) astAnnotation.getRoot());
}
@@ -137,11 +140,8 @@ public abstract class SourceAnnotation
* Return the text range corresponding to the annotation.
* If the annotation is missing, return <code>null</code>.
*/
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
- // the AST is null for virtual Java attributes
- // TODO remove the AST null check once we start storing text ranges
- // in the resource model
- return (astRoot == null) ? null : this.buildTextRange(this.getAstAnnotation(astRoot));
+ protected TextRange getAnnotationTextRange() {
+ return this.annotationTextRange;
}
/**
@@ -157,25 +157,17 @@ public abstract class SourceAnnotation
* Return the text range corresponding to the specified element.
* If the specified element is missing, return the annotation's text range instead.
*/
- protected TextRange getElementTextRange(DeclarationAnnotationElementAdapter<?> elementAdapter, CompilationUnit astRoot) {
- return this.getElementTextRange(this.getAnnotationElementTextRange(elementAdapter, astRoot), astRoot);
- }
-
- /**
- * Convenience method.
- * Return the text range corresponding to the specified element.
- * If the specified element is missing, return the annotation's text range instead.
- */
protected TextRange getElementTextRange(DeclarationAnnotationElementAdapter<?> elementAdapter, org.eclipse.jdt.core.dom.Annotation astAnnotation) {
return this.getElementTextRange(this.getAnnotationElementTextRange(elementAdapter, astAnnotation), astAnnotation);
}
/**
- * Convenience method. If the specified element text range is null
- * return the member's text range instead.
+ * Convenience method.
+ * Return the text range corresponding to the specified element at the given index.
+ * If the specified element is missing, return the annotation's text range instead.
*/
- protected TextRange getElementTextRange(TextRange elementTextRange, CompilationUnit astRoot) {
- return (elementTextRange != null) ? elementTextRange : this.getAnnotationTextRange(astRoot);
+ protected TextRange getElementTextRange(IndexedDeclarationAnnotationElementAdapter<?> elementAdapter, int index, org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+ return this.getElementTextRange(this.getAnnotationElementTextRange(elementAdapter, index, astAnnotation), astAnnotation);
}
/**
@@ -187,14 +179,6 @@ public abstract class SourceAnnotation
}
/**
- * Convenience method. Return whether the specified position exists and
- * touches the specified element.
- */
- protected boolean elementTouches(DeclarationAnnotationElementAdapter<?> elementAdapter, int pos, CompilationUnit astRoot) {
- return this.textRangeTouches(this.getAnnotationElementTextRange(elementAdapter, astRoot), pos);
- }
-
- /**
* Convenience method. Return whether the specified text range is not
* null (meaning the corresponding AST node exists) and the specified position touches it.
*/
@@ -202,26 +186,12 @@ public abstract class SourceAnnotation
return (textRange != null) && textRange.touches(pos);
}
- /**
- * Return the text range corresponding to the specified element.
- * If the element is missing, return null.
- */
- protected TextRange getAnnotationElementTextRange(DeclarationAnnotationElementAdapter<?> adapter, CompilationUnit astRoot) {
- // the AST is null for virtual Java attributes
- // TODO remove the AST null check once we start storing text ranges
- // in the resource model
- return (astRoot == null) ? null : this.buildTextRange(this.getAnnotationElementExpression(adapter, astRoot));
- }
-
protected TextRange getAnnotationElementTextRange(DeclarationAnnotationElementAdapter<?> adapter, org.eclipse.jdt.core.dom.Annotation astAnnotation) {
return (astAnnotation == null) ? null : this.buildTextRange(this.getAnnotationElementExpression(adapter, astAnnotation));
}
- /**
- * Return the specified AST DOM element.
- */
- protected Expression getAnnotationElementExpression(DeclarationAnnotationElementAdapter<?> adapter, CompilationUnit astRoot) {
- return adapter.getExpression(this.annotatedElement.getModifiedDeclaration(astRoot));
+ protected TextRange getAnnotationElementTextRange(IndexedDeclarationAnnotationElementAdapter<?> adapter, int index, org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+ return (astAnnotation == null) ? null : this.buildTextRange(this.getAnnotationElementExpression(adapter, index, astAnnotation));
}
/**
@@ -232,22 +202,10 @@ public abstract class SourceAnnotation
}
/**
- * Return the text range corresponding to the expression at the specified
- * index of the element's array.
- * @exception ArrayIndexOutOfBoundsException if the index is out of range
- */
- protected TextRange selectAnnotationElementTextRange(IndexedDeclarationAnnotationElementAdapter<?> adapter, int index, CompilationUnit astRoot) {
- // the AST is null for virtual Java attributes
- // TODO remove the AST null check once we start storing text ranges
- // in the resource model
- return (astRoot == null) ? null : this.buildTextRange(this.selectAnnotationElementExpression(adapter, index, astRoot));
- }
-
- /**
- * Return the expression at the specified index of the element's array.
+ * Return the specified AST DOM element.
*/
- protected Expression selectAnnotationElementExpression(IndexedDeclarationAnnotationElementAdapter<?> adapter, int index, CompilationUnit astRoot) {
- return adapter.selectExpression(this.annotatedElement.getModifiedDeclaration(astRoot), index);
+ protected Expression getAnnotationElementExpression(IndexedDeclarationAnnotationElementAdapter<?> adapter, int index, org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+ return adapter.selectExpression(astAnnotation, index);
}
/**
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceCompilationUnit.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceCompilationUnit.java
index d47133f..e5dac76 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceCompilationUnit.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceCompilationUnit.java
@@ -102,7 +102,7 @@ public abstract class SourceCompilationUnit
// ********** JavaResourceNode implementation **********
- public TextRange getTextRange(CompilationUnit astRoot) {
+ public TextRange getTextRange() {
return null;
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java
index 1160aea..020a5d4 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java
@@ -178,27 +178,6 @@ public class ASTTools {
}
/**
- * Return whether the specified expression is a type literal and the type binding
- * corresponding to the specified type name exists in the type
- * literal's inheritance hierarchy (superclasses and interfaces).
- * Return null otherwise.
- */
- public static boolean typeIsSubTypeOf(Expression expression, String searchTypeName) {
- return findTypeInHierarchy(expression, searchTypeName) != null;
- }
-
- /**
- * If the specified expression is a type literal, return the type binding
- * corresponding to the specified type name if it exists in the type
- * literal's inheritance hierarchy (superclasses and interfaces).
- * Return null otherwise.
- */
- public static ITypeBinding findTypeInHierarchy(Expression expression, String searchTypeName) {
- ITypeBinding typeBinding = resolveTypeBinding(expression);
- return (typeBinding == null) ? null : findTypeInHierarchy(typeBinding, searchTypeName);
- }
-
- /**
* Return whether a type binding with the specified type name exists in
* the specified type binding's inheritance hierarchy (superclasses
* and interfaces).
@@ -255,19 +234,6 @@ public class ASTTools {
}
return null;
}
- /**
- * Return whether the specified expression is a type literal and the type binding
- * corresponding to the specified interface name exists in the type
- * literal's inheritance hierarchy (superclasses and interfaces).
- * Return null otherwise.
- */
- public static boolean typeImplementsInterface(Expression expression, String searchInterfaceName) {
- ITypeBinding typeBinding = resolveTypeBinding(expression);
- if (typeBinding == null) {
- return false;
- }
- return findInterfaceInHierarchy(typeBinding, searchInterfaceName) != null;
- }
/**
* Return whether a type binding with the specified interface name exists in
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/IndexedConversionDeclarationAnnotationElementAdapter.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/IndexedConversionDeclarationAnnotationElementAdapter.java
index fe84b5a..a53c0fb 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/IndexedConversionDeclarationAnnotationElementAdapter.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/IndexedConversionDeclarationAnnotationElementAdapter.java
@@ -9,11 +9,11 @@
******************************************************************************/
package org.eclipse.jpt.common.core.internal.utility.jdt;
+import org.eclipse.jdt.core.dom.Annotation;
import org.eclipse.jdt.core.dom.Expression;
import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.common.core.utility.jdt.IndexedExpressionConverter;
-import org.eclipse.jpt.common.core.utility.jdt.ModifiedDeclaration;
/**
* Wrap a declaration annotation element adapter that deals with AST
@@ -38,7 +38,7 @@ public class IndexedConversionDeclarationAnnotationElementAdapter<T>
return (IndexedExpressionConverter<T>) this.converter;
}
- public Expression selectExpression(ModifiedDeclaration declaration, int index) {
- return this.getConverter().selectExpression(this.getExpression(declaration), index);
+ public Expression selectExpression(Annotation astAnnotation, int index) {
+ return this.getConverter().selectExpression(this.getExpression(astAnnotation), index);
}
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java
index fde46cc..aa64a76 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.common.core.resource.java;
import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.AnnotationProvider;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
@@ -200,10 +199,10 @@ public interface JavaResourceAnnotatedElement
* container annotation.
* This is not used for stand-alone annotations
*
- * @see Annotation#getTextRange(CompilationUnit)
+ * @see Annotation#getTextRange()
* @see AnnotationProvider#getContainerAnnotationName(String)
*/
- TextRange getTextRange(String nestableAnnotationName, CompilationUnit astRoot);
+ TextRange getTextRange(String nestableAnnotationName);
/**
* The kind of java element.
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java
index 7b63fb8..4a4fb50 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.common.core.resource.java;
import org.eclipse.core.resources.IFile;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.AnnotationProvider;
import org.eclipse.jpt.common.core.JptResourceModel;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -25,7 +24,7 @@ import org.eclipse.jpt.common.utility.model.Model;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.0
+ * @version 3.3
* @since 3.0
*/
public interface JavaResourceNode
@@ -57,7 +56,7 @@ public interface JavaResourceNode
/**
* Return the [source] node's text range in the compilation unit's file.
*/
- TextRange getTextRange(CompilationUnit astRoot);
+ TextRange getTextRange();
/**
* Root of Java resource model containment hierarchy.
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/utility/jdt/IndexedDeclarationAnnotationElementAdapter.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/utility/jdt/IndexedDeclarationAnnotationElementAdapter.java
index 202e094..b22558b 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/utility/jdt/IndexedDeclarationAnnotationElementAdapter.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/utility/jdt/IndexedDeclarationAnnotationElementAdapter.java
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.common.core.utility.jdt;
+import org.eclipse.jdt.core.dom.Annotation;
import org.eclipse.jdt.core.dom.Expression;
/**
@@ -30,9 +31,9 @@ public interface IndexedDeclarationAnnotationElementAdapter<T>
extends DeclarationAnnotationElementAdapter<T[]>
{
/**
- * Given the specified declaration, return the expression at the specified
+ * Given the specified annotation, return the expression at the specified
* index.
* @throws IndexOutOfBoundsException if the index is out of range
*/
- Expression selectExpression(ModifiedDeclaration declaration, int index);
+ Expression selectExpression(Annotation astAnnotation, int index);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextNode.java
index 67cb961..96120b4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextNode.java
@@ -9,8 +9,13 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.context;
+import java.util.List;
+
import org.eclipse.jpt.common.core.JptResourceTypeReference;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.JaxbNode;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
* Common protocol for JAXB objects that have a context, as opposed to
@@ -22,7 +27,7 @@ import org.eclipse.jpt.jaxb.core.JaxbNode;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.0
+ * @version 3.3
* @since 3.0
*/
public interface JaxbContextNode
@@ -43,4 +48,18 @@ public interface JaxbContextNode
*/
void update();
+
+
+ // ******************** validation ****************************************
+
+ /**
+ * Adds to the list of current validation messages
+ */
+ void validate(List<IMessage> messages, IReporter reporter);
+
+ /**
+ * Return the text range for highlighting errors for this object
+ */
+ TextRange getValidationTextRange();
+
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextRoot.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextRoot.java
index f203a01..fdb9aa6 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextRoot.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextRoot.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,10 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.context;
-import java.util.List;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
/**
* Root of the JAXB context model.
* <p>
@@ -22,7 +18,7 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 3.0
*/
public interface JaxbContextRoot
@@ -104,13 +100,4 @@ public interface JaxbContextRoot
// ***** misc *****
-
-
-
- // ***** validation *****
-
- /**
- * Add validation messages to the specified list.
- */
- public void validate(List<IMessage> messages, IReporter reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbPackage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbPackage.java
index 739cbe8..2c730c8 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbPackage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbPackage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,10 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.context;
-import java.util.List;
import org.eclipse.jpt.jaxb.core.xsd.XsdSchema;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
*
@@ -23,7 +20,7 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.0
+ * @version 3.03
* @since 3.0
*/
public interface JaxbPackage
@@ -75,12 +72,4 @@ public interface JaxbPackage
* Return the {@link XsdSchema} associated with this package, if there is one, null otherwise
*/
XsdSchema getXsdSchema();
-
-
- // **************** validation ********************************************
-
- /**
- * Add validation messages to the specified list.
- */
- public void validate(List<IMessage> messages, IReporter reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbQName.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbQName.java
index 5ef4178..bd648dc 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbQName.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbQName.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jaxb.core.context;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
@@ -23,7 +22,7 @@ import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.?
+ * @version 3.3
* @since 3.?
*/
public interface JaxbQName
@@ -57,7 +56,7 @@ public interface JaxbQName
// ***** validation *****
- TextRange getNamespaceTextRange(CompilationUnit astRoot);
+ TextRange getNamespaceTextRange();
- TextRange getNameTextRange(CompilationUnit astRoot);
+ TextRange getNameTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlElement.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlElement.java
index 333cbcf..378e161 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlElement.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jaxb.core.context;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
import org.eclipse.jpt.jaxb.core.resource.java.XmlElementAnnotation;
@@ -110,5 +109,5 @@ public interface XmlElement
// ***** validation *****
- TextRange getTypeTextRange(CompilationUnit astRoot);
+ TextRange getTypeTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/java/JavaContextNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/java/JavaContextNode.java
index b2859f0..c833c99 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/java/JavaContextNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/java/JavaContextNode.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
@@ -9,13 +9,9 @@
*******************************************************************************/
package org.eclipse.jpt.jaxb.core.context.java;
-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.jaxb.core.context.JaxbContextNode;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public interface JavaContextNode
@@ -27,17 +23,4 @@ public interface JavaContextNode
* Return the Java code-completion proposals for the specified position in the source code.
*/
Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot);
-
-
- // ******************** validation ****************************************
-
- /**
- * Adds to the list of current validation messages
- */
- void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
-
- /**
- * Return the text range for highlighting errors for this object
- */
- TextRange getValidationTextRange(CompilationUnit astRoot);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextNode.java
index 5e270b2..a8a2376 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextNode.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,11 +9,17 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context;
+import java.util.List;
+
import org.eclipse.jpt.common.core.JptResourceType;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.JaxbNode;
import org.eclipse.jpt.jaxb.core.context.JaxbContextNode;
import org.eclipse.jpt.jaxb.core.context.JaxbContextRoot;
import org.eclipse.jpt.jaxb.core.internal.AbstractJaxbNode;
+import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public abstract class AbstractJaxbContextNode
extends AbstractJaxbNode
@@ -83,4 +89,19 @@ public abstract class AbstractJaxbContextNode
public JaxbContextRoot getContextRoot() {
return getParent().getContextRoot();
}
+
+
+ // **************** validation ********************************************
+
+ public abstract TextRange getValidationTextRange();
+
+ /**
+ * All subclass implementations {@link #validate(List, IReporter)}
+ * should be preceded by a "super" call to this method
+ */
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ if (reporter.isCancelled()) {
+ throw new ValidationCancelledException();
+ }
+ }
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java
index e7e5170..ea3b3a4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java
@@ -20,6 +20,7 @@ import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceEnum;
import org.eclipse.jpt.common.core.resource.java.JavaResourcePackage;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.common.utility.internal.NotNullFilter;
import org.eclipse.jpt.common.utility.internal.StringTools;
@@ -568,8 +569,15 @@ public abstract class AbstractJaxbContextRoot
// **************** validation ********************************************
+
+ @Override
+ public TextRange getValidationTextRange() {
+ return TextRange.Empty.instance(); //?
+ }
+ @Override
public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
for (JaxbPackage pkg : this.packages.values()) {
pkg.validate(messages, reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/GenericPackage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/GenericPackage.java
index 5869fee..46927b9 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/GenericPackage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/GenericPackage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -11,6 +11,7 @@ package org.eclipse.jpt.jaxb.core.internal.context;
import java.util.List;
import org.eclipse.jpt.common.core.resource.java.JavaResourcePackage;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.jaxb.core.context.JaxbContextRoot;
import org.eclipse.jpt.jaxb.core.context.JaxbPackage;
@@ -20,7 +21,6 @@ import org.eclipse.jpt.jaxb.core.context.XmlRegistry;
import org.eclipse.jpt.jaxb.core.internal.validation.DefaultValidationMessages;
import org.eclipse.jpt.jaxb.core.internal.validation.JaxbValidationMessages;
import org.eclipse.jpt.jaxb.core.xsd.XsdSchema;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -110,7 +110,7 @@ public class GenericPackage
// **************** misc **************************************************
public String getNamespace() {
- return (getPackageInfo() == null) ? "" : getPackageInfo().getXmlSchema().getNamespace();
+ return (getPackageInfo() == null) ? "" : getPackageInfo().getXmlSchema().getNamespace(); //$NON-NLS-1$
}
public XmlNsForm getAttributeFormDefault() {
@@ -127,11 +127,15 @@ public class GenericPackage
// **************** validation ********************************************
+
+ @Override
+ public TextRange getValidationTextRange() {
+ return TextRange.Empty.instance(); //?
+ }
+ @Override
public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
+ super.validate(messages, reporter);
if (getJaxbProject().getSchemaLibrary().getSchema(getNamespace()) == null) {
messages.add(
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java
index f560b9e..6789f06 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
import org.eclipse.jpt.jaxb.core.context.JaxbPackage;
@@ -181,11 +180,11 @@ public abstract class AbstractJavaAdaptableAttributeMapping<A extends Annotation
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlJavaTypeAdapter != null) {
- this.xmlJavaTypeAdapter.validate(messages, reporter, astRoot);
+ this.xmlJavaTypeAdapter.validate(messages, reporter);
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAttributeMapping.java
index 7c215be..3bec53e 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAttributeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAttributeMapping.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -102,8 +101,8 @@ public abstract class AbstractJavaAttributeMapping<A extends Annotation>
// ********** validation **********
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation() == null ? getJavaResourceAttribute().getNameTextRange() : getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation() == null ? getJavaResourceAttribute().getNameTextRange() : getAnnotation().getTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java
index d92a2bb..2a20cb3 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java
@@ -9,20 +9,15 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import java.util.List;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.JptResourceType;
import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.Filter;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
import org.eclipse.jpt.jaxb.core.JaxbNode;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
import org.eclipse.jpt.jaxb.core.internal.context.AbstractJaxbContextNode;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public abstract class AbstractJavaContextNode
@@ -47,19 +42,4 @@ public abstract class AbstractJavaContextNode
int pos, Filter<String> filter, CompilationUnit astRoot) {
return EmptyIterable.instance();
}
-
-
- // **************** validation ********************************************
-
- public abstract TextRange getValidationTextRange(CompilationUnit astRoot);
-
- /**
- * All subclass implementations {@link #validate(List, IReporter, CompilationUnit)}
- * should be preceded by a "super" call to this method
- */
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
- }
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaElementQName.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaElementQName.java
index d3edefc..f4731e9 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaElementQName.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaElementQName.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.utility.Filter;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
import org.eclipse.jpt.jaxb.core.context.JaxbClassMapping;
@@ -94,7 +93,7 @@ public abstract class AbstractJavaElementQName
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
XsdTypeDefinition xsdType = getJaxbClassMapping().getXsdTypeDefinition();
if (xsdType == null) {
return;
@@ -118,7 +117,7 @@ public abstract class AbstractJavaElementQName
}
if (resolvedXsdElement == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaQName.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaQName.java
index 045a6db..2e157d7 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaQName.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaQName.java
@@ -169,20 +169,20 @@ public abstract class AbstractJavaQName
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getParent().getValidationTextRange();
}
- protected TextRange getTextRange(TextRange textRange, CompilationUnit astRoot) {
- return (textRange != null) ? textRange : getParent().getValidationTextRange(astRoot);
+ protected TextRange getTextRange(TextRange textRange) {
+ return (textRange != null) ? textRange : getParent().getValidationTextRange();
}
- public TextRange getNamespaceTextRange(CompilationUnit astRoot) {
- return getTextRange(this.proxy.getNamespaceTextRange(), astRoot);
+ public TextRange getNamespaceTextRange() {
+ return getTextRange(this.proxy.getNamespaceTextRange());
}
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return getTextRange(this.proxy.getNameTextRange(), astRoot);
+ public TextRange getNameTextRange() {
+ return getTextRange(this.proxy.getNameTextRange());
}
/**
@@ -194,17 +194,17 @@ public abstract class AbstractJavaQName
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateName(messages, reporter, astRoot);
+ validateName(messages, reporter);
if (! StringTools.stringIsEmpty(getName())) {
- validateReference(messages, reporter, astRoot);
+ validateReference(messages, reporter);
}
}
- protected void validateName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateName(List<IMessage> messages, IReporter reporter) {
if (StringTools.stringIsEmpty(getName())) {
messages.add(
DefaultValidationMessages.buildMessage(
@@ -212,19 +212,19 @@ public abstract class AbstractJavaQName
JaxbValidationMessages.QNAME__MISSING_NAME,
new String[] { getReferencedComponentTypeDescription() },
this,
- getNameTextRange(astRoot)));
+ getNameTextRange()));
}
}
- protected abstract void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
+ protected abstract void validateReference(List<IMessage> messages, IReporter reporter);
- protected IMessage getUnresolveSchemaComponentMessage(CompilationUnit astRoot) {
+ protected IMessage getUnresolveSchemaComponentMessage() {
return DefaultValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.QNAME__UNRESOLVED_COMPONENT,
new String[] { getReferencedComponentTypeDescription(), getNamespace(), getName() },
this,
- getNameTextRange(astRoot));
+ getNameTextRange());
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java
index cc03ba5..9ae8bac 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java
@@ -30,7 +30,6 @@ import org.eclipse.jpt.jaxb.core.resource.java.XmlJavaTypeAdapterAnnotation;
import org.eclipse.jpt.jaxb.core.resource.java.XmlRootElementAnnotation;
import org.eclipse.jpt.jaxb.core.resource.java.XmlTransientAnnotation;
import org.eclipse.jpt.jaxb.core.resource.java.XmlTypeAnnotation;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -268,13 +267,6 @@ public abstract class AbstractJavaType
}
- // ***** misc *****
-
- protected CompilationUnit buildASTRoot() {
- return this.resourceType.getJavaResourceCompilationUnit().buildASTRoot();
- }
-
-
// ***** content assist *****
@Override
@@ -310,14 +302,13 @@ public abstract class AbstractJavaType
* Override as needed
*/
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return getJavaResourceType().getNameTextRange();
}
+ @Override
public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
+ super.validate(messages, reporter);
// TODO temporary hack since we don't know yet where to put
// any messages for types in another project
IFile file = this.resourceType.getFile();
@@ -327,21 +318,14 @@ public abstract class AbstractJavaType
if ((file != null)
&& file.getProject().equals(getJaxbProject().getProject())
&& (this.resourceType instanceof SourceNode)) {
- // build the AST root here to pass down
- this.validate(messages, reporter, this.buildASTRoot());
- }
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
-
- if (this.mapping != null) {
- this.mapping.validate(messages, reporter, astRoot);
- }
-
- if (this.xmlJavaTypeAdapter != null) {
- this.xmlJavaTypeAdapter.validate(messages, reporter, astRoot);
+
+ if (this.mapping != null) {
+ this.mapping.validate(messages, reporter);
+ }
+
+ if (this.xmlJavaTypeAdapter != null) {
+ this.xmlJavaTypeAdapter.validate(messages, reporter);
+ }
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaTypeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaTypeMapping.java
index 8821439..5c59d92 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaTypeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaTypeMapping.java
@@ -338,20 +338,20 @@ public abstract class AbstractJavaTypeMapping
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = getXmlTypeAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : getJaxbType().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = getXmlTypeAnnotation().getTextRange();
+ return (textRange != null) ? textRange : getJaxbType().getValidationTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (! this.xmlTransient) {
- this.qName.validate(messages, reporter, astRoot);
+ this.qName.validate(messages, reporter);
if (this.xmlRootElement != null) {
- this.xmlRootElement.validate(messages, reporter, astRoot);
+ this.xmlRootElement.validate(messages, reporter);
}
}
}
@@ -436,7 +436,7 @@ public abstract class AbstractJavaTypeMapping
}
@Override
- protected void validateName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateName(List<IMessage> messages, IReporter reporter) {
// do not call super... - it is not an error if the name is ""
// if name is absent (""), namespace cannot be different from package namespace
if ("".equals(getName())
@@ -453,7 +453,7 @@ public abstract class AbstractJavaTypeMapping
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
// if name is not absent (""), type must be from schema associated with this package
String name = getName();
String namespace = getNamespace();
@@ -463,7 +463,7 @@ public abstract class AbstractJavaTypeMapping
if (schema != null) {
XsdTypeDefinition schemaType = schema.getTypeDefinition(namespace, name);
if (schemaType == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlJavaTypeAdapter.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlJavaTypeAdapter.java
index f2c8bb9..3a39782 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlJavaTypeAdapter.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlJavaTypeAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -200,7 +199,7 @@ public abstract class AbstractJavaXmlJavaTypeAdapter
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.annotation.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.annotation.getTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNamedNodeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNamedNodeMapping.java
index 57c51ad..1a15f78 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNamedNodeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNamedNodeMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbClassMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
@@ -288,19 +287,19 @@ public abstract class AbstractJavaXmlNamedNodeMapping<A extends JaxbBasicSchemaC
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlID != null) {
- this.xmlID.validate(messages, reporter, astRoot);
+ this.xmlID.validate(messages, reporter);
}
if (this.xmlIDREF != null) {
- this.xmlIDREF.validate(messages, reporter, astRoot);
+ this.xmlIDREF.validate(messages, reporter);
}
if (this.xmlAttachmentRef != null) {
- this.xmlAttachmentRef.validate(messages, reporter, astRoot);
+ this.xmlAttachmentRef.validate(messages, reporter);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNodeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNodeMapping.java
index 8f5f0ca..8cf22df 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNodeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNodeMapping.java
@@ -1,3 +1,12 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
@@ -223,26 +232,26 @@ public abstract class AbstractJavaXmlNodeMapping<A extends Annotation>
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlSchemaType != null) {
- this.xmlSchemaType.validate(messages, reporter, astRoot);
+ this.xmlSchemaType.validate(messages, reporter);
}
if (isXmlList()) {
- validateXmlList(messages, reporter, astRoot);
+ validateXmlList(messages, reporter);
}
}
- protected void validateXmlList(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateXmlList(List<IMessage> messages, IReporter reporter) {
if (! getPersistentAttribute().isJavaResourceAttributeCollectionType()) {
messages.add(
DefaultValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_LIST__ATTRIBUTE_NOT_COLLECTION_TYPE,
this,
- getXmlListValidationTextRange(astRoot)));
+ getXmlListValidationTextRange()));
}
else {
XsdTypeDefinition xsdType = getDataTypeXsdTypeDefinition();
@@ -256,13 +265,13 @@ public abstract class AbstractJavaXmlNodeMapping<A extends Annotation>
JaxbValidationMessages.XML_LIST__ITEM_TYPE_NOT_MAPPED_TO_VALID_SCHEMA_TYPE,
new String[] { getValueTypeName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
- protected TextRange getXmlListValidationTextRange(CompilationUnit astRoot) {
+ protected TextRange getXmlListValidationTextRange() {
XmlListAnnotation annotation = getXmlListAnnotation();
- return (annotation == null) ? getValidationTextRange(astRoot) : annotation.getTextRange(astRoot);
+ return (annotation == null) ? getValidationTextRange() : annotation.getTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java
index 1eb4de5..8d2f72b 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
@@ -58,7 +57,7 @@ public class FieldAccessor
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return null;
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeMappingXmlSchemaType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeMappingXmlSchemaType.java
index 99b941d..3db4fca 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeMappingXmlSchemaType.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeMappingXmlSchemaType.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbClassMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbPackage;
@@ -54,8 +53,8 @@ public class GenericJavaAttributeMappingXmlSchemaType
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
String fqType = getFullyQualifiedType();
if (fqType != null && ! XmlSchemaTypeAnnotation.DEFAULT_TYPE.equals(fqType)) {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeXmlJavaTypeAdapter.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeXmlJavaTypeAdapter.java
index 6090425..f2a3fec 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeXmlJavaTypeAdapter.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeXmlJavaTypeAdapter.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
import org.eclipse.jpt.jaxb.core.context.XmlJavaTypeAdapter;
@@ -48,8 +47,8 @@ public class GenericJavaAttributeXmlJavaTypeAdapter
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (getType() == null || getFullyQualifiedType().equals(XmlJavaTypeAdapter.DEFAULT_TYPE)) {
messages.add(
DefaultValidationMessages.buildMessage(
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java
index b608e72..3df75bc 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java
@@ -15,7 +15,6 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
@@ -643,16 +642,16 @@ public class GenericJavaAttributesContainer
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
for (JaxbPersistentAttribute attribute : getAttributes()) {
- attribute.validate(messages, reporter, astRoot);
+ attribute.validate(messages, reporter);
}
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getJaxbClassMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getJaxbClassMapping().getValidationTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java
index 348a972..438f26d 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java
@@ -775,22 +775,22 @@ public class GenericJavaClassMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateConstructor(messages, reporter, astRoot);
- validatePropOrder(messages, reporter, astRoot);
- validateXmlAnyAttributeMapping(messages, astRoot);
- validateXmlAnyElementMapping(messages, astRoot);
- validateXmlValueMapping(messages, astRoot);
- validateXmlIDs(messages, astRoot);
+ validateConstructor(messages, reporter);
+ validatePropOrder(messages, reporter);
+ validateXmlAnyAttributeMapping(messages);
+ validateXmlAnyElementMapping(messages);
+ validateXmlValueMapping(messages);
+ validateXmlIDs(messages);
for (JaxbPersistentAttribute attribute : getAttributes()) {
- attribute.validate(messages, reporter, astRoot);
+ attribute.validate(messages, reporter);
}
}
- protected void validateConstructor(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateConstructor(List<IMessage> messages, IReporter reporter) {
// TODO - factory class/method
if (! JAXB.XML_TYPE__DEFAULT_FACTORY_CLASS.equals(getFactoryClass())) {
@@ -800,7 +800,7 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_TYPE__UNSPECIFIED_FACTORY_METHOD,
this,
- getFactoryClassTextRange(astRoot)));
+ getFactoryClassTextRange()));
}
}
else {
@@ -812,13 +812,13 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_TYPE__NO_PUBLIC_OR_PROTECTED_CONSTRUCTOR,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
- protected void validatePropOrder(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validatePropOrder(List<IMessage> messages, IReporter reporter) {
if (CollectionTools.isEmpty(getPropOrder())) {
return;
}
@@ -894,7 +894,7 @@ public class GenericJavaClassMapping
JaxbValidationMessages.XML_TYPE__MISSING_PROP,
new String[] { missingProp },
this,
- getPropOrderTextRange(astRoot)));
+ getPropOrderTextRange()));
}
for (int i : nonexistentProps) {
@@ -918,7 +918,7 @@ public class GenericJavaClassMapping
}
}
- protected void validateXmlAnyAttributeMapping(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateXmlAnyAttributeMapping(List<IMessage> messages) {
Set<JaxbPersistentAttribute> localAttributes = new HashSet<JaxbPersistentAttribute>();
Set<JaxbPersistentAttribute> allAttributes = new HashSet<JaxbPersistentAttribute>();
@@ -941,7 +941,7 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ANY_ATTRIBUTE__MULTIPLE_MAPPINGS_DEFINED,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
for (JaxbPersistentAttribute anyAttribute : localAttributes) {
messages.add(
@@ -949,12 +949,12 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ANY_ATTRIBUTE__MULTIPLE_MAPPINGS_DEFINED,
anyAttribute.getMapping(),
- anyAttribute.getMapping().getValidationTextRange(astRoot)));
+ anyAttribute.getMapping().getValidationTextRange()));
}
}
}
- protected void validateXmlAnyElementMapping(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateXmlAnyElementMapping(List<IMessage> messages) {
Set<JaxbPersistentAttribute> localAttributes = new HashSet<JaxbPersistentAttribute>();
Set<JaxbPersistentAttribute> allAttributes = new HashSet<JaxbPersistentAttribute>();
@@ -977,7 +977,7 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ANY_ELEMENT__MULTIPLE_MAPPINGS_DEFINED,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
for (JaxbPersistentAttribute anyAttribute : localAttributes) {
messages.add(
@@ -985,12 +985,12 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ANY_ELEMENT__MULTIPLE_MAPPINGS_DEFINED,
anyAttribute.getMapping(),
- anyAttribute.getMapping().getValidationTextRange(astRoot)));
+ anyAttribute.getMapping().getValidationTextRange()));
}
}
}
- protected void validateXmlValueMapping(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateXmlValueMapping(List<IMessage> messages) {
Set<JaxbPersistentAttribute> localAttributes = new HashSet<JaxbPersistentAttribute>();
Set<JaxbPersistentAttribute> allAttributes = new HashSet<JaxbPersistentAttribute>();
@@ -1013,7 +1013,7 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_VALUE__MULTIPLE_MAPPINGS_DEFINED,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
for (JaxbPersistentAttribute anyAttribute : localAttributes) {
messages.add(
@@ -1021,12 +1021,12 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_VALUE__MULTIPLE_MAPPINGS_DEFINED,
anyAttribute.getMapping(),
- anyAttribute.getMapping().getValidationTextRange(astRoot)));
+ anyAttribute.getMapping().getValidationTextRange()));
}
}
}
- protected void validateXmlIDs(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateXmlIDs(List<IMessage> messages) {
Set<JaxbPersistentAttribute> localAttributes = new HashSet<JaxbPersistentAttribute>();
Set<JaxbPersistentAttribute> allAttributes = new HashSet<JaxbPersistentAttribute>();
@@ -1054,7 +1054,7 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ID__MULTIPLE_MAPPINGS_DEFINED,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
for (JaxbPersistentAttribute anyAttribute : localAttributes) {
messages.add(
@@ -1062,24 +1062,24 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ID__MULTIPLE_MAPPINGS_DEFINED,
anyAttribute.getMapping(),
- anyAttribute.getMapping().getValidationTextRange(astRoot)));
+ anyAttribute.getMapping().getValidationTextRange()));
}
}
}
- protected TextRange getFactoryClassTextRange(CompilationUnit astRoot) {
+ protected TextRange getFactoryClassTextRange() {
TextRange result = getXmlTypeAnnotation().getFactoryClassTextRange();
- return (result != null) ? result : getValidationTextRange(astRoot);
+ return (result != null) ? result : getValidationTextRange();
}
- protected TextRange getFactoryMethodTextRange(CompilationUnit astRoot) {
+ protected TextRange getFactoryMethodTextRange() {
TextRange result = getXmlTypeAnnotation().getFactoryMethodTextRange();
- return (result != null) ? result : getValidationTextRange(astRoot);
+ return (result != null) ? result : getValidationTextRange();
}
- protected TextRange getPropOrderTextRange(CompilationUnit astRoot) {
+ protected TextRange getPropOrderTextRange() {
TextRange result = getXmlTypeAnnotation().getPropOrderTextRange();
- return (result != null) ? result : getValidationTextRange(astRoot);
+ return (result != null) ? result : getValidationTextRange();
}
protected TextRange getPropTextRange(int index) {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java
index 9ede19c..be563d0 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java
@@ -199,18 +199,18 @@ public class GenericJavaElementFactoryMethod
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getXmlElementDeclAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getXmlElementDeclAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.qName.validate(messages, reporter, astRoot);
- this.substitutionHeadQName.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.qName.validate(messages, reporter);
+ this.substitutionHeadQName.validate(messages, reporter);
JavaResourceMethod resourceMethod = getResourceMethod();
- validateMethodReturnType(resourceMethod, messages, astRoot);
+ validateMethodReturnType(resourceMethod, messages);
if (resourceMethod.getParametersSize() != 1) {
messages.add(
@@ -218,12 +218,12 @@ public class GenericJavaElementFactoryMethod
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT_DECL__INVALID_METHOD_SIGNATURE_PARAM,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
protected void validateMethodReturnType(
- JavaResourceMethod resourceMethod, List<IMessage> messages, CompilationUnit astRoot) {
+ JavaResourceMethod resourceMethod, List<IMessage> messages) {
if (! JAXB.JAXB_ELEMENT.equals(resourceMethod.getTypeBinding().getQualifiedName())) {
messages.add(
@@ -231,7 +231,7 @@ public class GenericJavaElementFactoryMethod
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT_DECL__INVALID_METHOD_SIGNATURE_RETURN_TYPE,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
@@ -294,7 +294,7 @@ public class GenericJavaElementFactoryMethod
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
if (! GenericJavaElementFactoryMethod.this.isGlobalScope()) {
String fqScope = GenericJavaElementFactoryMethod.this.getFullyQualifiedScope();
JaxbTypeMapping scopeTypeMapping =
@@ -306,7 +306,7 @@ public class GenericJavaElementFactoryMethod
}
if (xsdType.getElement(getNamespace(), getName(), true) == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
@@ -314,7 +314,7 @@ public class GenericJavaElementFactoryMethod
XsdSchema xsdSchema = this.getXsdSchema();
if (xsdSchema != null) {
if (xsdSchema.getElementDeclaration(getNamespace(), getName()) == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
@@ -388,7 +388,7 @@ public class GenericJavaElementFactoryMethod
}
@Override
- protected void validateName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateName(List<IMessage> messages, IReporter reporter) {
// need to ignore the unspecified (null) case
if ("".equals(getName())) {
messages.add(
@@ -397,7 +397,7 @@ public class GenericJavaElementFactoryMethod
JaxbValidationMessages.QNAME__MISSING_NAME,
new String[] { getReferencedComponentTypeDescription() },
this,
- getNameTextRange(astRoot)));
+ getNameTextRange()));
}
else if (! StringTools.stringIsEmpty(getName())) {
if (Tools.valuesAreEqual(getName(), GenericJavaElementFactoryMethod.this.getQName().getName())) {
@@ -406,17 +406,17 @@ public class GenericJavaElementFactoryMethod
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT_DECL__SUBST_HEAD_NAME_EQUALS_NAME,
this,
- getNameTextRange(astRoot)));
+ getNameTextRange()));
}
}
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
XsdSchema xsdSchema = this.getXsdSchema();
if (xsdSchema != null) {
if (xsdSchema.getElementDeclaration(getNamespace(), getName()) == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
@@ -432,7 +432,7 @@ public class GenericJavaElementFactoryMethod
JaxbValidationMessages.XML_ELEMENT_DECL__SUBST_HEAD_NO_MATCHING_ELEMENT_DECL,
new String[] { getNamespace(), getName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumConstant.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumConstant.java
index bbe30a8..f4bb276 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumConstant.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumConstant.java
@@ -131,8 +131,8 @@ public class GenericJavaEnumConstant
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
String value = getValue();
XsdTypeDefinition<?> xsdType = getEnumMapping().getXsdTypeDefinition();
@@ -148,17 +148,17 @@ public class GenericJavaEnumConstant
JaxbValidationMessages.XML_ENUM_VALUE__INVALID_LEXICAL_VALUE,
new String[] { value, xsdType.getName() },
this,
- getValueTextRange(astRoot)));
+ getValueTextRange()));
}
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getResourceEnumConstant().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getResourceEnumConstant().getTextRange();
}
- protected TextRange getValueTextRange(CompilationUnit astRoot) {
+ protected TextRange getValueTextRange() {
TextRange enumValueTextRange = getXmlEnumValueAnnotation().getValueTextRange();
- return enumValueTextRange != null ? enumValueTextRange : getValidationTextRange(astRoot);
+ return enumValueTextRange != null ? enumValueTextRange : getValidationTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumMapping.java
index 89e9640..630eeeb 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumMapping.java
@@ -217,14 +217,14 @@ public class GenericJavaEnumMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
validateXmlType(messages, reporter);
validateXmlEnum(messages, reporter);
for (JaxbEnumConstant constant : getEnumConstants()) {
- constant.validate(messages, reporter, astRoot);
+ constant.validate(messages, reporter);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaJaxbClass.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaJaxbClass.java
index 05a0a9d..8bbd63f 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaJaxbClass.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaJaxbClass.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.jaxb.core.context.JaxbClass;
import org.eclipse.jpt.jaxb.core.context.JaxbClassMapping;
@@ -131,11 +130,11 @@ public class GenericJavaJaxbClass
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlRegistry != null) {
- this.xmlRegistry.validate(messages, reporter, astRoot);
+ this.xmlRegistry.validate(messages, reporter);
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java
index 9ad05a6..531d02a 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java
@@ -297,11 +297,7 @@ public class GenericJavaPackageInfo
// ***** misc *****
-
- protected CompilationUnit buildASTRoot() {
- return this.resourcePackage.getJavaResourceCompilationUnit().buildASTRoot();
- }
-
+
public String getNamespaceForPrefix(String prefix) {
if (this.xmlSchema != null) {
for (XmlNs xmlns : this.xmlSchema.getXmlNsPrefixes()) {
@@ -355,10 +351,11 @@ public class GenericJavaPackageInfo
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return this.resourcePackage.getNameTextRange();
}
+ @Override
public void validate(List<IMessage> messages, IReporter reporter) {
if (reporter.isCancelled()) {
throw new ValidationCancelledException();
@@ -370,23 +367,16 @@ public class GenericJavaPackageInfo
if ((file != null)
&& file.getProject().equals(getJaxbProject().getProject())
&& (this.resourcePackage instanceof SourceNode)) {
- // build the AST root here to pass down
- this.validate(messages, reporter, this.buildASTRoot());
- }
- }
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
-
- this.xmlSchema.validate(messages, reporter, astRoot);
-
- for (XmlSchemaType schemaType : getXmlSchemaTypes()) {
- schemaType.validate(messages, reporter, astRoot);
- }
-
- for (XmlJavaTypeAdapter adapter : getXmlJavaTypeAdapters()) {
- adapter.validate(messages, reporter, astRoot);
+ this.xmlSchema.validate(messages, reporter);
+
+ for (XmlSchemaType schemaType : getXmlSchemaTypes()) {
+ schemaType.validate(messages, reporter);
+ }
+
+ for (XmlJavaTypeAdapter adapter : getXmlJavaTypeAdapters()) {
+ adapter.validate(messages, reporter);
+ }
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlJavaTypeAdapter.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlJavaTypeAdapter.java
index 5d0308e..bb5a567 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlJavaTypeAdapter.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlJavaTypeAdapter.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.JaxbPackageInfo;
import org.eclipse.jpt.jaxb.core.context.XmlJavaTypeAdapter;
import org.eclipse.jpt.jaxb.core.internal.validation.DefaultValidationMessages;
@@ -34,8 +33,8 @@ public class GenericJavaPackageXmlJavaTypeAdapter
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (getSpecifiedType() == null || getFullyQualifiedType().equals(XmlJavaTypeAdapter.DEFAULT_TYPE)) {
messages.add(
DefaultValidationMessages.buildMessage(
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlSchemaType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlSchemaType.java
index 0448011..2805645 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlSchemaType.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlSchemaType.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.JaxbPackage;
import org.eclipse.jpt.jaxb.core.context.JaxbPackageInfo;
import org.eclipse.jpt.jaxb.core.internal.validation.DefaultValidationMessages;
@@ -45,8 +44,8 @@ public class GenericJavaPackageXmlSchemaType
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
String fqType = getFullyQualifiedType();
if (fqType == null || XmlSchemaTypeAnnotation.DEFAULT_TYPE.equals(fqType)) {
@@ -55,7 +54,7 @@ public class GenericJavaPackageXmlSchemaType
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_SCHEMA_TYPE__TYPE_NOT_SPECIFIED_ON_PACKAGE,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPersistentAttribute.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPersistentAttribute.java
index 01edcb5..d98231e 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPersistentAttribute.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPersistentAttribute.java
@@ -410,13 +410,13 @@ public class GenericJavaPersistentAttribute
// **************** validation ********************************************
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getJavaResourceAttribute().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getJavaResourceAttribute().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
// validate that unsupported annotations are not present
JavaAttributeMappingDefinition currentMappingDefinition = getCurrentMappingDefinition();
@@ -431,11 +431,11 @@ public class GenericJavaPersistentAttribute
JaxbValidationMessages.ATTRIBUTE_MAPPING__UNSUPPORTED_ANNOTATION,
new String[] { annotation.getAnnotationName(), currentMappingDefinition.getAnnotationName() },
this,
- annotation.getTextRange(astRoot)));
+ annotation.getTextRange()));
}
}
- this.getMapping().validate(messages, reporter, astRoot);
+ this.getMapping().validate(messages, reporter);
}
protected JavaAttributeMappingDefinition getCurrentMappingDefinition() {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java
index a18a767..71023f3 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import org.eclipse.core.resources.IResource;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
@@ -125,7 +124,7 @@ public class GenericJavaXmlAdapter
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return getJavaResourceType().getNameTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyAttributeMapping.java
index 6b94b42..0057f24 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyAttributeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyAttributeMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -11,7 +11,6 @@ package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
import java.util.Map;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.MappingKeys;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
import org.eclipse.jpt.jaxb.core.context.XmlAnyAttributeMapping;
@@ -45,8 +44,8 @@ public class GenericJavaXmlAnyAttributeMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (! getPersistentAttribute().isJavaResourceAttributeTypeSubTypeOf(Map.class.getName())) {
messages.add(
@@ -54,7 +53,7 @@ public class GenericJavaXmlAnyAttributeMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ANY_ATTRIBUTE__NON_MAP_TYPE,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyElementMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyElementMapping.java
index a5d9f92..2adf2d4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyElementMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyElementMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -334,10 +334,10 @@ public class GenericJavaXmlAnyElementMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.xmlElementRefs.validate(messages, reporter, astRoot);
+ this.xmlElementRefs.validate(messages, reporter);
if (getJavaResourceAttribute().getAnnotation(JAXB.XML_ELEMENT_REFS) != null) {
XmlElementRefAnnotation xmlElementRefAnnotation =
@@ -349,16 +349,16 @@ public class GenericJavaXmlAnyElementMapping
JaxbValidationMessages.ATTRIBUTE_MAPPING__UNSUPPORTED_ANNOTATION,
new String[] { JAXB.XML_ELEMENT_REF, JAXB.XML_ELEMENT_REFS },
getPersistentAttribute(),
- xmlElementRefAnnotation.getTextRange(astRoot)));
+ xmlElementRefAnnotation.getTextRange()));
}
}
if (this.xmlElementWrapper != null) {
- this.xmlElementWrapper.validate(messages, reporter, astRoot);
+ this.xmlElementWrapper.validate(messages, reporter);
}
if (this.xmlMixed != null) {
- this.xmlMixed.validate(messages, reporter, astRoot);
+ this.xmlMixed.validate(messages, reporter);
}
}
@@ -470,7 +470,7 @@ public class GenericJavaXmlAnyElementMapping
XmlElementRefsAnnotation xmlElementRefsAnnotation = getXmlElementRefsAnnotation();
if (xmlElementRefsAnnotation == null) {
- throw new IllegalArgumentException(String.valueOf(targetIndex) + ", " + String.valueOf(sourceIndex));
+ throw new IllegalArgumentException(String.valueOf(targetIndex) + ", " + String.valueOf(sourceIndex)); //$NON-NLS-1$
}
xmlElementRefsAnnotation.moveXmlElementRef(targetIndex, sourceIndex);
}
@@ -479,18 +479,18 @@ public class GenericJavaXmlAnyElementMapping
return new GenericJavaXmlElementRef(parent, new XmlElementRefContext(annotation));
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
XmlElementRefsAnnotation xmlElementRefsAnnotation = getXmlElementRefsAnnotation();
if (xmlElementRefsAnnotation != null) {
- return xmlElementRefsAnnotation.getTextRange(astRoot);
+ return xmlElementRefsAnnotation.getTextRange();
}
XmlElementRefAnnotation xmlElementRefAnnotation = getXmlElementRefAnnotation();
if (xmlElementRefAnnotation != null) {
- return xmlElementRefAnnotation.getTextRange(astRoot);
+ return xmlElementRefAnnotation.getTextRange();
}
- return GenericJavaXmlAnyElementMapping.this.getValidationTextRange(astRoot);
+ return GenericJavaXmlAnyElementMapping.this.getValidationTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttachmentRef.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttachmentRef.java
index e7ca2fc..20148b4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttachmentRef.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttachmentRef.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
@@ -39,7 +38,7 @@ public class GenericJavaXmlAttachmentRef
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.resourceXmlAttachmentRef.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.resourceXmlAttachmentRef.getTextRange();
}
}
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 7d9428c..6ff2e16 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -180,18 +180,18 @@ public class GenericJavaXmlAttributeMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateQName(messages, reporter, astRoot);
- validateSchemaType(messages, reporter, astRoot);
+ validateQName(messages, reporter);
+ validateSchemaType(messages, reporter);
}
- protected void validateQName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.qName.validate(messages, reporter, astRoot);
+ protected void validateQName(List<IMessage> messages, IReporter reporter) {
+ this.qName.validate(messages, reporter);
}
- protected void validateSchemaType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateSchemaType(List<IMessage> messages, IReporter reporter) {
XsdFeature xsdFeature = getXsdFeature();
if (xsdFeature == null) {
return;
@@ -220,7 +220,7 @@ public class GenericJavaXmlAttributeMapping
JaxbValidationMessages.XML_ATTRIBUTE__INVALID_SCHEMA_TYPE,
new String[] { getValueTypeName(), xsdFeature.getName() },
this,
- this.qName.getNameTextRange(astRoot)));
+ this.qName.getNameTextRange()));
}
}
@@ -268,11 +268,11 @@ public class GenericJavaXmlAttributeMapping
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
XsdTypeDefinition type = getJaxbClassMapping().getXsdTypeDefinition();
if (type != null) {
if (type.getAttribute(getNamespace(), getName()) == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
@@ -307,18 +307,18 @@ public class GenericJavaXmlAttributeMapping
return GenericJavaXmlAttributeMapping.this.getPersistentAttribute().getJavaResourceAttributeBaseTypeName();
}
- public TextRange getTypeTextRange(CompilationUnit astRoot) {
+ public TextRange getTypeTextRange() {
// 1) if we're getting here, XmlIDREF will not be null
// 2) use the @XmlIDREF text range, since there is no specific place where the type is specified
- return GenericJavaXmlAttributeMapping.this.getXmlIDREF().getValidationTextRange(astRoot);
+ return GenericJavaXmlAttributeMapping.this.getXmlIDREF().getValidationTextRange();
}
public XsdFeature getXsdFeature() {
return GenericJavaXmlAttributeMapping.this.getXsdFeature();
}
- public TextRange getXsdFeatureTextRange(CompilationUnit astRoot) {
- return GenericJavaXmlAttributeMapping.this.getQName().getNameTextRange(astRoot);
+ public TextRange getXsdFeatureTextRange() {
+ return GenericJavaXmlAttributeMapping.this.getQName().getNameTextRange();
}
});
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java
index 7a7cc19..aefc1e4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java
@@ -342,29 +342,29 @@ public class GenericJavaXmlElement
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
XmlElementAnnotation annotation = getAnnotation(false);
- return (annotation == null) ? getParent().getValidationTextRange(astRoot) : annotation.getTextRange(astRoot);
+ return (annotation == null) ? getParent().getValidationTextRange() : annotation.getTextRange();
}
- public TextRange getTypeTextRange(CompilationUnit astRoot) {
+ public TextRange getTypeTextRange() {
XmlElementAnnotation annotation = getAnnotation(false);
- return (annotation == null) ? getParent().getValidationTextRange(astRoot) : annotation.getTypeTextRange();
+ return (annotation == null) ? getParent().getValidationTextRange() : annotation.getTypeTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- validateQName(messages, reporter, astRoot);
- validateType(messages, reporter, astRoot);
- validateSchemaType(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ validateQName(messages, reporter);
+ validateType(messages, reporter);
+ validateSchemaType(messages, reporter);
}
- protected void validateQName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.qName.validate(messages, reporter, astRoot);
+ protected void validateQName(List<IMessage> messages, IReporter reporter) {
+ this.qName.validate(messages, reporter);
}
- protected void validateType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateType(List<IMessage> messages, IReporter reporter) {
String fqType = getFullyQualifiedType();
if (StringTools.stringIsEmpty(fqType)) {
messages.add(
@@ -372,7 +372,7 @@ public class GenericJavaXmlElement
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT__UNSPECIFIED_TYPE,
this,
- getTypeTextRange(astRoot)));
+ getTypeTextRange()));
}
else if (! StringTools.stringIsEmpty(this.specifiedType)
// verify that type actually exists before validating
@@ -385,13 +385,13 @@ public class GenericJavaXmlElement
JaxbValidationMessages.XML_ELEMENT__ILLEGAL_TYPE,
new String[] { attributeBaseType },
this,
- getTypeTextRange(astRoot)));
+ getTypeTextRange()));
}
}
}
- protected void validateSchemaType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateSchemaType(List<IMessage> messages, IReporter reporter) {
XsdElementDeclaration xsdElement = getXsdElement();
if (xsdElement == null) {
return;
@@ -430,7 +430,7 @@ public class GenericJavaXmlElement
JaxbValidationMessages.XML_ELEMENT__INVALID_SCHEMA_TYPE,
new String[] { typeName, xsdElement.getName() },
this,
- this.qName.getNameTextRange(astRoot)));
+ this.qName.getNameTextRange()));
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementMapping.java
index 75aae25..95517d2 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -228,13 +228,13 @@ public class GenericJavaXmlElementMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.xmlElement.validate(messages, reporter, astRoot);
+ this.xmlElement.validate(messages, reporter);
if (this.xmlElementWrapper != null) {
- this.xmlElementWrapper.validate(messages, reporter, astRoot);
+ this.xmlElementWrapper.validate(messages, reporter);
}
}
@@ -295,20 +295,20 @@ public class GenericJavaXmlElementMapping
return GenericJavaXmlElementMapping.this.xmlElement.getType();
}
- public TextRange getTypeTextRange(CompilationUnit astRoot) {
+ public TextRange getTypeTextRange() {
// 1) if we're getting here, XmlIDREF will not be null
// 2) if there is an @XmlElement annotation, use that, otherwise use the @XmlIDREF
return (GenericJavaXmlElementMapping.this.getAnnotation() == null) ?
- GenericJavaXmlElementMapping.this.getXmlIDREF().getValidationTextRange(astRoot)
- : GenericJavaXmlElementMapping.this.xmlElement.getTypeTextRange(astRoot);
+ GenericJavaXmlElementMapping.this.getXmlIDREF().getValidationTextRange()
+ : GenericJavaXmlElementMapping.this.xmlElement.getTypeTextRange();
}
public XsdFeature getXsdFeature() {
return GenericJavaXmlElementMapping.this.getXsdFeature();
}
- public TextRange getXsdFeatureTextRange(CompilationUnit astRoot) {
- return GenericJavaXmlElementMapping.this.xmlElement.getQName().getNameTextRange(astRoot);
+ public TextRange getXsdFeatureTextRange() {
+ return GenericJavaXmlElementMapping.this.xmlElement.getQName().getNameTextRange();
}
});
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java
index 182936e..1e14a79 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java
@@ -229,8 +229,8 @@ public class GenericJavaXmlElementRef
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
public TextRange getTypeTextRange() {
@@ -238,9 +238,9 @@ public class GenericJavaXmlElementRef
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.qName.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.qName.validate(messages, reporter);
validateType(messages, reporter);
}
@@ -343,16 +343,16 @@ public class GenericJavaXmlElementRef
}
@Override
- protected void validateName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateName(List<IMessage> messages, IReporter reporter) {
// only validate if type is JAXBElement
if (isTypeJAXBElement()) {
- super.validateName(messages, reporter, astRoot);
+ super.validateName(messages, reporter);
}
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validateReference(messages, reporter, astRoot);
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
+ super.validateReference(messages, reporter);
// if type is JAXBElement, then name/namespace must also point at a valid XmlElementDecl
if (! isTypeJAXBElement()) {
@@ -367,7 +367,7 @@ public class GenericJavaXmlElementRef
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT_REF__NO_REGISTRY,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
return;
}
@@ -383,7 +383,7 @@ public class GenericJavaXmlElementRef
JaxbValidationMessages.XML_ELEMENT_REF__NO_MATCHING_ELEMENT_DECL,
new String[] { getNamespace(), getName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefMapping.java
index 9362158..6faac68 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
@@ -259,13 +259,13 @@ public class GenericJavaXmlElementRefMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.xmlElementRef.validate(messages, reporter, astRoot);
+ this.xmlElementRef.validate(messages, reporter);
if (this.xmlElementWrapper != null) {
- this.xmlElementWrapper.validate(messages, reporter, astRoot);
+ this.xmlElementWrapper.validate(messages, reporter);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefs.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefs.java
index c4168ea..9695ca3 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefs.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefs.java
@@ -131,22 +131,22 @@ public class GenericJavaXmlElementRefs
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.context.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.context.getValidationTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateDuplicateTypesAndQNames(messages, reporter, astRoot);
+ validateDuplicateTypesAndQNames(messages, reporter);
for (XmlElementRef elementRef : getXmlElementRefs()) {
- elementRef.validate(messages, reporter, astRoot);
+ elementRef.validate(messages, reporter);
}
}
- protected void validateDuplicateTypesAndQNames(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateDuplicateTypesAndQNames(List<IMessage> messages, IReporter reporter) {
Bag<String> xmlElementRefTypes = new HashBag<String>();
Bag<QName> xmlElementRefQnames = new HashBag<QName>();
@@ -185,7 +185,7 @@ public class GenericJavaXmlElementRefs
JaxbValidationMessages.XML_ELEMENT_REFS__DUPLICATE_XML_ELEMENT_QNAME,
new String[] { xmlElementName },
xmlElementRef,
- xmlElementRef.getQName().getNameTextRange(astRoot)));
+ xmlElementRef.getQName().getNameTextRange()));
}
}
}
@@ -244,6 +244,6 @@ public class GenericJavaXmlElementRefs
XmlElementRef buildXmlElementRef(JavaContextNode parent, XmlElementRefAnnotation annotation);
- TextRange getValidationTextRange(CompilationUnit astRoot);
+ TextRange getValidationTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefsMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefsMapping.java
index 48bbf20..782d553 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefsMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefsMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
@@ -267,17 +267,17 @@ public class GenericJavaXmlElementRefsMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.xmlElementRefs.validate(messages, reporter, astRoot);
+ this.xmlElementRefs.validate(messages, reporter);
if (this.xmlElementWrapper != null) {
- this.xmlElementWrapper.validate(messages, reporter, astRoot);
+ this.xmlElementWrapper.validate(messages, reporter);
}
if (this.xmlMixed != null) {
- this.xmlMixed.validate(messages, reporter, astRoot);
+ this.xmlMixed.validate(messages, reporter);
}
}
@@ -309,8 +309,8 @@ public class GenericJavaXmlElementRefsMapping
return new GenericJavaXmlElementRef(parent, new XmlElementRefContext(annotation));
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getXmlElementRefsAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getXmlElementRefsAnnotation().getTextRange();
}
}
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 23f7c5a..179cf08 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -200,8 +200,8 @@ public class GenericJavaXmlElementWrapper
//************* validation ****************
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (! getPersistentAttribute().isJavaResourceAttributeCollectionType()) {
messages.add(
@@ -209,19 +209,19 @@ public class GenericJavaXmlElementWrapper
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT_WRAPPER_DEFINED_ON_NON_ARRAY_NON_COLLECTION,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
- validateQName(messages, reporter, astRoot);
+ validateQName(messages, reporter);
}
- protected void validateQName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.qName.validate(messages, reporter, astRoot);
+ protected void validateQName(List<IMessage> messages, IReporter reporter) {
+ this.qName.validate(messages, reporter);
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
@@ -292,14 +292,14 @@ public class GenericJavaXmlElementWrapper
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
XsdTypeDefinition type = getJaxbClassMapping().getXsdTypeDefinition();
if (type == null) {
return;
}
if (type.getElement(getNamespace(), getName()) == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementsMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementsMapping.java
index 993b48d..bbcc19f 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementsMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementsMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
@@ -317,25 +317,25 @@ public class GenericJavaXmlElementsMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateDuplicateTypesAndQNames(messages, reporter, astRoot);
+ validateDuplicateTypesAndQNames(messages, reporter);
for (XmlElement xmlElement : getXmlElements()) {
- xmlElement.validate(messages, reporter, astRoot);
+ xmlElement.validate(messages, reporter);
}
if (this.xmlElementWrapper != null) {
- this.xmlElementWrapper.validate(messages, reporter, astRoot);
+ this.xmlElementWrapper.validate(messages, reporter);
}
if (this.xmlIDREF != null) {
- this.xmlIDREF.validate(messages, reporter, astRoot);
+ this.xmlIDREF.validate(messages, reporter);
}
}
- protected void validateDuplicateTypesAndQNames(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateDuplicateTypesAndQNames(List<IMessage> messages, IReporter reporter) {
Bag<String> xmlElementTypes = new HashBag<String>();
Bag<QName> xmlElementQNames = new HashBag<QName>();
@@ -351,13 +351,13 @@ public class GenericJavaXmlElementsMapping
}
for (XmlElement xmlElement : getXmlElements()) {
- validateDuplicateType(xmlElement, xmlElementTypes, messages, astRoot);
- validateDuplicateQName(xmlElement, xmlElementQNames, messages, astRoot);
+ validateDuplicateType(xmlElement, xmlElementTypes, messages);
+ validateDuplicateQName(xmlElement, xmlElementQNames, messages);
}
}
protected void validateDuplicateType(XmlElement xmlElement, Bag<String> xmlElementTypes,
- List<IMessage> messages, CompilationUnit astRoot) {
+ List<IMessage> messages) {
String xmlElementType = xmlElement.getFullyQualifiedType();
if (xmlElementTypes.count(xmlElementType) > 1) {
messages.add(
@@ -366,12 +366,12 @@ public class GenericJavaXmlElementsMapping
JaxbValidationMessages.XML_ELEMENTS__DUPLICATE_XML_ELEMENT_TYPE,
new String[] { xmlElementType },
xmlElement,
- xmlElement.getTypeTextRange(astRoot)));
+ xmlElement.getTypeTextRange()));
}
}
protected void validateDuplicateQName(XmlElement xmlElement, Bag<QName> xmlElementQNames,
- List<IMessage> messages, CompilationUnit astRoot) {
+ List<IMessage> messages) {
String xmlElementNamespace = xmlElement.getQName().getNamespace();
String xmlElementName = xmlElement.getQName().getName();
if (xmlElementQNames.count(new QName(xmlElementNamespace, xmlElementName)) > 1) {
@@ -381,7 +381,7 @@ public class GenericJavaXmlElementsMapping
JaxbValidationMessages.XML_ELEMENTS__DUPLICATE_XML_ELEMENT_QNAME,
new String[] { xmlElementName },
xmlElement,
- xmlElement.getQName().getNameTextRange(astRoot)));
+ xmlElement.getQName().getNameTextRange()));
}
}
@@ -479,16 +479,16 @@ public class GenericJavaXmlElementsMapping
return o.getFullyQualifiedType();
}
- public TextRange getTypeTextRange(CompilationUnit astRoot) {
- return o.getTypeTextRange(astRoot);
+ public TextRange getTypeTextRange() {
+ return o.getTypeTextRange();
}
public XsdFeature getXsdFeature() {
return o.getXsdElement();
}
- public TextRange getXsdFeatureTextRange(CompilationUnit astRoot) {
- return o.getQName().getNameTextRange(astRoot);
+ public TextRange getXsdFeatureTextRange() {
+ return o.getQName().getNameTextRange();
}
};
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlID.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlID.java
index c9b039a..486c052 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlID.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlID.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
import org.eclipse.jpt.jaxb.core.context.XmlID;
@@ -49,10 +48,10 @@ public class GenericJavaXmlID
//************* validation ****************
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateAttributeType(messages, astRoot);
+ validateAttributeType(messages);
XsdFeature xsdFeature = getMapping().getXsdFeature();
if (xsdFeature == null) {
@@ -67,23 +66,23 @@ public class GenericJavaXmlID
JaxbValidationMessages.XML_ID__SCHEMA_TYPE_NOT_ID,
new String [] { xsdFeature.getName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
- protected void validateAttributeType(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateAttributeType(List<IMessage> messages) {
if (! getPersistentAttribute().isJavaResourceAttributeTypeSubTypeOf(String.class.getName())) {
messages.add(
DefaultValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ID__ATTRIBUTE_TYPE_NOT_STRING,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.resourceXmlID.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.resourceXmlID.getTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlIDREF.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlIDREF.java
index 903a8ea..3ff756b 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlIDREF.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlIDREF.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
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.internal.CollectionTools;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
@@ -51,13 +50,13 @@ public class GenericJavaXmlIDREF
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.context.getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.context.getAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
for (ValidatableReference ref : this.context.getReferences()) {
String typeName = ref.getFullyQualifiedType();
@@ -73,7 +72,7 @@ public class GenericJavaXmlIDREF
JaxbValidationMessages.XML_ID_REF__TYPE_DOES_NOT_CONTAIN_XML_ID,
new String[] { typeName },
this,
- ref.getTypeTextRange(astRoot)));
+ ref.getTypeTextRange()));
}
}
@@ -89,7 +88,7 @@ public class GenericJavaXmlIDREF
JaxbValidationMessages.XML_ID_REF__SCHEMA_TYPE_NOT_IDREF,
new String [] { xsdFeature.getName() },
this,
- ref.getXsdFeatureTextRange(astRoot)));
+ ref.getXsdFeatureTextRange()));
}
}
}
@@ -109,10 +108,10 @@ public class GenericJavaXmlIDREF
String getFullyQualifiedType();
- TextRange getTypeTextRange(CompilationUnit astRoot);
+ TextRange getTypeTextRange();
XsdFeature getXsdFeature();
- TextRange getXsdFeatureTextRange(CompilationUnit astRoot);
+ TextRange getXsdFeatureTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlMixed.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlMixed.java
index 4898ebd..9713608 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlMixed.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlMixed.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
@@ -42,7 +41,7 @@ public class GenericJavaXmlMixed
//************* validation ****************
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.resourceXmlMixed.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.resourceXmlMixed.getTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlNs.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlNs.java
index 75234dc..9752b60 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlNs.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlNs.java
@@ -122,13 +122,13 @@ public class GenericJavaXmlNs
int pos, Filter<String> filter, CompilationUnit astRoot) {
if (getResourceXmlNs().namespaceURITouches(pos)) {
- return getNamespaceURICompletionProposals(pos, filter, astRoot);
+ return getNamespaceURICompletionProposals(pos, filter);
}
return EmptyIterable.instance();
}
protected Iterable<String> getNamespaceURICompletionProposals(
- int pos, Filter<String> filter, CompilationUnit astRoot) {
+ int pos, Filter<String> filter) {
String packageNamespace = getJaxbPackageInfo().getJaxbPackage().getNamespace();
Iterable<String> result = (StringTools.stringIsEmpty(packageNamespace)) ?
@@ -144,8 +144,8 @@ public class GenericJavaXmlNs
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getResourceXmlNs().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getResourceXmlNs().getTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java
index f4cea35..f2718fb 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java
@@ -157,14 +157,14 @@ public class GenericJavaXmlRegistry
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = getAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : getJaxbClass().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = getAnnotation().getTextRange();
+ return (textRange != null) ? textRange : getJaxbClass().getValidationTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
Iterable<XmlRegistry> registries = getContextRoot().getXmlRegistries(getJaxbPackage());
if (CollectionTools.size(registries) > 1) {
@@ -173,17 +173,17 @@ public class GenericJavaXmlRegistry
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_REGISTRY__MULTIPLE_XML_REGISTRIES_FOR_PACKAGE,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
- validateDuplicateQNames(messages, reporter, astRoot);
+ validateDuplicateQNames(messages, reporter);
for (JaxbElementFactoryMethod efm : getElementFactoryMethods()) {
- efm.validate(messages, reporter, astRoot);
+ efm.validate(messages, reporter);
}
}
- protected void validateDuplicateQNames(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateDuplicateQNames(List<IMessage> messages, IReporter reporter) {
Map<String, Bag<QName>> xmlElementDeclQnames = new HashMap<String, Bag<QName>>();
@@ -203,7 +203,7 @@ public class GenericJavaXmlRegistry
String xmlElementNamespace = xmlElementDecl.getQName().getNamespace();
String xmlElementName = xmlElementDecl.getQName().getName();
if (xmlElementDeclQnames.get(fqScope).count(new QName(xmlElementNamespace, xmlElementName)) > 1) {
- String scopeDesc = "";
+ String scopeDesc = ""; //$NON-NLS-1$
if (! JaxbElementFactoryMethod.DEFAULT_SCOPE_CLASS_NAME.equals(fqScope)) {
scopeDesc = NLS.bind(JptJaxbCoreMessages.XML_ELEMENT_DECL__SCOPE, fqScope);
}
@@ -213,7 +213,7 @@ public class GenericJavaXmlRegistry
JaxbValidationMessages.XML_REGISTRY__DUPLICATE_XML_ELEMENT_QNAME,
new String[] { xmlElementName, scopeDesc },
xmlElementDecl,
- xmlElementDecl.getQName().getNameTextRange(astRoot)));
+ xmlElementDecl.getQName().getNameTextRange()));
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRootElement.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRootElement.java
index 5147639..3ab4c4d 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRootElement.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRootElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -109,15 +109,15 @@ public class GenericJavaXmlRootElement
// **************** validation ********************************************
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.annotation.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.annotation.getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.qName.validate(messages, reporter, astRoot);
+ this.qName.validate(messages, reporter);
}
@@ -178,7 +178,7 @@ public class GenericJavaXmlRootElement
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
String name = getName();
String namespace = getNamespace();
XsdSchema schema = this.getXsdSchema();
@@ -187,7 +187,7 @@ public class GenericJavaXmlRootElement
// element must resolve
XsdElementDeclaration schemaElement = schema.getElementDeclaration(namespace, name);
if (schemaElement == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
else {
// element type must agree with parent's schema type
@@ -200,7 +200,7 @@ public class GenericJavaXmlRootElement
JaxbValidationMessages.XML_ROOT_ELEMENT_TYPE_CONFLICTS_WITH_XML_TYPE,
new String[] {name, namespace},
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java
index 8929410..d4aca90 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java
@@ -292,15 +292,15 @@ public class GenericJavaXmlSchema
// **************** validation ********************************************
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getXmlSchemaAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getXmlSchemaAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
// removing this validation message for now: see jaxb bug 823 (http://java.net/jira/browse/JAXB-823)
// XsdSchema schema = getJaxbPackage().getXsdSchema();
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchemaType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchemaType.java
index 4c76e02..562cdc8 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchemaType.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchemaType.java
@@ -145,15 +145,15 @@ public abstract class GenericJavaXmlSchemaType
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.annotation.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.annotation.getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.qName.validate(messages, reporter, astRoot);
+ this.qName.validate(messages, reporter);
XsdTypeDefinition xsdType = getXsdTypeDefinition();
if (xsdType != null && xsdType.getKind() != XsdTypeDefinition.Kind.SIMPLE) {
@@ -163,7 +163,7 @@ public abstract class GenericJavaXmlSchemaType
JaxbValidationMessages.XML_SCHEMA_TYPE__NON_SIMPLE_TYPE,
new String[] { qName.getName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
@@ -219,7 +219,7 @@ public abstract class GenericJavaXmlSchemaType
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
String name = getName();
String namespace = getNamespace();
@@ -229,7 +229,7 @@ public abstract class GenericJavaXmlSchemaType
if (schema != null) {
XsdTypeDefinition schemaType = schema.getTypeDefinition(namespace, name);
if (schemaType == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSeeAlso.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSeeAlso.java
index d4216aa..8ffb4ef 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSeeAlso.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSeeAlso.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jaxb.core.context.JaxbTypeMapping;
@@ -66,8 +65,8 @@ public class GenericJavaXmlSeeAlso
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.annotation.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.annotation.getTextRange();
}
protected ListContainer<String, String> buildValueContainer() {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlValueMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlValueMapping.java
index be352f4..f8ab01a 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlValueMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlValueMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.MappingKeys;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
import org.eclipse.jpt.jaxb.core.context.XmlValueMapping;
@@ -52,13 +51,13 @@ public class GenericJavaXmlValueMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateSchemaType(messages, reporter, astRoot);
+ validateSchemaType(messages, reporter);
}
- protected void validateSchemaType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateSchemaType(List<IMessage> messages, IReporter reporter) {
XsdTypeDefinition xsdClassType = getClassMapping().getXsdTypeDefinition();
if (xsdClassType == null) {
@@ -71,7 +70,7 @@ public class GenericJavaXmlValueMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_VALUE__NO_TEXT_CONTENT,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
return;
}
@@ -89,7 +88,7 @@ public class GenericJavaXmlValueMapping
JaxbValidationMessages.XML_VALUE__INVALID_SCHEMA_TYPE,
new String[] { getValueTypeName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java
index bbbc39d..3695c36 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
@@ -109,8 +108,7 @@ public class PropertyAccessor
//if (getterIsAnnotated() && setterIsAnnotated()) error to user
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- // TODO Auto-generated method stub
+ public TextRange getValidationTextRange() {
return null;
}
} \ No newline at end of file
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlNsAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlNsAnnotation.java
index 6b4814c..2aeb598 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlNsAnnotation.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlNsAnnotation.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
@@ -129,14 +128,6 @@ public class SourceXmlNsAnnotation
public boolean namespaceURITouches(int pos) {
return this.textRangeTouches(this.namespaceURITextRange, pos);
}
-
- public TextRange getNamespaceURITextRange(CompilationUnit astRoot) {
- return getElementTextRange(this.namespaceURIDeclarationAdapter, astRoot);
- }
-
- public boolean namespaceURITouches(int pos, CompilationUnit astRoot) {
- return elementTouches(this.namespaceURIDeclarationAdapter, pos, astRoot);
- }
// ***** prefix *****
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlTypeAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlTypeAnnotation.java
index 9f3bf2a..0b90fc3 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlTypeAnnotation.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlTypeAnnotation.java
@@ -12,7 +12,6 @@ package org.eclipse.jpt.jaxb.core.internal.resource.java.source;
import java.util.Arrays;
import java.util.Vector;
import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
@@ -117,7 +116,7 @@ public final class SourceXmlTypeAnnotation
this.namespaceTextRange = this.buildNamespaceTextRange(astAnnotation);
this.initializePropOrder(astAnnotation);
this.propOrderTextRange = this.buildPropOrderTextRange(astAnnotation);
- this.syncPropTextRanges((CompilationUnit) astAnnotation.getRoot());
+ this.syncPropTextRanges(astAnnotation);
}
@Override
@@ -134,7 +133,7 @@ public final class SourceXmlTypeAnnotation
this.namespaceTextRange = this.buildNamespaceTextRange(astAnnotation);
this.syncPropOrder(astAnnotation);
this.propOrderTextRange = this.buildPropOrderTextRange(astAnnotation);
- this.syncPropTextRanges((CompilationUnit) astAnnotation.getRoot());
+ this.syncPropTextRanges(astAnnotation);
}
@Override
@@ -354,11 +353,11 @@ public final class SourceXmlTypeAnnotation
return this.textRangeTouches(this.propOrderTextRange, pos);
}
- //TODO I think we should be able to do this from the Annotation instead of the CompilationUnit
- private void syncPropTextRanges(CompilationUnit astRoot) {
+ private void syncPropTextRanges(Annotation astAnnotation) {
this.propTextRanges.clear();
for (int i = 0; i < this.propOrder.size(); i++) {
- this.propTextRanges.add(i, getElementTextRange(this.selectAnnotationElementTextRange(this.propOrderDeclarationAdapter, i, astRoot), astRoot));
+ TextRange propTextRange = this.getElementTextRange(this.propOrderDeclarationAdapter, i, astAnnotation);
+ this.propTextRanges.add(i, propTextRange);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaClassMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaClassMapping.java
index 1065f4f..4272526 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaClassMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaClassMapping.java
@@ -1,3 +1,12 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
import java.util.List;
@@ -250,15 +259,15 @@ public class ELJavaClassMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlDiscriminatorNode != null) {
- this.xmlDiscriminatorNode.validate(messages, reporter, astRoot);
+ this.xmlDiscriminatorNode.validate(messages, reporter);
}
if (this.xmlDiscriminatorValue != null) {
- this.xmlDiscriminatorValue.validate(messages, reporter, astRoot);
+ this.xmlDiscriminatorValue.validate(messages, reporter);
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java
index 54718ba..2119522 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
import org.eclipse.jpt.jaxb.core.context.XmlRegistry;
import org.eclipse.jpt.jaxb.core.internal.context.java.GenericJavaElementFactoryMethod;
@@ -30,7 +29,7 @@ public class ELJavaElementFactoryMethod
@Override
protected void validateMethodReturnType(
- JavaResourceMethod resourceMethod, List<IMessage> messages, CompilationUnit astRoot) {
+ JavaResourceMethod resourceMethod, List<IMessage> messages) {
if (! resourceMethod.getTypeBinding().isSubTypeOf(JAXB.JAXB_ELEMENT)) {
messages.add(
@@ -38,7 +37,7 @@ public class ELJavaElementFactoryMethod
IMessage.HIGH_SEVERITY,
ELJaxbValidationMessages.XML_ELEMENT_DECL__INVALID_METHOD_SIGNATURE_RETURN_TYPE,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyAttributeMapping.java
index dc5fc5d..b5e80cd 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyAttributeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyAttributeMapping.java
@@ -134,16 +134,16 @@ public class ELJavaXmlAnyAttributeMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlPath != null) {
- validateXmlPath(messages, reporter, astRoot);
+ validateXmlPath(messages, reporter);
}
}
- protected void validateXmlPath(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.xmlPath.validate(messages, reporter, astRoot);
+ protected void validateXmlPath(List<IMessage> messages, IReporter reporter) {
+ this.xmlPath.validate(messages, reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyElementMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyElementMapping.java
index ee8b129..bc9621b 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyElementMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyElementMapping.java
@@ -154,16 +154,16 @@ public class ELJavaXmlAnyElementMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlPath != null) {
- validateXmlPath(messages, reporter, astRoot);
+ validateXmlPath(messages, reporter);
}
}
- protected void validateXmlPath(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.xmlPath.validate(messages, reporter, astRoot);
+ protected void validateXmlPath(List<IMessage> messages, IReporter reporter) {
+ this.xmlPath.validate(messages, reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAttributeMapping.java
index 4418444..3f81228 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAttributeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAttributeMapping.java
@@ -235,17 +235,17 @@ public class ELJavaXmlAttributeMapping
// ***** validation *****
@Override
- protected void validateQName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateQName(List<IMessage> messages, IReporter reporter) {
if (this.xmlPath == null) {
- super.validateQName(messages, reporter, astRoot);
+ super.validateQName(messages, reporter);
}
else {
- validateXmlPath(messages, reporter, astRoot);
+ validateXmlPath(messages, reporter);
}
}
- protected void validateXmlPath(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.xmlPath.validate(messages, reporter, astRoot);
+ protected void validateXmlPath(List<IMessage> messages, IReporter reporter) {
+ this.xmlPath.validate(messages, reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlCDATA.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlCDATA.java
index f9679d3..956f5fc 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlCDATA.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlCDATA.java
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
import org.eclipse.jpt.jaxb.core.internal.context.java.AbstractJavaContextNode;
@@ -31,8 +30,8 @@ public class ELJavaXmlCDATA
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.context.getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.context.getAnnotation().getTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorNode.java
index daa689a..c984731 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorNode.java
@@ -109,13 +109,13 @@ public class ELJavaXmlDiscriminatorNode
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (StringTools.stringIsEmpty(this.value)) {
messages.add(
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorValue.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorValue.java
index 2ae45cd..6e2a6ad 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorValue.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorValue.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
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.internal.StringTools;
import org.eclipse.jpt.jaxb.core.internal.context.java.AbstractJavaContextNode;
@@ -82,13 +81,13 @@ public class ELJavaXmlDiscriminatorValue
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (StringTools.stringIsEmpty(this.value)) {
messages.add(
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElement.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElement.java
index 5414299..d49e517 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElement.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElement.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
import org.eclipse.jpt.jaxb.core.internal.context.java.GenericJavaXmlElement;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -31,9 +30,9 @@ public class ELJavaXmlElement
}
@Override
- protected void validateQName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateQName(List<IMessage> messages, IReporter reporter) {
if (! getContext().hasXmlPath()) {
- super.validateQName(messages, reporter, astRoot);
+ super.validateQName(messages, reporter);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementMapping.java
index 3567470..3519eec 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementMapping.java
@@ -310,16 +310,16 @@ public class ELJavaXmlElementMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlPath != null) {
- validateXmlPath(messages, reporter, astRoot);
+ validateXmlPath(messages, reporter);
}
}
- protected void validateXmlPath(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.xmlPath.validate(messages, reporter, astRoot);
+ protected void validateXmlPath(List<IMessage> messages, IReporter reporter) {
+ this.xmlPath.validate(messages, reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementWrapper.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementWrapper.java
index d92928a..d2ca1ea 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementWrapper.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementWrapper.java
@@ -1,7 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ *******************************************************************************/
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
import org.eclipse.jpt.jaxb.core.internal.context.java.GenericJavaXmlElementWrapper;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -21,9 +29,9 @@ public class ELJavaXmlElementWrapper
}
@Override
- protected void validateQName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateQName(List<IMessage> messages, IReporter reporter) {
if (! getContext().hasXmlPath()) {
- super.validateQName(messages, reporter, astRoot);
+ super.validateQName(messages, reporter);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementsMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementsMapping.java
index 9f80892..a252c8f 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementsMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementsMapping.java
@@ -145,15 +145,15 @@ public class ELJavaXmlElementsMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (getXmlPathsSize() > 0 ) {
- validateXmlPaths(messages, reporter, astRoot);
+ validateXmlPaths(messages, reporter);
}
}
- protected void validateXmlPaths(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateXmlPaths(List<IMessage> messages, IReporter reporter) {
Iterator<XmlElement> xmlElements = getXmlElements().iterator();
Iterator<ELJavaXmlPath> xmlPaths = this.xmlPathContainer.getContextElements().iterator();
@@ -168,7 +168,7 @@ public class ELJavaXmlElementsMapping
IMessage.HIGH_SEVERITY,
ELJaxbValidationMessages.XML_PATH__INSUFFICIENT_XML_PATHS_FOR_XML_ELEMENTS,
this,
- getXmlPathsTextRange(astRoot)));
+ getXmlPathsTextRange()));
}
while (xmlPaths.hasNext()) {
@@ -178,29 +178,29 @@ public class ELJavaXmlElementsMapping
IMessage.HIGH_SEVERITY,
ELJaxbValidationMessages.XML_PATH__INSUFFICIENT_XML_ELEMENTS_FOR_XML_PATHS,
this,
- xmlPath.getValidationTextRange(astRoot)));
+ xmlPath.getValidationTextRange()));
}
for (ELJavaXmlPath xmlPath : this.xmlPathContainer.getContextElements()) {
- xmlPath.validate(messages, reporter, astRoot);
+ xmlPath.validate(messages, reporter);
}
}
@Override
protected void validateDuplicateQName(XmlElement xmlElement, Bag<QName> xmlElementQNames,
- List<IMessage> messages, CompilationUnit astRoot) {
+ List<IMessage> messages) {
if (getXmlPathsSize() == 0) {
- super.validateDuplicateQName(xmlElement, xmlElementQNames, messages, astRoot);
+ super.validateDuplicateQName(xmlElement, xmlElementQNames, messages);
}
}
- protected TextRange getXmlPathsTextRange(CompilationUnit astRoot) {
+ protected TextRange getXmlPathsTextRange() {
Annotation annotation = getJavaResourceAttribute().getAnnotation(ELJaxb.XML_PATHS);
if (annotation == null) {
annotation = getJavaResourceAttribute().getAnnotation(0, ELJaxb.XML_PATH);
}
- return annotation.getTextRange(astRoot);
+ return annotation.getTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlID.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlID.java
index 7a15891..91da7e0 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlID.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlID.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.XmlNamedNodeMapping;
import org.eclipse.jpt.jaxb.core.internal.context.java.GenericJavaXmlID;
import org.eclipse.jpt.jaxb.core.resource.java.XmlIDAnnotation;
@@ -26,7 +25,7 @@ public class ELJavaXmlID
@Override
- protected void validateAttributeType(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateAttributeType(List<IMessage> messages) {
// no op - MOXy does not require String attribute types
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlInverseReferenceMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlInverseReferenceMapping.java
index 3e9aa0c..c53dd03 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlInverseReferenceMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlInverseReferenceMapping.java
@@ -161,20 +161,20 @@ public class ELJavaXmlInverseReferenceMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateMappedBy(messages, reporter, astRoot);
+ validateMappedBy(messages, reporter);
}
- protected void validateMappedBy(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateMappedBy(List<IMessage> messages, IReporter reporter) {
if (StringTools.stringIsEmpty(mappedBy)) {
messages.add(
ELJaxbValidationMessageBuilder.buildMessage(
IMessage.HIGH_SEVERITY,
ELJaxbValidationMessages.XML_INVERSE_REFERENCE__MAPPED_BY_NOT_SPECIFIED,
this,
- getMappedByTextRange(astRoot)));
+ getMappedByTextRange()));
return;
}
@@ -192,7 +192,7 @@ public class ELJavaXmlInverseReferenceMapping
ELJaxbValidationMessages.XML_INVERSE_REFERENCE__MAPPED_BY_NOT_RESOLVED,
new String[] { mappedBy, referencedClassMapping.getJaxbType().getFullyQualifiedName() },
this,
- getMappedByTextRange(astRoot)));
+ getMappedByTextRange()));
}
else if (
! ArrayTools.contains(
@@ -204,7 +204,7 @@ public class ELJavaXmlInverseReferenceMapping
ELJaxbValidationMessages.XML_INVERSE_REFERENCE__MAPPED_BY_ILLEGAL_MAPPING_TYPE,
new String[] { mappedBy, referencedClassMapping.getJaxbType().getFullyQualifiedName() },
this,
- getMappedByTextRange(astRoot)));
+ getMappedByTextRange()));
}
}
@@ -219,8 +219,8 @@ public class ELJavaXmlInverseReferenceMapping
MappingKeys.XML_VALUE_ATTRIBUTE_MAPPING_KEY
};
- protected TextRange getMappedByTextRange(CompilationUnit astRoot) {
+ protected TextRange getMappedByTextRange() {
TextRange textRange = getXmlInverseReferenceAnnotation().getMappedByTextRange();
- return (textRange != null) ? textRange : getValidationTextRange(astRoot);
+ return (textRange != null) ? textRange : getValidationTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNode.java
index ef8a40b..63ae1c3 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNode.java
@@ -170,13 +170,13 @@ public class ELJavaXmlJoinNode
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
validateXmlPath(messages);
validateReferencedXmlPath(messages);
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNodesMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNodesMapping.java
index 898567e..31edb88 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNodesMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNodesMapping.java
@@ -175,8 +175,8 @@ public class ELJavaXmlJoinNodesMapping
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
JaxbClassMapping referencedClass = getReferencedClassMapping();
@@ -187,13 +187,13 @@ public class ELJavaXmlJoinNodesMapping
ELJaxbValidationMessages.XML_JOIN_NODES__INVALID_REFERENCED_CLASS,
new String[] { getValueTypeName() },
ELJavaXmlJoinNodesMapping.this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
validateDuplicateXmlPaths(messages, reporter);
for (ELJavaXmlJoinNode xmlJoinNode : this.xmlJoinNodeContainer.getContextElements()) {
- xmlJoinNode.validate(messages, reporter, astRoot);
+ xmlJoinNode.validate(messages, reporter);
}
}
@@ -247,12 +247,12 @@ public class ELJavaXmlJoinNodesMapping
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
Annotation annotation = getAnnotation();
if (annotation == null) {
annotation = getJavaResourceAttribute().getAnnotation(0, ELJaxb.XML_JOIN_NODE);
}
- return annotation.getTextRange(astRoot);
+ return annotation.getTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlKey.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlKey.java
index 4f0122a..3c644f2 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlKey.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlKey.java
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
import org.eclipse.jpt.jaxb.core.internal.context.java.AbstractJavaContextNode;
@@ -31,8 +30,8 @@ public class ELJavaXmlKey
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.context.getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.context.getAnnotation().getTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlPath.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlPath.java
index d73eefe..6e9339b 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlPath.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlPath.java
@@ -119,13 +119,13 @@ public class ELJavaXmlPath
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (StringTools.stringIsEmpty(this.value)) {
messages.add(
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/binary/BinaryXmlDiscriminatorValueAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/binary/BinaryXmlDiscriminatorValueAnnotation.java
index 44573ef..c728adf 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/binary/BinaryXmlDiscriminatorValueAnnotation.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/binary/BinaryXmlDiscriminatorValueAnnotation.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.internal.resource.java.binary;
import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -71,7 +70,7 @@ public class BinaryXmlDiscriminatorValueAnnotation
throw new UnsupportedOperationException();
}
- public boolean valueTouches(int pos, CompilationUnit astRoot) {
+ public boolean valueTouches(int pos) {
throw new UnsupportedOperationException();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlDiscriminatorNodeAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlDiscriminatorNodeAnnotation.java
index f1957a6..6ceb40d 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlDiscriminatorNodeAnnotation.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlDiscriminatorNodeAnnotation.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java
index 7d85127..ed877ce 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java
@@ -19,8 +19,10 @@ import org.eclipse.jpt.common.core.resource.xml.JptXmlResource;
import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
import org.eclipse.jpt.jpa.core.context.MappingFile;
import org.eclipse.jpt.jpa.core.context.PersistentType;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
import org.eclipse.jpt.jpa.core.context.Table;
@@ -64,8 +66,6 @@ import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaQuery;
import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaQueryHint;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
import org.eclipse.jpt.jpa.core.context.java.JavaTable;
@@ -136,7 +136,7 @@ import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
*
* @see org.eclipse.jpt.jpa.core.internal.jpa1.GenericJpaFactory
*
- * @version 3.1
+ * @version 3.3
* @since 2.0
*/
public interface JpaFactory
@@ -229,11 +229,11 @@ public interface JpaFactory
JavaVirtualColumn buildJavaVirtualColumn(JavaJpaContextNode parent, JavaVirtualColumn.Owner owner);
- JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, JavaDiscriminatorColumn.Owner owner);
+ JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, ReadOnlyNamedDiscriminatorColumn.Owner owner);
- JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation joinColumnAnnotation);
+ JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, ReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation joinColumnAnnotation);
- JavaVirtualJoinColumn buildJavaVirtualJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn);
+ JavaVirtualJoinColumn buildJavaVirtualJoinColumn(JavaJpaContextNode parent, ReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn);
JavaSecondaryTable buildJavaSecondaryTable(JavaEntity parent, Table.Owner owner, SecondaryTableAnnotation tableAnnotation);
@@ -243,7 +243,7 @@ public interface JpaFactory
JavaGeneratedValue buildJavaGeneratedValue(JavaIdMapping parent, GeneratedValueAnnotation generatedValueAnnotation);
- JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, JavaReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation);
+ JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation);
JavaAttributeOverrideContainer buildJavaAttributeOverrideContainer(JavaJpaContextNode parent, JavaAttributeOverrideContainer.Owner owner);
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java
index deb2a9c..734307d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.context;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
/**
* JPA attribute mapping converter.
@@ -21,7 +20,7 @@ import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 2.1
*/
public interface Converter
@@ -46,7 +45,7 @@ public interface Converter
/**
*
*/
- JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver);
+ JptValidator buildValidator(Converter converter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java
index 934a08f..025f79a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,6 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
+
/**
* JPA generated value
* <p>
@@ -18,7 +20,7 @@ package org.eclipse.jpt.jpa.core.context;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.1
+ * @version 3.3
* @since 2.0
*/
public interface GeneratedValue
@@ -38,4 +40,9 @@ public interface GeneratedValue
String SPECIFIED_GENERATOR_PROPERTY = "specifiedGenerator"; //$NON-NLS-1$
String getDefaultGenerator();
String DEFAULT_GENERATOR_PROPERTY = "defaultGenerator"; //$NON-NLS-1$
+
+ /**
+ * Return the (best guess) text location of the generator.
+ */
+ TextRange getGeneratorTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java
index bb4bd3b..ec3ab91 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
@@ -36,6 +37,11 @@ public interface Generator
{
/**
+ * Return the (best guess) text location of the name.
+ */
+ TextRange getNameTextRange();
+
+ /**
* Return the generator's type.
*/
Class<? extends Generator> getType();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java
index 9e1e97a..8fbdc50 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java
@@ -9,12 +9,17 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import java.util.List;
+
import org.eclipse.jpt.common.core.JptResourceTypeReference;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.JpaNode;
import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
import org.eclipse.jpt.jpa.db.Catalog;
import org.eclipse.jpt.jpa.db.Schema;
import org.eclipse.jpt.jpa.db.SchemaContainer;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
* Common protocol for JPA objects that have a context, as opposed to
@@ -26,7 +31,7 @@ import org.eclipse.jpt.jpa.db.SchemaContainer;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.0
*/
public interface JpaContextNode
@@ -54,6 +59,16 @@ public interface JpaContextNode
Schema getContextDefaultDbSchema();
+ // ********** validation **********
+
+ TextRange getValidationTextRange();
+
+ /**
+ * Add to the list of current validation messages
+ */
+ void validate(List<IMessage> messages, IReporter reporter);
+
+
// ********** synchronize/update **********
/**
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java
index 878eb81..6fa0853 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java
@@ -9,10 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
-import java.util.List;
import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
* Root of the Dali JPA context model.
@@ -23,7 +20,7 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.2
+ * @version 3.3
* @since 2.0
*/
public interface JpaRootContextNode
@@ -44,11 +41,4 @@ public interface JpaRootContextNode
*/
PersistenceXml getPersistenceXml();
-
- // ********** validation **********
-
- /**
- * Add validation messages to the specified list.
- */
- public void validate(List<IMessage> messages, IReporter reporter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java
index 6823b93..450f269 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,10 +9,9 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
import org.eclipse.jpt.jpa.db.Table;
/**
@@ -24,7 +23,7 @@ import org.eclipse.jpt.jpa.db.Table;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.0
+ * @version 3.3
* @since 2.3
*/
public interface OverrideContainer
@@ -82,9 +81,9 @@ public interface OverrideContainer
*/
String getDefaultTableName();
- JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideTextRangeResolver textRangeResolver);
+ JptValidator buildOverrideValidator(ReadOnlyOverride override);
- JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver);
+ JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner);
// ********** overrides **********
@@ -210,8 +209,10 @@ public interface OverrideContainer
*/
Iterable<String> getCandidateTableNames();
- JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver);
+ TextRange getValidationTextRange();
- JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver);
+ JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container);
+
+ JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java
index 57a9550..9ec381e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
@@ -27,7 +28,7 @@ import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.2
+ * @version 3.3
* @since 2.0
*/
public interface Query
@@ -93,4 +94,9 @@ public interface Query
void moveHint(int targetIndex, int sourceIndex);
QueryHint getHint(int i);
+
+
+ TextRange getNameTextRange();
+
+ TextRange getQueryTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java
index 6205b74..0a87c1f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.db.Table;
/**
@@ -37,6 +38,12 @@ public interface ReadOnlyBaseJoinColumn
String SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY = "specifiedReferencedColumnName"; //$NON-NLS-1$
String getDefaultReferencedColumnName();
String DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY = "defaultReferencedColumnName"; //$NON-NLS-1$
+
+ /**
+ * Return the (best guess) text location of the join column's
+ * referenced column name.
+ */
+ TextRange getReferencedColumnNameTextRange();
// ********** misc **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java
index 3a35c3a..4e3dc9f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
/**
@@ -46,7 +45,7 @@ public interface ReadOnlyJoinTableRelationshipStrategy
boolean validatesAgainstDatabase();
- JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner);
- JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java
index 936e49c..4cdd707 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java
@@ -9,8 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.db.Table;
/**
@@ -43,6 +43,10 @@ public interface ReadOnlyNamedColumn
String getDefaultName();
String DEFAULT_NAME_PROPERTY = "defaultName"; //$NON-NLS-1$
+ /**
+ * Return the (best guess) text location of the column's name.
+ */
+ TextRange getNameTextRange();
// ********** table **********
@@ -103,7 +107,13 @@ public interface ReadOnlyNamedColumn
* Return the database table for the specified table name.
*/
Table resolveDbTable(String tableName);
-
- JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver);
+
+ JptValidator buildColumnValidator(ReadOnlyNamedColumn column);
+
+ /**
+ * Return the column owner's text range. This can be returned by the
+ * column when its annotation is not present.
+ */
+ TextRange getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java
index 4e027a8..a12bfaf 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.db.Table;
@@ -68,5 +68,10 @@ public interface ReadOnlyOverride
*/
String getDefaultTableName();
- JptValidator buildColumnValidator(ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver);
+ /**
+ * Return the (best guess) text location of the override's name.
+ */
+ TextRange getNameTextRange();
+
+ JptValidator buildColumnValidator(ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java
index 079b3a2..9178b88 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.db.Table;
@@ -53,7 +52,7 @@ public interface ReadOnlyOverrideRelationship
String getDefaultTableName();
- JptValidator buildColumnValidator(ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver);
+ JptValidator buildColumnValidator(ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner);
void initializeOnSpecified(OverrideRelationship specifiedRelationship);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java
index 43a7939..6cfad5b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,9 +9,9 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.db.Catalog;
import org.eclipse.jpt.jpa.db.Schema;
import org.eclipse.jpt.jpa.db.SchemaContainer;
@@ -119,6 +119,12 @@ public interface ReadOnlyTable
*/
boolean validatesAgainstDatabase();
+ TextRange getNameTextRange();
+
+ TextRange getSchemaTextRange();
+
+ TextRange getCatalogTextRange();
+
// ********** owner **********
@@ -127,6 +133,6 @@ public interface ReadOnlyTable
* (e.g. basic mappings and attribute overrides)
*/
interface Owner {
- JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver);
+ JptValidator buildTableValidator(ReadOnlyTable table);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java
index 9f7fc03..567978d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,6 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
+
/**
* Read-only
@@ -32,6 +34,11 @@ public interface ReadOnlyTableColumn
String getDefaultTable();
String DEFAULT_TABLE_PROPERTY = "defaultTable"; //$NON-NLS-1$
+ /**
+ * Return the (best guess) text location of the column's table.
+ */
+ TextRange getTableTextRange();
+
// ********** misc **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java
index b4901c8..1e0ddf1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java
@@ -9,12 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
-import java.util.List;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
/**
* XML JPA context node
* <p>
@@ -24,7 +18,7 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.2
+ * @version 3.3
* @since 2.1
*/
// TODO bjv rename to XmlJpaContextNode
@@ -37,10 +31,4 @@ public interface XmlContextNode
*/
Iterable<String> getXmlCompletionProposals(int pos);
- /**
- * Add to the list of current validation messages
- */
- void validate(List<IMessage> messages, IReporter reporter);
-
- TextRange getValidationTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java
index d483ec5..1ac7a1b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
@@ -17,7 +17,6 @@ import org.eclipse.jpt.jpa.core.context.JpaContextNode;
import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
import org.eclipse.jpt.jpa.core.context.PersistentType;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
/**
* Represents a JPA accessor (field/property).
@@ -28,7 +27,7 @@ import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeRes
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 3.1
*/
public interface Accessor extends JpaContextNode
@@ -51,5 +50,5 @@ public interface Accessor extends JpaContextNode
AccessType getDefaultAccess();
- JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute, PersistentAttributeTextRangeResolver textRangeResolver);
+ JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java
index 786fc76..44293c0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,6 +10,7 @@
package org.eclipse.jpt.jpa.core.context.java;
import org.eclipse.jpt.jpa.core.context.Column;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
/**
@@ -21,7 +22,7 @@ import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.0
*/
public interface JavaColumn
@@ -37,7 +38,7 @@ public interface JavaColumn
* (e.g. basic mappings and attribute overrides)
*/
interface Owner
- extends JavaReadOnlyBaseColumn.Owner
+ extends ReadOnlyBaseColumn.Owner
{
CompleteColumnAnnotation getColumnAnnotation();
void removeColumnAnnotation();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java
index e56e77e..6e5992d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java
@@ -16,7 +16,6 @@ import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.jpa.core.JpaFactory;
import org.eclipse.jpt.jpa.core.context.Converter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
/**
* Java converter
@@ -141,7 +140,7 @@ public interface JavaConverter
protected Owner buildOwner() {
return new Owner() {
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
+ public JptValidator buildValidator(Converter converter) {
return JptValidator.Null.instance();
}
};
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java
index 995f0fc..f7daf72 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -21,7 +21,7 @@ import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 2.0
*/
public interface JavaDiscriminatorColumn
@@ -29,15 +29,4 @@ public interface JavaDiscriminatorColumn
{
DiscriminatorColumnAnnotation getColumnAnnotation();
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- */
- interface Owner
- extends JavaReadOnlyNamedDiscriminatorColumn.Owner
- {
- // combine interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java
index d93495d..3f29656 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.GeneratedValue;
import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
@@ -23,16 +21,11 @@ import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.0
+ * @version 3.3
* @since 2.0
*/
public interface JavaGeneratedValue
extends GeneratedValue, JavaJpaContextNode
{
GeneratedValueAnnotation getGeneratedValueAnnotation();
-
- /**
- * Return the (best guess) text location of the generator.
- */
- TextRange getGeneratorTextRange(CompilationUnit astRoot);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java
index 0d6b8ab..ae3476a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.Generator;
import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
import org.eclipse.jpt.jpa.core.resource.java.GeneratorAnnotation;
@@ -24,7 +22,7 @@ import org.eclipse.jpt.jpa.core.resource.java.GeneratorAnnotation;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.0
+ * @version 3.3
* @since 2.0
*/
public interface JavaGenerator
@@ -32,8 +30,6 @@ public interface JavaGenerator
{
GeneratorAnnotation getGeneratorAnnotation();
- TextRange getNameTextRange(CompilationUnit astRoot);
-
//********* metadata conversion *********
/**
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java
index 068f576..84c4bb3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,13 +9,9 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-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.jpa.core.context.JpaContextNode;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
* Java JPA context node.
@@ -26,7 +22,7 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.2
+ * @version 3.3
* @since 2.0
*/
public interface JavaJpaContextNode
@@ -38,13 +34,4 @@ public interface JavaJpaContextNode
*/
Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot);
-
- // ********** validation **********
-
- /**
- * Adds to the list of current validation messages
- */
- void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
-
- TextRange getValidationTextRange(CompilationUnit astRoot);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java
index b300c2b..6814cba 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,9 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.context.OverrideContainer;
import org.eclipse.jpt.jpa.core.context.Override_;
@@ -26,7 +24,7 @@ import org.eclipse.jpt.jpa.core.context.VirtualOverride;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.3
*/
public interface JavaOverrideContainer
@@ -59,7 +57,5 @@ public interface JavaOverrideContainer
extends OverrideContainer.Owner
{
JavaResourceMember getResourceMember();
-
- TextRange getValidationTextRange(CompilationUnit astRoot);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java
index b9fc81c..3126e07 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
@@ -67,7 +66,7 @@ public interface JavaPersistentAttribute
* Return whether the attribute contains the given offset into its Java
* source code file.
*/
- boolean contains(int offset, CompilationUnit astRoot);
+ boolean contains(int offset);
// ********** type **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java
index 500c90e..0bb932e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java
@@ -10,8 +10,6 @@
package org.eclipse.jpt.jpa.core.context.java;
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.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.context.Query;
import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
@@ -29,7 +27,7 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.2
+ * @version 3.3
* @since 2.0
*/
public interface JavaQuery
@@ -49,9 +47,7 @@ public interface JavaQuery
// ********** validation **********
- void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
-
- TextRange getNameTextRange(CompilationUnit astRoot);
+ void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter);
// ********** metadata conversion *********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java
index 530065b..7f58a62 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -24,15 +24,4 @@ public interface JavaReadOnlyBaseColumn
extends ReadOnlyBaseColumn, JavaReadOnlyTableColumn
{
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyBaseColumn.Owner, JavaReadOnlyTableColumn.Owner
- {
- // combine interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java
index e391b7f..d3b0ea5 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
/**
@@ -25,22 +23,5 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
public interface JavaReadOnlyBaseJoinColumn
extends ReadOnlyBaseJoinColumn, JavaReadOnlyNamedColumn
{
- /**
- * Return the (best guess) text location of the join column's
- * referenced column name.
- */
- TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot);
-
- // ********** owner **********
-
- /**
- * interface allowing join columns to be used in multiple places
- * (e.g. 1:1 mappings and join tables)
- */
- interface Owner
- extends ReadOnlyBaseJoinColumn.Owner, JavaReadOnlyNamedColumn.Owner
- {
- // combine interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java
index 8e7a5b4..fb1e177 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -20,17 +20,11 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.0
*/
public interface JavaReadOnlyJoinColumn
extends ReadOnlyJoinColumn, JavaReadOnlyBaseJoinColumn, JavaReadOnlyBaseColumn
{
- // ********** owner **********
- interface Owner
- extends ReadOnlyJoinColumn.Owner, JavaReadOnlyBaseJoinColumn.Owner, JavaReadOnlyBaseColumn.Owner
- {
- // combine interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java
index bd3002a..6ae887c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
/**
@@ -31,25 +29,5 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
public interface JavaReadOnlyNamedColumn
extends ReadOnlyNamedColumn, JavaJpaContextNode
{
- /**
- * Return the (best guess) text location of the column's name.
- */
- TextRange getNameTextRange(CompilationUnit astRoot);
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyNamedColumn.Owner
- {
- /**
- * Return the column owner's text range. This can be returned by the
- * column when its annotation is not present.
- */
- TextRange getValidationTextRange(CompilationUnit astRoot);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java
index 7c0b582..c958afd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -21,21 +21,11 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 3.1
*/
public interface JavaReadOnlyNamedDiscriminatorColumn
extends ReadOnlyNamedDiscriminatorColumn, JavaReadOnlyNamedColumn
{
- // ********** owner **********
- /**
- * interface allowing discriminator columns to be used in multiple places
- * (but pretty much just entities)
- */
- interface Owner
- extends ReadOnlyNamedDiscriminatorColumn.Owner, JavaReadOnlyNamedColumn.Owner
- {
- //combining interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java
index 651e56f..d44f394 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
/**
@@ -25,8 +23,5 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
public interface JavaReadOnlyOverride
extends ReadOnlyOverride, JavaJpaContextNode
{
- /**
- * Return the (best guess) text location of the override's name.
- */
- TextRange getNameTextRange(CompilationUnit astRoot);
+
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java
index b2b2d34..c866e0f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
/**
@@ -25,7 +23,5 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
public interface JavaReadOnlyTable
extends ReadOnlyTable, JavaJpaContextNode
{
- TextRange getNameTextRange(CompilationUnit astRoot);
- TextRange getSchemaTextRange(CompilationUnit astRoot);
- TextRange getCatalogTextRange(CompilationUnit astRoot);
+
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java
index f878635..be6cfff 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn;
/**
@@ -25,21 +23,4 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn;
public interface JavaReadOnlyTableColumn
extends ReadOnlyTableColumn, JavaReadOnlyNamedColumn
{
- /**
- * Return the (best guess) text location of the column's table.
- */
- TextRange getTableTextRange(CompilationUnit astRoot);
-
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyTableColumn.Owner, JavaReadOnlyNamedColumn.Owner
- {
- // combine interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java
index 6e43119..7aa5171 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java
@@ -14,7 +14,6 @@ import org.eclipse.jpt.jpa.core.JpaFactory;
import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
import org.eclipse.jpt.jpa.core.context.Converter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.JavaElementCollectionTemporalConverterValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.JavaTemporalConverterValidator;
import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation;
@@ -70,8 +69,8 @@ public interface JavaTemporalConverter
@Override
protected Owner buildOwner() {
return new Owner() {
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new JavaTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
+ public JptValidator buildValidator(Converter converter) {
+ return new JavaTemporalConverterValidator((BaseTemporalConverter) converter);
}
};
}
@@ -92,8 +91,8 @@ public interface JavaTemporalConverter
@Override
protected Owner buildOwner() {
return new Owner() {
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new JavaElementCollectionTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
+ public JptValidator buildValidator(Converter converter) {
+ return new JavaElementCollectionTemporalConverterValidator((BaseTemporalConverter) converter);
}
};
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java
index 0841b9c..fa5f1b1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
import org.eclipse.jpt.jpa.core.context.VirtualColumn;
@@ -35,7 +36,7 @@ public interface JavaVirtualColumn
// ********** owner **********
interface Owner
- extends VirtualColumn.Owner, JavaReadOnlyBaseColumn.Owner
+ extends VirtualColumn.Owner, ReadOnlyBaseColumn.Owner
{
/**
* The overridden column can be either a Java column or an
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java
index 313fac9..5cf62db 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,6 +10,7 @@
package org.eclipse.jpt.jpa.core.context.orm;
import org.eclipse.jpt.jpa.core.context.Column;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn;
/**
@@ -37,7 +38,7 @@ public interface OrmColumn
* (e.g. basic mappings and attribute overrides)
*/
interface Owner
- extends OrmReadOnlyBaseColumn.Owner
+ extends ReadOnlyBaseColumn.Owner
{
XmlColumn getXmlColumn();
XmlColumn buildXmlColumn();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java
index a376a1d..30ee19a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,6 +10,7 @@
package org.eclipse.jpt.jpa.core.context.orm;
import org.eclipse.jpt.jpa.core.context.DiscriminatorColumn;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn;
/**
@@ -21,7 +22,7 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 2.0
*/
public interface OrmDiscriminatorColumn
@@ -36,7 +37,7 @@ public interface OrmDiscriminatorColumn
* interface allowing discriminator columns to be used in multiple places
*/
interface Owner
- extends OrmReadOnlyNamedDiscriminatorColumn.Owner
+ extends ReadOnlyNamedDiscriminatorColumn.Owner
{
XmlDiscriminatorColumn getXmlColumn();
XmlDiscriminatorColumn buildXmlColumn();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java
index 0a0f487..d0e1636 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java
@@ -13,7 +13,6 @@ import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter;
import org.eclipse.jpt.jpa.core.context.Converter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.EnumType;
import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping;
@@ -64,7 +63,7 @@ public interface OrmEnumeratedConverter
public TextRange getEnumTextRange() {
return mapping.getEnumeratedTextRange();
}
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
+ public JptValidator buildValidator(Converter converter) {
return JptValidator.Null.instance();
}
};
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java
index f42e8c0..9b46749 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.GeneratedValue;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue;
@@ -23,7 +22,7 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.1
+ * @version 3.3
* @since 2.0
*/
public interface OrmGeneratedValue
@@ -31,8 +30,4 @@ public interface OrmGeneratedValue
{
XmlGeneratedValue getXmlGeneratedValue();
- /**
- * Return the (best guess) text location of the generator.
- */
- TextRange getGeneratorTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java
index cd1791f..75a644a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.Generator;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator;
@@ -23,7 +22,7 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.0
+ * @version 3.3
* @since 2.0
*/
public interface OrmGenerator
@@ -31,5 +30,4 @@ public interface OrmGenerator
{
XmlGenerator getXmlGenerator();
- TextRange getNameTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java
index 75a4744..dd1ecfd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -12,7 +12,6 @@ package org.eclipse.jpt.jpa.core.context.orm;
import org.eclipse.jpt.jpa.core.context.Converter;
import org.eclipse.jpt.jpa.core.context.LobConverter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping;
@@ -63,7 +62,7 @@ public interface OrmLobConverter
((XmlConvertibleMapping) xmlMapping).setLob(false);
}
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
+ public JptValidator buildValidator(Converter converter) {
return JptValidator.Null.instance();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java
index 0735752..c86e8ec 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.context.orm;
import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.context.OverrideContainer;
import org.eclipse.jpt.jpa.core.context.Override_;
@@ -27,7 +26,7 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlOverride;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.3
*/
public interface OrmOverrideContainer
@@ -73,8 +72,6 @@ public interface OrmOverrideContainer
*/
Iterable<String> getJavaOverrideNames();
- TextRange getValidationTextRange();
-
OrmTypeMapping getTypeMapping();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java
index f35bed7..9d2ee47 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.context.orm;
import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.context.Query;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
@@ -28,7 +27,7 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.2
+ * @version 3.3
* @since 2.0
*/
public interface OrmQuery
@@ -50,7 +49,4 @@ public interface OrmQuery
void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter);
- TextRange getNameTextRange();
-
- TextRange getQueryTextRange();
} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java
index 679d9ee..b3710cb 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -24,15 +24,4 @@ public interface OrmReadOnlyBaseColumn
extends ReadOnlyBaseColumn, OrmReadOnlyTableColumn
{
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyBaseColumn.Owner, OrmReadOnlyTableColumn.Owner
- {
- // combine two interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java
index e31619f..60cce20 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
/**
@@ -24,22 +23,5 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
public interface OrmReadOnlyBaseJoinColumn
extends ReadOnlyBaseJoinColumn, OrmReadOnlyNamedColumn
{
- /**
- * Return the (best guess) text location of the column's
- * referenced column name.
- */
- TextRange getReferencedColumnNameTextRange();
-
- // ********** owner **********
-
- /**
- * interface allowing join columns to be used in multiple places
- * (e.g. 1:1 mappings and join tables)
- */
- interface Owner
- extends ReadOnlyBaseJoinColumn.Owner, OrmReadOnlyNamedColumn.Owner
- {
- // combine two interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java
index 25ab84a..3fe6158 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -20,17 +20,11 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.0
*/
public interface OrmReadOnlyJoinColumn
extends ReadOnlyJoinColumn, OrmReadOnlyBaseJoinColumn, OrmReadOnlyBaseColumn
{
- // ********** owner **********
- interface Owner
- extends ReadOnlyJoinColumn.Owner, OrmReadOnlyBaseJoinColumn.Owner, OrmReadOnlyBaseColumn.Owner
- {
- // combine interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java
index 736f6cd..117f78d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
@@ -31,25 +30,5 @@ import org.eclipse.jpt.jpa.core.context.XmlContextNode;
public interface OrmReadOnlyNamedColumn
extends ReadOnlyNamedColumn, XmlContextNode
{
- /**
- * Return the (best guess) text location of the column's name.
- */
- TextRange getNameTextRange();
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyNamedColumn.Owner
- {
- /**
- * Return the column owner's text range. This can be returned by the
- * column when its annotation is not present.
- */
- TextRange getValidationTextRange();
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java
index 1ec9da3..fd31237 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -21,22 +21,11 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 3.1
*/
public interface OrmReadOnlyNamedDiscriminatorColumn
extends ReadOnlyNamedDiscriminatorColumn, OrmReadOnlyNamedColumn
{
- // ********** owner **********
-
- /**
- * interface allowing discriminator columns to be used in multiple places
- * (but pretty much just entities)
- */
- interface Owner
- extends ReadOnlyNamedDiscriminatorColumn.Owner, OrmReadOnlyNamedColumn.Owner
- {
- //combining interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java
index e38c0ac..857924c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
@@ -25,8 +24,5 @@ import org.eclipse.jpt.jpa.core.context.XmlContextNode;
public interface OrmReadOnlyOverride
extends ReadOnlyOverride, XmlContextNode
{
- /**
- * Return the (best guess) text location of the override's name.
- */
- TextRange getNameTextRange();
+
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java
index d49312a..14190cd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
@@ -25,7 +24,5 @@ import org.eclipse.jpt.jpa.core.context.XmlContextNode;
public interface OrmReadOnlyTable
extends ReadOnlyTable, XmlContextNode
{
- TextRange getNameTextRange();
- TextRange getSchemaTextRange();
- TextRange getCatalogTextRange();
+
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java
index 1dcd63e..7ffb482 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn;
/**
@@ -24,21 +23,5 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn;
public interface OrmReadOnlyTableColumn
extends ReadOnlyTableColumn, OrmReadOnlyNamedColumn
{
- /**
- * Return the (best guess) text location of the column's table.
- */
- TextRange getTableTextRange();
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyTableColumn.Owner, OrmReadOnlyNamedColumn.Owner
- {
- // combine two interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java
index 166231a..b851bfe 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java
@@ -13,7 +13,6 @@ import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
import org.eclipse.jpt.jpa.core.context.Converter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.OrmElementCollectionTemporalConverterValidator;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.OrmTemporalConverterValidator;
import org.eclipse.jpt.jpa.core.resource.orm.TemporalType;
@@ -90,8 +89,8 @@ public interface OrmTemporalConverter
public TextRange getTemporalTextRange() {
return mapping.getTemporalTextRange();
}
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new OrmTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
+ public JptValidator buildValidator(Converter converter) {
+ return new OrmTemporalConverterValidator((BaseTemporalConverter) converter);
}
};
}
@@ -121,8 +120,8 @@ public interface OrmTemporalConverter
public TextRange getTemporalTextRange() {
return mapping.getTemporalTextRange();
}
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new OrmElementCollectionTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
+ public JptValidator buildValidator(Converter converter) {
+ return new OrmElementCollectionTemporalConverterValidator((BaseTemporalConverter) converter);
}
};
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java
index 1deafbb..77ab5fd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
import org.eclipse.jpt.jpa.core.context.VirtualColumn;
@@ -35,7 +36,7 @@ public interface OrmVirtualColumn
// ********** owner **********
interface Owner
- extends VirtualColumn.Owner, OrmReadOnlyBaseColumn.Owner
+ extends VirtualColumn.Owner, ReadOnlyBaseColumn.Owner
{
/**
* The overridden column can be either a Java column or an
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java
index c040b94..974a1ab 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -11,6 +11,7 @@ package org.eclipse.jpt.jpa.core.context.orm;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
@@ -61,7 +62,7 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlVersion;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.3
*/
// TODO bjv we need a factory interface for a 1.0 orm.xml in a 2.0 project...
@@ -115,17 +116,17 @@ public interface OrmXmlContextNodeFactory
OrmVirtualSecondaryTable buildOrmVirtualSecondaryTable(OrmEntity parent, ReadOnlyTable.Owner owner, JavaSecondaryTable javaSecondaryTable);
- OrmPrimaryKeyJoinColumn buildOrmPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn resourcePrimaryKeyJoinColumn);
+ OrmPrimaryKeyJoinColumn buildOrmPrimaryKeyJoinColumn(XmlContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn resourcePrimaryKeyJoinColumn);
- OrmVirtualPrimaryKeyJoinColumn buildOrmVirtualPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn);
+ OrmVirtualPrimaryKeyJoinColumn buildOrmVirtualPrimaryKeyJoinColumn(XmlContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn);
OrmJoinTable buildOrmJoinTable(OrmJoinTableRelationshipStrategy parent, Table.Owner owner);
OrmVirtualJoinTable buildOrmVirtualJoinTable(OrmVirtualJoinTableRelationshipStrategy parent, ReadOnlyTable.Owner owner, ReadOnlyJoinTable overriddenTable);
- OrmJoinColumn buildOrmJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, XmlJoinColumn resourceJoinColumn);
+ OrmJoinColumn buildOrmJoinColumn(XmlContextNode parent, ReadOnlyJoinColumn.Owner owner, XmlJoinColumn resourceJoinColumn);
- OrmVirtualJoinColumn buildOrmVirtualJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn);
+ OrmVirtualJoinColumn buildOrmVirtualJoinColumn(XmlContextNode parent, ReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn);
OrmAttributeOverrideContainer buildOrmAttributeOverrideContainer(XmlContextNode parent, OrmAttributeOverrideContainer.Owner owner);
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java
index 107c129..3dcbea7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java
@@ -22,8 +22,10 @@ import org.eclipse.jpt.jpa.core.JpaFile;
import org.eclipse.jpt.jpa.core.JpaProject;
import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
import org.eclipse.jpt.jpa.core.context.PersistentType;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
import org.eclipse.jpt.jpa.core.context.Table;
@@ -67,8 +69,6 @@ import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaQuery;
import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaQueryHint;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
import org.eclipse.jpt.jpa.core.context.java.JavaTable;
@@ -253,15 +253,15 @@ public abstract class AbstractJpaFactory
return new GenericJavaVirtualColumn(parent, owner);
}
- public JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, JavaDiscriminatorColumn.Owner owner) {
+ public JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, ReadOnlyNamedDiscriminatorColumn.Owner owner) {
return new GenericJavaDiscriminatorColumn(parent, owner);
}
- public JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation joinColumnAnnotation) {
+ public JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, ReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation joinColumnAnnotation) {
return new GenericJavaJoinColumn(parent, owner, joinColumnAnnotation);
}
- public JavaVirtualJoinColumn buildJavaVirtualJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
+ public JavaVirtualJoinColumn buildJavaVirtualJoinColumn(JavaJpaContextNode parent, ReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
return new GenericJavaVirtualJoinColumn(parent, owner, overriddenColumn);
}
@@ -337,7 +337,7 @@ public abstract class AbstractJpaFactory
return new GenericJavaGeneratedValue(parent, generatedValueAnnotation);
}
- public JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, JavaReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation) {
+ public JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation) {
return new GenericJavaPrimaryKeyJoinColumn(parent, owner, pkJoinColumnAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java
index 65a7d0a..a88c092 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java
@@ -9,7 +9,10 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context;
+import java.util.List;
+
import org.eclipse.jpt.common.core.JptResourceType;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.JpaNode;
import org.eclipse.jpt.jpa.core.context.JpaContextNode;
import org.eclipse.jpt.jpa.core.context.MappingFile;
@@ -18,6 +21,9 @@ import org.eclipse.jpt.jpa.core.internal.AbstractJpaNode;
import org.eclipse.jpt.jpa.db.Catalog;
import org.eclipse.jpt.jpa.db.Schema;
import org.eclipse.jpt.jpa.db.SchemaContainer;
+import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public abstract class AbstractJpaContextNode
extends AbstractJpaNode
@@ -104,6 +110,45 @@ public abstract class AbstractJpaContextNode
}
+ // ********** validation **********
+
+ /**
+ * All subclass implementations should be
+ * preceded by a "super" call to this method.
+ */
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ if (reporter.isCancelled()) {
+ throw new ValidationCancelledException();
+ }
+ }
+
+ /**
+ * Return the specified text range if it is not <code>null</code>; if it is
+ * <code>null</code>, return the node's validation text range.
+ */
+ protected TextRange getValidationTextRange(TextRange textRange) {
+ return (textRange != null) ? textRange : this.getValidationTextRange();
+ }
+
+ /**
+ * Validate the specified node if it is not <code>null</code>.
+ */
+ protected void validateNode(JpaContextNode node, List<IMessage> messages, IReporter reporter) {
+ if (node != null) {
+ node.validate(messages, reporter);
+ }
+ }
+
+ /**
+ * Validate the specified nodes.
+ */
+ protected void validateNodes(Iterable<? extends JpaContextNode> nodes, List<IMessage> messages, IReporter reporter) {
+ for (JpaContextNode node : nodes) {
+ node.validate(messages, reporter);
+ }
+ }
+
+
// ********** database stuff **********
public Schema getContextDefaultDbSchema() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java
index 0af1269..d9dccef 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java
@@ -9,13 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context;
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.JpaContextNode;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public abstract class AbstractXmlContextNode
extends AbstractJpaContextNode
@@ -26,43 +21,6 @@ public abstract class AbstractXmlContextNode
}
- // ********** validation **********
-
- /**
- * All subclass implementations should be have a "super" call to this method.
- */
- public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
- }
-
- /**
- * Validate the specified node if it is not <code>null</code>.
- */
- protected void validateNode(XmlContextNode node, List<IMessage> messages, IReporter reporter) {
- if (node != null) {
- node.validate(messages, reporter);
- }
- }
-
- /**
- * Validate the specified nodes.
- */
- protected void validateNodes(Iterable<? extends XmlContextNode> nodes, List<IMessage> messages, IReporter reporter) {
- for (XmlContextNode node : nodes) {
- node.validate(messages, reporter);
- }
- }
-
- /**
- * Return the specified text range if it is not <code>null</code>; if it is
- * <code>null</code>, return the node's validation text range.
- */
- protected TextRange getValidationTextRange(TextRange textRange) {
- return (textRange != null) ? textRange : this.getValidationTextRange();
- }
-
// *********** completion proposals ***********
public Iterable<String> getXmlCompletionProposals(int pos) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/BaseJoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/BaseJoinColumnTextRangeResolver.java
deleted file mode 100644
index 8918e1c..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/BaseJoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on join columns
- */
-public interface BaseJoinColumnTextRangeResolver extends NamedColumnTextRangeResolver
-{
- TextRange getReferencedColumnNameTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/EntityTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/EntityTextRangeResolver.java
deleted file mode 100644
index 19b118f..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/EntityTextRangeResolver.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.context;
-
-
-public interface EntityTextRangeResolver
- extends PrimaryKeyTextRangeResolver
-{
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JoinColumnTextRangeResolver.java
deleted file mode 100644
index 3d237dc..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.context;
-
-/**
- * Interface to resolve text ranges on join columns
- */
-public interface JoinColumnTextRangeResolver
- extends BaseJoinColumnTextRangeResolver, TableColumnTextRangeResolver
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/NamedColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/NamedColumnTextRangeResolver.java
deleted file mode 100644
index da47738..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/NamedColumnTextRangeResolver.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on named columns
- */
-public interface NamedColumnTextRangeResolver
-{
- TextRange getNameTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/OverrideTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/OverrideTextRangeResolver.java
deleted file mode 100644
index 901eae1..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/OverrideTextRangeResolver.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on named columns
- */
-public interface OverrideTextRangeResolver
-{
- TextRange getNameTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributeTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributeTextRangeResolver.java
deleted file mode 100644
index a2345cc..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributeTextRangeResolver.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on persistent attributes
- */
-public interface PersistentAttributeTextRangeResolver
-{
- TextRange getAttributeTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PrimaryKeyTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PrimaryKeyTextRangeResolver.java
deleted file mode 100644
index 8a759ea..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PrimaryKeyTextRangeResolver.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on persistent type mappings that can define primary keys
- */
-public interface PrimaryKeyTextRangeResolver extends TypeMappingTextRangeResolver
-{
-
- TextRange getIdClassTextRange();
-
- TextRange getAttributeMappingTextRange(String attributeName);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableColumnTextRangeResolver.java
deleted file mode 100644
index 877b397..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableColumnTextRangeResolver.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on named columns
- */
-public interface TableColumnTextRangeResolver extends NamedColumnTextRangeResolver
-{
- TextRange getTableTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableTextRangeResolver.java
deleted file mode 100644
index adb744d..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableTextRangeResolver.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on tables.
- */
-public interface TableTextRangeResolver
-{
- TextRange getNameTextRange();
-
- TextRange getSchemaTextRange();
-
- TextRange getCatalogTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTextRangeResolver.java
deleted file mode 100644
index a30cac2..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTextRangeResolver.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on persistent type mappings
- */
-public interface TypeMappingTextRangeResolver
-{
- TextRange getTypeMappingTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java
index 88b544a..f43907c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.HashMap;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.source.SourceNode;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
@@ -166,9 +165,9 @@ public abstract class AbstractAccessor
return this.member.isFor(memberName, occurrence);
}
- public TextRange getTextRange(CompilationUnit astRoot) {
+ public TextRange getTextRange() {
// should never be null
- return this.member.getTextRange(astRoot);
+ return this.member.getTextRange();
}
public TextRange getNameTextRange() {
@@ -176,9 +175,9 @@ public abstract class AbstractAccessor
return this.member.getNameTextRange();
}
- public TextRange getTextRange(String nestableAnnotationName, CompilationUnit astRoot) {
+ public TextRange getTextRange(String nestableAnnotationName) {
// should never be null
- return this.member.getTextRange(nestableAnnotationName, astRoot);
+ return this.member.getTextRange(nestableAnnotationName);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java
index 01e4043..a458615 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -11,7 +11,6 @@ package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -296,12 +295,12 @@ public abstract class AbstractJavaAttributeMapping<A extends Annotation>
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateMappingType(messages, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateMappingType(messages);
}
- protected void validateMappingType(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateMappingType(List<IMessage> messages) {
if ( ! this.getTypeMapping().attributeMappingKeyAllowed(this.getKey())) {
messages.add(
DefaultJpaValidationMessages.buildMessage(
@@ -309,19 +308,19 @@ public abstract class AbstractJavaAttributeMapping<A extends Annotation>
JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_MAPPING,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getMappingAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getPersistentAttribute().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getMappingAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getPersistentAttribute().getValidationTextRange();
}
- protected TextRange getMappingAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getMappingAnnotationTextRange() {
A annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java
index 3b12b80..79e8e32 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java
@@ -17,14 +17,12 @@ import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaBaseColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.java.BaseColumnAnnotation;
/**
* Java column or join column
*/
-public abstract class AbstractJavaBaseColumn<A extends BaseColumnAnnotation, O extends JavaReadOnlyBaseColumn.Owner>
+public abstract class AbstractJavaBaseColumn<A extends BaseColumnAnnotation, O extends ReadOnlyBaseColumn.Owner>
extends AbstractJavaNamedColumn<A, O>
implements JavaBaseColumn
{
@@ -134,8 +132,8 @@ public abstract class AbstractJavaBaseColumn<A extends BaseColumnAnnotation, O e
return this.owner.getDefaultTableName();
}
- public TextRange getTableTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getColumnAnnotation().getTableTextRange(), astRoot);
+ public TextRange getTableTextRange() {
+ return this.getValidationTextRange(this.getColumnAnnotation().getTableTextRange());
}
@@ -365,9 +363,4 @@ public abstract class AbstractJavaBaseColumn<A extends BaseColumnAnnotation, O e
public boolean tableNameIsInvalid() {
return this.owner.tableNameIsInvalid(this.getTable());
}
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableColumnTextRangeResolver(this, astRoot);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java
index ef53809..214c3f7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java
@@ -33,10 +33,8 @@ import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaBaseEmbeddedMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
@@ -207,15 +205,15 @@ public abstract class AbstractJavaBaseEmbeddedMapping<A extends Annotation>
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- if (this.validateTargetEmbeddable(messages, astRoot)) {
- this.validateOverrides(messages, reporter, astRoot);
+ if (this.validateTargetEmbeddable(messages)) {
+ this.validateOverrides(messages, reporter);
}
}
- protected boolean validateTargetEmbeddable(List<IMessage> messages, CompilationUnit astRoot) {
+ protected boolean validateTargetEmbeddable(List<IMessage> messages) {
if (this.targetEmbeddable != null) {
return true;
}
@@ -227,7 +225,7 @@ public abstract class AbstractJavaBaseEmbeddedMapping<A extends Annotation>
JpaValidationMessages.VIRTUAL_ATTRIBUTE_TARGET_NOT_AN_EMBEDDABLE,
new String[] {this.getName(), targetEmbeddableTypeName},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -238,15 +236,15 @@ public abstract class AbstractJavaBaseEmbeddedMapping<A extends Annotation>
JpaValidationMessages.TARGET_NOT_AN_EMBEDDABLE,
new String[] {targetEmbeddableTypeName},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
return false;
}
- protected void validateOverrides(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.attributeOverrideContainer.validate(messages, reporter, astRoot);
+ protected void validateOverrides(List<IMessage> messages, IReporter reporter) {
+ this.attributeOverrideContainer.validate(messages, reporter);
}
@@ -314,16 +312,16 @@ public abstract class AbstractJavaBaseEmbeddedMapping<A extends Annotation>
return true;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaBaseEmbeddedMapping.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaBaseEmbeddedMapping.this.getValidationTextRange();
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, new EntityTableDescriptionProvider());
}
protected JavaPersistentAttribute getPersistentAttribute() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java
index 92290de..32f6ba3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java
@@ -30,9 +30,7 @@ import org.eclipse.jpt.jpa.core.context.java.JavaEnumeratedConverter;
import org.eclipse.jpt.jpa.core.context.java.JavaLobConverter;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.java.JavaTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaConverter;
@@ -346,8 +344,8 @@ public abstract class AbstractJavaBasicMapping
return this.getTypeMapping().getAllAssociatedTableNames();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, new EntityTableDescriptionProvider());
}
@@ -374,9 +372,9 @@ public abstract class AbstractJavaBasicMapping
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.column.validate(messages, reporter, astRoot);
- this.converter.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.column.validate(messages, reporter);
+ this.converter.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java
index b256d72..7822d98 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java
@@ -13,7 +13,6 @@ import java.io.Serializable;
import java.util.List;
import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.utility.JDTTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
@@ -104,8 +103,8 @@ public abstract class AbstractJavaEmbeddedIdMapping
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
// [JPA 2.0] if the embedded id is mapped by a relationship, then any specified
// attribute overrides are in error
@@ -119,7 +118,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED,
new String[] {this.getName()},
this.attributeOverrideContainer,
- this.attributeOverrideContainer.getValidationTextRange(astRoot)
+ this.attributeOverrideContainer.getValidationTextRange()
)
);
} else {
@@ -129,20 +128,20 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED,
EMPTY_STRING_ARRAY,
this.attributeOverrideContainer,
- this.attributeOverrideContainer.getValidationTextRange(astRoot)
+ this.attributeOverrideContainer.getValidationTextRange()
)
);
}
}
- validateTargetEmbeddableImplementsSerializable(messages, reporter, astRoot);
- validateNoRelationshipMappingsOnTargetEmbeddable(messages, reporter, astRoot);
- validateTargetEmbeddableImplementsEqualsAndHashcode(messages, reporter, astRoot);
- validateTargetEmbeddableIsPublic(messages, reporter, astRoot);
- validateTargetEmbeddableImplementsZeroArgConstructor(messages, reporter, astRoot);
+ validateTargetEmbeddableImplementsSerializable(messages, reporter);
+ validateNoRelationshipMappingsOnTargetEmbeddable(messages, reporter);
+ validateTargetEmbeddableImplementsEqualsAndHashcode(messages, reporter);
+ validateTargetEmbeddableIsPublic(messages, reporter);
+ validateTargetEmbeddableImplementsZeroArgConstructor(messages, reporter);
}
- protected void validateTargetEmbeddableImplementsZeroArgConstructor(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateTargetEmbeddableImplementsZeroArgConstructor(List<IMessage> messages, IReporter reporter) {
if (this.getTargetEmbeddable() != null) {
String targetEmbeddableClassName = this.getTargetEmbeddable().getPersistentType().getName();
IJavaProject javaProject = getJpaProject().getJavaProject();
@@ -154,7 +153,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_NO_ARG_CONSTRUCTOR,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -164,7 +163,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_NO_ARG_CONSTRUCTOR,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -172,7 +171,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
}
}
- protected void validateTargetEmbeddableImplementsEqualsAndHashcode(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateTargetEmbeddableImplementsEqualsAndHashcode(List<IMessage> messages, IReporter reporter) {
if (this.getTargetEmbeddable() != null) {
JavaResourceType resourceType = getTargetEmbeddable().getJavaResourceType();
if (resourceType != null
@@ -185,7 +184,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_EQUALS_HASHCODE,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -195,7 +194,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_EQUALS_HASHCODE,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -203,7 +202,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
}
}
- protected void validateTargetEmbeddableIsPublic(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateTargetEmbeddableIsPublic(List<IMessage> messages, IReporter reporter) {
if (this.getTargetEmbeddable() != null) {
if (!getTargetEmbeddable().getJavaResourceType().isPublic()) {
if (getPersistentAttribute().isVirtual()) {
@@ -213,7 +212,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -223,7 +222,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -231,7 +230,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
}
}
- protected void validateTargetEmbeddableImplementsSerializable(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateTargetEmbeddableImplementsSerializable(List<IMessage> messages, IReporter reporter) {
if (this.getTargetEmbeddable() != null) {
String targetEmbeddableClassName = this.getTargetEmbeddable().getPersistentType().getName();
IJavaProject javaProject = getJpaProject().getJavaProject();
@@ -243,7 +242,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -253,7 +252,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -261,7 +260,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
}
}
- protected void validateNoRelationshipMappingsOnTargetEmbeddable(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateNoRelationshipMappingsOnTargetEmbeddable(List<IMessage> messages, IReporter reporter) {
if (this.getTargetEmbeddable() != null) {
TypeMapping targetEmbeddableTypeMapping = this.getTargetEmbeddable().getPersistentType().getMapping();
if (targetEmbeddableTypeMapping.getAllAttributeMappings(MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY).iterator().hasNext()
@@ -275,7 +274,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_NOT_CONTAIN_RELATIONSHIP_MAPPINGS,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -285,7 +284,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_NOT_CONTAIN_RELATIONSHIP_MAPPINGS,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java
index 149053e..a3c1a18 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -33,12 +33,8 @@ import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaBaseEmbeddedMapping;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideInverseJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
@@ -203,9 +199,9 @@ public abstract class AbstractJavaEmbeddedMapping
// ********** validation **********
@Override
- protected void validateOverrides(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validateOverrides(messages, reporter, astRoot);
- this.associationOverrideContainer.validate(messages, reporter, astRoot);
+ protected void validateOverrides(List<IMessage> messages, IReporter reporter) {
+ super.validateOverrides(messages, reporter);
+ this.associationOverrideContainer.validate(messages, reporter);
}
@@ -273,28 +269,28 @@ public abstract class AbstractJavaEmbeddedMapping
return true;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaEmbeddedMapping.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaEmbeddedMapping.this.getValidationTextRange();
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, new EntityTableDescriptionProvider());
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideInverseJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new AssociationOverrideInverseJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinTableValidator(this.getPersistentAttribute(), override, (ReadOnlyJoinTable) table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table) {
+ return new AssociationOverrideJoinTableValidator(this.getPersistentAttribute(), override, (ReadOnlyJoinTable) table);
}
protected JavaPersistentAttribute getPersistentAttribute() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java
index 31067ee..4fc14e7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java
@@ -74,19 +74,11 @@ import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
import org.eclipse.jpt.jpa.core.context.java.JavaTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.EntityTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTools;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideInverseJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
@@ -879,7 +871,7 @@ public abstract class AbstractJavaEntity
return this.getJpaFactory().buildJavaDiscriminatorColumn(this, this.buildDiscriminatorColumnOwner());
}
- protected JavaDiscriminatorColumn.Owner buildDiscriminatorColumnOwner() {
+ protected ReadOnlyNamedDiscriminatorColumn.Owner buildDiscriminatorColumnOwner() {
return new DiscriminatorColumnOwner();
}
@@ -1313,24 +1305,24 @@ public abstract class AbstractJavaEntity
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.validatePrimaryKey(messages, reporter, astRoot);
- this.validateTable(messages, reporter, astRoot);
+ this.validatePrimaryKey(messages, reporter);
+ this.validateTable(messages, reporter);
for (JavaSecondaryTable secondaryTable : this.getSecondaryTables()) {
- secondaryTable.validate(messages, reporter, astRoot);
+ secondaryTable.validate(messages, reporter);
}
- this.validateInheritance(messages, reporter, astRoot);
+ this.validateInheritance(messages, reporter);
for (JavaPrimaryKeyJoinColumn pkJoinColumn : this.getPrimaryKeyJoinColumns()) {
- pkJoinColumn.validate(messages, reporter, astRoot);
+ pkJoinColumn.validate(messages, reporter);
}
- this.generatorContainer.validate(messages, reporter, astRoot);
- this.queryContainer.validate(messages, reporter, astRoot);
- this.attributeOverrideContainer.validate(messages, reporter, astRoot);
- this.associationOverrideContainer.validate(messages, reporter, astRoot);
+ this.generatorContainer.validate(messages, reporter);
+ this.queryContainer.validate(messages, reporter);
+ this.attributeOverrideContainer.validate(messages, reporter);
+ this.associationOverrideContainer.validate(messages, reporter);
this.validateEntityName(messages);
- this.idClassReference.validate(messages, reporter, astRoot);
+ this.idClassReference.validate(messages, reporter);
}
@Override
@@ -1352,20 +1344,15 @@ public abstract class AbstractJavaEntity
}
}
- protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.buildPrimaryKeyValidator(astRoot).validate(messages, reporter);
+ protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter) {
+ this.buildPrimaryKeyValidator().validate(messages, reporter);
}
- protected JptValidator buildPrimaryKeyValidator(CompilationUnit astRoot) {
- return new GenericEntityPrimaryKeyValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildPrimaryKeyValidator() {
+ return new GenericEntityPrimaryKeyValidator(this);
}
- @Override
- protected EntityTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaEntityTextRangeResolver(this, astRoot);
- }
-
- protected void validateTable(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateTable(List<IMessage> messages, IReporter reporter) {
if (this.isAbstractTablePerClass()) {
if (this.table.isSpecifiedInResource()) {
messages.add(
@@ -1374,7 +1361,7 @@ public abstract class AbstractJavaEntity
JpaValidationMessages.ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE,
new String[] {this.getName()},
this,
- this.table.getValidationTextRange(astRoot)
+ this.table.getValidationTextRange()
)
);
}
@@ -1388,13 +1375,13 @@ public abstract class AbstractJavaEntity
JpaValidationMessages.ENTITY_SINGLE_TABLE_DESCENDANT_DEFINES_TABLE,
new String[] {this.getName()},
this,
- this.table.getValidationTextRange(astRoot)
+ this.table.getValidationTextRange()
)
);
}
return;
}
- this.table.validate(messages, reporter, astRoot);
+ this.table.validate(messages, reporter);
}
/**
@@ -1406,15 +1393,15 @@ public abstract class AbstractJavaEntity
(this.table.getDbTable() != this.getRootEntity().getTable().getDbTable());
}
- protected void validateInheritance(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.validateInheritanceStrategy(messages, astRoot);
- this.validateDiscriminatorColumn(messages, reporter, astRoot);
- this.validateDiscriminatorValue(messages, astRoot);
+ protected void validateInheritance(List<IMessage> messages, IReporter reporter) {
+ this.validateInheritanceStrategy(messages);
+ this.validateDiscriminatorColumn(messages, reporter);
+ this.validateDiscriminatorValue(messages);
}
- protected void validateDiscriminatorColumn(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateDiscriminatorColumn(List<IMessage> messages, IReporter reporter) {
if (this.specifiedDiscriminatorColumnIsAllowed && ! this.discriminatorColumnIsUndefined) {
- this.discriminatorColumn.validate(messages, reporter, astRoot);
+ this.discriminatorColumn.validate(messages, reporter);
}
else if (!this.discriminatorColumn.isVirtual()) {
if (this.isDescendant()) {
@@ -1424,7 +1411,7 @@ public abstract class AbstractJavaEntity
JpaValidationMessages.ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED,
new String[] {this.getName()},
this,
- this.getDiscriminatorColumnTextRange(astRoot)
+ this.getDiscriminatorColumnTextRange()
)
);
}
@@ -1435,14 +1422,14 @@ public abstract class AbstractJavaEntity
JpaValidationMessages.ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED,
new String[] {this.getName()},
this,
- this.getDiscriminatorColumnTextRange(astRoot)
+ this.getDiscriminatorColumnTextRange()
)
);
}
}
}
- protected void validateDiscriminatorValue(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateDiscriminatorValue(List<IMessage> messages) {
if (this.discriminatorValueIsUndefined && (this.specifiedDiscriminatorValue != null)) {
if (this.isAbstract()) {
messages.add(
@@ -1451,7 +1438,7 @@ public abstract class AbstractJavaEntity
JpaValidationMessages.ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED,
new String[] {this.getName()},
this,
- this.getDiscriminatorValueTextRange(astRoot)
+ this.getDiscriminatorValueTextRange()
)
);
}
@@ -1462,14 +1449,14 @@ public abstract class AbstractJavaEntity
JpaValidationMessages.ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED,
new String[] {this.getName()},
this,
- this.getDiscriminatorValueTextRange(astRoot)
+ this.getDiscriminatorValueTextRange()
)
);
}
}
}
- protected void validateInheritanceStrategy(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateInheritanceStrategy(List<IMessage> messages) {
Supported tablePerConcreteClassInheritanceIsSupported = this.getJpaPlatformVariation().getTablePerConcreteClassInheritanceIsSupported();
if (tablePerConcreteClassInheritanceIsSupported == Supported.YES) {
return;
@@ -1482,7 +1469,7 @@ public abstract class AbstractJavaEntity
JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_SUPPORTED_ON_PLATFORM,
new String[] {this.getName()},
this,
- this.getInheritanceStrategyTextRange(astRoot)
+ this.getInheritanceStrategyTextRange()
)
);
}
@@ -1493,23 +1480,23 @@ public abstract class AbstractJavaEntity
JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_PORTABLE_ON_PLATFORM,
new String[] {this.getName()},
this,
- this.getInheritanceStrategyTextRange(astRoot)
+ this.getInheritanceStrategyTextRange()
)
);
}
}
}
- protected TextRange getDiscriminatorValueTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getDiscriminatorValueAnnotation().getTextRange(astRoot), astRoot);
+ protected TextRange getDiscriminatorValueTextRange() {
+ return this.getValidationTextRange(this.getDiscriminatorValueAnnotation().getTextRange());
}
- protected TextRange getDiscriminatorColumnTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.discriminatorColumn.getValidationTextRange(astRoot), astRoot);
+ protected TextRange getDiscriminatorColumnTextRange() {
+ return this.getValidationTextRange(this.discriminatorColumn.getValidationTextRange());
}
- protected TextRange getInheritanceStrategyTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getInheritanceAnnotation().getStrategyTextRange(), astRoot);
+ protected TextRange getInheritanceStrategyTextRange() {
+ return this.getValidationTextRange(this.getInheritanceAnnotation().getStrategyTextRange());
}
@@ -1529,8 +1516,8 @@ public abstract class AbstractJavaEntity
return AbstractJavaEntity.this;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaEntity.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaEntity.this.getValidationTextRange();
}
public TypeMapping getOverridableTypeMapping() {
@@ -1599,12 +1586,12 @@ public abstract class AbstractJavaEntity
return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator((ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new MappedSuperclassOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AttributeOverrideValidator((ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new MappedSuperclassOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator((ReadOnlyAttributeOverride) override, column, textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new AttributeOverrideColumnValidator((ReadOnlyAttributeOverride) override, column, new EntityTableDescriptionProvider());
}
}
@@ -1624,24 +1611,24 @@ public abstract class AbstractJavaEntity
return MappingTools.resolveOverriddenRelationship(this.getOverridableTypeMapping(), attributeName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator((ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new MappedSuperclassOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AssociationOverrideValidator((ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, new MappedSuperclassOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator((ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new AssociationOverrideJoinColumnValidator((ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, new EntityTableDescriptionProvider());
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new AssociationOverrideJoinColumnValidator(override, column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideInverseJoinColumnValidator(override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new AssociationOverrideInverseJoinColumnValidator(override, column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable t, TableTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinTableValidator(override, (ReadOnlyJoinTable) t, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable t) {
+ return new AssociationOverrideJoinTableValidator(override, (ReadOnlyJoinTable) t);
}
}
@@ -1662,8 +1649,8 @@ public abstract class AbstractJavaEntity
return AbstractJavaEntity.this.resolveDbTable(tableName);
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaEntity.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaEntity.this.getValidationTextRange();
}
}
@@ -1672,7 +1659,7 @@ public abstract class AbstractJavaEntity
protected class PrimaryKeyJoinColumnOwner
extends NamedColumnOwner
- implements JavaReadOnlyBaseJoinColumn.Owner
+ implements ReadOnlyBaseJoinColumn.Owner
{
public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
Entity parentEntity = AbstractJavaEntity.this.getParentEntity();
@@ -1691,8 +1678,8 @@ public abstract class AbstractJavaEntity
return (parentEntity == null) ? AbstractJavaEntity.this.getPrimaryKeyColumnName() : parentEntity.getPrimaryKeyColumnName();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new EntityPrimaryKeyJoinColumnValidator((ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new EntityPrimaryKeyJoinColumnValidator((ReadOnlyBaseJoinColumn) column, this);
}
}
@@ -1701,7 +1688,7 @@ public abstract class AbstractJavaEntity
protected class DiscriminatorColumnOwner
extends NamedColumnOwner
- implements JavaDiscriminatorColumn.Owner
+ implements ReadOnlyNamedDiscriminatorColumn.Owner
{
public String getDefaultColumnName(ReadOnlyNamedColumn column) {
return this.isDescendant() ?
@@ -1733,8 +1720,8 @@ public abstract class AbstractJavaEntity
return AbstractJavaEntity.this.discriminatorColumnIsUndefined;
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new DiscriminatorColumnValidator(column, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new DiscriminatorColumnValidator(column);
}
}
@@ -1744,8 +1731,8 @@ public abstract class AbstractJavaEntity
protected class TableOwner
implements ReadOnlyTable.Owner
{
- public JptValidator buildTableValidator(ReadOnlyTable t, TableTextRangeResolver textRangeResolver) {
- return new TableValidator(t, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable t) {
+ return new TableValidator(t);
}
}
@@ -1755,8 +1742,8 @@ public abstract class AbstractJavaEntity
protected class SecondaryTableOwner
implements ReadOnlyTable.Owner
{
- public JptValidator buildTableValidator(ReadOnlyTable t, TableTextRangeResolver textRangeResolver) {
- return new SecondaryTableValidator((ReadOnlySecondaryTable) t, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable t) {
+ return new SecondaryTableValidator((ReadOnlySecondaryTable) t);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java
index ce719f8..d47ae6e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
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.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.Tools;
@@ -73,8 +72,8 @@ public abstract class AbstractJavaGenerator<A extends GeneratorAnnotation>
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (StringTools.stringIsEmpty(this.name)){
messages.add(
@@ -83,19 +82,19 @@ public abstract class AbstractJavaGenerator<A extends GeneratorAnnotation>
JpaValidationMessages.GENERATOR_NAME_UNDEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getNameTextRange(astRoot)
+ this.getNameTextRange()
)
);
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.generatorAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.generatorAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
}
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.generatorAnnotation.getNameTextRange(), astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange(this.generatorAnnotation.getNameTextRange());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java
index 7f3ae83..1c85bfd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java
@@ -34,9 +34,7 @@ import org.eclipse.jpt.jpa.core.context.java.JavaIdMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.java.JavaTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaConverter;
@@ -397,8 +395,8 @@ public abstract class AbstractJavaIdMapping
return this.getTypeMapping().getAllAssociatedTableNames();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, new EntityTableDescriptionProvider());
}
@@ -439,36 +437,36 @@ public abstract class AbstractJavaIdMapping
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
// JPA 2.0: If the column is specified or if the ID is not mapped by a relationship,
// the column is validated.
// JPA 1.0: The column is always be validated, since the ID is never mapped by a
// relationship.
if (this.columnIsSpecified() || ! this.derived) {
- this.column.validate(messages, reporter, astRoot);
+ this.column.validate(messages, reporter);
}
// JPA 2.0: If the column is specified and the ID is mapped by a relationship,
// we have an error.
// JPA 1.0: The ID cannot be mapped by a relationship.
if (this.columnIsSpecified() && this.derived) {
- messages.add(this.buildColumnSpecifiedAndDerivedMessage(astRoot));
+ messages.add(this.buildColumnSpecifiedAndDerivedMessage());
}
- this.generatorContainer.validate(messages, reporter, astRoot);
+ this.generatorContainer.validate(messages, reporter);
if (this.generatedValue != null) {
- this.generatedValue.validate(messages, reporter, astRoot);
+ this.generatedValue.validate(messages, reporter);
}
- this.converter.validate(messages, reporter, astRoot);
+ this.converter.validate(messages, reporter);
}
- protected IMessage buildColumnSpecifiedAndDerivedMessage(CompilationUnit astRoot) {
+ protected IMessage buildColumnSpecifiedAndDerivedMessage() {
return this.buildMessage(
JpaValidationMessages.ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_COLUMN_SPECIFIED,
EMPTY_STRING_ARRAY,
- this.column.getValidationTextRange(astRoot)
+ this.column.getValidationTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java
index bd400ef..3208673 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java
@@ -24,7 +24,6 @@ import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationship;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -35,7 +34,7 @@ public abstract class AbstractJavaJoinColumnRelationshipStrategy
implements JavaJoinColumnRelationshipStrategy
{
protected final ContextListContainer<JavaJoinColumn, JoinColumnAnnotation> specifiedJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner joinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner joinColumnOwner;
protected JavaJoinColumn defaultJoinColumn;
@@ -170,7 +169,7 @@ public abstract class AbstractJavaJoinColumnRelationshipStrategy
}
}
- protected abstract JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner();
+ protected abstract ReadOnlyJoinColumn.Owner buildJoinColumnOwner();
// ********** default join column **********
@@ -317,10 +316,10 @@ public abstract class AbstractJavaJoinColumnRelationshipStrategy
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
for (JavaJoinColumn joinColumn : this.getJoinColumns()) {
- joinColumn.validate(messages, reporter, astRoot);
+ joinColumn.validate(messages, reporter);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java
index 2b5f262..d66bb74 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -186,10 +186,10 @@ public abstract class AbstractJavaJoinTableRelationshipStrategy
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.joinTable != null) {
- this.joinTable.validate(messages, reporter, astRoot);
+ this.joinTable.validate(messages, reporter);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java
index d462f5c..494412b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java
@@ -9,17 +9,12 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import java.util.List;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.Filter;
import org.eclipse.jpt.jpa.core.context.JpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.internal.context.AbstractJpaContextNode;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public abstract class AbstractJavaJpaContextNode
extends AbstractJpaContextNode
@@ -55,42 +50,5 @@ public abstract class AbstractJavaJpaContextNode
protected Iterable<String> getConnectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
return null;
}
-
- // ********** validation **********
-
- /**
- * All subclass implementations
- * should be preceded by a "super" call to this method.
- */
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
- }
- /**
- * Validate the specified node if it is not <code>null</code>.
- */
- protected void validateNode(JavaJpaContextNode node, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (node != null) {
- node.validate(messages, reporter, astRoot);
- }
- }
-
- /**
- * Validate the specified nodes.
- */
- protected void validateNodes(Iterable<? extends JavaJpaContextNode> nodes, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- for (JavaJpaContextNode node : nodes) {
- node.validate(messages, reporter, astRoot);
- }
- }
-
- /**
- * Return the specified text range if it is not <code>null</code>; if it is
- * <code>null</code>, return the node's validation text range.
- */
- protected TextRange getValidationTextRange(TextRange textRange, CompilationUnit astRoot) {
- return (textRange != null) ? textRange : this.getValidationTextRange(astRoot);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java
index ebf34eb..1756057 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.Query;
@@ -19,7 +18,6 @@ import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericMappedSuperclassPrimaryKeyValidator;
import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -112,11 +110,11 @@ public abstract class AbstractJavaMappedSuperclass
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validatePrimaryKey(messages, reporter, astRoot);
- this.idClassReference.validate(messages, reporter, astRoot);
- this.queryContainer.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validatePrimaryKey(messages, reporter);
+ this.idClassReference.validate(messages, reporter);
+ this.queryContainer.validate(messages, reporter);
}
@Override
@@ -124,17 +122,12 @@ public abstract class AbstractJavaMappedSuperclass
return false;
}
- protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.buildPrimaryKeyValidator(astRoot).validate(messages, reporter);
+ protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter) {
+ this.buildPrimaryKeyValidator().validate(messages, reporter);
}
- protected JptValidator buildPrimaryKeyValidator(CompilationUnit astRoot) {
- return new GenericMappedSuperclassPrimaryKeyValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildPrimaryKeyValidator() {
+ return new GenericMappedSuperclassPrimaryKeyValidator(this);
// TODO - JPA 2.0 validation
}
-
- @Override
- protected PrimaryKeyTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaMappedSuperclassTextRangeResolver(this, astRoot);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java
index 6293874..0da8c8d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.Entity;
import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
@@ -126,7 +125,7 @@ public abstract class AbstractJavaMappingRelationship<M extends JavaRelationship
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getMapping().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java
index 270fd3c..118f1e7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java
@@ -52,14 +52,9 @@ import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaMultiRelationshipMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaOrderable;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideValidator;
@@ -111,7 +106,7 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
protected JavaConverter mapKeyConverter; // map key converter - never null
protected final ContextListContainer<JavaJoinColumn, MapKeyJoinColumn2_0Annotation> specifiedMapKeyJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
protected JavaJoinColumn defaultMapKeyJoinColumn;
@@ -776,7 +771,7 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
}
}
- protected JavaReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
return new MapKeyJoinColumnOwner();
}
@@ -969,15 +964,15 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateAttributeType(messages, reporter, astRoot);
- this.validateMapKeyClass(messages, astRoot);
- this.orderable.validate(messages, reporter, astRoot);
- this.validateMapKey(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateAttributeType(messages, reporter);
+ this.validateMapKeyClass(messages);
+ this.orderable.validate(messages, reporter);
+ this.validateMapKey(messages, reporter);
}
- protected void validateAttributeType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateAttributeType(List<IMessage> messages, IReporter reporter) {
JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
if ((javaAttribute != null) && !javaAttribute.getJpaContainerDefinition().isContainer()) {
if (this.getPersistentAttribute().isVirtual()) {
@@ -987,7 +982,7 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
new String[] {getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -998,49 +993,49 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
JpaValidationMessages.ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
}
}
- protected TextRange getMapKeyClassTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getMapKeyClassAnnotationTextRange(astRoot), astRoot);
+ protected TextRange getMapKeyClassTextRange() {
+ return this.getValidationTextRange(this.getMapKeyClassAnnotationTextRange());
}
- protected TextRange getMapKeyClassAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getMapKeyClassAnnotationTextRange() {
MapKeyClass2_0Annotation annotation = this.getMapKeyClassAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
- protected void validateMapKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateMapKey(List<IMessage> messages, IReporter reporter) {
if (this.getMapKeyAnnotation() != null) {//If MapKey annotation specified, no other MapKey* annotations can be specified, don't validate them
//TODO validate that the map key refers to an existing attribute
return;
}
if (this.getKeyType() == Type.BASIC_TYPE) {
- this.mapKeyColumn.validate(messages, reporter, astRoot);
- this.mapKeyConverter.validate(messages, reporter, astRoot);
+ this.mapKeyColumn.validate(messages, reporter);
+ this.mapKeyConverter.validate(messages, reporter);
}
else if (this.getKeyType() == Type.ENTITY_TYPE) {
for (JavaJoinColumn joinColumn : this.getMapKeyJoinColumns()) {
- joinColumn.validate(messages, reporter, astRoot);
+ joinColumn.validate(messages, reporter);
}
}
else if (this.getKeyType() == Type.EMBEDDABLE_TYPE) {
- this.mapKeyAttributeOverrideContainer.validate(messages, reporter, astRoot);
+ this.mapKeyAttributeOverrideContainer.validate(messages, reporter);
//validate map key association overrides - for eclipselink
}
}
- protected void validateMapKeyClass(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateMapKeyClass(List<IMessage> messages) {
if (this.isJpa2_0Compatible() && this.getPersistentAttribute().getJpaContainerDefinition().isMap()) {
- this.validateMapKeyClass_(messages, astRoot);
+ this.validateMapKeyClass_(messages);
}
}
- protected void validateMapKeyClass_(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateMapKeyClass_(List<IMessage> messages) {
if (this.getMapKeyClass() == null) {
if (this.getPersistentAttribute().isVirtual()) {
messages.add(
@@ -1049,7 +1044,7 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_NOT_DEFINED,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -1059,7 +1054,7 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
JpaValidationMessages.MAP_KEY_CLASS_NOT_DEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -1078,7 +1073,7 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE,
new String[] {this.getName(), this.getFullyQualifiedMapKeyClass()},
this,
- this.getMapKeyClassTextRange(astRoot)
+ this.getMapKeyClassTextRange()
)
);
}
@@ -1089,7 +1084,7 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
JpaValidationMessages.MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE,
new String[] {this.getFullyQualifiedMapKeyClass()},
this,
- this.getMapKeyClassTextRange(astRoot)
+ this.getMapKeyClassTextRange()
)
);
}
@@ -1121,8 +1116,8 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
return EmptyIterable.instance();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaMultiRelationshipMapping.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaMultiRelationshipMapping.this.getValidationTextRange();
}
protected RelationshipStrategy getRelationshipStrategy() {
@@ -1157,8 +1152,8 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
return this.getRelationshipStrategy().tableNameIsInvalid(tableName);
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
}
}
@@ -1209,12 +1204,12 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
}
}
@@ -1222,7 +1217,7 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
// ********** map key join column owner **********
protected class MapKeyJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected MapKeyJoinColumnOwner() {
super();
@@ -1272,16 +1267,15 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
return AbstractJavaMultiRelationshipMapping.this.getMapKeyJoinColumnsSize();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaMultiRelationshipMapping.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaMultiRelationshipMapping.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
return new MapKeyJoinColumnValidator(
this.getPersistentAttribute(),
(ReadOnlyJoinColumn) column,
- this,
- (JoinColumnTextRangeResolver) textRangeResolver,
+ this,
new RelationshipStrategyTableDescriptionProvider(getRelationship().getStrategy()));
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java
index 662ffba..c9ea6f8 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java
@@ -21,7 +21,6 @@ import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaNamedColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation;
import org.eclipse.jpt.jpa.db.Column;
import org.eclipse.jpt.jpa.db.Table;
@@ -247,26 +246,22 @@ public abstract class AbstractJavaNamedColumn<A extends NamedColumnAnnotation, O
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.buildValidator().validate(messages, reporter);
}
- protected JptValidator buildValidator(CompilationUnit astRoot) {
- return this.owner.buildColumnValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildValidator() {
+ return this.owner.buildColumnValidator(this);
}
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaNamedColumnTextRangeResolver(this, astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getColumnAnnotation().getTextRange();
+ return (textRange != null) ? textRange : this.owner.getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getColumnAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.owner.getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getColumnAnnotation().getNameTextRange(), astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange(this.getColumnAnnotation().getNameTextRange());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumnTextRangeResolver.java
deleted file mode 100644
index a8139f4..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumnTextRangeResolver.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.jpa.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-
-public abstract class AbstractJavaNamedColumnTextRangeResolver<C extends JavaReadOnlyNamedColumn>
- implements NamedColumnTextRangeResolver
-{
- protected final C column;
-
- protected final CompilationUnit astRoot;
-
-
- protected AbstractJavaNamedColumnTextRangeResolver(C column, CompilationUnit astRoot) {
- super();
- this.column = column;
- this.astRoot = astRoot;
- }
-
- public TextRange getNameTextRange() {
- return this.column.getNameTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java
index 83595c5..b42fd98 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java
@@ -23,8 +23,6 @@ import org.eclipse.jpt.jpa.core.context.java.JavaOverride;
import org.eclipse.jpt.jpa.core.context.java.JavaOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverride;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOverrideContainer2_0;
import org.eclipse.jpt.jpa.core.resource.java.OverrideAnnotation;
import org.eclipse.jpt.jpa.db.Table;
@@ -161,8 +159,8 @@ public abstract class AbstractJavaOverride<C extends JavaOverrideContainer, A ex
return this.getContainer().getDefaultTableName();
}
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner) {
+ return this.getContainer().buildColumnValidator(this, column, owner);
}
protected String prefix(String oldName) {
@@ -215,26 +213,22 @@ public abstract class AbstractJavaOverride<C extends JavaOverrideContainer, A ex
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.buildValidator().validate(messages, reporter);
}
- protected JptValidator buildValidator(CompilationUnit astRoot) {
- return this.getContainer().buildOverrideValidator(this, buildTextRangeResolver(astRoot));
+ protected JptValidator buildValidator() {
+ return this.getContainer().buildOverrideValidator(this);
}
- protected OverrideTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaOverrideTextRangeResolver(this, astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.overrideAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getContainer().getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.overrideAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getContainer().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.overrideAnnotation.getNameTextRange(), astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange(this.overrideAnnotation.getNameTextRange());
}
public boolean tableNameIsInvalid(String tableName) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java
index 075af3c..cdd5354 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java
@@ -38,7 +38,6 @@ import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaPersistentAttribute2_0;
import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
@@ -596,8 +595,8 @@ public abstract class AbstractJavaPersistentAttribute
return null;
}
- public boolean contains(int offset, CompilationUnit astRoot) {
- TextRange fullTextRange = this.getResourceAttribute().getTextRange(astRoot);
+ public boolean contains(int offset) {
+ TextRange fullTextRange = this.getResourceAttribute().getTextRange();
// 'fullTextRange' will be null if the attribute no longer exists in the java;
// the context model can be out of sync with the resource model
// when a selection event occurs before the context model has a
@@ -613,28 +612,24 @@ public abstract class AbstractJavaPersistentAttribute
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return this.isVirtual() ?
this.getOwningPersistentType().getValidationTextRange() :
this.getSelectionTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateAttribute(messages, reporter, astRoot);
- this.mapping.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateAttribute(messages, reporter);
+ this.mapping.validate(messages, reporter);
}
- protected void validateAttribute(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.buildAttributeValidator(astRoot).validate(messages, reporter);
+ protected void validateAttribute(List<IMessage> messages, IReporter reporter) {
+ this.buildAttributeValidator().validate(messages, reporter);
}
- protected abstract JptValidator buildAttributeValidator(CompilationUnit astRoot);
-
- protected PersistentAttributeTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaPersistentAttributeTextRangeResolver(this, astRoot);
- }
+ protected abstract JptValidator buildAttributeValidator();
/**
* If the attribute's owning type is an <code>orm.xml</code> persistent
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java
index e5ab9be..6b4d04b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java
@@ -53,7 +53,6 @@ import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
import org.eclipse.jpt.jpa.core.internal.plugin.JptJpaCorePlugin;
import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -569,7 +568,7 @@ public abstract class AbstractJavaPersistentType
private void syncFieldAccessAttributes() {
HashSet<JavaPersistentAttribute> contextAttributes = CollectionTools.set(this.getAttributes());
- this.syncFieldAttributes(contextAttributes, this.buildNonTransientNonStaticResourceFieldsFilter());
+ this.syncFieldAttributes(contextAttributes, buildNonTransientNonStaticResourceFieldsFilter());
this.syncAnnotatedPropertyAttributes(contextAttributes);
}
@@ -939,13 +938,10 @@ public abstract class AbstractJavaPersistentType
return JavaPersistentType.class;
}
- // TODO when we start caching text ranges we can stop building the ASTRoot.
public JpaStructureNode getStructureNode(int offset) {
- CompilationUnit astRoot = this.buildASTRoot();
-
- if (this.contains(offset, astRoot)) {
+ if (this.contains(offset)) {
for (JavaPersistentAttribute persistentAttribute : this.getAttributes()) {
- if (persistentAttribute.contains(offset, astRoot)) {
+ if (persistentAttribute.contains(offset)) {
return persistentAttribute;
}
}
@@ -954,8 +950,8 @@ public abstract class AbstractJavaPersistentType
return null;
}
- protected boolean contains(int offset, CompilationUnit astRoot) {
- TextRange fullTextRange = this.resourceType.getTextRange(astRoot);
+ protected boolean contains(int offset) {
+ TextRange fullTextRange = this.resourceType.getTextRange();
// 'fullTextRange' will be null if the type no longer exists in the java;
// the context model can be out of sync with the resource model
// when a selection event occurs before the context model has a
@@ -1013,49 +1009,37 @@ public abstract class AbstractJavaPersistentType
// ********** validation **********
+ @Override
public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
+ super.validate(messages, reporter);
if (MappingTools.nodeIsInternalSource(this, this.resourceType)) {
- // build the AST root here to pass down
- this.validate(messages, reporter, this.buildASTRoot());
+ this.validateMapping(messages, reporter);
+ this.validateAttributes(messages, reporter);
}
}
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateMapping(messages, reporter, astRoot);
- this.validateAttributes(messages, reporter, astRoot);
- }
-
- protected void validateMapping(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateMapping(List<IMessage> messages, IReporter reporter) {
try {
- this.mapping.validate(messages, reporter, astRoot);
+ this.mapping.validate(messages, reporter);
} catch(Throwable t) {
JptJpaCorePlugin.instance().logError(t);
}
}
- protected void validateAttributes(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateAttributes(List<IMessage> messages, IReporter reporter) {
for (JavaPersistentAttribute attribute : this.getAttributes()) {
- this.validateAttribute(attribute, reporter, messages, astRoot);
+ this.validateAttribute(attribute, reporter, messages);
}
}
- protected void validateAttribute(JavaPersistentAttribute attribute, IReporter reporter, List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateAttribute(JavaPersistentAttribute attribute, IReporter reporter, List<IMessage> messages) {
try {
- attribute.validate(messages, reporter, astRoot);
+ attribute.validate(messages, reporter);
} catch(Throwable t) {
JptJpaCorePlugin.instance().logError(t);
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange();
- }
-
public TextRange getValidationTextRange() {
return this.getSelectionTextRange();
}
@@ -1085,10 +1069,6 @@ public abstract class AbstractJavaPersistentType
return this.getParent().getDefaultPersistentTypeAccess();
}
- protected CompilationUnit buildASTRoot() {
- return this.resourceType.getJavaResourceCompilationUnit().buildASTRoot();
- }
-
protected JpaFile getJpaFile() {
return this.getJpaFile(this.resourceType.getFile());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java
index 9c0e210..1c35815 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java
@@ -11,7 +11,6 @@ package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.ArrayList;
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.internal.CollectionTools;
import org.eclipse.jpt.common.utility.internal.StringTools;
@@ -191,13 +190,13 @@ public abstract class AbstractJavaQuery<A extends QueryAnnotation>
// ********** validation **********
- public void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateName(messages, astRoot);
- this.validateQuery(queryHelper, messages, reporter, astRoot);
+ public void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateName(messages);
+ this.validateQuery(queryHelper, messages, reporter);
}
- protected void validateName(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateName(List<IMessage> messages) {
if (StringTools.stringIsEmpty(this.name)) {
messages.add(
DefaultJpaValidationMessages.buildMessage(
@@ -205,13 +204,13 @@ public abstract class AbstractJavaQuery<A extends QueryAnnotation>
JpaValidationMessages.QUERY_NAME_UNDEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getNameTextRange(astRoot)
+ this.getNameTextRange()
)
);
}
}
- public void validateQuery(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ public void validateQuery(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
if (StringTools.stringIsEmpty(this.query)){
messages.add(
DefaultJpaValidationMessages.buildMessage(
@@ -219,7 +218,7 @@ public abstract class AbstractJavaQuery<A extends QueryAnnotation>
JpaValidationMessages.QUERY_STATEMENT_UNDEFINED,
new String[] {this.name},
this,
- this.getNameTextRange(astRoot)
+ this.getNameTextRange()
)
);
} else {
@@ -229,13 +228,17 @@ public abstract class AbstractJavaQuery<A extends QueryAnnotation>
protected abstract void validateQuery_(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter);
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.queryAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.queryAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
}
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.queryAnnotation.getNameTextRange(), astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange(this.queryAnnotation.getNameTextRange());
+ }
+
+ public TextRange getQueryTextRange() {
+ return this.getValidationTextRange(this.queryAnnotation.getQueryTextRange());
}
public boolean isEquivalentTo(JpaNamedContextNode node) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java
index a87afee..bbd66f5 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java
@@ -319,13 +319,13 @@ public abstract class AbstractJavaRelationshipMapping<A extends RelationshipMapp
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateTargetEntity(messages, astRoot);
- this.relationship.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateTargetEntity(messages);
+ this.relationship.validate(messages, reporter);
}
- protected void validateTargetEntity(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateTargetEntity(List<IMessage> messages) {
if (this.getTargetEntity() == null) {
String msg = this.getPersistentAttribute().isVirtual() ?
JpaValidationMessages.VIRTUAL_ATTRIBUTE_TARGET_ENTITY_NOT_DEFINED :
@@ -336,7 +336,7 @@ public abstract class AbstractJavaRelationshipMapping<A extends RelationshipMapp
msg,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
return;
@@ -355,7 +355,7 @@ public abstract class AbstractJavaRelationshipMapping<A extends RelationshipMapp
JpaValidationMessages.VIRTUAL_ATTRIBUTE_TARGET_ENTITY_IS_NOT_AN_ENTITY,
new String[] {this.getName(), this.getFullyQualifiedTargetEntity()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -365,15 +365,15 @@ public abstract class AbstractJavaRelationshipMapping<A extends RelationshipMapp
JpaValidationMessages.TARGET_ENTITY_IS_NOT_AN_ENTITY,
new String[] {this.getFullyQualifiedTargetEntity()},
this,
- this.getTargetEntityTextRange(astRoot)
+ this.getTargetEntityTextRange()
)
);
}
}
}
- protected TextRange getTargetEntityTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getAnnotationTargetEntityTextRange(), astRoot);
+ protected TextRange getTargetEntityTextRange() {
+ return this.getValidationTextRange(this.getAnnotationTargetEntityTextRange());
}
protected TextRange getAnnotationTargetEntityTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java
index bc2e214..abd87dc 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java
@@ -148,8 +148,8 @@ public abstract class AbstractJavaSingleRelationshipMapping<A extends SingleRela
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.derivedIdentity.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.derivedIdentity.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java
index d327a92..662abdb 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java
@@ -25,7 +25,6 @@ import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaTable;
import org.eclipse.jpt.jpa.core.context.java.JavaUniqueConstraint;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.java.BaseTableAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
import org.eclipse.jpt.jpa.db.Catalog;
@@ -484,34 +483,30 @@ public abstract class AbstractJavaTable<A extends BaseTableAnnotation>
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildTableValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.buildTableValidator().validate(messages, reporter);
}
- protected JptValidator buildTableValidator(CompilationUnit astRoot) {
- return this.owner.buildTableValidator(this, buildTextRangeResolver(astRoot));
+ protected JptValidator buildTableValidator() {
+ return this.owner.buildTableValidator(this);
}
- protected TableTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableTextRangeResolver(this, astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getTableAnnotation().getTextRange();
+ return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getTableAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange(this.getTableAnnotation().getNameTextRange());
}
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getTableAnnotation().getNameTextRange(), astRoot);
+ public TextRange getSchemaTextRange() {
+ return this.getValidationTextRange(this.getTableAnnotation().getSchemaTextRange());
}
- public TextRange getSchemaTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getTableAnnotation().getSchemaTextRange(), astRoot);
- }
-
- public TextRange getCatalogTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getTableAnnotation().getCatalogTextRange(), astRoot);
+ public TextRange getCatalogTextRange() {
+ return this.getValidationTextRange(this.getTableAnnotation().getCatalogTextRange());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java
index e53a0c0..444303f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -36,7 +35,6 @@ import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTools;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericTypeMappingValidator;
import org.eclipse.jpt.jpa.db.Schema;
@@ -298,29 +296,25 @@ public abstract class AbstractJavaTypeMapping<A extends Annotation>
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateType(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateType(messages, reporter);
}
- protected void validateType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.buildTypeMappingValidator(astRoot).validate(messages, reporter);
+ protected void validateType(List<IMessage> messages, IReporter reporter) {
+ this.buildTypeMappingValidator().validate(messages, reporter);
}
- protected JptValidator buildTypeMappingValidator(CompilationUnit astRoot) {
- return new GenericTypeMappingValidator(this, this.getJavaResourceType(), buildTextRangeResolver(astRoot));
- }
-
- protected TypeMappingTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTypeMappingTextRangeResolver(this, astRoot);
+ protected JptValidator buildTypeMappingValidator() {
+ return new GenericTypeMappingValidator(this, this.getJavaResourceType());
}
public boolean validatesAgainstDatabase() {
return this.getPersistenceUnit().validatesAgainstDatabase();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.mappingAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getPersistentType().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.mappingAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getPersistentType().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java
index e8bb482..2669551 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -28,9 +28,7 @@ import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.java.JavaTemporalConverter;
import org.eclipse.jpt.jpa.core.context.java.JavaVersionMapping;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaConverter;
@@ -248,8 +246,8 @@ public abstract class AbstractJavaVersionMapping
return this.getTypeMapping().getAllAssociatedTableNames();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, new EntityTableDescriptionProvider());
}
@@ -275,14 +273,14 @@ public abstract class AbstractJavaVersionMapping
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.column.validate(messages, reporter, astRoot);
- this.converter.validate(messages, reporter, astRoot);
- this.validateAttributeType(messages, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.column.validate(messages, reporter);
+ this.converter.validate(messages, reporter);
+ this.validateAttributeType(messages);
}
- protected void validateAttributeType(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateAttributeType(List<IMessage> messages) {
if (!ArrayTools.contains(SUPPORTED_TYPE_NAMES, this.getPersistentAttribute().getTypeName())) {
messages.add(
DefaultJpaValidationMessages.buildMessage(
@@ -290,7 +288,7 @@ public abstract class AbstractJavaVersionMapping
JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_VERSION_MAPPING_TYPE,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java
index f6718b2..d187beb 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -9,15 +9,13 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.VirtualBaseColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-public abstract class AbstractJavaVirtualBaseColumn<O extends JavaReadOnlyBaseColumn.Owner, C extends ReadOnlyBaseColumn>
+public abstract class AbstractJavaVirtualBaseColumn<O extends ReadOnlyBaseColumn.Owner, C extends ReadOnlyBaseColumn>
extends AbstractJavaVirtualNamedColumn<O, C>
implements VirtualBaseColumn, JavaReadOnlyBaseColumn
{
@@ -254,12 +252,7 @@ public abstract class AbstractJavaVirtualBaseColumn<O extends JavaReadOnlyBaseCo
// ********** validation **********
- public TextRange getTableTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableColumnTextRangeResolver(this, astRoot);
+ public TextRange getTableTextRange() {
+ return this.getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java
index f51541a..7a38bb6 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java
@@ -10,14 +10,12 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.VirtualNamedColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.db.Column;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -150,25 +148,21 @@ public abstract class AbstractJavaVirtualNamedColumn<O extends ReadOnlyNamedColu
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.buildValidator().validate(messages, reporter);
}
- protected JptValidator buildValidator(CompilationUnit astRoot) {
- return this.owner.buildColumnValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildValidator() {
+ return this.owner.buildColumnValidator(this);
}
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaNamedColumnTextRangeResolver(this, astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getParent().getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java
index 2d44d0a..0ad85f3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -15,7 +15,7 @@ import org.eclipse.jpt.jpa.core.context.VirtualNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedDiscriminatorColumn;
-public abstract class AbstractJavaVirtualNamedDiscriminatorColumn<O extends JavaReadOnlyNamedDiscriminatorColumn.Owner, C extends ReadOnlyNamedDiscriminatorColumn>
+public abstract class AbstractJavaVirtualNamedDiscriminatorColumn<O extends ReadOnlyNamedDiscriminatorColumn.Owner, C extends ReadOnlyNamedDiscriminatorColumn>
extends AbstractJavaVirtualNamedColumn<O, C>
implements VirtualNamedDiscriminatorColumn, JavaReadOnlyNamedDiscriminatorColumn
{
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java
index be591b8..ece272b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn.Owner;
@@ -18,9 +17,7 @@ import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaOverride;
import org.eclipse.jpt.jpa.core.context.java.JavaOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverride;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -74,8 +71,8 @@ public abstract class AbstractJavaVirtualOverride<C extends JavaOverrideContaine
return this.getContainer().getDefaultTableName();
}
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner) {
+ return this.getContainer().buildColumnValidator(this, column, owner);
}
@Override
@@ -87,25 +84,21 @@ public abstract class AbstractJavaVirtualOverride<C extends JavaOverrideContaine
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.buildValidator().validate(messages, reporter);
}
- protected JptValidator buildValidator(CompilationUnit astRoot) {
- return this.getContainer().buildOverrideValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildValidator() {
+ return this.getContainer().buildOverrideValidator(this);
}
- protected OverrideTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaOverrideTextRangeResolver(this, astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getContainer().getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getContainer().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange();
}
public boolean tableNameIsInvalid(String tableName) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java
index b89f1a2..b92578c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
@@ -20,7 +19,6 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyReferenceTable;
import org.eclipse.jpt.jpa.core.context.VirtualReferenceTable;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumn;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -30,7 +28,7 @@ public abstract class AbstractJavaVirtualReferenceTable<T extends ReadOnlyRefere
implements VirtualReferenceTable
{
protected final ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn> specifiedJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner joinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner joinColumnOwner;
protected JavaVirtualJoinColumn defaultJoinColumn;
@@ -175,11 +173,11 @@ public abstract class AbstractJavaVirtualReferenceTable<T extends ReadOnlyRefere
return this.buildJoinColumn(this.joinColumnOwner, joinColumn);
}
- protected JavaVirtualJoinColumn buildJoinColumn(JavaReadOnlyJoinColumn.Owner columnOwner, ReadOnlyJoinColumn joinColumn) {
+ protected JavaVirtualJoinColumn buildJoinColumn(ReadOnlyJoinColumn.Owner columnOwner, ReadOnlyJoinColumn joinColumn) {
return this.getJpaFactory().buildJavaVirtualJoinColumn(this, columnOwner, joinColumn);
}
- protected abstract JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner();
+ protected abstract ReadOnlyJoinColumn.Owner buildJoinColumnOwner();
@Override
protected String buildDefaultSchema() {
@@ -195,18 +193,18 @@ public abstract class AbstractJavaVirtualReferenceTable<T extends ReadOnlyRefere
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- boolean continueValidating = this.buildTableValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ boolean continueValidating = this.buildTableValidator().validate(messages, reporter);
//join column validation will handle the check for whether to validate against the database
//some validation messages are not database specific. If the database validation for the
//table fails we will stop there and not validate the join columns at all
if (continueValidating) {
- this.validateJoinColumns(messages, reporter, astRoot);
+ this.validateJoinColumns(messages, reporter);
}
}
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.validateNodes(this.getJoinColumns(), messages, reporter, astRoot);
+ protected void validateJoinColumns(List<IMessage> messages, IReporter reporter) {
+ this.validateNodes(this.getJoinColumns(), messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java
index 3adde36..234f06d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
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.internal.NameTools;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
@@ -22,7 +21,6 @@ import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualUniqueConstraint;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.db.Catalog;
import org.eclipse.jpt.jpa.db.Schema;
import org.eclipse.jpt.jpa.db.SchemaContainer;
@@ -317,33 +315,29 @@ public abstract class AbstractJavaVirtualTable<T extends ReadOnlyTable>
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildTableValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.buildTableValidator().validate(messages, reporter);
}
- protected JptValidator buildTableValidator(CompilationUnit astRoot) {
- return this.owner.buildTableValidator(this, buildTextRangeResolver(astRoot));
+ protected JptValidator buildTableValidator() {
+ return this.owner.buildTableValidator(this);
}
- protected TableTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableTextRangeResolver(this, astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getParent().getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange();
}
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
+ public TextRange getSchemaTextRange() {
+ return this.getValidationTextRange();
}
- public TextRange getSchemaTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
- public TextRange getCatalogTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
+ public TextRange getCatalogTextRange() {
+ return this.getValidationTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java
index 831c48c..137f218 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.FieldDeclaration;
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
@@ -22,7 +21,6 @@ import org.eclipse.jpt.jpa.core.context.PersistentType;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.PersistentFieldValidator;
public class FieldAccessor
@@ -63,11 +61,11 @@ public class FieldAccessor
return this.resourceField.isFinal();
}
- public JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute, PersistentAttributeTextRangeResolver textRangeResolver) {
- return new PersistentFieldValidator(persistentAttribute, this, textRangeResolver);
+ public JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute) {
+ return new PersistentFieldValidator(persistentAttribute, this);
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return this.getResourceAttribute().getNameTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java
index 06634f8..3c77a2b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.utility.JDTTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
@@ -248,12 +247,12 @@ public class GenericJavaIdClassReference
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateIdClass(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateIdClass(messages, reporter);
}
- protected void validateIdClass(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateIdClass(List<IMessage> messages, IReporter reporter) {
if (this.isSpecified()) {
JavaResourceType jrt = this.getIdClassJavaResourceType();
if (jrt != null) {
@@ -265,7 +264,7 @@ public class GenericJavaIdClassReference
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_PUBLIC,
new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -277,7 +276,7 @@ public class GenericJavaIdClassReference
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_IMPLEMENT_SERIALIZABLE,
new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -289,7 +288,7 @@ public class GenericJavaIdClassReference
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_EQUALS_METHOD,
new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -301,7 +300,7 @@ public class GenericJavaIdClassReference
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_HASHCODE_METHOD,
new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -309,13 +308,13 @@ public class GenericJavaIdClassReference
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange();
}
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getAnnotationTextRange() {
IdClassAnnotation annotation = this.getIdClassAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java
index efbf688..58751be 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -191,9 +191,9 @@ public class GenericJavaManyToManyRelationship
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.mappedByStrategy.validate(messages, reporter, astRoot);
- this.joinTableStrategy.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.mappedByStrategy.validate(messages, reporter);
+ this.joinTableStrategy.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java
index d2a4bff..d0c5cc8 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -187,9 +187,9 @@ public class GenericJavaManyToOneRelationship
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.joinColumnStrategy.validate(messages, reporter, astRoot);
- this.joinTableStrategy.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.joinColumnStrategy.validate(messages, reporter);
+ this.joinTableStrategy.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java
index 15c2bdf..762088d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java
@@ -198,8 +198,8 @@ public class GenericJavaMappedByRelationshipStrategy
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.mappedByAttribute == null) {
return;
@@ -216,8 +216,7 @@ public class GenericJavaMappedByRelationshipStrategy
messages.add(
this.buildMessage(
JpaValidationMessages.MAPPING_UNRESOLVED_MAPPED_BY,
- new String[] {this.mappedByAttribute},
- astRoot
+ new String[] {this.mappedByAttribute}
)
);
return;
@@ -227,8 +226,7 @@ public class GenericJavaMappedByRelationshipStrategy
messages.add(
this.buildMessage(
JpaValidationMessages.MAPPING_INVALID_MAPPED_BY,
- new String[] {this.mappedByAttribute},
- astRoot
+ new String[] {this.mappedByAttribute}
)
);
return;
@@ -240,14 +238,13 @@ public class GenericJavaMappedByRelationshipStrategy
messages.add(
this.buildMessage(
JpaValidationMessages.MAPPING_MAPPED_BY_ON_BOTH_SIDES,
- new String[] {this.mappedByAttribute},
- astRoot
+ new String[] {this.mappedByAttribute}
)
);
}
}
- protected IMessage buildMessage(String msgID, String[] parms, CompilationUnit astRoot) {
+ protected IMessage buildMessage(String msgID, String[] parms) {
PersistentAttribute attribute = this.getRelationshipMapping().getPersistentAttribute();
String attributeDescription = attribute.isVirtual() ?
JpaValidationDescriptionMessages.VIRTUAL_ATTRIBUTE_DESC :
@@ -259,13 +256,13 @@ public class GenericJavaMappedByRelationshipStrategy
msgID,
parms,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
);
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
TextRange textRange = this.getAnnotationMappedByTextRange();
- return (textRange != null) ? textRange : this.getRelationship().getValidationTextRange(astRoot);
+ return (textRange != null) ? textRange : this.getRelationship().getValidationTextRange();
}
protected TextRange getAnnotationMappedByTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java
index b817526..c60e214 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -24,10 +23,8 @@ import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaMappingJoinColumnRelationship;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.resource.java.NullJoinColumnAnnotation;
@@ -101,7 +98,7 @@ public class GenericJavaMappingJoinColumnRelationshipStrategy
}
@Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -143,15 +140,15 @@ public class GenericJavaMappingJoinColumnRelationshipStrategy
return JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
// ********** join column owner **********
protected class JoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -203,12 +200,12 @@ public class GenericJavaMappingJoinColumnRelationshipStrategy
return GenericJavaMappingJoinColumnRelationshipStrategy.this.getJoinColumnsSize();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaMappingJoinColumnRelationshipStrategy.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaMappingJoinColumnRelationshipStrategy.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, new EntityTableDescriptionProvider());
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java
index e49cb15..815f50a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -265,10 +265,10 @@ public class GenericJavaOneToManyRelationship
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.mappedByStrategy.validate(messages, reporter, astRoot);
- this.joinTableStrategy.validate(messages, reporter, astRoot);
- this.joinColumnStrategy.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.mappedByStrategy.validate(messages, reporter);
+ this.joinTableStrategy.validate(messages, reporter);
+ this.joinColumnStrategy.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java
index c0335f4..ae00df9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -293,11 +293,11 @@ public class GenericJavaOneToOneRelationship
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.mappedByStrategy.validate(messages, reporter, astRoot);
- this.primaryKeyJoinColumnStrategy.validate(messages, reporter, astRoot);
- this.joinColumnStrategy.validate(messages, reporter, astRoot);
- this.joinTableStrategy.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.mappedByStrategy.validate(messages, reporter);
+ this.primaryKeyJoinColumnStrategy.validate(messages, reporter);
+ this.joinColumnStrategy.validate(messages, reporter);
+ this.joinTableStrategy.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java
index 5a2dfa5..8dfc6f7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.context.Entity;
@@ -20,11 +19,8 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.resource.java.NullJoinColumnAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
@@ -73,7 +69,7 @@ public class GenericJavaOverrideJoinColumnRelationshipStrategy
// ********** misc **********
@Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -158,15 +154,15 @@ public class GenericJavaOverrideJoinColumnRelationshipStrategy
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
// ********** join column owner adapter **********
protected class JoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -213,12 +209,12 @@ public class GenericJavaOverrideJoinColumnRelationshipStrategy
return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getJoinColumnsSize();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this, (TableColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java
index 4d4c157..a208be5 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java
@@ -21,16 +21,14 @@ import org.eclipse.jpt.jpa.core.context.Entity;
import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipMapping;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.OneToOnePrimaryKeyJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
@@ -45,7 +43,7 @@ public class GenericJavaPrimaryKeyJoinColumnRelationshipStrategy
implements JavaMappingPrimaryKeyJoinColumnRelationshipStrategy2_0
{
protected final ContextListContainer<JavaPrimaryKeyJoinColumn, PrimaryKeyJoinColumnAnnotation> primaryKeyJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner primaryKeyJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner primaryKeyJoinColumnOwner;
public GenericJavaPrimaryKeyJoinColumnRelationshipStrategy(JavaPrimaryKeyJoinColumnRelationship parent) {
@@ -145,7 +143,7 @@ public class GenericJavaPrimaryKeyJoinColumnRelationshipStrategy
}
}
- protected JavaReadOnlyJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
return new PrimaryKeyJoinColumnOwner();
}
@@ -258,22 +256,22 @@ public class GenericJavaPrimaryKeyJoinColumnRelationshipStrategy
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
for (JavaPrimaryKeyJoinColumn pkJoinColumn : this.getPrimaryKeyJoinColumns()) {
- pkJoinColumn.validate(messages, reporter, astRoot);
+ pkJoinColumn.validate(messages, reporter);
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
// ********** join column owner **********
protected class PrimaryKeyJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected PrimaryKeyJoinColumnOwner() {
super();
@@ -326,16 +324,16 @@ public class GenericJavaPrimaryKeyJoinColumnRelationshipStrategy
return null;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.getValidationTextRange();
}
public int getJoinColumnsSize() {
return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.getPrimaryKeyJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new OneToOnePrimaryKeyJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new OneToOnePrimaryKeyJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseJoinColumn) column, this);
}
protected JavaRelationshipMapping getRelationshipMapping() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java
index bcfe509..192cb73 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
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.internal.Tools;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
@@ -25,15 +24,12 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTable;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTableRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -46,7 +42,7 @@ public class GenericJavaVirtualJoinTable
{
protected final ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn> specifiedInverseJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
protected JavaVirtualJoinColumn defaultInverseJoinColumn;
@@ -197,11 +193,11 @@ public class GenericJavaVirtualJoinTable
}
@Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
- protected JavaReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
return new InverseJoinColumnOwner();
}
@@ -226,9 +222,9 @@ public class GenericJavaVirtualJoinTable
// ********** validation **********
@Override
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validateJoinColumns(messages, reporter, astRoot);
- this.validateNodes(this.getInverseJoinColumns(), messages, reporter, astRoot);
+ protected void validateJoinColumns(List<IMessage> messages, IReporter reporter) {
+ super.validateJoinColumns(messages, reporter);
+ this.validateNodes(this.getInverseJoinColumns(), messages, reporter);
}
public boolean validatesAgainstDatabase() {
@@ -242,7 +238,7 @@ public class GenericJavaVirtualJoinTable
* just a little common behavior
*/
protected abstract class AbstractJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected AbstractJoinColumnOwner() {
super();
@@ -281,8 +277,8 @@ public class GenericJavaVirtualJoinTable
return GenericJavaVirtualJoinTable.this.getName();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaVirtualJoinTable.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaVirtualJoinTable.this.getValidationTextRange();
}
protected JavaVirtualRelationship getRelationship() {
@@ -322,8 +318,8 @@ public class GenericJavaVirtualJoinTable
return GenericJavaVirtualJoinTable.this.getJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericJavaVirtualJoinTable.this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return GenericJavaVirtualJoinTable.this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this);
}
}
@@ -358,8 +354,8 @@ public class GenericJavaVirtualJoinTable
return GenericJavaVirtualJoinTable.this.getInverseJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericJavaVirtualJoinTable.this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return GenericJavaVirtualJoinTable.this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityTextRangeResolver.java
deleted file mode 100644
index af74224..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityTextRangeResolver.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/