Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jaxb
diff options
context:
space:
mode:
authorBrian Vosburgh2016-07-12 18:11:12 -0400
committerBrian Vosburgh2017-05-18 18:37:46 -0400
commitc06255a0b27d949afea7c27a528e2fb913908eca (patch)
tree87ee2e9199cac892d43b17f8e119a9a0667e8807 /jaxb
parent246f11c9c3a8e9a2a55dd00f0069ed004f6da700 (diff)
downloadwebtools.dali-c06255a0b27d949afea7c27a528e2fb913908eca.tar.gz
webtools.dali-c06255a0b27d949afea7c27a528e2fb913908eca.tar.xz
webtools.dali-c06255a0b27d949afea7c27a528e2fb913908eca.zip
delete Transformation PVMs
Diffstat (limited to 'jaxb')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/xsd/XsdSchema.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/ELJaxbProjectImpl.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaClassMapping.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/navigator/ELJaxbNavigatorItemLabelProviderFactory.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/AbstractNavigatorItemContentProviderFactory.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/AbstractNavigatorItemLabelProviderFactory.java16
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/navigator/JaxbNavigatorItemContentProviderFactory.java15
10 files changed, 38 insertions, 40 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java
index 1a7126e9e2..874e7d9592 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2013 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2016 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.
@@ -685,7 +685,7 @@ public abstract class AbstractJaxbProject
// }
protected Iterable<JavaResourceCompilationUnit> getInternalJavaResourceCompilationUnits() {
- return IterableTools.downCast(IterableTools.transform(this.getJavaSourceJaxbFiles(), JaxbFile.RESOURCE_MODEL_TRANSFORMER));
+ return IterableTools.downcast(IterableTools.transform(this.getJavaSourceJaxbFiles(), JaxbFile.RESOURCE_MODEL_TRANSFORMER));
}
/**
@@ -865,7 +865,7 @@ public abstract class AbstractJaxbProject
// **************** jaxb.index resources **********************************
public Iterable<JaxbIndexResource> getJaxbIndexResources() {
- return IterableTools.downCast(IterableTools.transform(getJaxbFiles(JaxbIndexResource.CONTENT_TYPE), JaxbFile.RESOURCE_MODEL_TRANSFORMER));
+ return IterableTools.downcast(IterableTools.transform(getJaxbFiles(JaxbIndexResource.CONTENT_TYPE), JaxbFile.RESOURCE_MODEL_TRANSFORMER));
}
public JaxbIndexResource getJaxbIndexResource(String packageName) {
@@ -881,7 +881,7 @@ public abstract class AbstractJaxbProject
// **************** jaxb.properties resources *****************************
public Iterable<JaxbPropertiesResource> getJaxbPropertiesResources() {
- return IterableTools.downCast(IterableTools.transform(getJaxbFiles(JaxbPropertiesResource.CONTENT_TYPE), JaxbFile.RESOURCE_MODEL_TRANSFORMER));
+ return IterableTools.downcast(IterableTools.transform(getJaxbFiles(JaxbPropertiesResource.CONTENT_TYPE), JaxbFile.RESOURCE_MODEL_TRANSFORMER));
}
public JaxbPropertiesResource getJaxbPropertiesResource(String packageName) {
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 d8a1490d82..8f11d280d0 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2015 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2016 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.
@@ -462,19 +462,19 @@ public abstract class AbstractJaxbContextRoot
}
public Iterable<JavaClass> getJavaClasses() {
- return IterableTools.downCast(IterableTools.filter(getJavaTypes(), new JavaType.IsKind(TypeKind.CLASS)));
+ return IterableTools.downcast(IterableTools.filter(getJavaTypes(), new JavaType.IsKind(TypeKind.CLASS)));
}
public Iterable<JavaClass> getJavaClasses(JaxbPackage jaxbPackage) {
- return IterableTools.downCast(IterableTools.filter(getJavaTypes(jaxbPackage), new JavaType.IsKind(TypeKind.CLASS)));
+ return IterableTools.downcast(IterableTools.filter(getJavaTypes(jaxbPackage), new JavaType.IsKind(TypeKind.CLASS)));
}
public Iterable<JavaEnum> getJavaEnums() {
- return IterableTools.downCast(IterableTools.filter(getJavaTypes(), new JavaType.IsKind(TypeKind.ENUM)));
+ return IterableTools.downcast(IterableTools.filter(getJavaTypes(), new JavaType.IsKind(TypeKind.ENUM)));
}
public Iterable<JavaEnum> getJavaEnums(JaxbPackage jaxbPackage) {
- return IterableTools.downCast(IterableTools.filter(getJavaTypes(jaxbPackage), new JavaType.IsKind(TypeKind.ENUM)));
+ return IterableTools.downcast(IterableTools.filter(getJavaTypes(jaxbPackage), new JavaType.IsKind(TypeKind.ENUM)));
}
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 eed89d7473..2a7a7e4ac7 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
@@ -80,7 +80,7 @@ public class GenericJavaClassMapping
public GenericJavaClassMapping(JavaClass parent) {
super(parent);
- this.includedAttributesContainers = new Hashtable<JaxbClassMapping, JaxbAttributesContainer>();
+ this.includedAttributesContainers = new Hashtable<>();
this.propOrderContainer = new PropOrderContainer();
initFactoryClass();
@@ -669,7 +669,7 @@ public class GenericJavaClassMapping
public JaxbAttributeMapping getXmlIdMapping() {
Iterator<XmlNamedNodeMapping> allXmlIdMappings =
IterableTools.filter(
- IterableTools.<JaxbAttributeMapping, XmlNamedNodeMapping>downCast(
+ IterableTools.<JaxbAttributeMapping, XmlNamedNodeMapping>downcast(
IterableTools.filter(
IterableTools.transform(
getAllAttributes(),
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/xsd/XsdSchema.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/xsd/XsdSchema.java
index 0a055fc9da..91e0dd7818 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/xsd/XsdSchema.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/xsd/XsdSchema.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2016 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.
@@ -95,8 +95,7 @@ public class XsdSchema
}
protected Iterable<XSDSimpleTypeDefinition> getXSDSimpleTypeDefinitions(String namespace) {
- return IterableTools.downCast(
- IterableTools.filter(getXSDTypeDefinitions(namespace), PredicateTools.<XSDTypeDefinition>instanceOf(XSDSimpleTypeDefinition.class)));
+ return IterableTools.filter(getXSDTypeDefinitions(namespace), XSDSimpleTypeDefinition.class);
}
public Iterable<XsdElementDeclaration> getElementDeclarations() {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/ELJaxbProjectImpl.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/ELJaxbProjectImpl.java
index bd11a603cf..573914c8da 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/ELJaxbProjectImpl.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/ELJaxbProjectImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2016 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.
@@ -27,6 +27,6 @@ public class ELJaxbProjectImpl
public Iterable<JptXmlResource> getOxmResources() {
- return IterableTools.downCast(IterableTools.transform(getJaxbFiles(Oxm.CONTENT_TYPE), JaxbFile.RESOURCE_MODEL_TRANSFORMER));
+ return IterableTools.downcast(IterableTools.transform(getJaxbFiles(Oxm.CONTENT_TYPE), JaxbFile.RESOURCE_MODEL_TRANSFORMER));
}
}
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 65e14dd3bd..c3955f5943 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,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Oracle. All rights reserved.
+ * Copyright (c) 2012, 2016 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.
@@ -201,7 +201,7 @@ public class ELJavaClassMapping
protected Iterable<ELXmlNamedNodeMapping> getAllKeyMappings() {
return IterableTools.filter(
- IterableTools.<JaxbAttributeMapping, ELXmlNamedNodeMapping>downCast(
+ IterableTools.<JaxbAttributeMapping, ELXmlNamedNodeMapping>downcast(
IterableTools.filter(
IterableTools.transform(
getAllAttributes(),
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/navigator/ELJaxbNavigatorItemLabelProviderFactory.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/navigator/ELJaxbNavigatorItemLabelProviderFactory.java
index 10822278dd..d2e9c09f08 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/navigator/ELJaxbNavigatorItemLabelProviderFactory.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/navigator/ELJaxbNavigatorItemLabelProviderFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2016 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.common.ui.internal.jface.ModelItemExtendedLabelProvider;
import org.eclipse.jpt.common.ui.internal.jface.StaticItemExtendedLabelProvider;
import org.eclipse.jpt.common.ui.jface.ItemExtendedLabelProvider;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter;
-import org.eclipse.jpt.common.utility.internal.model.value.StaticPropertyValueModel;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
import org.eclipse.jpt.jaxb.eclipselink.core.context.oxm.OxmFile;
@@ -106,7 +106,7 @@ public class ELJaxbNavigatorItemLabelProviderFactory
}
protected PropertyValueModel<ImageDescriptor> buildOxmJavaTypeImageDescriptorModel(@SuppressWarnings("unused") OxmJavaType item) {
- return new StaticPropertyValueModel<ImageDescriptor>(JptJaxbUiImages.JAXB_CLASS);
+ return PropertyValueModelTools.staticPropertyValueModel(JptJaxbUiImages.JAXB_CLASS);
}
protected PropertyValueModel<String> buildOxmJavaTypeTextModel(OxmJavaType item) {
@@ -141,7 +141,7 @@ public class ELJaxbNavigatorItemLabelProviderFactory
}
protected PropertyValueModel<ImageDescriptor> buildOxmXmlEnumImageDescriptorModel(@SuppressWarnings("unused") OxmXmlEnum item) {
- return new StaticPropertyValueModel<ImageDescriptor>(JptJaxbUiImages.JAXB_ENUM);
+ return PropertyValueModelTools.staticPropertyValueModel(JptJaxbUiImages.JAXB_ENUM);
}
protected PropertyValueModel<String> buildOxmXmlEnumTextModel(OxmXmlEnum item) {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/AbstractNavigatorItemContentProviderFactory.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/AbstractNavigatorItemContentProviderFactory.java
index 7adbba36bd..97506efa04 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/AbstractNavigatorItemContentProviderFactory.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/AbstractNavigatorItemContentProviderFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2013 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2016 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.
@@ -108,7 +108,7 @@ public abstract class AbstractNavigatorItemContentProviderFactory
return new CollectionAspectAdapter<JaxbContextRoot, JaxbContextNode>(JaxbContextRoot.JAVA_TYPES_COLLECTION, jaxbPackage.getContextRoot()) {
@Override
protected Iterable<JaxbContextNode> getIterable() {
- return IterableTools.<JaxbContextNode>upCast(this.subject.getJavaTypes(jaxbPackage));
+ return IterableTools.<JaxbContextNode>upcast(this.subject.getJavaTypes(jaxbPackage));
}
};
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/AbstractNavigatorItemLabelProviderFactory.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/AbstractNavigatorItemLabelProviderFactory.java
index 6adf2d1cc7..4a8ee6f91b 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/AbstractNavigatorItemLabelProviderFactory.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/AbstractNavigatorItemLabelProviderFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2013 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2016 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,7 @@ import org.eclipse.jpt.common.ui.internal.jface.StaticItemExtendedLabelProvider;
import org.eclipse.jpt.common.ui.jface.ItemExtendedLabelProvider;
import org.eclipse.jpt.common.utility.internal.model.value.AspectPropertyValueModelAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter;
-import org.eclipse.jpt.common.utility.internal.model.value.StaticPropertyValueModel;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.model.event.PropertyChangeEvent;
import org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
@@ -141,7 +141,7 @@ public abstract class AbstractNavigatorItemLabelProviderFactory
public JavaClassImageDescriptorModel(JavaClass subject) {
- super(new StaticPropertyValueModel<JavaClass>(subject));
+ super(PropertyValueModelTools.staticPropertyValueModel(subject));
this.isXmlRegistryModel = buildIsXmlRegistryModel();
this.mappingModel = buildMappingModel();
this.isXmlTransientModel = buildIsXmlTransientModel();
@@ -244,7 +244,7 @@ public abstract class AbstractNavigatorItemLabelProviderFactory
public JavaEnumImageDescriptorModel(JavaEnum subject) {
- super(new StaticPropertyValueModel<JavaEnum>(subject));
+ super(PropertyValueModelTools.staticPropertyValueModel(subject));
this.mappingModel = buildMappingModel();
this.isXmlTransientModel = buildIsXmlTransientModel();
this.propertyChangeListener = buildPropertyChangeListener();
@@ -308,11 +308,11 @@ public abstract class AbstractNavigatorItemLabelProviderFactory
// ********** java type **********
public PropertyValueModel<String> buildJavaTypeTextModel(JavaType item) {
- return new StaticPropertyValueModel<String>(item.getTypeName().getTypeQualifiedName());
+ return PropertyValueModelTools.staticPropertyValueModel(item.getTypeName().getTypeQualifiedName());
}
public PropertyValueModel<String> buildJavaTypeDescriptionModel(JavaType item) {
- return new StaticPropertyValueModel<String>(this.buildJavaTypeDescription(item));
+ return PropertyValueModelTools.staticPropertyValueModel(this.buildJavaTypeDescription(item));
}
protected String buildJavaTypeDescription(JavaType item) {
@@ -359,7 +359,7 @@ public abstract class AbstractNavigatorItemLabelProviderFactory
};
public PropertyValueModel<String> buildJavaPersistentAttributeTextModel(JavaPersistentAttribute item) {
- return new StaticPropertyValueModel<String>(this.buildJavaPersistentAttributeText(item));
+ return PropertyValueModelTools.staticPropertyValueModel(this.buildJavaPersistentAttributeText(item));
}
protected String buildJavaPersistentAttributeText(JavaPersistentAttribute item) {
@@ -373,7 +373,7 @@ public abstract class AbstractNavigatorItemLabelProviderFactory
}
public PropertyValueModel<String> buildJavaPersistentAttributeDescriptionModel(JavaPersistentAttribute item) {
- return new StaticPropertyValueModel<String>(this.buildJavaPersistentAttributeDescription(item));
+ return PropertyValueModelTools.staticPropertyValueModel(this.buildJavaPersistentAttributeDescription(item));
}
protected String buildJavaPersistentAttributeDescription(JavaPersistentAttribute item) {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/navigator/JaxbNavigatorItemContentProviderFactory.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/navigator/JaxbNavigatorItemContentProviderFactory.java
index e4915119f3..a3f3176371 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/navigator/JaxbNavigatorItemContentProviderFactory.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/navigator/JaxbNavigatorItemContentProviderFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2016 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,8 +20,7 @@ import org.eclipse.jpt.common.ui.jface.ItemStructuredContentProvider;
import org.eclipse.jpt.common.ui.jface.ItemTreeContentProvider;
import org.eclipse.jpt.common.utility.internal.ObjectTools;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyCollectionValueModelAdapter;
-import org.eclipse.jpt.common.utility.internal.model.value.TransformationPropertyValueModel;
-import org.eclipse.jpt.common.utility.internal.transformer.TransformerTools;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.model.value.CollectionValueModel;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.jaxb.core.JaxbProject;
@@ -40,7 +39,7 @@ public class JaxbNavigatorItemContentProviderFactory
/**
* Delegate factories, keyed by JAXB platform.
*/
- private HashMap<JaxbPlatform, ItemTreeContentProvider.Factory> delegates = new HashMap<JaxbPlatform, ItemTreeContentProvider.Factory>();
+ private HashMap<JaxbPlatform, ItemTreeContentProvider.Factory> delegates = new HashMap<>();
public JaxbNavigatorItemContentProviderFactory() {
@@ -79,15 +78,15 @@ public class JaxbNavigatorItemContentProviderFactory
// ********** project **********
protected CollectionValueModel<JaxbContextRoot> buildProjectChildrenModel(IProject project) {
- return new PropertyCollectionValueModelAdapter<JaxbContextRoot>(this.buildProjectJaxbContextRootModel(project));
+ return new PropertyCollectionValueModelAdapter<>(this.buildProjectJaxbContextRootModel(project));
}
protected PropertyValueModel<JaxbContextRoot> buildProjectJaxbContextRootModel(IProject project) {
- return new TransformationPropertyValueModel<JaxbProject, JaxbContextRoot>(this.buildProjectJaxbProjectModel(project), TransformerTools.nullCheck(JaxbProject.CONTEXT_ROOT_TRANSFORMER));
+ return PropertyValueModelTools.transform(this.buildProjectJaxbProjectModel(project), JaxbProject.CONTEXT_ROOT_TRANSFORMER);
}
protected PropertyValueModel<JaxbProject> buildProjectJaxbProjectModel(IProject project) {
- return (JaxbProjectModel) project.getAdapter(JaxbProjectModel.class);
+ return project.getAdapter(JaxbProjectModel.class);
}
@@ -110,7 +109,7 @@ public class JaxbNavigatorItemContentProviderFactory
}
private ItemTreeContentProvider.Factory buildDelegate(JaxbPlatform jaxbPlatform) {
- JaxbPlatformUi platformUI = (JaxbPlatformUi) jaxbPlatform.getAdapter(JaxbPlatformUi.class);
+ JaxbPlatformUi platformUI = jaxbPlatform.getAdapter(JaxbPlatformUi.class);
return (platformUI != null) ?
platformUI.getNavigatorUi().getTreeItemContentProviderFactory() :
NullItemTreeContentProviderFactory.instance();

Back to the top