summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Butzke2013-02-01 15:54:00 (EST)
committerKaren Butzke2013-02-01 15:54:35 (EST)
commit84f7322c6a43fb315d92942bd1efa2ca13e71ef7 (patch)
treeaf3cc82a691258aa96ce8e3a061043cf42080e72
parent9cc2e2258678f83433b712b5facb38fd1e2a924c (diff)
downloadwebtools.dali-84f7322c6a43fb315d92942bd1efa2ca13e71ef7.zip
webtools.dali-84f7322c6a43fb315d92942bd1efa2ca13e71ef7.tar.gz
webtools.dali-84f7322c6a43fb315d92942bd1efa2ca13e71ef7.tar.bz2
JPA structure view had implied class refs for a persistence.xml, I refactored that incorrectly
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java20
1 files changed, 4 insertions, 16 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java
index e6f1974..5eec313 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java
@@ -349,18 +349,14 @@ public abstract class AbstractPersistenceUnit
protected void initializeChildren() {
CollectionTools.addAll(this.children, this.getMappingFileRefs());
- CollectionTools.addAll(this.children, this.getSpecifiedClassRefs());
-
- //TODO why are we not displaying these in the JPA Structure View for a persistence.xml?
- //CollectionTools.addAll(this.children, this.getImpliedClassRefs());
+ CollectionTools.addAll(this.children, this.getClassRefs());
CollectionTools.addAll(this.children, this.getJarFileRefs());
}
protected void updateChildren() {
Vector<JpaStructureNode> newChildren = new Vector<JpaStructureNode>();
CollectionTools.addAll(newChildren, this.getMappingFileRefs());
- CollectionTools.addAll(newChildren, this.getSpecifiedClassRefs());
- //CollectionTools.addAll(children, this.getImpliedClassRefs());
+ CollectionTools.addAll(newChildren, this.getClassRefs());
CollectionTools.addAll(newChildren, this.getJarFileRefs());
this.synchronizeCollection(newChildren, this.children, CHILDREN_COLLECTION);
@@ -388,16 +384,8 @@ public abstract class AbstractPersistenceUnit
}
public void dispose() {
- //I assume we also need to dispose implied class refs, so I am not using the getChildren() api
- //right now since that currently only builds specified class refs.
- for (ClassRef classRef : this.getClassRefs()) {
- classRef.dispose();
- }
- for (JarFileRef jarFileRef : this.getJarFileRefs()) {
- jarFileRef.dispose();
- }
- for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
- mappingFileRef.dispose();
+ for (JpaStructureNode child : this.getChildren()) {
+ child.dispose();
}
}