Skip to main content
summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-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
2 files changed, 4 insertions, 30 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();

Back to the top