Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • lennart.thiesen/de.ugoe.cs.rwm.mocci
  • rwm/de.ugoe.cs.rwm.mocci
2 results
Show changes
Showing
with 369 additions and 317 deletions
de.ugoe.cs.rwm.mocci.model.edit/icons/full/obj16/Dataprocessor.gif

129 B

de.ugoe.cs.rwm.mocci.model.edit/icons/full/obj16/Gatheringservice.gif

129 B

de.ugoe.cs.rwm.mocci.model.edit/icons/full/obj16/Martpublisher.gif

129 B

de.ugoe.cs.rwm.mocci.model.edit/icons/full/obj16/MonitoringData.gif

129 B

de.ugoe.cs.rwm.mocci.model.edit/icons/full/obj16/Resultprovider.gif

129 B

......@@ -52,3 +52,46 @@ _UI_Monitoringattribute_monitoringAttributeValue_feature = Monitoring Attribute
_UI_Monitoringproperty_type = Monitoringproperty
_UI_Monitoringproperty_monitoringAttributeName_feature = Monitoring Attribute Name
_UI_Monitoringproperty_monitoringAttributeValue_feature = Monitoring Attribute Value
_UI_Monitoringproperty_monitoringPropertyName_feature = Monitoring Property Name
_UI_Monitoringproperty_monitoringPropertyValue_feature = Monitoring Property Value
_UI_Monitoringproperty_monitoringPropertyId_feature = Monitoring Property Id
_UI_Sensor_monitoringPropertyId_feature = Monitoring Property Id
_UI_Sensor_monitoringPropertyMixin_feature = Monitoring Property Mixin
_UI_MonitoringData_type = Data
_UI_MonitoringData_name_feature = Name
_UI_MonitoringData_value_feature = Value
_UI_MonitoringData_Id_feature = Id
_UI_Monitoringproperty_monitoringProperty_feature = Monitoring Property
_UI_MonitoringDataArray_type = Data Array
_UI_MonitoringDataArray_monitoringdataarrayValues_feature = Monitoringdataarray Values
_UI_MonitoringDataArray_values_feature = Values
_UI_MonitoringProperty_type = Property
_UI_MonitoringPropertyArray_type = Property Array
_UI_Monitoringproperties_type = Monitoringproperties
_UI_MonitoringProperty_name_feature = Name
_UI_MonitoringProperty_value_feature = Value
_UI_MonitoringProperty_Id_feature = Id
_UI_MonitoringPropertyArray_monitoringpropertyarrayValues_feature = Monitoringpropertyarray Values
_UI_Monitoringproperties_monitoringProperties_feature = Monitoring Properties
_UI_Monitoringproperty_monitoringPropertyResource_feature = Monitoring Property Resource
_UI_Martpublisher_type = Martpublisher
_UI_Processor_gathererAddress_feature = Gatherer Address
_UI_Publisher_publisherEndpoint_feature = Publisher Endpoint
_UI_Martpublisher_monitoringPropertyName_feature = Monitoring Property Name
_UI_Martpublisher_monitoringPropertyValue_feature = Monitoring Property Value
_UI_Martpublisher_monitoringPropertyResource_feature = Monitoring Property Resource
_UI_Martpublisher_monitoringPropertyId_feature = Monitoring Property Id
_UI_Dataprocessor_type = Dataprocessor
_UI_Resultprovider_type = Resultprovider
_UI_Occiresultprovider_type = Occiresultprovider
_UI_Gatheringservice_type = Gatheringservice
_UI_Resultprovider_resultProviderEndpoint_feature = Result Provider Endpoint
_UI_Monitoringproperty_monitoringPropertyResult_feature = Monitoring Property Result
_UI_Occiresultprovider_monitoringPropertyName_feature = Monitoring Property Name
_UI_Occiresultprovider_monitoringPropertyId_feature = Monitoring Property Id
_UI_Occiresultprovider_monitoringPropertyResource_feature = Monitoring Property Resource
_UI_Gatheringservice_serviceAddress_feature = Service Address
_UI_Monitorableproperty_type = Monitorableproperty
_UI_Monitorableproperty_monitoringProperty_feature = Monitoring Property
_UI_Monitorableproperty_monitoringResult_feature = Monitoring Result
_UI_Occiresultprovider_resultProviderEndpoint_feature = Result Provider Endpoint
/**
* Copyright (c) 2015-2017 Obeo, Inria
* 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
*
* Contributors:
* - William Piers <william.piers@obeo.fr>
* - Philippe Merle <philippe.merle@inria.fr>
* - Faiez Zalila <faiez.zalila@inria.fr>
*/
package monitoring.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.cmf.occi.core.provider.MixinBaseItemProvider;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
/**
* This is the item provider adapter for a {@link monitoring.Aggregator} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class AggregatorItemProvider extends MixinBaseItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public AggregatorItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
}
return itemPropertyDescriptors;
}
/**
* This returns Aggregator.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Aggregator"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
return getString("_UI_Aggregator_type");
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return MonitoringEditPlugin.INSTANCE;
}
}
......@@ -4,7 +4,7 @@
* 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
*
*
* Contributors:
* - William Piers <william.piers@obeo.fr>
* - Philippe Merle <philippe.merle@inria.fr>
......@@ -12,39 +12,30 @@
*/
package monitoring.provider;
import java.util.Collection;
import java.util.List;
import monitoring.Datagatherer;
import monitoring.MonitoringFactory;
import monitoring.MonitoringPackage;
import org.eclipse.cmf.occi.core.OCCIPackage;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.modmacao.occi.platform.provider.ComponentItemProvider;
import monitoring.Datagatherer;
import monitoring.MonitoringFactory;
/**
* This is the item provider adapter for a {@link monitoring.Datagatherer} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* This is the item provider adapter for a {@link monitoring.Datagatherer}
* object. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public class DatagathererItemProvider extends ComponentItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* This constructs an instance from a factory and a notifier. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public DatagathererItemProvider(AdapterFactory adapterFactory) {
......@@ -52,9 +43,9 @@ public class DatagathererItemProvider extends ComponentItemProvider {
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* This returns the property descriptors for the adapted class. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
......@@ -62,83 +53,13 @@ public class DatagathererItemProvider extends ComponentItemProvider {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addOcciCollectorPeriodPropertyDescriptor(object);
addOcciCollectorGranularityPropertyDescriptor(object);
addOcciCollectorAccuracyPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Occi Collector Period feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addOcciCollectorPeriodPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Datagatherer_occiCollectorPeriod_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Datagatherer_occiCollectorPeriod_feature", "_UI_Datagatherer_type"),
MonitoringPackage.Literals.DATAGATHERER__OCCI_COLLECTOR_PERIOD,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Occi Collector Granularity feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addOcciCollectorGranularityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Datagatherer_occiCollectorGranularity_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Datagatherer_occiCollectorGranularity_feature", "_UI_Datagatherer_type"),
MonitoringPackage.Literals.DATAGATHERER__OCCI_COLLECTOR_GRANULARITY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Occi Collector Accuracy feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addOcciCollectorAccuracyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Datagatherer_occiCollectorAccuracy_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Datagatherer_occiCollectorAccuracy_feature", "_UI_Datagatherer_type"),
MonitoringPackage.Literals.DATAGATHERER__OCCI_COLLECTOR_ACCURACY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This returns Datagatherer.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* This returns Datagatherer.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
......@@ -147,62 +68,53 @@ public class DatagathererItemProvider extends ComponentItemProvider {
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* This returns the label text for the adapted class. <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public String getText(Object object) {
String label = ((Datagatherer)object).getId();
return label == null || label.length() == 0 ?
getString("_UI_Datagatherer_type") :
getString("_UI_Datagatherer_type") + " " + label;
String label = ((Datagatherer) object).getId();
return label == null || label.length() == 0 ? getString("_UI_Datagatherer_type")
: getString("_UI_Datagatherer_type") + " " + label;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* This handles model notifications by calling {@link #updateChildren} to update
* any cached children and by creating a viewer notification, which it passes to
* {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Datagatherer.class)) {
case MonitoringPackage.DATAGATHERER__OCCI_COLLECTOR_PERIOD:
case MonitoringPackage.DATAGATHERER__OCCI_COLLECTOR_GRANULARITY:
case MonitoringPackage.DATAGATHERER__OCCI_COLLECTOR_ACCURACY:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing
* the children that can be created under this object. <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(OCCIPackage.Literals.ENTITY__PARTS,
MonitoringFactory.eINSTANCE.createMonitoringproperty()));
newChildDescriptors.add(createChildParameter(OCCIPackage.Literals.ENTITY__PARTS,
MonitoringFactory.eINSTANCE.createOcciresultprovider()));
newChildDescriptors.add(createChildParameter(OCCIPackage.Literals.RESOURCE__LINKS,
MonitoringFactory.eINSTANCE.createMonitorableproperty()));
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* Return the resource locator for this item provider's resources. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
......
......@@ -16,8 +16,8 @@ package monitoring.provider;
import java.util.Collection;
import java.util.List;
import monitoring.Dataprocessor;
import monitoring.MonitoringFactory;
import monitoring.Processor;
import org.eclipse.cmf.occi.core.OCCIPackage;
......@@ -31,19 +31,19 @@ import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.modmacao.occi.platform.provider.ComponentItemProvider;
/**
* This is the item provider adapter for a {@link monitoring.Processor} object.
* This is the item provider adapter for a {@link monitoring.Dataprocessor} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class ProcessorItemProvider extends ComponentItemProvider {
public class DataprocessorItemProvider extends ComponentItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ProcessorItemProvider(AdapterFactory adapterFactory) {
public DataprocessorItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
......@@ -63,14 +63,14 @@ public class ProcessorItemProvider extends ComponentItemProvider {
}
/**
* This returns Processor.gif.
* This returns Dataprocessor.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Processor"));
return overlayImage(object, getResourceLocator().getImage("full/obj16/Dataprocessor"));
}
/**
......@@ -81,10 +81,10 @@ public class ProcessorItemProvider extends ComponentItemProvider {
*/
@Override
public String getText(Object object) {
String label = ((Processor)object).getId();
String label = ((Dataprocessor)object).getId();
return label == null || label.length() == 0 ?
getString("_UI_Processor_type") :
getString("_UI_Processor_type") + " " + label;
getString("_UI_Dataprocessor_type") :
getString("_UI_Dataprocessor_type") + " " + label;
}
......@@ -115,7 +115,12 @@ public class ProcessorItemProvider extends ComponentItemProvider {
newChildDescriptors.add
(createChildParameter
(OCCIPackage.Literals.ENTITY__PARTS,
MonitoringFactory.eINSTANCE.createMonitoringproperty()));
MonitoringFactory.eINSTANCE.createOcciresultprovider()));
newChildDescriptors.add
(createChildParameter
(OCCIPackage.Literals.RESOURCE__LINKS,
MonitoringFactory.eINSTANCE.createMonitorableproperty()));
}
/**
......
......@@ -16,29 +16,40 @@ package monitoring.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.cmf.occi.core.provider.MixinBaseItemProvider;
import monitoring.Monitorableproperty;
import monitoring.MonitoringFactory;
import monitoring.MonitoringPackage;
import org.eclipse.cmf.occi.core.OCCIPackage;
import org.eclipse.cmf.occi.core.provider.LinkItemProvider;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.modmacao.occi.platform.PlatformFactory;
/**
* This is the item provider adapter for a {@link monitoring.Metric} object.
* This is the item provider adapter for a {@link monitoring.Monitorableproperty} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class MetricItemProvider extends MixinBaseItemProvider {
public class MonitorablepropertyItemProvider extends LinkItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MetricItemProvider(AdapterFactory adapterFactory) {
public MonitorablepropertyItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
......@@ -53,19 +64,65 @@ public class MetricItemProvider extends MixinBaseItemProvider {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addMonitoringPropertyPropertyDescriptor(object);
addMonitoringResultPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This returns Metric.gif.
* This adds a property descriptor for the Monitoring Property feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addMonitoringPropertyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Monitorableproperty_monitoringProperty_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Monitorableproperty_monitoringProperty_feature", "_UI_Monitorableproperty_type"),
MonitoringPackage.Literals.MONITORABLEPROPERTY__MONITORING_PROPERTY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Monitoring Result feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addMonitoringResultPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Monitorableproperty_monitoringResult_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Monitorableproperty_monitoringResult_feature", "_UI_Monitorableproperty_type"),
MonitoringPackage.Literals.MONITORABLEPROPERTY__MONITORING_RESULT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This returns Monitorableproperty.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Metric"));
return overlayImage(object, getResourceLocator().getImage("full/obj16/Monitorableproperty"));
}
/**
......@@ -76,7 +133,10 @@ public class MetricItemProvider extends MixinBaseItemProvider {
*/
@Override
public String getText(Object object) {
return getString("_UI_Metric_type");
String label = ((Monitorableproperty)object).getId();
return label == null || label.length() == 0 ?
getString("_UI_Monitorableproperty_type") :
getString("_UI_Monitorableproperty_type") + " " + label;
}
......@@ -90,6 +150,13 @@ public class MetricItemProvider extends MixinBaseItemProvider {
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Monitorableproperty.class)) {
case MonitoringPackage.MONITORABLEPROPERTY__MONITORING_PROPERTY:
case MonitoringPackage.MONITORABLEPROPERTY__MONITORING_RESULT:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
......@@ -103,6 +170,31 @@ public class MetricItemProvider extends MixinBaseItemProvider {
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(OCCIPackage.Literals.ENTITY__PARTS,
MonitoringFactory.eINSTANCE.createOcciresultprovider()));
newChildDescriptors.add
(createChildParameter
(OCCIPackage.Literals.ENTITY__PARTS,
PlatformFactory.eINSTANCE.createApp_tpl()));
newChildDescriptors.add
(createChildParameter
(OCCIPackage.Literals.ENTITY__PARTS,
PlatformFactory.eINSTANCE.createRes_tpl()));
newChildDescriptors.add
(createChildParameter
(OCCIPackage.Literals.ENTITY__PARTS,
PlatformFactory.eINSTANCE.createDatabase()));
newChildDescriptors.add
(createChildParameter
(OCCIPackage.Literals.ENTITY__PARTS,
PlatformFactory.eINSTANCE.createDatabaselink()));
}
/**
......
......@@ -128,72 +128,95 @@ public class MonitoringItemProviderAdapterFactory extends MonitoringAdapterFacto
}
/**
* This keeps track of the one adapter used for all {@link monitoring.Processor} instances.
* This keeps track of the one adapter used for all {@link monitoring.Dataprocessor} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ProcessorItemProvider processorItemProvider;
protected DataprocessorItemProvider dataprocessorItemProvider;
/**
* This creates an adapter for a {@link monitoring.Processor}.
* This creates an adapter for a {@link monitoring.Dataprocessor}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createProcessorAdapter() {
if (processorItemProvider == null) {
processorItemProvider = new ProcessorItemProvider(this);
public Adapter createDataprocessorAdapter() {
if (dataprocessorItemProvider == null) {
dataprocessorItemProvider = new DataprocessorItemProvider(this);
}
return processorItemProvider;
return dataprocessorItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link monitoring.Publisher} instances.
* This keeps track of the one adapter used for all {@link monitoring.Resultprovider} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PublisherItemProvider publisherItemProvider;
protected ResultproviderItemProvider resultproviderItemProvider;
/**
* This creates an adapter for a {@link monitoring.Publisher}.
* This creates an adapter for a {@link monitoring.Resultprovider}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createPublisherAdapter() {
if (publisherItemProvider == null) {
publisherItemProvider = new PublisherItemProvider(this);
public Adapter createResultproviderAdapter() {
if (resultproviderItemProvider == null) {
resultproviderItemProvider = new ResultproviderItemProvider(this);
}
return publisherItemProvider;
return resultproviderItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link monitoring.Monitoringproperty} instances.
* This keeps track of the one adapter used for all {@link monitoring.Monitorableproperty} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MonitoringpropertyItemProvider monitoringpropertyItemProvider;
protected MonitorablepropertyItemProvider monitorablepropertyItemProvider;
/**
* This creates an adapter for a {@link monitoring.Monitoringproperty}.
* This creates an adapter for a {@link monitoring.Monitorableproperty}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createMonitoringpropertyAdapter() {
if (monitoringpropertyItemProvider == null) {
monitoringpropertyItemProvider = new MonitoringpropertyItemProvider(this);
public Adapter createMonitorablepropertyAdapter() {
if (monitorablepropertyItemProvider == null) {
monitorablepropertyItemProvider = new MonitorablepropertyItemProvider(this);
}
return monitoringpropertyItemProvider;
return monitorablepropertyItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link monitoring.Occiresultprovider} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected OcciresultproviderItemProvider occiresultproviderItemProvider;
/**
* This creates an adapter for a {@link monitoring.Occiresultprovider}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createOcciresultproviderAdapter() {
if (occiresultproviderItemProvider == null) {
occiresultproviderItemProvider = new OcciresultproviderItemProvider(this);
}
return occiresultproviderItemProvider;
}
/**
......@@ -297,9 +320,10 @@ public class MonitoringItemProviderAdapterFactory extends MonitoringAdapterFacto
public void dispose() {
if (sensorItemProvider != null) sensorItemProvider.dispose();
if (datagathererItemProvider != null) datagathererItemProvider.dispose();
if (processorItemProvider != null) processorItemProvider.dispose();
if (publisherItemProvider != null) publisherItemProvider.dispose();
if (monitoringpropertyItemProvider != null) monitoringpropertyItemProvider.dispose();
if (dataprocessorItemProvider != null) dataprocessorItemProvider.dispose();
if (resultproviderItemProvider != null) resultproviderItemProvider.dispose();
if (monitorablepropertyItemProvider != null) monitorablepropertyItemProvider.dispose();
if (occiresultproviderItemProvider != null) occiresultproviderItemProvider.dispose();
}
}
......@@ -17,7 +17,7 @@ import java.util.Collection;
import java.util.List;
import monitoring.MonitoringPackage;
import monitoring.Monitoringproperty;
import monitoring.Occiresultprovider;
import org.eclipse.cmf.occi.core.provider.MixinBaseItemProvider;
......@@ -32,19 +32,19 @@ import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
* This is the item provider adapter for a {@link monitoring.Monitoringproperty} object.
* This is the item provider adapter for a {@link monitoring.Occiresultprovider} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class MonitoringpropertyItemProvider extends MixinBaseItemProvider {
public class OcciresultproviderItemProvider extends MixinBaseItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MonitoringpropertyItemProvider(AdapterFactory adapterFactory) {
public OcciresultproviderItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
......@@ -59,26 +59,25 @@ public class MonitoringpropertyItemProvider extends MixinBaseItemProvider {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addMonitoringAttributeNamePropertyDescriptor(object);
addMonitoringAttributeValuePropertyDescriptor(object);
addResultProviderEndpointPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Monitoring Attribute Name feature.
* This adds a property descriptor for the Result Provider Endpoint feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addMonitoringAttributeNamePropertyDescriptor(Object object) {
protected void addResultProviderEndpointPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Monitoringproperty_monitoringAttributeName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Monitoringproperty_monitoringAttributeName_feature", "_UI_Monitoringproperty_type"),
MonitoringPackage.Literals.MONITORINGPROPERTY__MONITORING_ATTRIBUTE_NAME,
getString("_UI_Occiresultprovider_resultProviderEndpoint_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Occiresultprovider_resultProviderEndpoint_feature", "_UI_Occiresultprovider_type"),
MonitoringPackage.Literals.OCCIRESULTPROVIDER__RESULT_PROVIDER_ENDPOINT,
true,
false,
false,
......@@ -88,36 +87,14 @@ public class MonitoringpropertyItemProvider extends MixinBaseItemProvider {
}
/**
* This adds a property descriptor for the Monitoring Attribute Value feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addMonitoringAttributeValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Monitoringproperty_monitoringAttributeValue_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Monitoringproperty_monitoringAttributeValue_feature", "_UI_Monitoringproperty_type"),
MonitoringPackage.Literals.MONITORINGPROPERTY__MONITORING_ATTRIBUTE_VALUE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This returns Monitoringproperty.gif.
* This returns Occiresultprovider.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Monitoringproperty"));
return overlayImage(object, getResourceLocator().getImage("full/obj16/Occiresultprovider"));
}
/**
......@@ -128,10 +105,10 @@ public class MonitoringpropertyItemProvider extends MixinBaseItemProvider {
*/
@Override
public String getText(Object object) {
String label = ((Monitoringproperty)object).getMonitoringAttributeName();
String label = ((Occiresultprovider)object).getResultProviderEndpoint();
return label == null || label.length() == 0 ?
getString("_UI_Monitoringproperty_type") :
getString("_UI_Monitoringproperty_type") + " " + label;
getString("_UI_Occiresultprovider_type") :
getString("_UI_Occiresultprovider_type") + " " + label;
}
......@@ -146,9 +123,8 @@ public class MonitoringpropertyItemProvider extends MixinBaseItemProvider {
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Monitoringproperty.class)) {
case MonitoringPackage.MONITORINGPROPERTY__MONITORING_ATTRIBUTE_NAME:
case MonitoringPackage.MONITORINGPROPERTY__MONITORING_ATTRIBUTE_VALUE:
switch (notification.getFeatureID(Occiresultprovider.class)) {
case MonitoringPackage.OCCIRESULTPROVIDER__RESULT_PROVIDER_ENDPOINT:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
......