Skip to content
Snippets Groups Projects
Commit 6b24eebb authored by Nikolaus Huber's avatar Nikolaus Huber
Browse files

+ WeightingFunction attribute holding class name that implements weighting function

git-svn-id: https://se1.informatik.uni-wuerzburg.de/usvn/svn/code/code/DMM/trunk@11916 9e42b895-fcda-4063-8a3b-11be15eb1bbd
parent e1b8475c
No related branches found
No related tags found
No related merge requests found
......@@ -157,3 +157,4 @@ _UI_RelationalOperator_GREATER_EQUAL_literal = GREATER_EQUAL
_UI_RelationalOperator_LESS_literal = LESS
_UI_RelationalOperator_LESS_EQUAL_literal = LESS_EQUAL
_UI_Objective_specifications_feature = Specifications
_UI_WeightingFunction_WeightingFunction_feature = Weighting Function
......@@ -20,12 +20,14 @@ import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
......@@ -63,10 +65,33 @@ public class WeightingFunctionItemProvider
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addWeightingFunctionPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Weighting Function feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addWeightingFunctionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_WeightingFunction_WeightingFunction_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_WeightingFunction_WeightingFunction_feature", "_UI_WeightingFunction_type"),
AdaptationPackage.Literals.WEIGHTING_FUNCTION__WEIGHTING_FUNCTION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
......@@ -134,6 +159,9 @@ public class WeightingFunctionItemProvider
updateChildren(notification);
switch (notification.getFeatureID(WeightingFunction.class)) {
case AdaptationPackage.WEIGHTING_FUNCTION__WEIGHTING_FUNCTION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case AdaptationPackage.WEIGHTING_FUNCTION__WEIGHTED_METRICS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment