Commit c2defafa authored by Dominique Marcadet's avatar Dominique Marcadet

Merge branch '35-use-explicit-attribute-groups-like-in-the-nsd-metamodel' into 'master'

Resolve "use explicit attribute groups like in the NSD metamodel"

Closes #35

See merge request RiseClipseGroup/RiseClipseMetamodel_SCL2003!31
parents f7648ffa bb72c6f1
......@@ -1054,3 +1054,41 @@ _UI_LogControl_RefersToLog_feature = Refers To Log
_UI_AnyLN_ReferredByLNode_feature = Referred By LNode
_UI_LDevice_AnyLN_feature = Any LN
_UI_LNode_RefersToAnyLN_feature = Refers To Any LN
_UI_AgAuthentication_type = Ag Authentication
_UI_AgSmvOpts_type = Ag Smv Opts
_UI_AgOptFields_type = Ag Opt Fields
_UI_AgDesc_type = Ag Desc
_UI_AgLDRef_type = Ag LD Ref
_UI_AgLNRef_type = Ag LN Ref
_UI_AgDATrgOp_type = Ag DA Trg Op
_UI_AgVirtual_type = Ag Virtual
_UI_AgAuthentication_certificate_feature = Certificate
_UI_AgAuthentication_none_feature = None
_UI_AgAuthentication_password_feature = Password
_UI_AgAuthentication_strong_feature = Strong
_UI_AgAuthentication_weak_feature = Weak
_UI_AgSmvOpts_dataSet_feature = Data Set
_UI_AgSmvOpts_refreshTime_feature = Refresh Time
_UI_AgSmvOpts_sampleRate_feature = Sample Rate
_UI_AgSmvOpts_sampleSynchronized_feature = Sample Synchronized
_UI_AgSmvOpts_security_feature = Security
_UI_AgSmvOpts_timestamp_feature = Timestamp
_UI_AgSmvOpts_synchSourceId_feature = Synch Source Id
_UI_AgOptFields_bufOvfl_feature = Buf Ovfl
_UI_AgOptFields_configRef_feature = Config Ref
_UI_AgOptFields_dataRef_feature = Data Ref
_UI_AgOptFields_dataSet_feature = Data Set
_UI_AgOptFields_entryID_feature = Entry ID
_UI_AgOptFields_reasonCode_feature = Reason Code
_UI_AgOptFields_seqNum_feature = Seq Num
_UI_AgOptFields_timeStamp_feature = Time Stamp
_UI_AgDesc_desc_feature = Desc
_UI_AgLDRef_iedName_feature = Ied Name
_UI_AgLDRef_ldInst_feature = Ld Inst
_UI_AgLNRef_lnClass_feature = Ln Class
_UI_AgLNRef_lnInst_feature = Ln Inst
_UI_AgLNRef_prefix_feature = Prefix
_UI_AgDATrgOp_dchg_feature = Dchg
_UI_AgDATrgOp_dupd_feature = Dupd
_UI_AgDATrgOp_qchg_feature = Qchg
_UI_AgVirtual_virtual_feature = Virtual
/**
* Copyright (c) 2018 CentraleSupélec & EDF.
* 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
*
* This file is part of the RiseClipse tool
*
* Contributors:
* Computer Science Department, CentraleSupélec
* EDF R&D
* Contacts:
* dominique.marcadet@centralesupelec.fr
* aurelie.dehouck-neveu@edf.fr
* Web site:
* http://wdi.supelec.fr/software/RiseClipse/
*
*/
package fr.centralesupelec.edf.riseclipse.iec61850.scl.provider;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.AgAuthentication;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage;
import java.util.Collection;
import java.util.List;
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.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.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
* This is the item provider adapter for a {@link fr.centralesupelec.edf.riseclipse.iec61850.scl.AgAuthentication} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class AgAuthenticationItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public AgAuthenticationItemProvider(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);
addCertificatePropertyDescriptor(object);
addNonePropertyDescriptor(object);
addPasswordPropertyDescriptor(object);
addStrongPropertyDescriptor(object);
addWeakPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Certificate feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addCertificatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AgAuthentication_certificate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AgAuthentication_certificate_feature", "_UI_AgAuthentication_type"),
SclPackage.eINSTANCE.getAgAuthentication_Certificate(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the None feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addNonePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AgAuthentication_none_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AgAuthentication_none_feature", "_UI_AgAuthentication_type"),
SclPackage.eINSTANCE.getAgAuthentication_None(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Password feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addPasswordPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AgAuthentication_password_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AgAuthentication_password_feature", "_UI_AgAuthentication_type"),
SclPackage.eINSTANCE.getAgAuthentication_Password(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Strong feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addStrongPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AgAuthentication_strong_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AgAuthentication_strong_feature", "_UI_AgAuthentication_type"),
SclPackage.eINSTANCE.getAgAuthentication_Strong(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Weak feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addWeakPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AgAuthentication_weak_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AgAuthentication_weak_feature", "_UI_AgAuthentication_type"),
SclPackage.eINSTANCE.getAgAuthentication_Weak(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This returns AgAuthentication.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/AgAuthentication"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
Boolean labelValue = ((AgAuthentication)object).getCertificate();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ?
getString("_UI_AgAuthentication_type") :
getString("_UI_AgAuthentication_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 -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(AgAuthentication.class)) {
case SclPackage.AG_AUTHENTICATION__CERTIFICATE:
case SclPackage.AG_AUTHENTICATION__NONE:
case SclPackage.AG_AUTHENTICATION__PASSWORD:
case SclPackage.AG_AUTHENTICATION__STRONG:
case SclPackage.AG_AUTHENTICATION__WEAK:
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 -->
* <!-- 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 SCLEditPlugin.INSTANCE;
}
}
/**
* Copyright (c) 2018 CentraleSupélec & EDF.
* 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
*
* This file is part of the RiseClipse tool
*
* Contributors:
* Computer Science Department, CentraleSupélec
* EDF R&D
* Contacts:
* dominique.marcadet@centralesupelec.fr
* aurelie.dehouck-neveu@edf.fr
* Web site:
* http://wdi.supelec.fr/software/RiseClipse/
*
*/
package fr.centralesupelec.edf.riseclipse.iec61850.scl.provider;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.AgDATrgOp;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage;
import java.util.Collection;
import java.util.List;
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.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.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
* This is the item provider adapter for a {@link fr.centralesupelec.edf.riseclipse.iec61850.scl.AgDATrgOp} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class AgDATrgOpItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public AgDATrgOpItemProvider(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);
addDchgPropertyDescriptor(object);
addDupdPropertyDescriptor(object);
addQchgPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Dchg feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addDchgPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AgDATrgOp_dchg_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AgDATrgOp_dchg_feature", "_UI_AgDATrgOp_type"),
SclPackage.eINSTANCE.getAgDATrgOp_Dchg(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Dupd feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addDupdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AgDATrgOp_dupd_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AgDATrgOp_dupd_feature", "_UI_AgDATrgOp_type"),
SclPackage.eINSTANCE.getAgDATrgOp_Dupd(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Qchg feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addQchgPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AgDATrgOp_qchg_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AgDATrgOp_qchg_feature", "_UI_AgDATrgOp_type"),
SclPackage.eINSTANCE.getAgDATrgOp_Qchg(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
Boolean labelValue = ((AgDATrgOp)object).getDchg();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ?
getString("_UI_AgDATrgOp_type") :
getString("_UI_AgDATrgOp_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 -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(AgDATrgOp.class)) {
case SclPackage.AG_DA_TRG_OP__DCHG:
case SclPackage.AG_DA_TRG_OP__DUPD:
case SclPackage.AG_DA_TRG_OP__QCHG:
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 -->
* <!-- 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 SCLEditPlugin.INSTANCE;
}
}
/**
* Copyright (c) 2018 CentraleSupélec & EDF.
* 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
*
* This file is part of the RiseClipse tool
*
* Contributors:
* Computer Science Department, CentraleSupélec
* EDF R&D
* Contacts:
* dominique.marcadet@centralesupelec.fr
* aurelie.dehouck-neveu@edf.fr
* Web site:
* http://wdi.supelec.fr/software/RiseClipse/
*
*/
package fr.centralesupelec.edf.riseclipse.iec61850.scl.provider;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.AgDesc;
import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage;
import java.util.Collection;
import java.util.List;
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.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.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
* This is the item provider adapter for a {@link fr.centralesupelec.edf.riseclipse.iec61850.scl.AgDesc} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class AgDescItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public AgDescItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->