-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from riseclipse/develop
prepare release
- Loading branch information
Showing
160 changed files
with
5,872 additions
and
2,221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
491 changes: 248 additions & 243 deletions
491
fr.centralesupelec.edf.riseclipse.iec61850.scl.edit/plugin.properties
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
182 changes: 182 additions & 0 deletions
182
....edit/src/fr/centralesupelec/edf/riseclipse/iec61850/scl/provider/AgUuidItemProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
/** | ||
* Copyright (c) 2016-2024 CentraleSupélec & EDF. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* This file is part of the RiseClipse tool | ||
* | ||
* Contributors: | ||
* Computer Science Department, CentraleSupélec | ||
* EDF R&D | ||
* Contacts: | ||
* [email protected] | ||
* [email protected] | ||
* Web site: | ||
* https://riseclipse.github.io/ | ||
* | ||
*/ | ||
package fr.centralesupelec.edf.riseclipse.iec61850.scl.provider; | ||
|
||
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; | ||
|
||
import fr.centralesupelec.edf.riseclipse.iec61850.scl.AgUuid; | ||
import fr.centralesupelec.edf.riseclipse.iec61850.scl.SclPackage; | ||
|
||
/** | ||
* This is the item provider adapter for a {@link fr.centralesupelec.edf.riseclipse.iec61850.scl.AgUuid} object. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
public class AgUuidItemProvider | ||
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 AgUuidItemProvider( 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 ); | ||
|
||
addUuidPropertyDescriptor( object ); | ||
addTemplateUuidPropertyDescriptor( object ); | ||
} | ||
return itemPropertyDescriptors; | ||
} | ||
|
||
/** | ||
* This adds a property descriptor for the Uuid feature. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
protected void addUuidPropertyDescriptor( Object object ) { | ||
itemPropertyDescriptors.add( | ||
createItemPropertyDescriptor( ( ( ComposeableAdapterFactory ) adapterFactory ).getRootAdapterFactory(), | ||
getResourceLocator(), | ||
getString( "_UI_AgUuid_uuid_feature" ), | ||
getString( "_UI_PropertyDescriptor_description", "_UI_AgUuid_uuid_feature", "_UI_AgUuid_type" ), | ||
SclPackage.eINSTANCE.getAgUuid_Uuid(), | ||
true, | ||
false, | ||
false, | ||
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, | ||
null, | ||
null ) ); | ||
} | ||
|
||
/** | ||
* This adds a property descriptor for the Template Uuid feature. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
protected void addTemplateUuidPropertyDescriptor( Object object ) { | ||
itemPropertyDescriptors.add( | ||
createItemPropertyDescriptor( ( ( ComposeableAdapterFactory ) adapterFactory ).getRootAdapterFactory(), | ||
getResourceLocator(), | ||
getString( "_UI_AgUuid_templateUuid_feature" ), | ||
getString( "_UI_PropertyDescriptor_description", "_UI_AgUuid_templateUuid_feature", | ||
"_UI_AgUuid_type" ), | ||
SclPackage.eINSTANCE.getAgUuid_TemplateUuid(), | ||
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 ) { | ||
String label = ( ( AgUuid ) object ).getUuid(); | ||
return label == null || label.length() == 0 ? getString( "_UI_AgUuid_type" ) | ||
: getString( "_UI_AgUuid_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( AgUuid.class ) ) { | ||
case SclPackage.AG_UUID__UUID: | ||
case SclPackage.AG_UUID__TEMPLATE_UUID: | ||
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; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.