Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2008-04-08 16:54:37 -0400
committerkmoore2008-04-08 16:54:37 -0400
commitbb23dcdb40c951c7b3cf872ba920c25e27024a0e (patch)
tree63d2c338caaffcc466a66ec951463557ed1d6455
parent065fe055f76790fcd9fb56f20dad2fe1a4550294 (diff)
downloadwebtools.dali-bb23dcdb40c951c7b3cf872ba920c25e27024a0e.tar.gz
webtools.dali-bb23dcdb40c951c7b3cf872ba920c25e27024a0e.tar.xz
webtools.dali-bb23dcdb40c951c7b3cf872ba920c25e27024a0e.zip
switch to PropertyListValueModelAdapter
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/RootContextItemContentProvider.java28
1 files changed, 15 insertions, 13 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/RootContextItemContentProvider.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/RootContextItemContentProvider.java
index ab886a3621..c6e1311a2c 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/RootContextItemContentProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/platform/generic/RootContextItemContentProvider.java
@@ -15,9 +15,8 @@ import org.eclipse.jpt.core.context.JpaRootContextNode;
import org.eclipse.jpt.core.context.persistence.PersistenceXml;
import org.eclipse.jpt.ui.internal.jface.AbstractTreeItemContentProvider;
import org.eclipse.jpt.ui.internal.jface.DelegatingTreeContentAndLabelProvider;
-import org.eclipse.jpt.utility.internal.model.value.CollectionListValueModelAdapter;
import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter;
-import org.eclipse.jpt.utility.internal.model.value.PropertyCollectionValueModelAdapter;
+import org.eclipse.jpt.utility.internal.model.value.PropertyListValueModelAdapter;
import org.eclipse.jpt.utility.model.value.ListValueModel;
public class RootContextItemContentProvider
@@ -28,23 +27,26 @@ public class RootContextItemContentProvider
super(rootContext, contentProvider);
}
+ @Override
+ public JpaRootContextNode model() {
+ return (JpaRootContextNode) super.model();
+ }
@Override
public IProject getParent() {
- return ((JpaRootContextNode) model()).getJpaProject().getProject();
+ return model().getJpaProject().getProject();
}
@Override
protected ListValueModel<PersistenceXml> buildChildrenModel() {
- return new CollectionListValueModelAdapter<PersistenceXml>(
- new PropertyCollectionValueModelAdapter<PersistenceXml>(
- new PropertyAspectAdapter<JpaRootContextNode, PersistenceXml>(
- JpaRootContextNode.PERSISTENCE_XML_PROPERTY,
- (JpaRootContextNode) model()) {
- @Override
- protected PersistenceXml buildValue_() {
- return subject.getPersistenceXml();
- }
- }));
+ return new PropertyListValueModelAdapter<PersistenceXml>(
+ new PropertyAspectAdapter<JpaRootContextNode, PersistenceXml>(
+ JpaRootContextNode.PERSISTENCE_XML_PROPERTY,
+ model()) {
+ @Override
+ protected PersistenceXml buildValue_() {
+ return subject.getPersistenceXml();
+ }
+ });
}
}

Back to the top