Initial commit.

This commit is contained in:
2018-12-21 17:53:31 +01:00
parent 59793babbc
commit e177e3d904
6295 changed files with 433543 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -0,0 +1 @@
/bin/

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.irtsaintexupery.fiacre.instance.edit</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,17 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.irtsaintexupery.fiacre.instance.edit;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: com.irtsaintexupery.fiacre.instance.fiacreinstance.provider.FiacreInstanceEditPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.irtsaintexupery.fiacre.instance.fiacreinstance.provider
Require-Bundle: org.eclipse.core.runtime,
com.irtsaintexupery.fiacre.instance;visibility:=reexport,
org.eclipse.emf.edit;visibility:=reexport,
fr.irit.fiacre.xtext;visibility:=reexport,
fr.irit.fiacre.xtext.edit;visibility:=reexport
Bundle-ActivationPolicy: lazy

View File

@@ -0,0 +1,20 @@
###############################################################################
# Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exup<75>ry).
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the LGPL 3.0
# which accompanies this distribution, and is available at
# https://www.gnu.org/licenses/lgpl-3.0-standalone.html
#
# Contributors:
# Faiez Zalila - initial API and implementation and/or initial documentation
###############################################################################
#
bin.includes = .,\
icons/,\
META-INF/,\
plugin.xml,\
plugin.properties
jars.compile.order = .
source.. = src/
output.. = bin/

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

View File

@@ -0,0 +1,69 @@
###############################################################################
# Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exup<75>ry).
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the LGPL 3.0
# which accompanies this distribution, and is available at
# https://www.gnu.org/licenses/lgpl-3.0-standalone.html
#
# Contributors:
# Faiez Zalila - initial API and implementation and/or initial documentation
###############################################################################
#
pluginName = FiacreInstance Edit Support
providerName = www.example.org
_UI_CreateChild_text = {0}
_UI_CreateChild_text2 = {1} {0}
_UI_CreateChild_text3 = {1}
_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
_UI_PropertyDescriptor_description = The {0} of the {1}
_UI_InstanceModel_type = Instance Model
_UI_StatementBlock_type = Statement Block
_UI_ExecutedStatementBlock_type = Executed Statement Block
_UI_ExecutableStatementBlock_type = Executable Statement Block
_UI_FireableStatementBlock_type = Fireable Statement Block
_UI_EnabledStatementBlock_type = Enabled Statement Block
_UI_BlockInstance_type = Block Instance
_UI_CompositionInstance_type = Composition Instance
_UI_DeclarationInstance_type = Declaration Instance
_UI_ComponentDeclarationInstance_type = Component Declaration Instance
_UI_ProcessDeclarationInstance_type = Process Declaration Instance
_UI_InstanceStatementBlock_type = Instance Statement Block
_UI_InstanceExecutedStatementBlock_type = Instance Executed Statement Block
_UI_InstanceExecutableStatementBlock_type = Instance Executable Statement Block
_UI_InstanceFireableStatementBlock_type = Instance Fireable Statement Block
_UI_InstanceEnabledStatementBlock_type = Instance Enabled Statement Block
_UI_VariableDeclarationInstance_type = Variable Declaration Instance
_UI_Unknown_type = Object
_UI_Unknown_datatype= Value
_UI_InstanceModel_name_feature = Name
_UI_InstanceModel_model_feature = Model
_UI_InstanceModel_instance_feature = Instance
_UI_InstanceModel_statementBlocks_feature = Statement Blocks
_UI_StatementBlock_instanceStatementBlocks_feature = Instance Statement Blocks
_UI_StatementBlock_name_feature = Name
_UI_ExecutableStatementBlock_date_feature = Date
_UI_BlockInstance_blockInstances_feature = Block Instances
_UI_CompositionInstance_composition_feature = Composition
_UI_DeclarationInstance_variableDeclarationInstances_feature = Variable Declaration Instances
_UI_DeclarationInstance_name_feature = Name
_UI_DeclarationInstance_instance_feature = Instance
_UI_ComponentDeclarationInstance_component_feature = Component
_UI_ProcessDeclarationInstance_currentState_feature = Current State
_UI_ProcessDeclarationInstance_process_feature = Process
_UI_ProcessDeclarationInstance_instanceStatementBlocks_feature = Instance Statement Blocks
_UI_InstanceStatementBlock_transitionSource_feature = Transition Source
_UI_InstanceStatementBlock_statements_feature = Statements
_UI_InstanceStatementBlock_name_feature = Name
_UI_VariableDeclarationInstance_variableDeclaration_feature = Variable Declaration
_UI_VariableDeclarationInstance_currentValue_feature = Current Value
_UI_Unknown_feature = Unspecified
_UI_DeclarationInstance_flatname_feature = Flatname

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
All rights reserved. This program and the accompanying materials
are made available under the terms of the LGPL 3.0
which accompanies this distribution, and is available at
https://www.gnu.org/licenses/lgpl-3.0-standalone.html
Contributors:
Faiez Zalila - initial API and implementation and/or initial documentation
-->
<!--
-->
<plugin>
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
<!-- @generated FiacreInstance -->
<factory
uri="http://fiacreinstance/1.0"
class="com.irtsaintexupery.fiacre.instance.fiacreinstance.provider.FiacreinstanceItemProviderAdapterFactory"
supportedTypes=
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
org.eclipse.emf.edit.provider.ITreeItemContentProvider
org.eclipse.emf.edit.provider.IItemLabelProvider
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>
</plugin>

View File

@@ -0,0 +1,177 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.ecore.EStructuralFeature;
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.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.BlockInstance;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstanceFactory;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstancePackage;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.BlockInstance} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class BlockInstanceItemProvider
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 BlockInstanceItemProvider(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 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
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(FiacreinstancePackage.Literals.BLOCK_INSTANCE__BLOCK_INSTANCES);
}
return childrenFeatures;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return super.getChildFeature(object, child);
}
/**
* 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_BlockInstance_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);
switch (notification.getFeatureID(BlockInstance.class)) {
case FiacreinstancePackage.BLOCK_INSTANCE__BLOCK_INSTANCES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
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);
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.BLOCK_INSTANCE__BLOCK_INSTANCES,
FiacreinstanceFactory.eINSTANCE.createCompositionInstance()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.BLOCK_INSTANCE__BLOCK_INSTANCES,
FiacreinstanceFactory.eINSTANCE.createComponentDeclarationInstance()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.BLOCK_INSTANCE__BLOCK_INSTANCES,
FiacreinstanceFactory.eINSTANCE.createProcessDeclarationInstance()));
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return FiacreInstanceEditPlugin.INSTANCE;
}
}

View File

@@ -0,0 +1,134 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.ComponentDeclarationInstance;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstancePackage;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.ComponentDeclarationInstance} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class ComponentDeclarationInstanceItemProvider extends DeclarationInstanceItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ComponentDeclarationInstanceItemProvider(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);
addComponentPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Component feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addComponentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ComponentDeclarationInstance_component_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ComponentDeclarationInstance_component_feature", "_UI_ComponentDeclarationInstance_type"),
FiacreinstancePackage.Literals.COMPONENT_DECLARATION_INSTANCE__COMPONENT,
true,
false,
true,
null,
null,
null));
}
/**
* This returns ComponentDeclarationInstance.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/ComponentDeclarationInstance"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((ComponentDeclarationInstance)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_ComponentDeclarationInstance_type") :
getString("_UI_ComponentDeclarationInstance_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);
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);
}
}

View File

@@ -0,0 +1,130 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstancePackage;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.CompositionInstance} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class CompositionInstanceItemProvider extends BlockInstanceItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CompositionInstanceItemProvider(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);
addCompositionPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Composition feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addCompositionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CompositionInstance_composition_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CompositionInstance_composition_feature", "_UI_CompositionInstance_type"),
FiacreinstancePackage.Literals.COMPOSITION_INSTANCE__COMPOSITION,
true,
false,
true,
null,
null,
null));
}
/**
* This returns CompositionInstance.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/CompositionInstance"));
}
/**
* 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_CompositionInstance_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);
}
}

View File

@@ -0,0 +1,219 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.ecore.EStructuralFeature;
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 com.irtsaintexupery.fiacre.instance.fiacreinstance.DeclarationInstance;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstanceFactory;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstancePackage;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.DeclarationInstance} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class DeclarationInstanceItemProvider extends BlockInstanceItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DeclarationInstanceItemProvider(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);
addNamePropertyDescriptor(object);
addInstancePropertyDescriptor(object);
addFlatnamePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DeclarationInstance_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DeclarationInstance_name_feature", "_UI_DeclarationInstance_type"),
FiacreinstancePackage.Literals.DECLARATION_INSTANCE__NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Instance feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addInstancePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DeclarationInstance_instance_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DeclarationInstance_instance_feature", "_UI_DeclarationInstance_type"),
FiacreinstancePackage.Literals.DECLARATION_INSTANCE__INSTANCE,
true,
false,
true,
null,
null,
null));
}
/**
* This adds a property descriptor for the Flatname feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addFlatnamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DeclarationInstance_flatname_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DeclarationInstance_flatname_feature", "_UI_DeclarationInstance_type"),
FiacreinstancePackage.Literals.DECLARATION_INSTANCE__FLATNAME,
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
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(FiacreinstancePackage.Literals.DECLARATION_INSTANCE__VARIABLE_DECLARATION_INSTANCES);
}
return childrenFeatures;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return super.getChildFeature(object, child);
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((DeclarationInstance)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_DeclarationInstance_type") :
getString("_UI_DeclarationInstance_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(DeclarationInstance.class)) {
case FiacreinstancePackage.DECLARATION_INSTANCE__NAME:
case FiacreinstancePackage.DECLARATION_INSTANCE__FLATNAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case FiacreinstancePackage.DECLARATION_INSTANCE__VARIABLE_DECLARATION_INSTANCES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
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);
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.DECLARATION_INSTANCE__VARIABLE_DECLARATION_INSTANCES,
FiacreinstanceFactory.eINSTANCE.createVariableDeclarationInstance()));
}
}

View File

@@ -0,0 +1,109 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.edit.provider.IItemPropertyDescriptor;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.EnabledStatementBlock;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.EnabledStatementBlock} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class EnabledStatementBlockItemProvider extends ExecutableStatementBlockItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EnabledStatementBlockItemProvider(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 EnabledStatementBlock.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/EnabledStatementBlock"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((EnabledStatementBlock)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_EnabledStatementBlock_type") :
getString("_UI_EnabledStatementBlock_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);
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);
}
}

View File

@@ -0,0 +1,142 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.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 com.irtsaintexupery.fiacre.instance.fiacreinstance.ExecutableStatementBlock;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstancePackage;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.ExecutableStatementBlock} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class ExecutableStatementBlockItemProvider extends StatementBlockItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ExecutableStatementBlockItemProvider(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);
addDatePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Date feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addDatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ExecutableStatementBlock_date_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ExecutableStatementBlock_date_feature", "_UI_ExecutableStatementBlock_type"),
FiacreinstancePackage.Literals.EXECUTABLE_STATEMENT_BLOCK__DATE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This returns ExecutableStatementBlock.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/ExecutableStatementBlock"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((ExecutableStatementBlock)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_ExecutableStatementBlock_type") :
getString("_UI_ExecutableStatementBlock_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(ExecutableStatementBlock.class)) {
case FiacreinstancePackage.EXECUTABLE_STATEMENT_BLOCK__DATE:
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);
}
}

View File

@@ -0,0 +1,109 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.edit.provider.IItemPropertyDescriptor;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.ExecutedStatementBlock;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.ExecutedStatementBlock} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class ExecutedStatementBlockItemProvider extends StatementBlockItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ExecutedStatementBlockItemProvider(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 ExecutedStatementBlock.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/ExecutedStatementBlock"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((ExecutedStatementBlock)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_ExecutedStatementBlock_type") :
getString("_UI_ExecutedStatementBlock_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);
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);
}
}

View File

@@ -0,0 +1,102 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.provider;
import fr.irit.fiacre.xtext.fiacre.provider.FiacreEditPlugin;
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
/**
* This is the central singleton for the FiacreInstance edit plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public final class FiacreInstanceEditPlugin extends EMFPlugin {
/**
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final FiacreInstanceEditPlugin INSTANCE = new FiacreInstanceEditPlugin();
/**
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static Implementation plugin;
/**
* Create the instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FiacreInstanceEditPlugin() {
super
(new ResourceLocator [] {
FiacreEditPlugin.INSTANCE,
});
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the singleton instance.
* @generated
*/
@Override
public ResourceLocator getPluginResourceLocator() {
return plugin;
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the singleton instance.
* @generated
*/
public static Implementation getPlugin() {
return plugin;
}
/**
* The actual implementation of the Eclipse <b>Plugin</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static class Implementation extends EclipsePlugin {
/**
* Creates an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Implementation() {
super();
// Remember the static instance.
//
plugin = this;
}
}
}

View File

@@ -0,0 +1,473 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.provider;
import java.util.ArrayList;
import java.util.Collection;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.edit.provider.ChangeNotifier;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.IChangeNotifier;
import org.eclipse.emf.edit.provider.IDisposable;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.INotifyChangedListener;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.util.FiacreinstanceAdapterFactory;
/**
* This is the factory that is used to provide the interfaces needed to support Viewers.
* The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
* The adapters also support Eclipse property sheets.
* Note that most of the adapters are shared among multiple instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class FiacreinstanceItemProviderAdapterFactory extends FiacreinstanceAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
/**
* This keeps track of the root adapter factory that delegates to this adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ComposedAdapterFactory parentAdapterFactory;
/**
* This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IChangeNotifier changeNotifier = new ChangeNotifier();
/**
* This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Collection<Object> supportedTypes = new ArrayList<Object>();
/**
* This constructs an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FiacreinstanceItemProviderAdapterFactory() {
supportedTypes.add(IEditingDomainItemProvider.class);
supportedTypes.add(IStructuredItemContentProvider.class);
supportedTypes.add(ITreeItemContentProvider.class);
supportedTypes.add(IItemLabelProvider.class);
supportedTypes.add(IItemPropertySource.class);
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceModel} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected InstanceModelItemProvider instanceModelItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceModel}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createInstanceModelAdapter() {
if (instanceModelItemProvider == null) {
instanceModelItemProvider = new InstanceModelItemProvider(this);
}
return instanceModelItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.ExecutedStatementBlock} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ExecutedStatementBlockItemProvider executedStatementBlockItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.ExecutedStatementBlock}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createExecutedStatementBlockAdapter() {
if (executedStatementBlockItemProvider == null) {
executedStatementBlockItemProvider = new ExecutedStatementBlockItemProvider(this);
}
return executedStatementBlockItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.ExecutableStatementBlock} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ExecutableStatementBlockItemProvider executableStatementBlockItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.ExecutableStatementBlock}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createExecutableStatementBlockAdapter() {
if (executableStatementBlockItemProvider == null) {
executableStatementBlockItemProvider = new ExecutableStatementBlockItemProvider(this);
}
return executableStatementBlockItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.FireableStatementBlock} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected FireableStatementBlockItemProvider fireableStatementBlockItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.FireableStatementBlock}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createFireableStatementBlockAdapter() {
if (fireableStatementBlockItemProvider == null) {
fireableStatementBlockItemProvider = new FireableStatementBlockItemProvider(this);
}
return fireableStatementBlockItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.EnabledStatementBlock} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EnabledStatementBlockItemProvider enabledStatementBlockItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.EnabledStatementBlock}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createEnabledStatementBlockAdapter() {
if (enabledStatementBlockItemProvider == null) {
enabledStatementBlockItemProvider = new EnabledStatementBlockItemProvider(this);
}
return enabledStatementBlockItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.CompositionInstance} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CompositionInstanceItemProvider compositionInstanceItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.CompositionInstance}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createCompositionInstanceAdapter() {
if (compositionInstanceItemProvider == null) {
compositionInstanceItemProvider = new CompositionInstanceItemProvider(this);
}
return compositionInstanceItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.ComponentDeclarationInstance} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ComponentDeclarationInstanceItemProvider componentDeclarationInstanceItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.ComponentDeclarationInstance}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createComponentDeclarationInstanceAdapter() {
if (componentDeclarationInstanceItemProvider == null) {
componentDeclarationInstanceItemProvider = new ComponentDeclarationInstanceItemProvider(this);
}
return componentDeclarationInstanceItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.ProcessDeclarationInstance} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ProcessDeclarationInstanceItemProvider processDeclarationInstanceItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.ProcessDeclarationInstance}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createProcessDeclarationInstanceAdapter() {
if (processDeclarationInstanceItemProvider == null) {
processDeclarationInstanceItemProvider = new ProcessDeclarationInstanceItemProvider(this);
}
return processDeclarationInstanceItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceExecutedStatementBlock} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected InstanceExecutedStatementBlockItemProvider instanceExecutedStatementBlockItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceExecutedStatementBlock}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createInstanceExecutedStatementBlockAdapter() {
if (instanceExecutedStatementBlockItemProvider == null) {
instanceExecutedStatementBlockItemProvider = new InstanceExecutedStatementBlockItemProvider(this);
}
return instanceExecutedStatementBlockItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceFireableStatementBlock} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected InstanceFireableStatementBlockItemProvider instanceFireableStatementBlockItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceFireableStatementBlock}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createInstanceFireableStatementBlockAdapter() {
if (instanceFireableStatementBlockItemProvider == null) {
instanceFireableStatementBlockItemProvider = new InstanceFireableStatementBlockItemProvider(this);
}
return instanceFireableStatementBlockItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceEnabledStatementBlock} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected InstanceEnabledStatementBlockItemProvider instanceEnabledStatementBlockItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceEnabledStatementBlock}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createInstanceEnabledStatementBlockAdapter() {
if (instanceEnabledStatementBlockItemProvider == null) {
instanceEnabledStatementBlockItemProvider = new InstanceEnabledStatementBlockItemProvider(this);
}
return instanceEnabledStatementBlockItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.VariableDeclarationInstance} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected VariableDeclarationInstanceItemProvider variableDeclarationInstanceItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.VariableDeclarationInstance}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createVariableDeclarationInstanceAdapter() {
if (variableDeclarationInstanceItemProvider == null) {
variableDeclarationInstanceItemProvider = new VariableDeclarationInstanceItemProvider(this);
}
return variableDeclarationInstanceItemProvider;
}
/**
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ComposeableAdapterFactory getRootAdapterFactory() {
return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
}
/**
* This sets the composed adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
this.parentAdapterFactory = parentAdapterFactory;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean isFactoryForType(Object type) {
return supportedTypes.contains(type) || super.isFactoryForType(type);
}
/**
* This implementation substitutes the factory itself as the key for the adapter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter adapt(Notifier notifier, Object type) {
return super.adapt(notifier, this);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object adapt(Object object, Object type) {
if (isFactoryForType(type)) {
Object adapter = super.adapt(object, type);
if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
return adapter;
}
}
return null;
}
/**
* This adds a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void addListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.addListener(notifyChangedListener);
}
/**
* This removes a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void removeListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.removeListener(notifyChangedListener);
}
/**
* This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void fireNotifyChanged(Notification notification) {
changeNotifier.fireNotifyChanged(notification);
if (parentAdapterFactory != null) {
parentAdapterFactory.fireNotifyChanged(notification);
}
}
/**
* This disposes all of the item providers created by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void dispose() {
if (instanceModelItemProvider != null) instanceModelItemProvider.dispose();
if (executedStatementBlockItemProvider != null) executedStatementBlockItemProvider.dispose();
if (executableStatementBlockItemProvider != null) executableStatementBlockItemProvider.dispose();
if (fireableStatementBlockItemProvider != null) fireableStatementBlockItemProvider.dispose();
if (enabledStatementBlockItemProvider != null) enabledStatementBlockItemProvider.dispose();
if (compositionInstanceItemProvider != null) compositionInstanceItemProvider.dispose();
if (componentDeclarationInstanceItemProvider != null) componentDeclarationInstanceItemProvider.dispose();
if (processDeclarationInstanceItemProvider != null) processDeclarationInstanceItemProvider.dispose();
if (instanceExecutedStatementBlockItemProvider != null) instanceExecutedStatementBlockItemProvider.dispose();
if (instanceFireableStatementBlockItemProvider != null) instanceFireableStatementBlockItemProvider.dispose();
if (instanceEnabledStatementBlockItemProvider != null) instanceEnabledStatementBlockItemProvider.dispose();
if (variableDeclarationInstanceItemProvider != null) variableDeclarationInstanceItemProvider.dispose();
}
}

View File

@@ -0,0 +1,109 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.edit.provider.IItemPropertyDescriptor;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FireableStatementBlock;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.FireableStatementBlock} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class FireableStatementBlockItemProvider extends ExecutableStatementBlockItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FireableStatementBlockItemProvider(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 FireableStatementBlock.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/FireableStatementBlock"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((FireableStatementBlock)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_FireableStatementBlock_type") :
getString("_UI_FireableStatementBlock_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);
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);
}
}

View File

@@ -0,0 +1,109 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.edit.provider.IItemPropertyDescriptor;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceEnabledStatementBlock;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceEnabledStatementBlock} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class InstanceEnabledStatementBlockItemProvider extends InstanceExecutableStatementBlockItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public InstanceEnabledStatementBlockItemProvider(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 InstanceEnabledStatementBlock.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/InstanceEnabledStatementBlock"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((InstanceEnabledStatementBlock)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_InstanceEnabledStatementBlock_type") :
getString("_UI_InstanceEnabledStatementBlock_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);
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);
}
}

View File

@@ -0,0 +1,98 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.edit.provider.IItemPropertyDescriptor;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceExecutableStatementBlock;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceExecutableStatementBlock} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class InstanceExecutableStatementBlockItemProvider extends InstanceStatementBlockItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public InstanceExecutableStatementBlockItemProvider(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 the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((InstanceExecutableStatementBlock)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_InstanceExecutableStatementBlock_type") :
getString("_UI_InstanceExecutableStatementBlock_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);
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);
}
}

View File

@@ -0,0 +1,109 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.edit.provider.IItemPropertyDescriptor;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceExecutedStatementBlock;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceExecutedStatementBlock} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class InstanceExecutedStatementBlockItemProvider extends InstanceStatementBlockItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public InstanceExecutedStatementBlockItemProvider(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 InstanceExecutedStatementBlock.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/InstanceExecutedStatementBlock"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((InstanceExecutedStatementBlock)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_InstanceExecutedStatementBlock_type") :
getString("_UI_InstanceExecutedStatementBlock_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);
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);
}
}

View File

@@ -0,0 +1,109 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.edit.provider.IItemPropertyDescriptor;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceFireableStatementBlock;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceFireableStatementBlock} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class InstanceFireableStatementBlockItemProvider extends InstanceExecutableStatementBlockItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public InstanceFireableStatementBlockItemProvider(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 InstanceFireableStatementBlock.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/InstanceFireableStatementBlock"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((InstanceFireableStatementBlock)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_InstanceFireableStatementBlock_type") :
getString("_UI_InstanceFireableStatementBlock_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);
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);
}
}

View File

@@ -0,0 +1,259 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.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.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstanceFactory;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstancePackage;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceModel;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceModel} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class InstanceModelItemProvider
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 InstanceModelItemProvider(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);
addNamePropertyDescriptor(object);
addModelPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InstanceModel_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InstanceModel_name_feature", "_UI_InstanceModel_type"),
FiacreinstancePackage.Literals.INSTANCE_MODEL__NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Model feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addModelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InstanceModel_model_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InstanceModel_model_feature", "_UI_InstanceModel_type"),
FiacreinstancePackage.Literals.INSTANCE_MODEL__MODEL,
true,
false,
true,
null,
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
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(FiacreinstancePackage.Literals.INSTANCE_MODEL__INSTANCE);
childrenFeatures.add(FiacreinstancePackage.Literals.INSTANCE_MODEL__STATEMENT_BLOCKS);
}
return childrenFeatures;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return super.getChildFeature(object, child);
}
/**
* This returns InstanceModel.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/InstanceModel"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((InstanceModel)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_InstanceModel_type") :
getString("_UI_InstanceModel_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(InstanceModel.class)) {
case FiacreinstancePackage.INSTANCE_MODEL__NAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case FiacreinstancePackage.INSTANCE_MODEL__INSTANCE:
case FiacreinstancePackage.INSTANCE_MODEL__STATEMENT_BLOCKS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
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);
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.INSTANCE_MODEL__INSTANCE,
FiacreinstanceFactory.eINSTANCE.createComponentDeclarationInstance()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.INSTANCE_MODEL__INSTANCE,
FiacreinstanceFactory.eINSTANCE.createProcessDeclarationInstance()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.INSTANCE_MODEL__STATEMENT_BLOCKS,
FiacreinstanceFactory.eINSTANCE.createExecutedStatementBlock()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.INSTANCE_MODEL__STATEMENT_BLOCKS,
FiacreinstanceFactory.eINSTANCE.createExecutableStatementBlock()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.INSTANCE_MODEL__STATEMENT_BLOCKS,
FiacreinstanceFactory.eINSTANCE.createFireableStatementBlock()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.INSTANCE_MODEL__STATEMENT_BLOCKS,
FiacreinstanceFactory.eINSTANCE.createEnabledStatementBlock()));
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return FiacreInstanceEditPlugin.INSTANCE;
}
}

View File

@@ -0,0 +1,203 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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 com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstancePackage;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceStatementBlock;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.InstanceStatementBlock} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class InstanceStatementBlockItemProvider
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 InstanceStatementBlockItemProvider(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);
addTransitionSourcePropertyDescriptor(object);
addStatementsPropertyDescriptor(object);
addNamePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Transition Source feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addTransitionSourcePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InstanceStatementBlock_transitionSource_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InstanceStatementBlock_transitionSource_feature", "_UI_InstanceStatementBlock_type"),
FiacreinstancePackage.Literals.INSTANCE_STATEMENT_BLOCK__TRANSITION_SOURCE,
true,
false,
true,
null,
null,
null));
}
/**
* This adds a property descriptor for the Statements feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addStatementsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InstanceStatementBlock_statements_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InstanceStatementBlock_statements_feature", "_UI_InstanceStatementBlock_type"),
FiacreinstancePackage.Literals.INSTANCE_STATEMENT_BLOCK__STATEMENTS,
true,
false,
true,
null,
null,
null));
}
/**
* This adds a property descriptor for the Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InstanceStatementBlock_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InstanceStatementBlock_name_feature", "_UI_InstanceStatementBlock_type"),
FiacreinstancePackage.Literals.INSTANCE_STATEMENT_BLOCK__NAME,
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 = ((InstanceStatementBlock)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_InstanceStatementBlock_type") :
getString("_UI_InstanceStatementBlock_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(InstanceStatementBlock.class)) {
case FiacreinstancePackage.INSTANCE_STATEMENT_BLOCK__NAME:
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 FiacreInstanceEditPlugin.INSTANCE;
}
}

View File

@@ -0,0 +1,212 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstanceFactory;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstancePackage;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.ProcessDeclarationInstance;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.ProcessDeclarationInstance} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class ProcessDeclarationInstanceItemProvider extends DeclarationInstanceItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ProcessDeclarationInstanceItemProvider(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);
addCurrentStatePropertyDescriptor(object);
addProcessPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Current State feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addCurrentStatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProcessDeclarationInstance_currentState_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ProcessDeclarationInstance_currentState_feature", "_UI_ProcessDeclarationInstance_type"),
FiacreinstancePackage.Literals.PROCESS_DECLARATION_INSTANCE__CURRENT_STATE,
true,
false,
true,
null,
null,
null));
}
/**
* This adds a property descriptor for the Process feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addProcessPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProcessDeclarationInstance_process_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ProcessDeclarationInstance_process_feature", "_UI_ProcessDeclarationInstance_type"),
FiacreinstancePackage.Literals.PROCESS_DECLARATION_INSTANCE__PROCESS,
true,
false,
true,
null,
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
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(FiacreinstancePackage.Literals.PROCESS_DECLARATION_INSTANCE__INSTANCE_STATEMENT_BLOCKS);
}
return childrenFeatures;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return super.getChildFeature(object, child);
}
/**
* This returns ProcessDeclarationInstance.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/ProcessDeclarationInstance"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((ProcessDeclarationInstance)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_ProcessDeclarationInstance_type") :
getString("_UI_ProcessDeclarationInstance_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(ProcessDeclarationInstance.class)) {
case FiacreinstancePackage.PROCESS_DECLARATION_INSTANCE__INSTANCE_STATEMENT_BLOCKS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
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);
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.PROCESS_DECLARATION_INSTANCE__INSTANCE_STATEMENT_BLOCKS,
FiacreinstanceFactory.eINSTANCE.createInstanceExecutedStatementBlock()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.PROCESS_DECLARATION_INSTANCE__INSTANCE_STATEMENT_BLOCKS,
FiacreinstanceFactory.eINSTANCE.createInstanceFireableStatementBlock()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.PROCESS_DECLARATION_INSTANCE__INSTANCE_STATEMENT_BLOCKS,
FiacreinstanceFactory.eINSTANCE.createInstanceEnabledStatementBlock()));
}
}

View File

@@ -0,0 +1,180 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.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 com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstancePackage;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.StatementBlock;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.StatementBlock} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class StatementBlockItemProvider
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 StatementBlockItemProvider(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);
addInstanceStatementBlocksPropertyDescriptor(object);
addNamePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Instance Statement Blocks feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addInstanceStatementBlocksPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StatementBlock_instanceStatementBlocks_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StatementBlock_instanceStatementBlocks_feature", "_UI_StatementBlock_type"),
FiacreinstancePackage.Literals.STATEMENT_BLOCK__INSTANCE_STATEMENT_BLOCKS,
true,
false,
true,
null,
null,
null));
}
/**
* This adds a property descriptor for the Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StatementBlock_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StatementBlock_name_feature", "_UI_StatementBlock_type"),
FiacreinstancePackage.Literals.STATEMENT_BLOCK__NAME,
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 = ((StatementBlock)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_StatementBlock_type") :
getString("_UI_StatementBlock_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(StatementBlock.class)) {
case FiacreinstancePackage.STATEMENT_BLOCK__NAME:
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 FiacreInstanceEditPlugin.INSTANCE;
}
}

View File

@@ -0,0 +1,263 @@
/*******************************************************************************
* Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the LGPL 3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Contributors:
* Faiez Zalila - initial API and implementation and/or initial documentation
*******************************************************************************/
/**
*/
package com.irtsaintexupery.fiacre.instance.fiacreinstance.provider;
import fr.irit.fiacre.xtext.fiacre.FiacreFactory;
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.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.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.FiacreinstancePackage;
import com.irtsaintexupery.fiacre.instance.fiacreinstance.VariableDeclarationInstance;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.fiacre.instance.fiacreinstance.VariableDeclarationInstance} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class VariableDeclarationInstanceItemProvider
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 VariableDeclarationInstanceItemProvider(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);
addVariableDeclarationPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Variable Declaration feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addVariableDeclarationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_VariableDeclarationInstance_variableDeclaration_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_VariableDeclarationInstance_variableDeclaration_feature", "_UI_VariableDeclarationInstance_type"),
FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__VARIABLE_DECLARATION,
true,
false,
true,
null,
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
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE);
}
return childrenFeatures;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return super.getChildFeature(object, child);
}
/**
* This returns VariableDeclarationInstance.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/VariableDeclarationInstance"));
}
/**
* 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_VariableDeclarationInstance_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);
switch (notification.getFeatureID(VariableDeclarationInstance.class)) {
case FiacreinstancePackage.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
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);
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createValueExpression()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createIdentifierExpression()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createRecordExpression()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createArrayExpression()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createQueueExpression()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createLiteralExpression()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createBooleanLiteral()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createNaturalLiteral()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createConstructionExpression()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createArrayAccessExpression()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createRecordAccessExpression()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createTrueLiteral()));
newChildDescriptors.add
(createChildParameter
(FiacreinstancePackage.Literals.VARIABLE_DECLARATION_INSTANCE__CURRENT_VALUE,
FiacreFactory.eINSTANCE.createFalseLiteral()));
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return FiacreInstanceEditPlugin.INSTANCE;
}
}

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -0,0 +1 @@
/bin/

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.irtsaintexupery.fiacre.instance.editor</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

Some files were not shown because too many files have changed in this diff Show More