diff options
Diffstat (limited to 'extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit')
34 files changed, 2554 insertions, 0 deletions
diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/.classpath b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/.classpath new file mode 100755 index 00000000000..26e67d64ad0 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <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="src" path="src-gen"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/.gitignore b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/.gitignore new file mode 100755 index 00000000000..ae3c1726048 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/.project b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/.project new file mode 100755 index 00000000000..953105cc0a1 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.propertylifecycle.model.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> diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/.settings/org.eclipse.jdt.core.prefs b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/.settings/org.eclipse.jdt.core.prefs new file mode 100755 index 00000000000..0c68a61dca8 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/META-INF/MANIFEST.MF b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/META-INF/MANIFEST.MF new file mode 100755 index 00000000000..0d159382493 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.papyrus.propertylifecycle.model.edit;singleton:=true +Bundle-Version: 0.0.1.qualifier +Bundle-ClassPath: . +Bundle-Activator: org.eclipse.papyrus.propertylifecycle.provider.PropertylifecycleEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.papyrus.propertylifecycle.provider +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.12.0", + org.eclipse.papyrus.propertylifecycle.model;bundle-version="0.0.1";visibility:=reexport, + org.eclipse.emf.edit;bundle-version="2.12.0";visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/about.html b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/about.html new file mode 100755 index 00000000000..d35d5aed64c --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>June 5, 2007</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> + +</body> +</html> diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/build.properties b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/build.properties new file mode 100755 index 00000000000..477e474a141 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/build.properties @@ -0,0 +1,20 @@ +# Copyright (c) 2016 CEA LIST and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# +# Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties,\ + about.html +jars.compile.order = . +source.. = src-gen/ +output.. = bin/ diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateElementContainer_containersContainer_ElementContainer.gif b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateElementContainer_containersContainer_ElementContainer.gif Binary files differnew file mode 100755 index 00000000000..0a9ad1c7ea8 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateElementContainer_containersContainer_ElementContainer.gif diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateElementProperty_triggers_BasicTrigger.gif b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateElementProperty_triggers_BasicTrigger.gif Binary files differnew file mode 100755 index 00000000000..a259b8fb4f2 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateElementProperty_triggers_BasicTrigger.gif diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateElementProperty_valueProcessor_JavaProcessor.gif b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateElementProperty_valueProcessor_JavaProcessor.gif Binary files differnew file mode 100755 index 00000000000..52be1a507e5 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateElementProperty_valueProcessor_JavaProcessor.gif diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateStrategyElement_elementContainers_ElementContainer.gif b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateStrategyElement_elementContainers_ElementContainer.gif Binary files differnew file mode 100755 index 00000000000..59232185315 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateStrategyElement_elementContainers_ElementContainer.gif diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateStrategyElement_elementProperties_ElementProperty.gif b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateStrategyElement_elementProperties_ElementProperty.gif Binary files differnew file mode 100755 index 00000000000..263f6e69405 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateStrategyElement_elementProperties_ElementProperty.gif diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateStrategySet_strategies_StrategyElement.gif b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateStrategySet_strategies_StrategyElement.gif Binary files differnew file mode 100755 index 00000000000..05c17b39cf5 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/ctool16/CreateStrategySet_strategies_StrategyElement.gif diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/BasicTrigger.gif b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/BasicTrigger.gif Binary files differnew file mode 100755 index 00000000000..badaab0664a --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/BasicTrigger.gif diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/ElementContainer.gif b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/ElementContainer.gif Binary files differnew file mode 100755 index 00000000000..338fb8d9a72 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/ElementContainer.gif diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/ElementProperty.gif b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/ElementProperty.gif Binary files differnew file mode 100755 index 00000000000..d3dc5a9ad81 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/ElementProperty.gif diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/JavaProcessor.gif b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/JavaProcessor.gif Binary files differnew file mode 100755 index 00000000000..7bac4fd3808 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/JavaProcessor.gif diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/StrategyElement.gif b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/StrategyElement.gif Binary files differnew file mode 100755 index 00000000000..cb1755a7125 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/StrategyElement.gif diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/StrategySet.gif b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/StrategySet.gif Binary files differnew file mode 100755 index 00000000000..106881e5d9b --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/icons/full/obj16/StrategySet.gif diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/plugin.properties b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/plugin.properties new file mode 100755 index 00000000000..866671fb27e --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/plugin.properties @@ -0,0 +1,58 @@ +# Copyright (c) 2016 CEA LIST and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# +# Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + +pluginName = Propertylifecycle 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_StrategyTemplate_type = Strategy Template +_UI_StrategySet_type = Strategy Set +_UI_StrategyElement_type = Strategy Element +_UI_ElementTemplate_type = Element Template +_UI_ElementContainer_type = Element Container +_UI_ElementProperty_type = Element Property +_UI_AbstractTrigger_type = Abstract Trigger +_UI_AbstractValueProcessor_type = Abstract Value Processor +_UI_JavaProcessor_type = Java Processor +_UI_BasicTrigger_type = Basic Trigger +_UI_Unknown_type = Object + +_UI_Unknown_datatype= Value + +_UI_StrategyTemplate_name_feature = Name +_UI_StrategyTemplate_decription_feature = Decription +_UI_StrategyTemplate_id_feature = Id +_UI_StrategySet_strategies_feature = Strategies +_UI_StrategyElement_elementContainers_feature = Element Containers +_UI_StrategyElement_elementProperties_feature = Element Properties +_UI_ElementTemplate_baseType_feature = Base Type +_UI_ElementTemplate_specializedType_feature = Specialized Type +_UI_ElementContainer_containersContainer_feature = Containers Container +_UI_ElementProperty_featureLabel_feature = Feature Label +_UI_ElementProperty_priority_feature = Priority +_UI_ElementProperty_triggers_feature = Triggers +_UI_ElementProperty_valueProcessor_feature = Value Processor +_UI_JavaProcessor_className_feature = Class Name +_UI_BasicTrigger_onCreate_feature = On Create +_UI_BasicTrigger_onDelete_feature = On Delete +_UI_BasicTrigger_onOpen_feature = On Open +_UI_BasicTrigger_onMove_feature = On Move +_UI_Unknown_feature = Unspecified + +_UI_ElementTemplate_matcher_feature = Matcher diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/plugin.xml b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/plugin.xml new file mode 100755 index 00000000000..ac7670721de --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/plugin.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- + Copyright (c) 2016 CEA LIST and others. + + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at + http://www.eclipse.org/legal/epl-v10.html + + Contributors: + + Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation +--> + +<plugin> + + <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> + <!-- @generated propertylifecycle --> + <factory + uri="http://www.eclipse.org/papyrus/infra/propertylifecycle/1.0" + class="org.eclipse.papyrus.propertylifecycle.provider.PropertylifecycleItemProviderAdapterFactory" + 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> diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/pom.xml b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/pom.xml new file mode 100755 index 00000000000..fe1a842c067 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/pom.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <artifactId>org.eclipse.papyrus.infra.propertylifecycle.model.edit</artifactId> + <version>0.0.1.qualifier</version> + <groupId>org.eclipse.papyrus</groupId> + <packaging>eclipse-plugin</packaging> + <parent> + <groupId>org.eclipse.papyrus</groupId> + <artifactId>org.eclipse.papyrus.infra.propertylifecycle</artifactId> + <version>0.0.1.qualifier</version> + <relativePath>../org.eclipse.papyrus.infra.propertylifecycle/pom.xml</relativePath> + </parent> +</project> diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/AbstractTriggerItemProvider.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/AbstractTriggerItemProvider.java new file mode 100755 index 00000000000..a32f955a49f --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/AbstractTriggerItemProvider.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * + * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.propertylifecycle.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.IChildCreationExtender; +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; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.propertylifecycle.AbstractTrigger} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class AbstractTriggerItemProvider + 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 AbstractTriggerItemProvider(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) { + return getString("_UI_AbstractTrigger_type"); //$NON-NLS-1$ + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); + } + +} diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/AbstractValueProcessorItemProvider.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/AbstractValueProcessorItemProvider.java new file mode 100755 index 00000000000..c3c24bcafe7 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/AbstractValueProcessorItemProvider.java @@ -0,0 +1,127 @@ +/** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * + * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.propertylifecycle.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.IChildCreationExtender; +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; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.propertylifecycle.AbstractValueProcessor} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class AbstractValueProcessorItemProvider + 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 AbstractValueProcessorItemProvider(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) { + return getString("_UI_AbstractValueProcessor_type"); //$NON-NLS-1$ + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); + } + +} diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/BasicTriggerItemProvider.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/BasicTriggerItemProvider.java new file mode 100755 index 00000000000..c20db0005b1 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/BasicTriggerItemProvider.java @@ -0,0 +1,214 @@ +/** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * + * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.propertylifecycle.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 org.eclipse.papyrus.propertylifecycle.BasicTrigger; +import org.eclipse.papyrus.propertylifecycle.PropertylifecyclePackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.propertylifecycle.BasicTrigger} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class BasicTriggerItemProvider extends AbstractTriggerItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public BasicTriggerItemProvider(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); + + addOnCreatePropertyDescriptor(object); + addOnDeletePropertyDescriptor(object); + addOnOpenPropertyDescriptor(object); + addOnMovePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the On Create feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addOnCreatePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BasicTrigger_onCreate_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_BasicTrigger_onCreate_feature", "_UI_BasicTrigger_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.BASIC_TRIGGER__ON_CREATE, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the On Delete feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addOnDeletePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BasicTrigger_onDelete_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_BasicTrigger_onDelete_feature", "_UI_BasicTrigger_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.BASIC_TRIGGER__ON_DELETE, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the On Open feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addOnOpenPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BasicTrigger_onOpen_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_BasicTrigger_onOpen_feature", "_UI_BasicTrigger_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.BASIC_TRIGGER__ON_OPEN, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the On Move feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addOnMovePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BasicTrigger_onMove_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_BasicTrigger_onMove_feature", "_UI_BasicTrigger_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.BASIC_TRIGGER__ON_MOVE, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns BasicTrigger.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/BasicTrigger")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + BasicTrigger basicTrigger = (BasicTrigger) object; + return getString("_UI_BasicTrigger_type") + " " + basicTrigger.isOnCreate(); //$NON-NLS-1$ //$NON-NLS-2$ + } + + + /** + * 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(BasicTrigger.class)) { + case PropertylifecyclePackage.BASIC_TRIGGER__ON_CREATE: + case PropertylifecyclePackage.BASIC_TRIGGER__ON_DELETE: + case PropertylifecyclePackage.BASIC_TRIGGER__ON_OPEN: + case PropertylifecyclePackage.BASIC_TRIGGER__ON_MOVE: + 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); + } + +} diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/ElementContainerItemProvider.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/ElementContainerItemProvider.java new file mode 100755 index 00000000000..0e44d6f3b8e --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/ElementContainerItemProvider.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * + * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.propertylifecycle.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.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.papyrus.propertylifecycle.ElementContainer; +import org.eclipse.papyrus.propertylifecycle.PropertylifecycleFactory; +import org.eclipse.papyrus.propertylifecycle.PropertylifecyclePackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.propertylifecycle.ElementContainer} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class ElementContainerItemProvider extends ElementTemplateItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public ElementContainerItemProvider(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(PropertylifecyclePackage.Literals.ELEMENT_CONTAINER__CONTAINERS_CONTAINER); + } + 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 ElementContainer.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ElementContainer")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ElementContainer) object).getBaseType(); + return label == null || label.length() == 0 ? getString("_UI_ElementContainer_type") //$NON-NLS-1$ + : + getString("_UI_ElementContainer_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + + /** + * 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(ElementContainer.class)) { + case PropertylifecyclePackage.ELEMENT_CONTAINER__CONTAINERS_CONTAINER: + 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(PropertylifecyclePackage.Literals.ELEMENT_CONTAINER__CONTAINERS_CONTAINER, + PropertylifecycleFactory.eINSTANCE.createElementContainer())); + } + +} diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/ElementPropertyItemProvider.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/ElementPropertyItemProvider.java new file mode 100755 index 00000000000..a3e7c0ead64 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/ElementPropertyItemProvider.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * + * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.propertylifecycle.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.IChildCreationExtender; +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 org.eclipse.papyrus.propertylifecycle.ElementProperty; +import org.eclipse.papyrus.propertylifecycle.PropertylifecycleFactory; +import org.eclipse.papyrus.propertylifecycle.PropertylifecyclePackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.propertylifecycle.ElementProperty} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class ElementPropertyItemProvider + 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 ElementPropertyItemProvider(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); + + addFeatureLabelPropertyDescriptor(object); + addPriorityPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Feature Label feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addFeatureLabelPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ElementProperty_featureLabel_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ElementProperty_featureLabel_feature", "_UI_ElementProperty_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.ELEMENT_PROPERTY__FEATURE_LABEL, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Priority feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addPriorityPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ElementProperty_priority_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ElementProperty_priority_feature", "_UI_ElementProperty_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.ELEMENT_PROPERTY__PRIORITY, + 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(PropertylifecyclePackage.Literals.ELEMENT_PROPERTY__TRIGGERS); + childrenFeatures.add(PropertylifecyclePackage.Literals.ELEMENT_PROPERTY__VALUE_PROCESSOR); + } + 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 ElementProperty.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ElementProperty")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ElementProperty) object).getFeatureLabel(); + return label == null || label.length() == 0 ? getString("_UI_ElementProperty_type") //$NON-NLS-1$ + : + getString("_UI_ElementProperty_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + + /** + * 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(ElementProperty.class)) { + case PropertylifecyclePackage.ELEMENT_PROPERTY__FEATURE_LABEL: + case PropertylifecyclePackage.ELEMENT_PROPERTY__PRIORITY: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case PropertylifecyclePackage.ELEMENT_PROPERTY__TRIGGERS: + case PropertylifecyclePackage.ELEMENT_PROPERTY__VALUE_PROCESSOR: + 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(PropertylifecyclePackage.Literals.ELEMENT_PROPERTY__TRIGGERS, + PropertylifecycleFactory.eINSTANCE.createBasicTrigger())); + + newChildDescriptors.add(createChildParameter(PropertylifecyclePackage.Literals.ELEMENT_PROPERTY__VALUE_PROCESSOR, + PropertylifecycleFactory.eINSTANCE.createJavaProcessor())); + } + + /** + * Return the resource locator for this item provider's resources. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ((IChildCreationExtender) adapterFactory).getResourceLocator(); + } + +} diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/ElementTemplateItemProvider.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/ElementTemplateItemProvider.java new file mode 100755 index 00000000000..89902e1c88d --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/ElementTemplateItemProvider.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * + * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.propertylifecycle.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.IChildCreationExtender; +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 org.eclipse.papyrus.propertylifecycle.ElementTemplate; +import org.eclipse.papyrus.propertylifecycle.PropertylifecyclePackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.propertylifecycle.ElementTemplate} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class ElementTemplateItemProvider + 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 ElementTemplateItemProvider(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); + + addBaseTypePropertyDescriptor(object); + addSpecializedTypePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Base Type feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addBaseTypePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ElementTemplate_baseType_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ElementTemplate_baseType_feature", "_UI_ElementTemplate_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.ELEMENT_TEMPLATE__BASE_TYPE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Specialized Type feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addSpecializedTypePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ElementTemplate_specializedType_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_ElementTemplate_specializedType_feature", "_UI_ElementTemplate_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.ELEMENT_TEMPLATE__SPECIALIZED_TYPE, + 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 = ((ElementTemplate) object).getBaseType(); + return label == null || label.length() == 0 ? getString("_UI_ElementTemplate_type") //$NON-NLS-1$ + : + getString("_UI_ElementTemplate_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + + /** + * 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(ElementTemplate.class)) { + case PropertylifecyclePackage.ELEMENT_TEMPLATE__BASE_TYPE: + case PropertylifecyclePackage.ELEMENT_TEMPLATE__SPECIALIZED_TYPE: + 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 ((IChildCreationExtender) adapterFactory).getResourceLocator(); + } + +} diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/JavaProcessorItemProvider.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/JavaProcessorItemProvider.java new file mode 100755 index 00000000000..aa67cbd60fe --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/JavaProcessorItemProvider.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * + * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.propertylifecycle.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 org.eclipse.papyrus.propertylifecycle.JavaProcessor; +import org.eclipse.papyrus.propertylifecycle.PropertylifecyclePackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.propertylifecycle.JavaProcessor} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class JavaProcessorItemProvider extends AbstractValueProcessorItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public JavaProcessorItemProvider(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); + + addClassNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Class Name feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addClassNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_JavaProcessor_className_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_JavaProcessor_className_feature", "_UI_JavaProcessor_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.JAVA_PROCESSOR__CLASS_NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns JavaProcessor.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/JavaProcessor")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((JavaProcessor) object).getClassName(); + return label == null || label.length() == 0 ? getString("_UI_JavaProcessor_type") //$NON-NLS-1$ + : + getString("_UI_JavaProcessor_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + + /** + * 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(JavaProcessor.class)) { + case PropertylifecyclePackage.JAVA_PROCESSOR__CLASS_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); + } + +} diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/PropertylifecycleEditPlugin.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/PropertylifecycleEditPlugin.java new file mode 100755 index 00000000000..10631195f90 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/PropertylifecycleEditPlugin.java @@ -0,0 +1,106 @@ +/** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * + * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.propertylifecycle.provider; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +/** + * This is the central singleton for the Propertylifecycle edit plugin. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public final class PropertylifecycleEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public static final PropertylifecycleEditPlugin INSTANCE = new PropertylifecycleEditPlugin(); + + /** + * 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 PropertylifecycleEditPlugin() { + super(new ResourceLocator[] { + }); + } + + /** + * 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; + } + } + +} diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/PropertylifecycleItemProviderAdapterFactory.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/PropertylifecycleItemProviderAdapterFactory.java new file mode 100755 index 00000000000..e80be9158ac --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/PropertylifecycleItemProviderAdapterFactory.java @@ -0,0 +1,421 @@ +/** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * + * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.propertylifecycle.provider; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +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.common.util.ResourceLocator; + +import org.eclipse.emf.edit.domain.EditingDomain; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ChildCreationExtenderManager; +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.IChildCreationExtender; +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 org.eclipse.papyrus.propertylifecycle.PropertylifecyclePackage; +import org.eclipse.papyrus.propertylifecycle.util.PropertylifecycleAdapterFactory; + +/** + * 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 PropertylifecycleItemProviderAdapterFactory extends PropertylifecycleAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable, IChildCreationExtender { + /** + * 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 helps manage the child creation extenders. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(PropertylifecycleEditPlugin.INSTANCE, PropertylifecyclePackage.eNS_URI); + + /** + * 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 PropertylifecycleItemProviderAdapterFactory() { + 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 org.eclipse.papyrus.propertylifecycle.StrategySet} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected StrategySetItemProvider strategySetItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.propertylifecycle.StrategySet}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createStrategySetAdapter() { + if (strategySetItemProvider == null) { + strategySetItemProvider = new StrategySetItemProvider(this); + } + + return strategySetItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.propertylifecycle.StrategyElement} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected StrategyElementItemProvider strategyElementItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.propertylifecycle.StrategyElement}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createStrategyElementAdapter() { + if (strategyElementItemProvider == null) { + strategyElementItemProvider = new StrategyElementItemProvider(this); + } + + return strategyElementItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.propertylifecycle.ElementContainer} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ElementContainerItemProvider elementContainerItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.propertylifecycle.ElementContainer}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createElementContainerAdapter() { + if (elementContainerItemProvider == null) { + elementContainerItemProvider = new ElementContainerItemProvider(this); + } + + return elementContainerItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.propertylifecycle.ElementProperty} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected ElementPropertyItemProvider elementPropertyItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.propertylifecycle.ElementProperty}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createElementPropertyAdapter() { + if (elementPropertyItemProvider == null) { + elementPropertyItemProvider = new ElementPropertyItemProvider(this); + } + + return elementPropertyItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.propertylifecycle.JavaProcessor} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected JavaProcessorItemProvider javaProcessorItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.propertylifecycle.JavaProcessor}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createJavaProcessorAdapter() { + if (javaProcessorItemProvider == null) { + javaProcessorItemProvider = new JavaProcessorItemProvider(this); + } + + return javaProcessorItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.propertylifecycle.BasicTrigger} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected BasicTriggerItemProvider basicTriggerItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.papyrus.propertylifecycle.BasicTrigger}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createBasicTriggerAdapter() { + if (basicTriggerItemProvider == null) { + basicTriggerItemProvider = new BasicTriggerItemProvider(this); + } + + return basicTriggerItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + 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 + */ + @Override + 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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public List<IChildCreationExtender> getChildCreationExtenders() { + return childCreationExtenderManager.getChildCreationExtenders(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) { + return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return childCreationExtenderManager; + } + + /** + * This adds a listener. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + 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 + */ + @Override + public void dispose() { + if (strategySetItemProvider != null) { + strategySetItemProvider.dispose(); + } + if (strategyElementItemProvider != null) { + strategyElementItemProvider.dispose(); + } + if (elementContainerItemProvider != null) { + elementContainerItemProvider.dispose(); + } + if (elementPropertyItemProvider != null) { + elementPropertyItemProvider.dispose(); + } + if (javaProcessorItemProvider != null) { + javaProcessorItemProvider.dispose(); + } + if (basicTriggerItemProvider != null) { + basicTriggerItemProvider.dispose(); + } + } + +} diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/StrategyElementItemProvider.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/StrategyElementItemProvider.java new file mode 100755 index 00000000000..ceb501ad5aa --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/StrategyElementItemProvider.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * + * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.propertylifecycle.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 org.eclipse.papyrus.propertylifecycle.PropertylifecycleFactory; +import org.eclipse.papyrus.propertylifecycle.PropertylifecyclePackage; +import org.eclipse.papyrus.propertylifecycle.StrategyElement; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.propertylifecycle.StrategyElement} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class StrategyElementItemProvider extends ElementTemplateItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public StrategyElementItemProvider(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); + addDecriptionPropertyDescriptor(object); + addIdPropertyDescriptor(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_StrategyTemplate_name_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_StrategyTemplate_name_feature", "_UI_StrategyTemplate_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.STRATEGY_TEMPLATE__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Decription feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addDecriptionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_StrategyTemplate_decription_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_StrategyTemplate_decription_feature", "_UI_StrategyTemplate_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.STRATEGY_TEMPLATE__DECRIPTION, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Id feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addIdPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_StrategyTemplate_id_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_StrategyTemplate_id_feature", "_UI_StrategyTemplate_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.STRATEGY_TEMPLATE__ID, + 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(PropertylifecyclePackage.Literals.STRATEGY_ELEMENT__ELEMENT_CONTAINERS); + childrenFeatures.add(PropertylifecyclePackage.Literals.STRATEGY_ELEMENT__ELEMENT_PROPERTIES); + } + 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 StrategyElement.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/StrategyElement")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((StrategyElement) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_StrategyElement_type") //$NON-NLS-1$ + : + getString("_UI_StrategyElement_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + + /** + * 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(StrategyElement.class)) { + case PropertylifecyclePackage.STRATEGY_ELEMENT__NAME: + case PropertylifecyclePackage.STRATEGY_ELEMENT__DECRIPTION: + case PropertylifecyclePackage.STRATEGY_ELEMENT__ID: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case PropertylifecyclePackage.STRATEGY_ELEMENT__ELEMENT_CONTAINERS: + case PropertylifecyclePackage.STRATEGY_ELEMENT__ELEMENT_PROPERTIES: + 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(PropertylifecyclePackage.Literals.STRATEGY_ELEMENT__ELEMENT_CONTAINERS, + PropertylifecycleFactory.eINSTANCE.createElementContainer())); + + newChildDescriptors.add(createChildParameter(PropertylifecyclePackage.Literals.STRATEGY_ELEMENT__ELEMENT_PROPERTIES, + PropertylifecycleFactory.eINSTANCE.createElementProperty())); + } + +} diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/StrategySetItemProvider.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/StrategySetItemProvider.java new file mode 100755 index 00000000000..bbb912a3468 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/StrategySetItemProvider.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * + * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.propertylifecycle.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.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.papyrus.propertylifecycle.PropertylifecycleFactory; +import org.eclipse.papyrus.propertylifecycle.PropertylifecyclePackage; +import org.eclipse.papyrus.propertylifecycle.StrategySet; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.propertylifecycle.StrategySet} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class StrategySetItemProvider extends StrategyTemplateItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public StrategySetItemProvider(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(PropertylifecyclePackage.Literals.STRATEGY_SET__STRATEGIES); + } + 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 StrategySet.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/StrategySet")); //$NON-NLS-1$ + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((StrategySet) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_StrategySet_type") //$NON-NLS-1$ + : + getString("_UI_StrategySet_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + + /** + * 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(StrategySet.class)) { + case PropertylifecyclePackage.STRATEGY_SET__STRATEGIES: + 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(PropertylifecyclePackage.Literals.STRATEGY_SET__STRATEGIES, + PropertylifecycleFactory.eINSTANCE.createStrategyElement())); + } + +} diff --git a/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/StrategyTemplateItemProvider.java b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/StrategyTemplateItemProvider.java new file mode 100755 index 00000000000..b196be19d03 --- /dev/null +++ b/extraplugins/propertylifecycle/org.eclipse.papyrus.propertylifecycle.model.edit/src-gen/org/eclipse/papyrus/propertylifecycle/provider/StrategyTemplateItemProvider.java @@ -0,0 +1,209 @@ +/** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * + * Quentin Le Menez (CEA LIST) quentin.lemenez@cea.fr - Initial API and implementation + */ +package org.eclipse.papyrus.propertylifecycle.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.IChildCreationExtender; +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 org.eclipse.papyrus.propertylifecycle.PropertylifecyclePackage; +import org.eclipse.papyrus.propertylifecycle.StrategyTemplate; + +/** + * This is the item provider adapter for a {@link org.eclipse.papyrus.propertylifecycle.StrategyTemplate} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class StrategyTemplateItemProvider + 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 StrategyTemplateItemProvider(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); + addDecriptionPropertyDescriptor(object); + addIdPropertyDescriptor(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_StrategyTemplate_name_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_StrategyTemplate_name_feature", "_UI_StrategyTemplate_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.STRATEGY_TEMPLATE__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Decription feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addDecriptionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_StrategyTemplate_decription_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_StrategyTemplate_decription_feature", "_UI_StrategyTemplate_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.STRATEGY_TEMPLATE__DECRIPTION, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Id feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected void addIdPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_StrategyTemplate_id_feature"), //$NON-NLS-1$ + getString("_UI_PropertyDescriptor_description", "_UI_StrategyTemplate_id_feature", "_UI_StrategyTemplate_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + PropertylifecyclePackage.Literals.STRATEGY_TEMPLATE__ID, + 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 = ((StrategyTemplate) object).getName(); + return label == null || label.length() == 0 ? getString("_UI_StrategyTemplate_type") //$NON-NLS-1$ + : + getString("_UI_StrategyTemplate_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ + } + + + /** + * 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(StrategyTemplate.class)) { + case PropertylifecyclePackage.STRATEGY_TEMPLATE__NAME: + case PropertylifecyclePackage.STRATEGY_TEMPLATE__DECRIPTION: + case PropertylifecyclePackage.STRATEGY_TEMPLATE__ID: + 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 ((IChildCreationExtender) adapterFactory).getResourceLocator(); + } + +} |