Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Vosburgh2016-07-15 19:43:30 +0000
committerBrian Vosburgh2017-05-18 22:38:03 +0000
commitd08f5dcaf4d8bb1e73184466310d856fc94700bf (patch)
tree184005e8b12aa335f12c692b24db96c58a0f24f3
parentf425951d5bc3e8e83887fe9a9383807c04f3781d (diff)
downloadwebtools.dali-d08f5dcaf4d8bb1e73184466310d856fc94700bf.tar.gz
webtools.dali-d08f5dcaf4d8bb1e73184466310d856fc94700bf.tar.xz
webtools.dali-d08f5dcaf4d8bb1e73184466310d856fc94700bf.zip
remove some PropertyAspectAdapter constructors
-rw-r--r--common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/PropertyAspectAdapter.java29
-rw-r--r--common/tests/org.eclipse.jpt.common.ui.tests/src/org/eclipse/jpt/common/ui/tests/internal/jface/TreeLabelProviderUiTest.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/AbstractNavigatorItemLabelProviderFactory.java2
3 files changed, 5 insertions, 31 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/PropertyAspectAdapter.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/PropertyAspectAdapter.java
index f7a77a3758..877ef4539c 100644
--- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/PropertyAspectAdapter.java
+++ b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/PropertyAspectAdapter.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.common.utility.internal.model.value;
-import java.util.Collection;
import org.eclipse.jpt.common.utility.model.Model;
import org.eclipse.jpt.common.utility.model.event.PropertyChangeEvent;
import org.eclipse.jpt.common.utility.model.listener.PropertyChangeAdapter;
@@ -50,15 +49,7 @@ public abstract class PropertyAspectAdapter<S extends Model, V>
* and property aspect.
*/
protected PropertyAspectAdapter(String aspectName, S subject) {
- this(new String[] {aspectName}, subject);
- }
-
- /**
- * Construct a property aspect adapter for the specified subject
- * and property aspects.
- */
- protected PropertyAspectAdapter(String[] aspectNames, S subject) {
- this(PropertyValueModelTools.staticPropertyValueModel(subject), aspectNames);
+ this(PropertyValueModelTools.staticPropertyValueModel(subject), new String[] {aspectName});
}
/**
@@ -74,24 +65,6 @@ public abstract class PropertyAspectAdapter<S extends Model, V>
this.aspectChangeListener = this.buildAspectChangeListener();
}
- /**
- * Construct a property aspect adapter for the specified subject model
- * and property aspects.
- */
- protected PropertyAspectAdapter(PropertyValueModel<? extends S> subjectModel, Collection<String> aspectNames) {
- this(subjectModel, aspectNames.toArray(new String[aspectNames.size()]));
- }
-
- /**
- * Construct a property aspect adapter for an "unchanging" property aspect in
- * the specified subject. This is useful for a property aspect that does not
- * change for a particular subject; but the subject will change, resulting in
- * a new property.
- */
- protected PropertyAspectAdapter(PropertyValueModel<? extends S> subjectModel) {
- this(subjectModel, EMPTY_ASPECT_NAMES);
- }
-
// ********** initialization **********
diff --git a/common/tests/org.eclipse.jpt.common.ui.tests/src/org/eclipse/jpt/common/ui/tests/internal/jface/TreeLabelProviderUiTest.java b/common/tests/org.eclipse.jpt.common.ui.tests/src/org/eclipse/jpt/common/ui/tests/internal/jface/TreeLabelProviderUiTest.java
index 7892a6a80d..9ddaa04d95 100644
--- a/common/tests/org.eclipse.jpt.common.ui.tests/src/org/eclipse/jpt/common/ui/tests/internal/jface/TreeLabelProviderUiTest.java
+++ b/common/tests/org.eclipse.jpt.common.ui.tests/src/org/eclipse/jpt/common/ui/tests/internal/jface/TreeLabelProviderUiTest.java
@@ -37,6 +37,7 @@ import org.eclipse.jpt.common.ui.jface.ItemTreeContentProvider;
import org.eclipse.jpt.common.ui.jface.TreeStateProvider;
import org.eclipse.jpt.common.utility.internal.model.AbstractModel;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.model.value.SimplePropertyValueModel;
import org.eclipse.jpt.common.utility.model.event.PropertyChangeEvent;
import org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener;
@@ -345,7 +346,7 @@ public class TreeLabelProviderUiTest
}
/* CU private */ static PropertyValueModel<ImageDescriptor> buildImageDescriptorModel(Vehicle vehicle) {
- return new PropertyAspectAdapter<Vehicle, ImageDescriptor>(IMAGE_ASPECT_NAMES, vehicle) {
+ return new PropertyAspectAdapter<Vehicle, ImageDescriptor>(PropertyValueModelTools.staticPropertyValueModel(vehicle), IMAGE_ASPECT_NAMES) {
@Override
protected ImageDescriptor buildValue_() {
return this.subject.getImageDescriptor();
@@ -360,7 +361,7 @@ public class TreeLabelProviderUiTest
};
/* CU private */ static PropertyValueModel<String> buildTextModel(Vehicle vehicle) {
- return new PropertyAspectAdapter<Vehicle, String>(TEXT_ASPECT_NAMES, vehicle) {
+ return new PropertyAspectAdapter<Vehicle, String>(PropertyValueModelTools.staticPropertyValueModel(vehicle), TEXT_ASPECT_NAMES) {
@Override
protected String buildValue_() {
return this.subject.getColor().getDescription() + ' ' + this.subject.getVehicleType().getDescription();
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 4a8ee6f91b..3fcaf73188 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
@@ -341,7 +341,7 @@ public abstract class AbstractNavigatorItemLabelProviderFactory
}
public PropertyValueModel<ImageDescriptor> buildJavaPersistentAttributeImageDescriptorModel(JavaPersistentAttribute item) {
- return new PropertyAspectAdapter<JavaPersistentAttribute, ImageDescriptor>(IMAGE_ASPECT_NAMES, item) {
+ return new PropertyAspectAdapter<JavaPersistentAttribute, ImageDescriptor>(PropertyValueModelTools.staticPropertyValueModel(item), IMAGE_ASPECT_NAMES) {
@Override
protected ImageDescriptor buildValue_() {
return AbstractNavigatorItemLabelProviderFactory.this.buildJavaPersistentAttributeImageDescriptor(this.subject.getMappingKey());

Back to the top