diff options
Diffstat (limited to 'plugins')
164 files changed, 11111 insertions, 0 deletions
diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/.classpath new file mode 100644 index 0000000000..664b52ed75 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src-gen"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/.project new file mode 100644 index 0000000000..387b37a3b8 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.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/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..60b3f38a7a --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.properties.edit;singleton:=true +Bundle-Version: 4.1.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: org.eclipse.sirius.tests.rcptt.properties.propertiestests.provider.PropertiestestsEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.eclipse.sirius.tests.rcptt.properties.propertiestests.provider +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.sirius.tests.rcptt.properties;visibility:=reexport, + org.eclipse.emf.edit;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/build.properties new file mode 100644 index 0000000000..2c9fb6293a --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/build.properties @@ -0,0 +1,14 @@ +# Copyright (c) 2016 Obeo. +# 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.htm + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src-gen/ +output.. = bin/ diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/ctool16/CreateTestElement_containmentReference_TestElement.gif b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/ctool16/CreateTestElement_containmentReference_TestElement.gif Binary files differnew file mode 100644 index 0000000000..40ef685420 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/ctool16/CreateTestElement_containmentReference_TestElement.gif diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/ctool16/CreateTestElement_containmentReferences_TestElement.gif b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/ctool16/CreateTestElement_containmentReferences_TestElement.gif Binary files differnew file mode 100644 index 0000000000..40ef685420 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/ctool16/CreateTestElement_containmentReferences_TestElement.gif diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/ctool16/CreateTestRoot_elements_TestElement.gif b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/ctool16/CreateTestRoot_elements_TestElement.gif Binary files differnew file mode 100644 index 0000000000..e6388bf07a --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/ctool16/CreateTestRoot_elements_TestElement.gif diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/obj16/TestElement.gif b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/obj16/TestElement.gif Binary files differnew file mode 100644 index 0000000000..b1f8afa476 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/obj16/TestElement.gif diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/obj16/TestRoot.gif b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/obj16/TestRoot.gif Binary files differnew file mode 100644 index 0000000000..a3908bcf7b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/icons/full/obj16/TestRoot.gif diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/plugin.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/plugin.properties new file mode 100644 index 0000000000..a301af00f6 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/plugin.properties @@ -0,0 +1,43 @@ +# Copyright (c) 2016 Obeo. +# 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.htm + +pluginName = Sirius Properties Tests Edit Support +providerName = Eclipse Modeling Project + +_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_TestRoot_type = Test Root +_UI_TestElement_type = Test Element +_UI_Unknown_type = Object + +_UI_Unknown_datatype= Value + +_UI_TestRoot_elements_feature = Elements +_UI_TestElement_stringMonoValuedAttribute_feature = String Mono Valued Attribute +_UI_Unknown_feature = Unspecified + +_UI_TestElement_stringAttribute_feature = String Attribute +_UI_TestElement_stringAttributes_feature = String Attributes +_UI_TestElement_intAttribute_feature = Int Attribute +_UI_TestElement_intAttributes_feature = Int Attributes +_UI_TestElement_booleanAttribute_feature = Boolean Attribute +_UI_TestElement_booleanAttributes_feature = Boolean Attributes +_UI_TestElement_enumAttribute_feature = Enum Attribute +_UI_TestElement_enumAttributes_feature = Enum Attributes +_UI_TestElement_containmentReference_feature = Containment Reference +_UI_TestElement_containmentReferences_feature = Containment References +_UI_TestElement_reference_feature = Reference +_UI_TestElement_references_feature = References +_UI_TestEnum_Literal1_literal = Literal1 +_UI_TestEnum_Literal2_literal = Literal2 +_UI_TestEnum_Literal3_literal = Literal3 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/plugin.xml new file mode 100644 index 0000000000..50512d85af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/plugin.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- + Copyright (c) 2016 Obeo. + 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.htm +--> + +<plugin> + + <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> + <!-- @generated propertiestests --> + <factory + uri="http://www.eclipse.org/sirius/tests/properties/1.0.0" + class="org.eclipse.sirius.tests.rcptt.properties.propertiestests.provider.PropertiestestsItemProviderAdapterFactory" + 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/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/pom.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/pom.xml new file mode 100644 index 0000000000..c26b33ff6d --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/pom.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2016 Obeo + 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: + Obeo - Initial API and implementation +--> +<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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.sirius</groupId> + <artifactId>sirius-parent</artifactId> + <version>4.1.0-SNAPSHOT</version> + <relativePath>../../packaging/org.eclipse.sirius.parent</relativePath> + </parent> + + <artifactId>org.eclipse.sirius.tests.rcptt.properties.edit</artifactId> + <packaging>eclipse-plugin</packaging> + <version>4.1.0-SNAPSHOT</version> + +</project> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/provider/PropertiestestsEditPlugin.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/provider/PropertiestestsEditPlugin.java new file mode 100644 index 0000000000..496640b330 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/provider/PropertiestestsEditPlugin.java @@ -0,0 +1,89 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.provider; + +import org.eclipse.emf.common.EMFPlugin; +import org.eclipse.emf.common.util.ResourceLocator; + +/** + * This is the central singleton for the Propertiestests edit plugin. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public final class PropertiestestsEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public static final PropertiestestsEditPlugin INSTANCE = new PropertiestestsEditPlugin(); + + /** + * 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 PropertiestestsEditPlugin() { + 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 PropertiestestsEditPlugin.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 PropertiestestsEditPlugin.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. + // + PropertiestestsEditPlugin.plugin = this; + } + } + +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/provider/PropertiestestsItemProviderAdapterFactory.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/provider/PropertiestestsItemProviderAdapterFactory.java new file mode 100644 index 0000000000..836417bfa5 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/provider/PropertiestestsItemProviderAdapterFactory.java @@ -0,0 +1,242 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.provider; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.util.PropertiestestsAdapterFactory; + +/** + * 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 PropertiestestsItemProviderAdapterFactory extends PropertiestestsAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this + * adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement + * {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by + * {@link #isFactoryForType isFactoryForType}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected Collection<Object> supportedTypes = new ArrayList<Object>(); + + /** + * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public PropertiestestsItemProviderAdapterFactory() { + 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.sirius.tests.rcptt.properties.propertiestests.TestRoot} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TestRootItemProvider testRootItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTestRootAdapter() { + if (testRootItemProvider == null) { + testRootItemProvider = new TestRootItemProvider(this); + } + + return testRootItemProvider; + } + + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement} + * instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TestElementItemProvider testElementItemProvider; + + /** + * This creates an adapter for a + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement} + * . <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Adapter createTestElementAdapter() { + if (testElementItemProvider == null) { + testElementItemProvider = new TestElementItemProvider(this); + } + + return testElementItemProvider; + } + + /** + * 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; + } + + /** + * 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 (testRootItemProvider != null) { + testRootItemProvider.dispose(); + } + if (testElementItemProvider != null) { + testElementItemProvider.dispose(); + } + } + +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/provider/TestElementItemProvider.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/provider/TestElementItemProvider.java new file mode 100644 index 0000000000..9bcfa9d746 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/provider/TestElementItemProvider.java @@ -0,0 +1,330 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsFactory; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TestElementItemProvider 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 TestElementItemProvider(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); + + addStringAttributePropertyDescriptor(object); + addStringAttributesPropertyDescriptor(object); + addIntAttributePropertyDescriptor(object); + addIntAttributesPropertyDescriptor(object); + addBooleanAttributePropertyDescriptor(object); + addBooleanAttributesPropertyDescriptor(object); + addEnumAttributePropertyDescriptor(object); + addEnumAttributesPropertyDescriptor(object); + addReferencePropertyDescriptor(object); + addReferencesPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the String Attribute feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStringAttributePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TestElement_stringAttribute_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TestElement_stringAttribute_feature", "_UI_TestElement_type"), + PropertiestestsPackage.Literals.TEST_ELEMENT__STRING_ATTRIBUTE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the String Attributes feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addStringAttributesPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TestElement_stringAttributes_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TestElement_stringAttributes_feature", "_UI_TestElement_type"), + PropertiestestsPackage.Literals.TEST_ELEMENT__STRING_ATTRIBUTES, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Int Attribute feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addIntAttributePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TestElement_intAttribute_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TestElement_intAttribute_feature", "_UI_TestElement_type"), + PropertiestestsPackage.Literals.TEST_ELEMENT__INT_ATTRIBUTE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Int Attributes feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addIntAttributesPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TestElement_intAttributes_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TestElement_intAttributes_feature", "_UI_TestElement_type"), + PropertiestestsPackage.Literals.TEST_ELEMENT__INT_ATTRIBUTES, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Boolean Attribute feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addBooleanAttributePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TestElement_booleanAttribute_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TestElement_booleanAttribute_feature", "_UI_TestElement_type"), + PropertiestestsPackage.Literals.TEST_ELEMENT__BOOLEAN_ATTRIBUTE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Boolean Attributes feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addBooleanAttributesPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TestElement_booleanAttributes_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TestElement_booleanAttributes_feature", "_UI_TestElement_type"), + PropertiestestsPackage.Literals.TEST_ELEMENT__BOOLEAN_ATTRIBUTES, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Enum Attribute feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addEnumAttributePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TestElement_enumAttribute_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TestElement_enumAttribute_feature", "_UI_TestElement_type"), + PropertiestestsPackage.Literals.TEST_ELEMENT__ENUM_ATTRIBUTE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Enum Attributes feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addEnumAttributesPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TestElement_enumAttributes_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TestElement_enumAttributes_feature", "_UI_TestElement_type"), + PropertiestestsPackage.Literals.TEST_ELEMENT__ENUM_ATTRIBUTES, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Reference feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addReferencePropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TestElement_reference_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TestElement_reference_feature", "_UI_TestElement_type"), + PropertiestestsPackage.Literals.TEST_ELEMENT__REFERENCE, true, false, true, null, null, null)); + } + + /** + * This adds a property descriptor for the References feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void addReferencesPropertyDescriptor(Object object) { + itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), + getString("_UI_TestElement_references_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TestElement_references_feature", "_UI_TestElement_type"), + PropertiestestsPackage.Literals.TEST_ELEMENT__REFERENCES, true, false, true, null, null, null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to + * deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, + * {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in + * {@link #createCommand}. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(PropertiestestsPackage.Literals.TEST_ELEMENT__CONTAINMENT_REFERENCE); + childrenFeatures.add(PropertiestestsPackage.Literals.TEST_ELEMENT__CONTAINMENT_REFERENCES); + } + 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 TestElement.gif. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TestElement")); + } + + /** + * This returns the label text for the adapted class. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((TestElement) object).getStringAttribute(); + return label == null || label.length() == 0 ? getString("_UI_TestElement_type") : getString("_UI_TestElement_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TestElement.class)) { + case PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTE: + case PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTES: + case PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTE: + case PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTES: + case PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTE: + case PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTES: + case PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTE: + case PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTES: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCE: + case PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCES: + 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(PropertiestestsPackage.Literals.TEST_ELEMENT__CONTAINMENT_REFERENCE, PropertiestestsFactory.eINSTANCE.createTestElement())); + + newChildDescriptors.add(createChildParameter(PropertiestestsPackage.Literals.TEST_ELEMENT__CONTAINMENT_REFERENCES, PropertiestestsFactory.eINSTANCE.createTestElement())); + } + + /** + * This returns the label text for + * {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = childFeature == PropertiestestsPackage.Literals.TEST_ELEMENT__CONTAINMENT_REFERENCE || childFeature == PropertiestestsPackage.Literals.TEST_ELEMENT__CONTAINMENT_REFERENCES; + + if (qualify) { + return getString("_UI_CreateChild_text2", new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return PropertiestestsEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/provider/TestRootItemProvider.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/provider/TestRootItemProvider.java new file mode 100644 index 0000000000..5aea5d7930 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/provider/TestRootItemProvider.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.ResourceLocator; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsFactory; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot; + +/** + * This is the item provider adapter for a + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot} + * object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class TestRootItemProvider 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 TestRootItemProvider(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(PropertiestestsPackage.Literals.TEST_ROOT__ELEMENTS); + } + 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 TestRoot.gif. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/TestRoot")); + } + + /** + * 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_TestRoot_type"); + } + + /** + * This handles model notifications by calling {@link #updateChildren} to + * update any cached children and by creating a viewer notification, which + * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(TestRoot.class)) { + case PropertiestestsPackage.TEST_ROOT__ELEMENTS: + 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(PropertiestestsPackage.Literals.TEST_ROOT__ELEMENTS, PropertiestestsFactory.eINSTANCE.createTestElement())); + } + + /** + * Return the resource locator for this item provider's resources. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return PropertiestestsEditPlugin.INSTANCE; + } + +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/.classpath new file mode 100644 index 0000000000..664b52ed75 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src-gen"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/.project new file mode 100644 index 0000000000..6f16cfd81d --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.editor</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..47349568ba --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/META-INF/MANIFEST.MF @@ -0,0 +1,18 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.properties.editor;singleton:=true +Bundle-Version: 4.1.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: org.eclipse.sirius.tests.rcptt.properties.propertiestests.presentation.PropertiestestsEditorPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.eclipse.sirius.tests.rcptt.properties.propertiestests.presentation +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.resources;visibility:=reexport, + org.eclipse.sirius.tests.rcptt.properties.edit;visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.eclipse.emf.edit.ui;visibility:=reexport, + org.eclipse.ui.ide;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/build.properties new file mode 100644 index 0000000000..af0a62ecf8 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/build.properties @@ -0,0 +1,14 @@ +# Copyright (c) 2016 Obeo. +# 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.htm + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src-gen/ +output.. = bin diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/icons/full/obj16/PropertiestestsModelFile.gif b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/icons/full/obj16/PropertiestestsModelFile.gif Binary files differnew file mode 100644 index 0000000000..c4edfc0c55 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/icons/full/obj16/PropertiestestsModelFile.gif diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/icons/full/wizban/NewPropertiestests.gif b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/icons/full/wizban/NewPropertiestests.gif Binary files differnew file mode 100644 index 0000000000..0ed73ab4fd --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/icons/full/wizban/NewPropertiestests.gif diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/plugin.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/plugin.properties new file mode 100644 index 0000000000..4f79d00830 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/plugin.properties @@ -0,0 +1,57 @@ +# Copyright (c) 2016 Obeo. +# 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.htm + +pluginName = Sirius Properties Tests Editor +providerName = Eclipse Modeling Project + +_UI_PropertiestestsEditor_menu = &Propertiestests Editor + +_UI_CreateChild_menu_item = &New Child +_UI_CreateSibling_menu_item = N&ew Sibling + +_UI_ShowPropertiesView_menu_item = Show &Properties View +_UI_RefreshViewer_menu_item = &Refresh + +_UI_SelectionPage_label = Selection +_UI_ParentPage_label = Parent +_UI_ListPage_label = List +_UI_TreePage_label = Tree +_UI_TablePage_label = Table +_UI_TreeWithColumnsPage_label = Tree with Columns +_UI_ObjectColumn_label = Object +_UI_SelfColumn_label = Self + +_UI_NoObjectSelected = Selected Nothing +_UI_SingleObjectSelected = Selected Object: {0} +_UI_MultiObjectSelected = Selected {0} Objects + +_UI_OpenEditorError_label = Open Editor + +_UI_Wizard_category = Example EMF Model Creation Wizards + +_UI_CreateModelError_message = Problems encountered in file "{0}" + +_UI_PropertiestestsModelWizard_label = Propertiestests Model +_UI_PropertiestestsModelWizard_description = Create a new Propertiestests model + +_UI_PropertiestestsEditor_label = Propertiestests Model Editor + +_UI_PropertiestestsEditorFilenameDefaultBase = My +_UI_PropertiestestsEditorFilenameExtensions = propertiestests + +_UI_Wizard_label = New + +_WARN_FilenameExtension = The file name must end in ''.{0}'' +_WARN_FilenameExtensions = The file name must have one of the following extensions: {0} + +_UI_ModelObject = &Model Object +_UI_XMLEncoding = &XML Encoding +_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1 +_UI_Wizard_initial_object_description = Select a model object to create + +_UI_FileConflict_label = File Conflict +_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes? + diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/plugin.xml new file mode 100644 index 0000000000..e1e4d857ae --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/plugin.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- + Copyright (c) 2016 Obeo. + 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.htm +--> + +<plugin> + + <extension point="org.eclipse.ui.newWizards"> + <!-- @generated propertiestests --> + <category + id="org.eclipse.emf.ecore.Wizard.category.ID" + name="%_UI_Wizard_category"/> + <wizard + id="org.eclipse.sirius.tests.rcptt.properties.propertiestests.presentation.PropertiestestsModelWizardID" + name="%_UI_PropertiestestsModelWizard_label" + class="org.eclipse.sirius.tests.rcptt.properties.propertiestests.presentation.PropertiestestsModelWizard" + category="org.eclipse.emf.ecore.Wizard.category.ID" + icon="icons/full/obj16/PropertiestestsModelFile.gif"> + <description>%_UI_PropertiestestsModelWizard_description</description> + <selection class="org.eclipse.core.resources.IResource"/> + </wizard> + </extension> + + <extension point="org.eclipse.ui.editors"> + <!-- @generated propertiestests --> + <editor + id="org.eclipse.sirius.tests.rcptt.properties.propertiestests.presentation.PropertiestestsEditorID" + name="%_UI_PropertiestestsEditor_label" + icon="icons/full/obj16/PropertiestestsModelFile.gif" + extensions="propertiestests" + class="org.eclipse.sirius.tests.rcptt.properties.propertiestests.presentation.PropertiestestsEditor" + contributorClass="org.eclipse.sirius.tests.rcptt.properties.propertiestests.presentation.PropertiestestsActionBarContributor"> + </editor> + </extension> + +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/pom.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/pom.xml new file mode 100644 index 0000000000..b49b0cfcc4 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/pom.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2016 Obeo + 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: + Obeo - Initial API and implementation +--> +<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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.sirius</groupId> + <artifactId>sirius-parent</artifactId> + <version>4.1.0-SNAPSHOT</version> + <relativePath>../../packaging/org.eclipse.sirius.parent</relativePath> + </parent> + + <artifactId>org.eclipse.sirius.tests.rcptt.properties.editor</artifactId> + <packaging>eclipse-plugin</packaging> + <version>4.1.0-SNAPSHOT</version> + +</project> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/presentation/PropertiestestsActionBarContributor.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/presentation/PropertiestestsActionBarContributor.java new file mode 100644 index 0000000000..4da77f682e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/presentation/PropertiestestsActionBarContributor.java @@ -0,0 +1,430 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.presentation; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; +import org.eclipse.emf.edit.ui.action.ControlAction; +import org.eclipse.emf.edit.ui.action.CreateChildAction; +import org.eclipse.emf.edit.ui.action.CreateSiblingAction; +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; +import org.eclipse.emf.edit.ui.action.LoadResourceAction; +import org.eclipse.emf.edit.ui.action.ValidateAction; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.ActionContributionItem; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IContributionItem; +import org.eclipse.jface.action.IContributionManager; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.action.SubContributionItem; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PartInitException; + +/** + * This is the action bar contributor for the Propertiestests model editor. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public class PropertiestestsActionBarContributor extends EditingDomainActionBarContributor implements ISelectionChangedListener { + /** + * This keeps track of the active editor. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected IEditorPart activeEditorPart; + + /** + * This keeps track of the current selection provider. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + protected ISelectionProvider selectionProvider; + + /** + * This action opens the Properties view. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected IAction showPropertiesViewAction = new Action(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { + @Override + public void run() { + try { + getPage().showView("org.eclipse.ui.views.PropertySheet"); + } catch (PartInitException exception) { + PropertiestestsEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * This action refreshes the viewer of the current editor if the editor + * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected IAction refreshViewerAction = new Action(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { + @Override + public boolean isEnabled() { + return activeEditorPart instanceof IViewerProvider; + } + + @Override + public void run() { + if (activeEditorPart instanceof IViewerProvider) { + Viewer viewer = ((IViewerProvider) activeEditorPart).getViewer(); + if (viewer != null) { + viewer.refresh(); + } + } + } + }; + + /** + * This will contain one + * {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to + * each descriptor generated for the current selection by the item provider. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Collection<IAction> createChildActions; + + /** + * This is the menu manager into which menu contribution items should be + * added for CreateChild actions. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + protected IMenuManager createChildMenuManager; + + /** + * This will contain one + * {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding + * to each descriptor generated for the current selection by the item + * provider. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Collection<IAction> createSiblingActions; + + /** + * This is the menu manager into which menu contribution items should be + * added for CreateSibling actions. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected IMenuManager createSiblingMenuManager; + + /** + * This creates an instance of the contributor. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public PropertiestestsActionBarContributor() { + super(EditingDomainActionBarContributor.ADDITIONS_LAST_STYLE); + loadResourceAction = new LoadResourceAction(); + validateAction = new ValidateAction(); + controlAction = new ControlAction(); + } + + /** + * This adds Separators for editor additions to the tool bar. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void contributeToToolBar(IToolBarManager toolBarManager) { + toolBarManager.add(new Separator("propertiestests-settings")); + toolBarManager.add(new Separator("propertiestests-additions")); + } + + /** + * This adds to the menu bar a menu and some separators for editor + * additions, as well as the sub-menus for object creation items. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void contributeToMenu(IMenuManager menuManager) { + super.contributeToMenu(menuManager); + + IMenuManager submenuManager = new MenuManager(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_PropertiestestsEditor_menu"), + "org.eclipse.sirius.tests.rcptt.properties.propertiestestsMenuID"); + menuManager.insertAfter("additions", submenuManager); + submenuManager.add(new Separator("settings")); + submenuManager.add(new Separator("actions")); + submenuManager.add(new Separator("additions")); + submenuManager.add(new Separator("additions-end")); + + // Prepare for CreateChild item addition or removal. + // + createChildMenuManager = new MenuManager(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + submenuManager.insertBefore("additions", createChildMenuManager); + + // Prepare for CreateSibling item addition or removal. + // + createSiblingMenuManager = new MenuManager(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + submenuManager.insertBefore("additions", createSiblingMenuManager); + + // Force an update because Eclipse hides empty menus now. + // + submenuManager.addMenuListener(new IMenuListener() { + @Override + public void menuAboutToShow(IMenuManager menuManager) { + menuManager.updateAll(true); + } + }); + + addGlobalActions(submenuManager); + } + + /** + * When the active editor changes, this remembers the change and registers + * with it as a selection provider. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void setActiveEditor(IEditorPart part) { + super.setActiveEditor(part); + activeEditorPart = part; + + // Switch to the new selection provider. + // + if (selectionProvider != null) { + selectionProvider.removeSelectionChangedListener(this); + } + if (part == null) { + selectionProvider = null; + } else { + selectionProvider = part.getSite().getSelectionProvider(); + selectionProvider.addSelectionChangedListener(this); + + // Fake a selection changed event to update the menus. + // + if (selectionProvider.getSelection() != null) { + selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); + } + } + } + + /** + * This implements + * {@link org.eclipse.jface.viewers.ISelectionChangedListener}, handling + * {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for + * the children and siblings that can be added to the selected object and + * updating the menus accordingly. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public void selectionChanged(SelectionChangedEvent event) { + // Remove any menu items for old selection. + // + if (createChildMenuManager != null) { + depopulateManager(createChildMenuManager, createChildActions); + } + if (createSiblingMenuManager != null) { + depopulateManager(createSiblingMenuManager, createSiblingActions); + } + + // Query the new selection for appropriate new child/sibling descriptors + // + Collection<?> newChildDescriptors = null; + Collection<?> newSiblingDescriptors = null; + + ISelection selection = event.getSelection(); + if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1) { + Object object = ((IStructuredSelection) selection).getFirstElement(); + + EditingDomain domain = ((IEditingDomainProvider) activeEditorPart).getEditingDomain(); + + newChildDescriptors = domain.getNewChildDescriptors(object, null); + newSiblingDescriptors = domain.getNewChildDescriptors(null, object); + } + + // Generate actions for selection; populate and redraw the menus. + // + createChildActions = generateCreateChildActions(newChildDescriptors, selection); + createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); + + if (createChildMenuManager != null) { + populateManager(createChildMenuManager, createChildActions, null); + createChildMenuManager.update(true); + } + if (createSiblingMenuManager != null) { + populateManager(createSiblingMenuManager, createSiblingActions, null); + createSiblingMenuManager.update(true); + } + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} + * for each object in <code>descriptors</code>, and returns the collection + * of these actions. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) { + Collection<IAction> actions = new ArrayList<IAction>(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This generates a + * {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each + * object in <code>descriptors</code>, and returns the collection of these + * actions. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) { + Collection<IAction> actions = new ArrayList<IAction>(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This populates the specified <code>manager</code> with + * {@link org.eclipse.jface.action.ActionContributionItem}s based on the + * {@link org.eclipse.jface.action.IAction}s contained in the + * <code>actions</code> collection, by inserting them before the specified + * contribution item <code>contributionID</code>. If + * <code>contributionID</code> is <code>null</code>, they are simply added. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) { + if (actions != null) { + for (IAction action : actions) { + if (contributionID != null) { + manager.insertBefore(contributionID, action); + } else { + manager.add(action); + } + } + } + } + + /** + * This removes from the specified <code>manager</code> all + * {@link org.eclipse.jface.action.ActionContributionItem}s based on the + * {@link org.eclipse.jface.action.IAction}s contained in the + * <code>actions</code> collection. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) { + if (actions != null) { + IContributionItem[] items = manager.getItems(); + for (IContributionItem item : items) { + // Look into SubContributionItems + // + IContributionItem contributionItem = item; + while (contributionItem instanceof SubContributionItem) { + contributionItem = ((SubContributionItem) contributionItem).getInnerItem(); + } + + // Delete the ActionContributionItems with matching action. + // + if (contributionItem instanceof ActionContributionItem) { + IAction action = ((ActionContributionItem) contributionItem).getAction(); + if (actions.contains(action)) { + manager.remove(contributionItem); + } + } + } + } + } + + /** + * This populates the pop-up menu before it appears. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + @Override + public void menuAboutToShow(IMenuManager menuManager) { + super.menuAboutToShow(menuManager); + MenuManager submenuManager = null; + + submenuManager = new MenuManager(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + populateManager(submenuManager, createChildActions, null); + menuManager.insertBefore("edit", submenuManager); + + submenuManager = new MenuManager(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + populateManager(submenuManager, createSiblingActions, null); + menuManager.insertBefore("edit", submenuManager); + } + + /** + * This inserts global actions before the "additions-end" separator. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void addGlobalActions(IMenuManager menuManager) { + menuManager.insertAfter("additions-end", new Separator("ui-actions")); + menuManager.insertAfter("ui-actions", showPropertiesViewAction); + + refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); + menuManager.insertAfter("ui-actions", refreshViewerAction); + + super.addGlobalActions(menuManager); + } + + /** + * This ensures that a delete action will clean up all references to deleted + * objects. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected boolean removeAllReferencesOnDelete() { + return true; + } + +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/presentation/PropertiestestsEditor.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/presentation/PropertiestestsEditor.java new file mode 100644 index 0000000000..886a205a7d --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/presentation/PropertiestestsEditor.java @@ -0,0 +1,1757 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.presentation; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.EventObject; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceDeltaVisitor; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.emf.common.command.BasicCommandStack; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.command.CommandStackListener; +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.ui.MarkerHelper; +import org.eclipse.emf.common.ui.ViewerPane; +import org.eclipse.emf.common.ui.editor.ProblemEditorPart; +import org.eclipse.emf.common.ui.viewer.IViewerProvider; +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.util.EContentAdapter; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; +import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; +import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; +import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor; +import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter; +import org.eclipse.emf.edit.ui.dnd.LocalTransfer; +import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; +import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider; +import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper; +import org.eclipse.emf.edit.ui.util.EditUIUtil; +import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IStatusLineManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.jface.util.LocalSelectionTransfer; +import org.eclipse.jface.viewers.ColumnWeightData; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ListViewer; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.viewers.TableLayout; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.provider.PropertiestestsItemProviderAdapterFactory; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CTabFolder; +import org.eclipse.swt.dnd.DND; +import org.eclipse.swt.dnd.FileTransfer; +import org.eclipse.swt.dnd.Transfer; +import org.eclipse.swt.events.ControlAdapter; +import org.eclipse.swt.events.ControlEvent; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.swt.widgets.TreeColumn; +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IPartListener; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.actions.WorkspaceModifyOperation; +import org.eclipse.ui.dialogs.SaveAsDialog; +import org.eclipse.ui.ide.IGotoMarker; +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.MultiPageEditorPart; +import org.eclipse.ui.views.contentoutline.ContentOutline; +import org.eclipse.ui.views.contentoutline.ContentOutlinePage; +import org.eclipse.ui.views.contentoutline.IContentOutlinePage; +import org.eclipse.ui.views.properties.IPropertySheetPage; +import org.eclipse.ui.views.properties.PropertySheet; +import org.eclipse.ui.views.properties.PropertySheetPage; + +/** + * This is an example of a Propertiestests model editor. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ +public class PropertiestestsEditor extends MultiPageEditorPart implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker { + /** + * This keeps track of the editing domain that is used to track all changes + * to the model. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected AdapterFactoryEditingDomain editingDomain; + + /** + * This is the one adapter factory used for providing views of the model. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ComposedAdapterFactory adapterFactory; + + /** + * This is the content outline page. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected IContentOutlinePage contentOutlinePage; + + /** + * This is a kludge... <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected IStatusLineManager contentOutlineStatusLineManager; + + /** + * This is the content outline page's viewer. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected TreeViewer contentOutlineViewer; + + /** + * This is the property sheet page. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>(); + + /** + * This is the viewer that shadows the selection in the content outline. The + * parent relation must be correctly defined for this to work. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TreeViewer selectionViewer; + + /** + * This inverts the roll of parent and child in the content provider and + * show parents as a tree. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TreeViewer parentViewer; + + /** + * This shows how a tree view works. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected TreeViewer treeViewer; + + /** + * This shows how a list view works. A list viewer doesn't support icons. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ListViewer listViewer; + + /** + * This shows how a table view works. A table can be used as a list with + * icons. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TableViewer tableViewer; + + /** + * This shows how a tree view with columns works. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected TreeViewer treeViewerWithColumns; + + /** + * This keeps track of the active viewer pane, in the book. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ViewerPane currentViewerPane; + + /** + * This keeps track of the active content viewer, which may be either one of + * the viewers in the pages or the content outline viewer. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Viewer currentViewer; + + /** + * This listens to which ever viewer is active. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected ISelectionChangedListener selectionChangedListener; + + /** + * This keeps track of all the + * {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are + * listening to this editor. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>(); + + /** + * This keeps track of the selection of the editor as a whole. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ISelection editorSelection = StructuredSelection.EMPTY; + + /** + * The MarkerHelper is responsible for creating workspace resource markers + * presented in Eclipse's Problems View. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected MarkerHelper markerHelper = new EditUIMarkerHelper(); + + /** + * This listens for when the outline becomes active <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected IPartListener partListener = new IPartListener() { + @Override + public void partActivated(IWorkbenchPart p) { + if (p instanceof ContentOutline) { + if (((ContentOutline) p).getCurrentPage() == contentOutlinePage) { + getActionBarContributor().setActiveEditor(PropertiestestsEditor.this); + + setCurrentViewer(contentOutlineViewer); + } + } else if (p instanceof PropertySheet) { + if (propertySheetPages.contains(((PropertySheet) p).getCurrentPage())) { + getActionBarContributor().setActiveEditor(PropertiestestsEditor.this); + handleActivate(); + } + } else if (p == PropertiestestsEditor.this) { + handleActivate(); + } + } + + @Override + public void partBroughtToTop(IWorkbenchPart p) { + // Ignore. + } + + @Override + public void partClosed(IWorkbenchPart p) { + // Ignore. + } + + @Override + public void partDeactivated(IWorkbenchPart p) { + // Ignore. + } + + @Override + public void partOpened(IWorkbenchPart p) { + // Ignore. + } + }; + + /** + * Resources that have been removed since last activation. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Collection<Resource> removedResources = new ArrayList<Resource>(); + + /** + * Resources that have been changed since last activation. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Collection<Resource> changedResources = new ArrayList<Resource>(); + + /** + * Resources that have been saved. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + protected Collection<Resource> savedResources = new ArrayList<Resource>(); + + /** + * Map to store the diagnostic associated with a resource. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>(); + + /** + * Controls whether the problem indication should be updated. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected boolean updateProblemIndication = true; + + /** + * Adapter used to update the problem indication when resources are demanded + * loaded. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EContentAdapter problemIndicationAdapter = new EContentAdapter() { + @Override + public void notifyChanged(Notification notification) { + if (notification.getNotifier() instanceof Resource) { + switch (notification.getFeatureID(Resource.class)) { + case Resource.RESOURCE__IS_LOADED: + case Resource.RESOURCE__ERRORS: + case Resource.RESOURCE__WARNINGS: { + Resource resource = (Resource) notification.getNotifier(); + Diagnostic diagnostic = analyzeResourceProblems(resource, null); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, diagnostic); + } else { + resourceToDiagnosticMap.remove(resource); + } + + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + updateProblemIndication(); + } + }); + } + break; + } + } + } else { + super.notifyChanged(notification); + } + } + + @Override + protected void setTarget(Resource target) { + basicSetTarget(target); + } + + @Override + protected void unsetTarget(Resource target) { + basicUnsetTarget(target); + resourceToDiagnosticMap.remove(target); + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + updateProblemIndication(); + } + }); + } + } + }; + + /** + * This listens for workspace changes. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected IResourceChangeListener resourceChangeListener = new IResourceChangeListener() { + @Override + public void resourceChanged(IResourceChangeEvent event) { + IResourceDelta delta = event.getDelta(); + try { + class ResourceDeltaVisitor implements IResourceDeltaVisitor { + protected ResourceSet resourceSet = editingDomain.getResourceSet(); + + protected Collection<Resource> changedResources = new ArrayList<Resource>(); + + protected Collection<Resource> removedResources = new ArrayList<Resource>(); + + @Override + public boolean visit(IResourceDelta delta) { + if (delta.getResource().getType() == IResource.FILE) { + if (delta.getKind() == IResourceDelta.REMOVED || delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) { + Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false); + if (resource != null) { + if (delta.getKind() == IResourceDelta.REMOVED) { + removedResources.add(resource); + } else if (!savedResources.remove(resource)) { + changedResources.add(resource); + } + } + } + return false; + } + + return true; + } + + public Collection<Resource> getChangedResources() { + return changedResources; + } + + public Collection<Resource> getRemovedResources() { + return removedResources; + } + } + + final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(); + delta.accept(visitor); + + if (!visitor.getRemovedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + removedResources.addAll(visitor.getRemovedResources()); + if (!isDirty()) { + getSite().getPage().closeEditor(PropertiestestsEditor.this, false); + } + } + }); + } + + if (!visitor.getChangedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + changedResources.addAll(visitor.getChangedResources()); + if (getSite().getPage().getActiveEditor() == PropertiestestsEditor.this) { + handleActivate(); + } + } + }); + } + } catch (CoreException exception) { + PropertiestestsEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * Handles activation of the editor or it's associated views. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void handleActivate() { + // Recompute the read only state. + // + if (editingDomain.getResourceToReadOnlyMap() != null) { + editingDomain.getResourceToReadOnlyMap().clear(); + + // Refresh any actions that may become enabled or disabled. + // + setSelection(getSelection()); + } + + if (!removedResources.isEmpty()) { + if (handleDirtyConflict()) { + getSite().getPage().closeEditor(PropertiestestsEditor.this, false); + } else { + removedResources.clear(); + changedResources.clear(); + savedResources.clear(); + } + } else if (!changedResources.isEmpty()) { + changedResources.removeAll(savedResources); + handleChangedResources(); + changedResources.clear(); + savedResources.clear(); + } + } + + /** + * Handles what to do with changed resources on activation. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void handleChangedResources() { + if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { + if (isDirty()) { + changedResources.addAll(editingDomain.getResourceSet().getResources()); + } + editingDomain.getCommandStack().flush(); + + updateProblemIndication = false; + for (Resource resource : changedResources) { + if (resource.isLoaded()) { + resource.unload(); + try { + resource.load(Collections.EMPTY_MAP); + } catch (IOException exception) { + if (!resourceToDiagnosticMap.containsKey(resource)) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + } + } + } + + if (AdapterFactoryEditingDomain.isStale(editorSelection)) { + setSelection(StructuredSelection.EMPTY); + } + + updateProblemIndication = true; + updateProblemIndication(); + } + } + + /** + * Updates the problems indication with the information described in the + * specified diagnostic. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void updateProblemIndication() { + if (updateProblemIndication) { + BasicDiagnostic diagnostic = new BasicDiagnostic(Diagnostic.OK, "org.eclipse.sirius.tests.rcptt.properties.editor", 0, null, new Object[] { editingDomain.getResourceSet() }); + for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { + if (childDiagnostic.getSeverity() != Diagnostic.OK) { + diagnostic.add(childDiagnostic); + } + } + + int lastEditorPage = getPageCount() - 1; + if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { + ((ProblemEditorPart) getEditor(lastEditorPage)).setDiagnostic(diagnostic); + if (diagnostic.getSeverity() != Diagnostic.OK) { + setActivePage(lastEditorPage); + } + } else if (diagnostic.getSeverity() != Diagnostic.OK) { + ProblemEditorPart problemEditorPart = new ProblemEditorPart(); + problemEditorPart.setDiagnostic(diagnostic); + problemEditorPart.setMarkerHelper(markerHelper); + try { + addPage(++lastEditorPage, problemEditorPart, getEditorInput()); + setPageText(lastEditorPage, problemEditorPart.getPartName()); + setActivePage(lastEditorPage); + showTabs(); + } catch (PartInitException exception) { + PropertiestestsEditorPlugin.INSTANCE.log(exception); + } + } + + if (markerHelper.hasMarkers(editingDomain.getResourceSet())) { + markerHelper.deleteMarkers(editingDomain.getResourceSet()); + if (diagnostic.getSeverity() != Diagnostic.OK) { + try { + markerHelper.createMarkers(diagnostic); + } catch (CoreException exception) { + PropertiestestsEditorPlugin.INSTANCE.log(exception); + } + } + } + } + } + + /** + * Shows a dialog that asks if conflicting changes should be discarded. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected boolean handleDirtyConflict() { + return MessageDialog.openQuestion(getSite().getShell(), PropertiestestsEditor.getString("_UI_FileConflict_label"), PropertiestestsEditor.getString("_WARN_FileConflict")); + } + + /** + * This creates a model editor. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public PropertiestestsEditor() { + super(); + initializeEditingDomain(); + } + + /** + * This sets up the editing domain for the model editor. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + protected void initializeEditingDomain() { + // Create an adapter factory that yields item providers. + // + adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new PropertiestestsItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + + // Create the command stack that will notify this editor as commands are + // executed. + // + BasicCommandStack commandStack = new BasicCommandStack(); + + // Add a listener to set the most recent command's affected objects to + // be the selection of the viewer with focus. + // + commandStack.addCommandStackListener(new CommandStackListener() { + @Override + public void commandStackChanged(final EventObject event) { + getContainer().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + firePropertyChange(IEditorPart.PROP_DIRTY); + + // Try to select the affected objects. + // + Command mostRecentCommand = ((CommandStack) event.getSource()).getMostRecentCommand(); + if (mostRecentCommand != null) { + setSelectionToViewer(mostRecentCommand.getAffectedObjects()); + } + for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext();) { + PropertySheetPage propertySheetPage = i.next(); + if (propertySheetPage.getControl().isDisposed()) { + i.remove(); + } else { + propertySheetPage.refresh(); + } + } + } + }); + } + }); + + // Create the editing domain with a special command stack. + // + editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>()); + } + + /** + * This is here for the listener to be able to call it. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected void firePropertyChange(int action) { + super.firePropertyChange(action); + } + + /** + * This sets the selection into whichever viewer is active. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setSelectionToViewer(Collection<?> collection) { + final Collection<?> theSelection = collection; + // Make sure it's okay. + // + if (theSelection != null && !theSelection.isEmpty()) { + Runnable runnable = new Runnable() { + @Override + public void run() { + // Try to select the items in the current content viewer of + // the editor. + // + if (currentViewer != null) { + currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); + } + } + }; + getSite().getShell().getDisplay().asyncExec(runnable); + } + } + + /** + * This returns the editing domain as required by the + * {@link IEditingDomainProvider} interface. This is important for + * implementing the static methods of {@link AdapterFactoryEditingDomain} + * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EditingDomain getEditingDomain() { + return editingDomain; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object[] getElements(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object[] getChildren(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean hasChildren(Object object) { + Object parent = super.getParent(object); + return parent != null; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object getParent(Object object) { + return null; + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setCurrentViewerPane(ViewerPane viewerPane) { + if (currentViewerPane != viewerPane) { + if (currentViewerPane != null) { + currentViewerPane.showFocus(false); + } + currentViewerPane = viewerPane; + } + setCurrentViewer(currentViewerPane.getViewer()); + } + + /** + * This makes sure that one content viewer, either for the current page or + * the outline view, if it has focus, is the current one. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setCurrentViewer(Viewer viewer) { + // If it is changing... + // + if (currentViewer != viewer) { + if (selectionChangedListener == null) { + // Create the listener on demand. + // + selectionChangedListener = new ISelectionChangedListener() { + // This just notifies those things that are affected by the + // section. + // + @Override + public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { + setSelection(selectionChangedEvent.getSelection()); + } + }; + } + + // Stop listening to the old one. + // + if (currentViewer != null) { + currentViewer.removeSelectionChangedListener(selectionChangedListener); + } + + // Start listening to the new one. + // + if (viewer != null) { + viewer.addSelectionChangedListener(selectionChangedListener); + } + + // Remember it. + // + currentViewer = viewer; + + // Set the editors selection based on the current viewer's + // selection. + // + setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); + } + } + + /** + * This returns the viewer as required by the {@link IViewerProvider} + * interface. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Viewer getViewer() { + return currentViewer; + } + + /** + * This creates a context menu for the viewer and adds a listener as well + * registering the menu for extension. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected void createContextMenuFor(StructuredViewer viewer) { + MenuManager contextMenu = new MenuManager("#PopUp"); + contextMenu.add(new Separator("additions")); + contextMenu.setRemoveAllWhenShown(true); + contextMenu.addMenuListener(this); + Menu menu = contextMenu.createContextMenu(viewer.getControl()); + viewer.getControl().setMenu(menu); + getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); + + int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; + Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() }; + viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); + viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); + } + + /** + * This is the method called to load a resource into the editing domain's + * resource set based on the editor's input. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public void createModel() { + URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); + Exception exception = null; + Resource resource = null; + try { + // Load the resource through the editing domain. + // + resource = editingDomain.getResourceSet().getResource(resourceURI, true); + } catch (Exception e) { + exception = e; + resource = editingDomain.getResourceSet().getResource(resourceURI, false); + } + + Diagnostic diagnostic = analyzeResourceProblems(resource, exception); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); + } + + /** + * Returns a diagnostic describing the errors and warnings listed in the + * resource and the specified exception (if any). <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { + boolean hasErrors = !resource.getErrors().isEmpty(); + if (hasErrors || !resource.getWarnings().isEmpty()) { + BasicDiagnostic basicDiagnostic = new BasicDiagnostic(hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "org.eclipse.sirius.tests.rcptt.properties.editor", 0, + PropertiestestsEditor.getString("_UI_CreateModelError_message", resource.getURI()), new Object[] { exception == null ? (Object) resource : exception }); + basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); + return basicDiagnostic; + } else if (exception != null) { + return new BasicDiagnostic(Diagnostic.ERROR, "org.eclipse.sirius.tests.rcptt.properties.editor", 0, PropertiestestsEditor.getString("_UI_CreateModelError_message", resource.getURI()), + new Object[] { exception }); + } else { + return Diagnostic.OK_INSTANCE; + } + } + + /** + * This is the method used by the framework to install your own controls. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void createPages() { + // Creates the model from the editor input + // + createModel(); + + // Only creates the other pages if there is something that can be edited + // + if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { + // Create a page for the selection tree view. + // + { + ViewerPane viewerPane = new ViewerPane(getSite().getPage(), PropertiestestsEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + selectionViewer = (TreeViewer) viewerPane.getViewer(); + selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + + selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + selectionViewer.setInput(editingDomain.getResourceSet()); + selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + viewerPane.setTitle(editingDomain.getResourceSet()); + + new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); + + createContextMenuFor(selectionViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, PropertiestestsEditor.getString("_UI_SelectionPage_label")); + } + + // Create a page for the parent tree view. + // + { + ViewerPane viewerPane = new ViewerPane(getSite().getPage(), PropertiestestsEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + parentViewer = (TreeViewer) viewerPane.getViewer(); + parentViewer.setAutoExpandLevel(30); + parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory)); + parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(parentViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, PropertiestestsEditor.getString("_UI_ParentPage_label")); + } + + // This is the page for the list viewer + // + { + ViewerPane viewerPane = new ViewerPane(getSite().getPage(), PropertiestestsEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new ListViewer(composite); + } + + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + listViewer = (ListViewer) viewerPane.getViewer(); + listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(listViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, PropertiestestsEditor.getString("_UI_ListPage_label")); + } + + // This is the page for the tree viewer + // + { + ViewerPane viewerPane = new ViewerPane(getSite().getPage(), PropertiestestsEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + treeViewer = (TreeViewer) viewerPane.getViewer(); + treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory); + + createContextMenuFor(treeViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, PropertiestestsEditor.getString("_UI_TreePage_label")); + } + + // This is the page for the table viewer. + // + { + ViewerPane viewerPane = new ViewerPane(getSite().getPage(), PropertiestestsEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TableViewer(composite); + } + + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + tableViewer = (TableViewer) viewerPane.getViewer(); + + Table table = tableViewer.getTable(); + TableLayout layout = new TableLayout(); + table.setLayout(layout); + table.setHeaderVisible(true); + table.setLinesVisible(true); + + TableColumn objectColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(3, 100, true)); + objectColumn.setText(PropertiestestsEditor.getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + + TableColumn selfColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(2, 100, true)); + selfColumn.setText(PropertiestestsEditor.getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + + tableViewer.setColumnProperties(new String[] { "a", "b" }); + tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(tableViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, PropertiestestsEditor.getString("_UI_TablePage_label")); + } + + // This is the page for the table tree viewer. + // + { + ViewerPane viewerPane = new ViewerPane(getSite().getPage(), PropertiestestsEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + treeViewerWithColumns = (TreeViewer) viewerPane.getViewer(); + + Tree tree = treeViewerWithColumns.getTree(); + tree.setLayoutData(new FillLayout()); + tree.setHeaderVisible(true); + tree.setLinesVisible(true); + + TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE); + objectColumn.setText(PropertiestestsEditor.getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + objectColumn.setWidth(250); + + TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE); + selfColumn.setText(PropertiestestsEditor.getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + selfColumn.setWidth(200); + + treeViewerWithColumns.setColumnProperties(new String[] { "a", "b" }); + treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(treeViewerWithColumns); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, PropertiestestsEditor.getString("_UI_TreeWithColumnsPage_label")); + } + + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + setActivePage(0); + } + }); + } + + // Ensures that this editor will only display the page's tab + // area if there are more than one page + // + getContainer().addControlListener(new ControlAdapter() { + boolean guard = false; + + @Override + public void controlResized(ControlEvent event) { + if (!guard) { + guard = true; + hideTabs(); + guard = false; + } + } + }); + + getSite().getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + updateProblemIndication(); + } + }); + } + + /** + * If there is just one page in the multi-page editor part, this hides the + * single tab at the bottom. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void hideTabs() { + if (getPageCount() <= 1) { + setPageText(0, ""); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder) getContainer()).setTabHeight(1); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y + 6); + } + } + } + + /** + * If there is more than one page in the multi-page editor part, this shows + * the tabs at the bottom. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void showTabs() { + if (getPageCount() > 1) { + setPageText(0, PropertiestestsEditor.getString("_UI_SelectionPage_label")); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder) getContainer()).setTabHeight(SWT.DEFAULT); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y - 6); + } + } + } + + /** + * This is used to track the active viewer. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + protected void pageChange(int pageIndex) { + super.pageChange(pageIndex); + + if (contentOutlinePage != null) { + handleContentOutlineSelection(contentOutlinePage.getSelection()); + } + } + + /** + * This is how the framework determines which interfaces we implement. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("rawtypes") + @Override + public Object getAdapter(Class key) { + if (key.equals(IContentOutlinePage.class)) { + return showOutlineView() ? getContentOutlinePage() : null; + } else if (key.equals(IPropertySheetPage.class)) { + return getPropertySheetPage(); + } else if (key.equals(IGotoMarker.class)) { + return this; + } else { + return super.getAdapter(key); + } + } + + /** + * This accesses a cached version of the content outliner. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public IContentOutlinePage getContentOutlinePage() { + if (contentOutlinePage == null) { + // The content outline is just a tree. + // + class MyContentOutlinePage extends ContentOutlinePage { + @Override + public void createControl(Composite parent) { + super.createControl(parent); + contentOutlineViewer = getTreeViewer(); + contentOutlineViewer.addSelectionChangedListener(this); + + // Set up the tree viewer. + // + contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + contentOutlineViewer.setInput(editingDomain.getResourceSet()); + + // Make sure our popups work. + // + createContextMenuFor(contentOutlineViewer); + + if (!editingDomain.getResourceSet().getResources().isEmpty()) { + // Select the root object in the view. + // + contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + } + } + + @Override + public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { + super.makeContributions(menuManager, toolBarManager, statusLineManager); + contentOutlineStatusLineManager = statusLineManager; + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + } + + contentOutlinePage = new MyContentOutlinePage(); + + // Listen to selection so that we can handle it is a special way. + // + contentOutlinePage.addSelectionChangedListener(new ISelectionChangedListener() { + // This ensures that we handle selections correctly. + // + @Override + public void selectionChanged(SelectionChangedEvent event) { + handleContentOutlineSelection(event.getSelection()); + } + }); + } + + return contentOutlinePage; + } + + /** + * This accesses a cached version of the property sheet. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + public IPropertySheetPage getPropertySheetPage() { + PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage(editingDomain) { + @Override + public void setSelectionToViewer(List<?> selection) { + PropertiestestsEditor.this.setSelectionToViewer(selection); + PropertiestestsEditor.this.setFocus(); + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + }; + propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); + propertySheetPages.add(propertySheetPage); + + return propertySheetPage; + } + + /** + * This deals with how we want selection in the outliner to affect the other + * views. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void handleContentOutlineSelection(ISelection selection) { + if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { + Iterator<?> selectedElements = ((IStructuredSelection) selection).iterator(); + if (selectedElements.hasNext()) { + // Get the first selected element. + // + Object selectedElement = selectedElements.next(); + + // If it's the selection viewer, then we want it to select the + // same selection as this selection. + // + if (currentViewerPane.getViewer() == selectionViewer) { + ArrayList<Object> selectionList = new ArrayList<Object>(); + selectionList.add(selectedElement); + while (selectedElements.hasNext()) { + selectionList.add(selectedElements.next()); + } + + // Set the selection to the widget. + // + selectionViewer.setSelection(new StructuredSelection(selectionList)); + } else { + // Set the input to the widget. + // + if (currentViewerPane.getViewer().getInput() != selectedElement) { + currentViewerPane.getViewer().setInput(selectedElement); + currentViewerPane.setTitle(selectedElement); + } + } + } + } + } + + /** + * This is for implementing {@link IEditorPart} and simply tests the command + * stack. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isDirty() { + return ((BasicCommandStack) editingDomain.getCommandStack()).isSaveNeeded(); + } + + /** + * This is for implementing {@link IEditorPart} and simply saves the model + * file. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void doSave(IProgressMonitor progressMonitor) { + // Save only resources that have actually changed. + // + final Map<Object, Object> saveOptions = new HashMap<Object, Object>(); + saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); + saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED); + + // Do the work within an operation because this is a long running + // activity that modifies the workbench. + // + WorkspaceModifyOperation operation = new WorkspaceModifyOperation() { + // This is the method that gets invoked when the operation runs. + // + @Override + public void execute(IProgressMonitor monitor) { + // Save the resources to the file system. + // + boolean first = true; + for (Resource resource : editingDomain.getResourceSet().getResources()) { + if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) { + try { + long timeStamp = resource.getTimeStamp(); + resource.save(saveOptions); + if (resource.getTimeStamp() != timeStamp) { + savedResources.add(resource); + } + } catch (Exception exception) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + first = false; + } + } + } + }; + + updateProblemIndication = false; + try { + // This runs the options, and shows progress. + // + new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); + + // Refresh the necessary state. + // + ((BasicCommandStack) editingDomain.getCommandStack()).saveIsDone(); + firePropertyChange(IEditorPart.PROP_DIRTY); + } catch (Exception exception) { + // Something went wrong that shouldn't. + // + PropertiestestsEditorPlugin.INSTANCE.log(exception); + } + updateProblemIndication = true; + updateProblemIndication(); + } + + /** + * This returns whether something has been persisted to the URI of the + * specified resource. The implementation uses the URI converter from the + * editor's resource set to try to open an input stream. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + protected boolean isPersisted(Resource resource) { + boolean result = false; + try { + InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); + if (stream != null) { + result = true; + stream.close(); + } + } catch (IOException e) { + // Ignore + } + return result; + } + + /** + * This always returns true because it is not currently supported. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isSaveAsAllowed() { + return true; + } + + /** + * This also changes the editor's input. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void doSaveAs() { + SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); + saveAsDialog.open(); + IPath path = saveAsDialog.getResult(); + if (path != null) { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + if (file != null) { + doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); + } + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void doSaveAs(URI uri, IEditorInput editorInput) { + (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + IProgressMonitor progressMonitor = getActionBars().getStatusLineManager() != null ? getActionBars().getStatusLineManager().getProgressMonitor() : new NullProgressMonitor(); + doSave(progressMonitor); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void gotoMarker(IMarker marker) { + List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker); + if (!targetObjects.isEmpty()) { + setSelectionToViewer(targetObjects); + } + } + + /** + * This is called during startup. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + @Override + public void init(IEditorSite site, IEditorInput editorInput) { + setSite(site); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + site.setSelectionProvider(this); + site.getPage().addPartListener(partListener); + ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setFocus() { + if (currentViewerPane != null) { + currentViewerPane.setFocus(); + } else { + getControl(getActivePage()).setFocus(); + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void addSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.add(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void removeSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.remove(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to + * return this editor's overall selection. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public ISelection getSelection() { + return editorSelection; + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to + * set this editor's overall selection. Calling this result will notify the + * listeners. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setSelection(ISelection selection) { + editorSelection = selection; + + for (ISelectionChangedListener listener : selectionChangedListeners) { + listener.selectionChanged(new SelectionChangedEvent(this, selection)); + } + setStatusLineManager(selection); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setStatusLineManager(ISelection selection) { + IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); + + if (statusLineManager != null) { + if (selection instanceof IStructuredSelection) { + Collection<?> collection = ((IStructuredSelection) selection).toList(); + switch (collection.size()) { + case 0: { + statusLineManager.setMessage(PropertiestestsEditor.getString("_UI_NoObjectSelected")); + break; + } + case 1: { + String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); + statusLineManager.setMessage(PropertiestestsEditor.getString("_UI_SingleObjectSelected", text)); + break; + } + default: { + statusLineManager.setMessage(PropertiestestsEditor.getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); + break; + } + } + } else { + statusLineManager.setMessage(""); + } + } + } + + /** + * This looks up a string in the plugin's plugin.properties file. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static String getString(String key) { + return PropertiestestsEditorPlugin.INSTANCE.getString(key); + } + + /** + * This looks up a string in plugin.properties, making a substitution. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static String getString(String key, Object s1) { + return PropertiestestsEditorPlugin.INSTANCE.getString(key, new Object[] { s1 }); + } + + /** + * This implements {@link org.eclipse.jface.action.IMenuListener} to help + * fill the context menus with contributions from the Edit menu. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void menuAboutToShow(IMenuManager menuManager) { + ((IMenuListener) getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EditingDomainActionBarContributor getActionBarContributor() { + return (EditingDomainActionBarContributor) getEditorSite().getActionBarContributor(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public IActionBars getActionBars() { + return getActionBarContributor().getActionBars(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public AdapterFactory getAdapterFactory() { + return adapterFactory; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void dispose() { + updateProblemIndication = false; + + ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener); + + getSite().getPage().removePartListener(partListener); + + adapterFactory.dispose(); + + if (getActionBarContributor().getActiveEditor() == this) { + getActionBarContributor().setActiveEditor(null); + } + + for (PropertySheetPage propertySheetPage : propertySheetPages) { + propertySheetPage.dispose(); + } + + if (contentOutlinePage != null) { + contentOutlinePage.dispose(); + } + + super.dispose(); + } + + /** + * Returns whether the outline view should be presented to the user. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected boolean showOutlineView() { + return true; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/presentation/PropertiestestsEditorPlugin.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/presentation/PropertiestestsEditorPlugin.java new file mode 100644 index 0000000000..2c2a5b8071 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/presentation/PropertiestestsEditorPlugin.java @@ -0,0 +1,90 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.presentation; + +import org.eclipse.emf.common.EMFPlugin; +import org.eclipse.emf.common.ui.EclipseUIPlugin; +import org.eclipse.emf.common.util.ResourceLocator; + +/** + * This is the central singleton for the Propertiestests editor plugin. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ +public final class PropertiestestsEditorPlugin extends EMFPlugin { + /** + * Keep track of the singleton. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + public static final PropertiestestsEditorPlugin INSTANCE = new PropertiestestsEditorPlugin(); + + /** + * 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 PropertiestestsEditorPlugin() { + 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 PropertiestestsEditorPlugin.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 PropertiestestsEditorPlugin.plugin; + } + + /** + * The actual implementation of the Eclipse <b>Plugin</b>. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static class Implementation extends EclipseUIPlugin { + /** + * Creates an instance. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + PropertiestestsEditorPlugin.plugin = this; + } + } + +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/presentation/PropertiestestsModelWizard.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/presentation/PropertiestestsModelWizard.java new file mode 100644 index 0000000000..c5e32e6610 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/presentation/PropertiestestsModelWizard.java @@ -0,0 +1,593 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.presentation; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.MissingResourceException; +import java.util.StringTokenizer; + +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.Path; +import org.eclipse.emf.common.CommonPlugin; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.ecore.xmi.XMLResource; +import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsFactory; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.provider.PropertiestestsEditPlugin; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.ui.INewWizard; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.actions.WorkspaceModifyOperation; +import org.eclipse.ui.dialogs.WizardNewFileCreationPage; +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.ISetSelectionTarget; + +/** + * This is a simple wizard for creating a new model file. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ +public class PropertiestestsModelWizard extends Wizard implements INewWizard { + /** + * The supported extensions for created files. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public static final List<String> FILE_EXTENSIONS = Collections + .unmodifiableList(Arrays.asList(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_PropertiestestsEditorFilenameExtensions").split("\\s*,\\s*"))); + + /** + * A formatted list of supported file extensions, suitable for display. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static final String FORMATTED_FILE_EXTENSIONS = PropertiestestsEditorPlugin.INSTANCE.getString("_UI_PropertiestestsEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); + + /** + * This caches an instance of the model package. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected PropertiestestsPackage propertiestestsPackage = PropertiestestsPackage.eINSTANCE; + + /** + * This caches an instance of the model factory. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected PropertiestestsFactory propertiestestsFactory = propertiestestsPackage.getPropertiestestsFactory(); + + /** + * This is the file creation page. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + protected PropertiestestsModelWizardNewFileCreationPage newFileCreationPage; + + /** + * This is the initial object creation page. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + protected PropertiestestsModelWizardInitialObjectCreationPage initialObjectCreationPage; + + /** + * Remember the selection during initialization for populating the default + * container. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected IStructuredSelection selection; + + /** + * Remember the workbench during initialization. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + protected IWorkbench workbench; + + /** + * Caches the names of the types that can be created as the root object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected List<String> initialObjectNames; + + /** + * This just records the information. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public void init(IWorkbench workbench, IStructuredSelection selection) { + this.workbench = workbench; + this.selection = selection; + setWindowTitle(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); + setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(PropertiestestsEditorPlugin.INSTANCE.getImage("full/wizban/NewPropertiestests"))); + } + + /** + * Returns the names of the types that can be created as the root object. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Collection<String> getInitialObjectNames() { + if (initialObjectNames == null) { + initialObjectNames = new ArrayList<String>(); + for (EClassifier eClassifier : propertiestestsPackage.getEClassifiers()) { + if (eClassifier instanceof EClass) { + EClass eClass = (EClass) eClassifier; + if (!eClass.isAbstract()) { + initialObjectNames.add(eClass.getName()); + } + } + } + Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); + } + return initialObjectNames; + } + + /** + * Create a new model. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EObject createInitialModel() { + EClass eClass = (EClass) propertiestestsPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); + EObject rootObject = propertiestestsFactory.create(eClass); + return rootObject; + } + + /** + * Do the work after everything is specified. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public boolean performFinish() { + try { + // Remember the file. + // + final IFile modelFile = getModelFile(); + + // Do the work within an operation. + // + WorkspaceModifyOperation operation = new WorkspaceModifyOperation() { + @Override + protected void execute(IProgressMonitor progressMonitor) { + try { + // Create a resource set + // + ResourceSet resourceSet = new ResourceSetImpl(); + + // Get the URI of the model file. + // + URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); + + // Create a resource for this file. + // + Resource resource = resourceSet.createResource(fileURI); + + // Add the initial model object to the contents. + // + EObject rootObject = createInitialModel(); + if (rootObject != null) { + resource.getContents().add(rootObject); + } + + // Save the contents of the resource to the file system. + // + Map<Object, Object> options = new HashMap<Object, Object>(); + options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding()); + resource.save(options); + } catch (Exception exception) { + PropertiestestsEditorPlugin.INSTANCE.log(exception); + } finally { + progressMonitor.done(); + } + } + }; + + getContainer().run(false, false, operation); + + // Select the new file resource in the current view. + // + IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); + IWorkbenchPage page = workbenchWindow.getActivePage(); + final IWorkbenchPart activePart = page.getActivePart(); + if (activePart instanceof ISetSelectionTarget) { + final ISelection targetSelection = new StructuredSelection(modelFile); + getShell().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + ((ISetSelectionTarget) activePart).selectReveal(targetSelection); + } + }); + } + + // Open an editor on the new file. + // + try { + page.openEditor(new FileEditorInput(modelFile), workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); + } catch (PartInitException exception) { + MessageDialog.openError(workbenchWindow.getShell(), PropertiestestsEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); + return false; + } + + return true; + } catch (Exception exception) { + PropertiestestsEditorPlugin.INSTANCE.log(exception); + return false; + } + } + + /** + * This is the one page of the wizard. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public class PropertiestestsModelWizardNewFileCreationPage extends WizardNewFileCreationPage { + /** + * Pass in the selection. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public PropertiestestsModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) { + super(pageId, selection); + } + + /** + * The framework calls this to see if the file is correct. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected boolean validatePage() { + if (super.validatePage()) { + String extension = new Path(getFileName()).getFileExtension(); + if (extension == null || !PropertiestestsModelWizard.FILE_EXTENSIONS.contains(extension)) { + String key = PropertiestestsModelWizard.FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; + setErrorMessage(PropertiestestsEditorPlugin.INSTANCE.getString(key, new Object[] { PropertiestestsModelWizard.FORMATTED_FILE_EXTENSIONS })); + return false; + } + return true; + } + return false; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public IFile getModelFile() { + return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName())); + } + } + + /** + * This is the page where the type of object to create is selected. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public class PropertiestestsModelWizardInitialObjectCreationPage extends WizardPage { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Combo initialObjectField; + + /** + * @generated <!-- begin-user-doc --> <!-- end-user-doc --> + */ + protected List<String> encodings; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Combo encodingField; + + /** + * Pass in the selection. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public PropertiestestsModelWizardInitialObjectCreationPage(String pageId) { + super(pageId); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void createControl(Composite parent) { + Composite composite = new Composite(parent, SWT.NONE); + { + GridLayout layout = new GridLayout(); + layout.numColumns = 1; + layout.verticalSpacing = 12; + composite.setLayout(layout); + + GridData data = new GridData(); + data.verticalAlignment = GridData.FILL; + data.grabExcessVerticalSpace = true; + data.horizontalAlignment = GridData.FILL; + composite.setLayoutData(data); + } + + Label containerLabel = new Label(composite, SWT.LEFT); + { + containerLabel.setText(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_ModelObject")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + containerLabel.setLayoutData(data); + } + + initialObjectField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + initialObjectField.setLayoutData(data); + } + + for (String objectName : getInitialObjectNames()) { + initialObjectField.add(getLabel(objectName)); + } + + if (initialObjectField.getItemCount() == 1) { + initialObjectField.select(0); + } + initialObjectField.addModifyListener(validator); + + Label encodingLabel = new Label(composite, SWT.LEFT); + { + encodingLabel.setText(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + encodingLabel.setLayoutData(data); + } + encodingField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + encodingField.setLayoutData(data); + } + + for (String encoding : getEncodings()) { + encodingField.add(encoding); + } + + encodingField.select(0); + encodingField.addModifyListener(validator); + + setPageComplete(validatePage()); + setControl(composite); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ModifyListener validator = new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + setPageComplete(validatePage()); + } + }; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected boolean validatePage() { + return getInitialObjectName() != null && getEncodings().contains(encodingField.getText()); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setVisible(boolean visible) { + super.setVisible(visible); + if (visible) { + if (initialObjectField.getItemCount() == 1) { + initialObjectField.clearSelection(); + encodingField.setFocus(); + } else { + encodingField.clearSelection(); + initialObjectField.setFocus(); + } + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getInitialObjectName() { + String label = initialObjectField.getText(); + + for (String name : getInitialObjectNames()) { + if (getLabel(name).equals(label)) { + return name; + } + } + return null; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getEncoding() { + return encodingField.getText(); + } + + /** + * Returns the label for the specified type name. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + protected String getLabel(String typeName) { + try { + return PropertiestestsEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); + } catch (MissingResourceException mre) { + PropertiestestsEditorPlugin.INSTANCE.log(mre); + } + return typeName; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected Collection<String> getEncodings() { + if (encodings == null) { + encodings = new ArrayList<String>(); + for (StringTokenizer stringTokenizer = new StringTokenizer(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens();) { + encodings.add(stringTokenizer.nextToken()); + } + } + return encodings; + } + } + + /** + * The framework calls this to create the contents of the wizard. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void addPages() { + // Create a page, set the title, and the initial model file name. + // + newFileCreationPage = new PropertiestestsModelWizardNewFileCreationPage("Whatever", selection); + newFileCreationPage.setTitle(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_PropertiestestsModelWizard_label")); + newFileCreationPage.setDescription(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_PropertiestestsModelWizard_description")); + newFileCreationPage.setFileName(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_PropertiestestsEditorFilenameDefaultBase") + "." + PropertiestestsModelWizard.FILE_EXTENSIONS.get(0)); + addPage(newFileCreationPage); + + // Try and get the resource selection to determine a current directory + // for the file dialog. + // + if (selection != null && !selection.isEmpty()) { + // Get the resource... + // + Object selectedElement = selection.iterator().next(); + if (selectedElement instanceof IResource) { + // Get the resource parent, if its a file. + // + IResource selectedResource = (IResource) selectedElement; + if (selectedResource.getType() == IResource.FILE) { + selectedResource = selectedResource.getParent(); + } + + // This gives us a directory... + // + if (selectedResource instanceof IFolder || selectedResource instanceof IProject) { + // Set this for the container. + // + newFileCreationPage.setContainerFullPath(selectedResource.getFullPath()); + + // Make up a unique new name here. + // + String defaultModelBaseFilename = PropertiestestsEditorPlugin.INSTANCE.getString("_UI_PropertiestestsEditorFilenameDefaultBase"); + String defaultModelFilenameExtension = PropertiestestsModelWizard.FILE_EXTENSIONS.get(0); + String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; + for (int i = 1; ((IContainer) selectedResource).findMember(modelFilename) != null; ++i) { + modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; + } + newFileCreationPage.setFileName(modelFilename); + } + } + } + initialObjectCreationPage = new PropertiestestsModelWizardInitialObjectCreationPage("Whatever2"); + initialObjectCreationPage.setTitle(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_PropertiestestsModelWizard_label")); + initialObjectCreationPage.setDescription(PropertiestestsEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); + addPage(initialObjectCreationPage); + } + + /** + * Get the file from the page. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public IFile getModelFile() { + return newFileCreationPage.getModelFile(); + } + +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/.project new file mode 100644 index 0000000000..c681eb4a5a --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.samples</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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..fe746f6917 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.properties.samples;singleton:=true +Bundle-Version: 4.1.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Require-Bundle: org.eclipse.emf.common.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.ui.ide +Bundle-Vendor: %providerName diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/build.properties new file mode 100644 index 0000000000..03fc825f1a --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/build.properties @@ -0,0 +1,17 @@ +# ==================================================================== +# Copyright (c) 2016 Obeo +# 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: +# Obeo - initial API and implementation +# ==================================================================== +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + contents/,\ + plugin.properties diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/.project new file mode 100644 index 0000000000..f7e0969658 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.design.button</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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..b0bb9d1a50 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.sirius.tests.rcptt.sample.properties.design +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.sample.properties.design;singleton:=true +Bundle-Version: 4.1.0 +Bundle-Activator: org.eclipse.sirius.tests.rcptt.sample.properties.design.button.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/description/PropertiesTests.odesign new file mode 100644 index 0000000000..cfaad40330 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/description/PropertiesTests.odesign @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8"?> +<description:Group + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" + xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" + xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" + name="PropertiesTests" + version="11.0.0.201601261200"> + <ownedViewpoints + name="PropertiesTestsButton"/> + <extensions + xsi:type="properties:ViewExtensionDescription"> + <pages identifier="" + labelExpression="Button" + groups="//@extensions.0/@groups.0"/> + <groups + identifier="Button" + labelExpression="Button" + domainClass=""> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="Button" + helpExpression="" + isEnabledExpression="" + buttonLabelExpression="Label"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="ButtonClicked"/> + </initialOperation> + </controls> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="ALongLongLongLabel" + helpExpression="" + isEnabledExpression="" + buttonLabelExpression="ALongLongLongLabel"/> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="No Label" + helpExpression="" + isEnabledExpression="" + buttonLabelExpression=""/> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="Style Button" + helpExpression="" + isEnabledExpression="" + buttonLabelExpression="Label"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + </style> + </controls> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="Conditional Style Button" + helpExpression="" + isEnabledExpression="" + buttonLabelExpression="Label"> + <conditionalStyles + preconditionExpression="aql:true"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_green']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + </style> + </conditionalStyles> + </controls> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="Disable Button" + helpExpression="" + isEnabledExpression="aql:false" + buttonLabelExpression="Label"/> + </groups> + </extensions> +</description:Group> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/plugin.xml new file mode 100644 index 0000000000..36b8ef5d8e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="org.eclipse.sirius.tests.rcptt.sample.properties.design.button.Activator" + id="org.eclipse.sirius.tests.rcptt.sample.properties.design" + name="PropertiesTests"> + </component> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/button/Activator.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/button/Activator.java new file mode 100644 index 0000000000..ef03f6df3b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.button/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/button/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.rcptt.sample.properties.design.button; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.sirius.tests.rcptt.sample.properties.design.button"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign")); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint : viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/.project new file mode 100644 index 0000000000..cbc0db9524 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.design.checkbox</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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..c970572dce --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.sirius.tests.rcptt.sample.properties.design +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.sample.properties.design;singleton:=true +Bundle-Version: 4.1.0 +Bundle-Activator: org.eclipse.sirius.tests.rcptt.sample.properties.design.checkbox.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/description/PropertiesTests.odesign new file mode 100644 index 0000000000..268a006631 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/description/PropertiesTests.odesign @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<description:Group + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" + xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" + xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" + name="PropertiesTests" + version="11.0.0.201601261200"> + <ownedViewpoints + name="PropertiesTestsCheckbox"/> + <extensions + xsi:type="properties:ViewExtensionDescription"> + <pages identifier="" + labelExpression="Checkbox" + groups="//@extensions.0/@groups.0"/> + <groups + identifier="Checkbox" + labelExpression="Checkbox" + domainClass=""> + <controls + xsi:type="properties:CheckboxDescription" + labelExpression="Checkbox" + valueExpression="aql:self.booleanAttribute"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="booleanAttribute" + valueExpression="aql:newValue"/> + </initialOperation> + </controls> + <controls + xsi:type="properties:CheckboxDescription" + labelExpression="Style Checkbox" + valueExpression="aql:self.booleanAttribute"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + </style> + </controls> + <controls + xsi:type="properties:CheckboxDescription" + labelExpression="Conditional Style Checkbox" + valueExpression="aql:self.booleanAttribute"> + <conditionalStyles + preconditionExpression="aql:true"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_green']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + </style> + </conditionalStyles> + </controls> + <controls + xsi:type="properties:CheckboxDescription" + labelExpression="Disable Checkbox" + isEnabledExpression="aql:false" + valueExpression="aql:self.booleanAttribute"/> + </groups> + </extensions> +</description:Group> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/plugin.xml new file mode 100644 index 0000000000..dfc5742f5f --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="org.eclipse.sirius.tests.rcptt.sample.properties.design.checkbox.Activator" + id="org.eclipse.sirius.tests.rcptt.sample.properties.design" + name="PropertiesTests"> + </component> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/checkbox/Activator.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/checkbox/Activator.java new file mode 100644 index 0000000000..b38ff193d7 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.checkbox/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/checkbox/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.rcptt.sample.properties.design.checkbox; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.sirius.tests.rcptt.sample.properties.design.checkbox"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign")); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint : viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/.project new file mode 100644 index 0000000000..b0f36dce87 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.design.group</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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..12135b4834 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.sirius.tests.rcptt.sample.properties.design +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.sample.properties.design;singleton:=true +Bundle-Version: 4.1.0 +Bundle-Activator: org.eclipse.sirius.tests.rcptt.sample.properties.design.group.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/description/PropertiesTests.odesign new file mode 100644 index 0000000000..c12308eda5 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/description/PropertiesTests.odesign @@ -0,0 +1,342 @@ +<?xml version="1.0" encoding="UTF-8"?> +<description:Group + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" + xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" + name="PropertiesTests" + version="11.0.0.201601261200"> + <ownedViewpoints + name="PropertiesTestsGroup"/> + <extensions + xsi:type="properties:ViewExtensionDescription"> + <pages identifier="" + labelExpression="Group" + groups="//@extensions.0/@groups.0 //@extensions.0/@groups.2 //@extensions.0/@groups.3 //@extensions.0/@groups.4 //@extensions.0/@groups.5 //@extensions.0/@groups.6 //@extensions.0/@groups.1 //@extensions.0/@groups.7"/> + <groups + identifier="Group" + labelExpression="Group" + domainClass=""> + <controls + xsi:type="properties:TextDescription" + identifier="Text" + labelExpression="Text" + helpExpression="Help" + isEnabledExpression="aql:true" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:TextAreaDescription" + labelExpression="Text area" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:LabelDescription" + labelExpression="Label" + helpExpression="" + bodyExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="Button" + buttonLabelExpression="Button"/> + <controls + xsi:type="properties:CheckboxDescription" + labelExpression="Checkbox" + valueExpression=""/> + <controls + xsi:type="properties:RadioDescription" + identifier="" + labelExpression="Radio" + valueExpression="a" + candidatesExpression="aql:Sequence{'a','b','c'}" + candidateDisplayExpression="aql:candidate"/> + </groups> + <groups + identifier="Style Group" + labelExpression="Style Group" + domainClass=""> + <controls + xsi:type="properties:TextDescription" + identifier="Text" + labelExpression="Text" + helpExpression="Help" + isEnabledExpression="aql:true" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:TextAreaDescription" + labelExpression="Text area" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:LabelDescription" + labelExpression="Label" + bodyExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="Button" + buttonLabelExpression="Button"/> + <controls + xsi:type="properties:CheckboxDescription" + labelExpression="Checkbox" + valueExpression=""/> + <controls + xsi:type="properties:RadioDescription" + identifier="" + labelExpression="Radio" + valueExpression="a" + candidatesExpression="aql:Sequence{'a','b','c'}" + candidateDisplayExpression="aql:candidate"/> + <style + fontNameExpression="Times new roman" + fontSize="12" + expandedByDefault="true"> + <backgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <foregroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + </style> + </groups> + <groups + identifier="Short title Group" + labelExpression="Short title Group" + domainClass=""> + <controls + xsi:type="properties:TextDescription" + identifier="Text" + labelExpression="Text" + helpExpression="Help" + isEnabledExpression="aql:true" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:TextAreaDescription" + labelExpression="Text area" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:LabelDescription" + labelExpression="Label" + bodyExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="Button" + buttonLabelExpression="Button"/> + <controls + xsi:type="properties:CheckboxDescription" + labelExpression="Checkbox" + valueExpression=""/> + <controls + xsi:type="properties:RadioDescription" + identifier="" + labelExpression="Radio" + valueExpression="a" + candidatesExpression="aql:Sequence{'a','b','c'}" + candidateDisplayExpression="aql:candidate"/> + <style + fontNameExpression="" + barStyle="SHORT_TITLE_BAR" + expandedByDefault="true"/> + </groups> + <groups + identifier="No title Group" + labelExpression="No title Group" + domainClass=""> + <controls + xsi:type="properties:TextDescription" + identifier="Text" + labelExpression="Text" + helpExpression="Help" + isEnabledExpression="aql:true" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:TextAreaDescription" + labelExpression="Text area" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:LabelDescription" + labelExpression="Label" + bodyExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="Button" + buttonLabelExpression="Button"/> + <controls + xsi:type="properties:CheckboxDescription" + labelExpression="Checkbox" + valueExpression=""/> + <controls + xsi:type="properties:RadioDescription" + identifier="" + labelExpression="Radio" + valueExpression="a" + candidatesExpression="aql:Sequence{'a','b','c'}" + candidateDisplayExpression="aql:candidate"/> + <style + fontNameExpression="" + barStyle="NO_TITLE" + expandedByDefault="true"/> + </groups> + <groups + identifier="Tree node Group" + labelExpression="Tree node Group" + domainClass=""> + <controls + xsi:type="properties:TextDescription" + identifier="Text" + labelExpression="Text" + helpExpression="Help" + isEnabledExpression="aql:true" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:TextAreaDescription" + labelExpression="Text area" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:LabelDescription" + labelExpression="Label" + bodyExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="Button" + buttonLabelExpression="Button"/> + <controls + xsi:type="properties:CheckboxDescription" + labelExpression="Checkbox" + valueExpression=""/> + <controls + xsi:type="properties:RadioDescription" + identifier="" + labelExpression="Radio" + valueExpression="a" + candidatesExpression="aql:Sequence{'a','b','c'}" + candidateDisplayExpression="aql:candidate"/> + <style + fontNameExpression="" + toggleStyle="TREE_NODE" + expandedByDefault="true"/> + </groups> + <groups + identifier="None toggle Group" + labelExpression="None toggle Group" + domainClass=""> + <controls + xsi:type="properties:TextDescription" + identifier="Text" + labelExpression="Text" + helpExpression="Help" + isEnabledExpression="aql:true" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:TextAreaDescription" + labelExpression="Text area" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:LabelDescription" + labelExpression="Label" + bodyExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="Button" + buttonLabelExpression="Button"/> + <controls + xsi:type="properties:CheckboxDescription" + labelExpression="Checkbox" + valueExpression=""/> + <controls + xsi:type="properties:RadioDescription" + identifier="" + labelExpression="Radio" + valueExpression="a" + candidatesExpression="aql:Sequence{'a','b','c'}" + candidateDisplayExpression="aql:candidate"/> + <style + fontNameExpression="" + toggleStyle="NONE" + expandedByDefault="true"/> + </groups> + <groups + identifier="Collapse Group" + labelExpression="Collapse Group" + domainClass=""> + <controls + xsi:type="properties:TextDescription" + identifier="Text" + labelExpression="Text" + helpExpression="Help" + isEnabledExpression="aql:true" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:TextAreaDescription" + labelExpression="Text area" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:LabelDescription" + labelExpression="Label" + bodyExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="Button" + buttonLabelExpression="Button"/> + <controls + xsi:type="properties:CheckboxDescription" + labelExpression="Checkbox" + valueExpression=""/> + <controls + xsi:type="properties:RadioDescription" + identifier="" + labelExpression="Radio" + valueExpression="a" + candidatesExpression="aql:Sequence{'a','b','c'}" + candidateDisplayExpression="aql:candidate"/> + <style + fontNameExpression=""/> + </groups> + <groups + identifier="Conditional Style Group" + labelExpression="Conditional Style Group" + domainClass=""> + <controls + xsi:type="properties:TextDescription" + identifier="Text" + labelExpression="Text" + helpExpression="Help" + isEnabledExpression="aql:true" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:TextAreaDescription" + labelExpression="Text area" + valueExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:LabelDescription" + labelExpression="Label" + bodyExpression="Lorem ipsum dolor sit amet."/> + <controls + xsi:type="properties:ButtonDescription" + labelExpression="Button" + buttonLabelExpression="Button"/> + <controls + xsi:type="properties:CheckboxDescription" + labelExpression="Checkbox" + valueExpression=""/> + <controls + xsi:type="properties:RadioDescription" + identifier="" + labelExpression="Radio" + valueExpression="a" + candidatesExpression="aql:Sequence{'a','b','c'}" + candidateDisplayExpression="aql:candidate"/> + <conditionalStyles + preconditionExpression="aql:true"> + <style + fontNameExpression="Times new roman" + fontSize="12" + expandedByDefault="true"> + <backgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <foregroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_green']"/> + </style> + </conditionalStyles> + </groups> + </extensions> +</description:Group> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/plugin.xml new file mode 100644 index 0000000000..64acb1a7b4 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="org.eclipse.sirius.tests.rcptt.sample.properties.design.group.Activator" + id="org.eclipse.sirius.tests.rcptt.sample.properties.design" + name="PropertiesTests"> + </component> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/group/Activator.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/group/Activator.java new file mode 100644 index 0000000000..4c1dd21b26 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.group/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/group/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.rcptt.sample.properties.design.group; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.sirius.tests.rcptt.sample.properties.design.group"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign")); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint : viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/.project new file mode 100644 index 0000000000..eb2c5cb38e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.design.hyperlink</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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..7e4dfa6aa5 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.sirius.tests.rcptt.sample.properties.design +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.sample.properties.design;singleton:=true +Bundle-Version: 4.1.0 +Bundle-Activator: org.eclipse.sirius.tests.rcptt.sample.properties.design.hyperlink.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/description/PropertiesTests.odesign new file mode 100644 index 0000000000..ec7d1e17b5 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/description/PropertiesTests.odesign @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="UTF-8"?> +<description:Group + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" + xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" + xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" + name="PropertiesTests" + version="11.0.0.201601261200"> + <ownedViewpoints + name="PropertiesTestsHyperlink"/> + <extensions + xsi:type="properties:ViewExtensionDescription"> + <pages identifier="" + labelExpression="Hyperlink" + groups="//@extensions.0/@groups.0"/> + <groups + identifier="Hyperlink" + labelExpression="Hyperlink" + domainClass=""> + <controls + xsi:type="properties:HyperlinkDescription" + labelExpression="Hyperlink" + helpExpression="" + valueExpression="aql:self.stringAttribute"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="NewValue"/> + </initialOperation> + </controls> + <controls + xsi:type="properties:HyperlinkDescription" + labelExpression="Style Hyperlink" + helpExpression="" + valueExpression="aql:self.stringAttribute"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12" + fontNameExpression="Times new roman" + fontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + <backgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + <fontFormat>italic</fontFormat> + <fontFormat>bold</fontFormat> + <fontFormat>underline</fontFormat> + <fontFormat>strike_through</fontFormat> + </style> + </controls> + <controls + xsi:type="properties:HyperlinkDescription" + labelExpression="Conditional Style Hyperlink" + helpExpression="" + valueExpression="aql:self.stringAttribute"> + <conditionalStyles + preconditionExpression="aql:true"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12" + fontNameExpression="Times new roman" + fontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_green']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + <backgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_green']"/> + <fontFormat>italic</fontFormat> + <fontFormat>bold</fontFormat> + <fontFormat>underline</fontFormat> + <fontFormat>strike_through</fontFormat> + </style> + </conditionalStyles> + </controls> + <controls + xsi:type="properties:HyperlinkDescription" + labelExpression="Disable Hyperlink" + helpExpression="" + isEnabledExpression="aql:false" + valueExpression="aql:self.stringAttribute"/> + </groups> + </extensions> +</description:Group> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/plugin.xml new file mode 100644 index 0000000000..ad04e0c6ad --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="org.eclipse.sirius.tests.rcptt.sample.properties.design.hyperlink.Activator" + id="org.eclipse.sirius.tests.rcptt.sample.properties.design" + name="PropertiesTests"> + </component> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/hyperlink/Activator.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/hyperlink/Activator.java new file mode 100644 index 0000000000..8f89746512 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.hyperlink/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/hyperlink/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.rcptt.sample.properties.design.hyperlink; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.sirius.tests.rcptt.sample.properties.design.hyperlink"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign")); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint : viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/.project new file mode 100644 index 0000000000..ebfc0963cc --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.design.label</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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..6886b404ca --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.sirius.tests.rcptt.sample.properties.design +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.sample.properties.design;singleton:=true +Bundle-Version: 4.1.0 +Bundle-Activator: org.eclipse.sirius.tests.rcptt.sample.properties.design.label.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/description/PropertiesTests.odesign new file mode 100644 index 0000000000..25360305b7 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/description/PropertiesTests.odesign @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8"?> +<description:Group + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" + xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" + name="PropertiesTests" + version="11.0.0.201601261200"> + <ownedViewpoints + name="PropertiesTestsLabel"/> + <extensions + xsi:type="properties:ViewExtensionDescription"> + <pages identifier="" + labelExpression="Label" + groups="//@extensions.0/@groups.0"/> + <groups + identifier="Label" + labelExpression="Label" + domainClass=""> + <controls + xsi:type="properties:LabelDescription" + labelExpression="Label" + helpExpression="" + bodyExpression="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam egestas ac dui eu venenatis. Etiam porta, ligula ut sollicitudin porta, elit tortor laoreet velit, sit amet iaculis risus velit a purus."/> + <controls + xsi:type="properties:LabelDescription" + labelExpression="Style Label" + helpExpression="" + bodyExpression="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam egestas ac dui eu venenatis. Etiam porta, ligula ut sollicitudin porta, elit tortor laoreet velit, sit amet iaculis risus velit a purus."> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12" + fontNameExpression="Times new roman" + fontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + <backgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + <foregroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <fontFormat>italic</fontFormat> + <fontFormat>bold</fontFormat> + <fontFormat>underline</fontFormat> + <fontFormat>strike_through</fontFormat> + </style> + </controls> + <controls + xsi:type="properties:LabelDescription" + labelExpression="Conditional Style Label" + helpExpression="" + bodyExpression="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam egestas ac dui eu venenatis. Etiam porta, ligula ut sollicitudin porta, elit tortor laoreet velit, sit amet iaculis risus velit a purus."> + <conditionalStyles + preconditionExpression="aql:true"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12" + fontNameExpression="Times new roman" + fontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_green']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + <backgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_green']"/> + <foregroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <fontFormat>italic</fontFormat> + <fontFormat>bold</fontFormat> + <fontFormat>underline</fontFormat> + <fontFormat>strike_through</fontFormat> + </style> + </conditionalStyles> + </controls> + </groups> + </extensions> +</description:Group> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/plugin.xml new file mode 100644 index 0000000000..2f88556e0e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="org.eclipse.sirius.tests.rcptt.sample.properties.design.label.Activator" + id="org.eclipse.sirius.tests.rcptt.sample.properties.design" + name="PropertiesTests"> + </component> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/label/Activator.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/label/Activator.java new file mode 100644 index 0000000000..76036db852 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/label/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.rcptt.sample.properties.design.label; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.sirius.tests.rcptt.sample.properties.design.label"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign")); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint : viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/.project new file mode 100644 index 0000000000..989255ab01 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.design.radio</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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..c1e8aedfb7 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.sirius.tests.rcptt.sample.properties.design +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.sample.properties.design;singleton:=true +Bundle-Version: 1.0.0 +Bundle-Activator: org.eclipse.sirius.tests.rcptt.sample.properties.design.radio.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/description/PropertiesTests.odesign new file mode 100644 index 0000000000..3208a617f6 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/description/PropertiesTests.odesign @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<description:Group + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" + xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" + xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" + xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" + name="PropertiesTests" + version="11.0.0.201601261200"> + <ownedViewpoints + name="PropertiesTestsRadio"> + <ownedRepresentations + xsi:type="description_1:DiagramDescription" + enablePopupBars="true"> + <defaultLayer + name="Default"/> + </ownedRepresentations> + </ownedViewpoints> + <extensions + xsi:type="properties:ViewExtensionDescription" + identifier="" + metamodel="http://www.eclipse.org/sirius/tests/properties/1.0.0#/"> + <pages labelExpression="Radio" + groups="//@extensions.0/@groups.0"/> + <groups + identifier="Radio" + labelExpression="Radio" + domainClass=""> + <controls + xsi:type="properties:RadioDescription" + identifier="" + labelExpression="Radio" + helpExpression="" + isEnabledExpression="aql:true" + valueExpression="aql:self.enumAttribute" + candidatesExpression="aql:propertiestests::TestEnum.eLiterals" + candidateDisplayExpression="aql:candidate.name"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="enumAttribute" + valueExpression="aql:newValue"/> + </initialOperation> + </controls> + <controls + xsi:type="properties:RadioDescription" + identifier="" + labelExpression="Style Radio" + helpExpression="" + isEnabledExpression="aql:true" + valueExpression="aql:self.enumAttribute" + candidatesExpression="aql:propertiestests::TestEnum.eLiterals" + candidateDisplayExpression="aql:candidate.name"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + </style> + </controls> + <controls + xsi:type="properties:RadioDescription" + identifier="" + labelExpression="Conditional Style Radio" + helpExpression="" + isEnabledExpression="aql:true" + valueExpression="aql:self.enumAttribute" + candidatesExpression="aql:propertiestests::TestEnum.eLiterals" + candidateDisplayExpression="aql:candidate.name"> + <conditionalStyles + preconditionExpression="aql:true"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_green']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + </style> + </conditionalStyles> + </controls> + <controls + xsi:type="properties:RadioDescription" + identifier="" + labelExpression="Disable Radio" + helpExpression="" + isEnabledExpression="aql:false" + valueExpression="aql:self.enumAttribute" + candidatesExpression="aql:propertiestests::TestEnum.eLiterals" + candidateDisplayExpression="aql:candidate.name"/> + </groups> + </extensions> +</description:Group> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/plugin.xml new file mode 100644 index 0000000000..657b0aba5e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="org.eclipse.sirius.tests.rcptt.sample.properties.design.radio.Activator" + id="org.eclipse.sirius.tests.rcptt.sample.properties.design" + name="PropertiesTests"> + </component> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/radio/Activator.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/radio/Activator.java new file mode 100644 index 0000000000..21f99db25f --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.radio/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/radio/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.rcptt.sample.properties.design.radio; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.sirius.tests.rcptt.sample.properties.design.radio"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign")); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint : viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/.project new file mode 100644 index 0000000000..905b048d81 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.design.reference</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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..a447e7921d --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.sirius.tests.rcptt.sample.properties.design +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.sample.properties.design;singleton:=true +Bundle-Version: 4.1.0 +Bundle-Activator: org.eclipse.sirius.tests.rcptt.sample.properties.design.reference.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/description/PropertiesTests.odesign new file mode 100644 index 0000000000..80eafdb2b7 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/description/PropertiesTests.odesign @@ -0,0 +1,154 @@ +<?xml version="1.0" encoding="UTF-8"?> +<description:Group + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" + xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" + xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" + name="PropertiesTests" + version="11.0.0.201601261200"> + <ownedViewpoints + name="PropertiesTestsReference" + label="" + icon=""/> + <extensions + xsi:type="properties:ViewExtensionDescription"> + <pages identifier="" + labelExpression="Reference" + groups="//@extensions.0/@groups.0"/> + <groups + identifier="Reference" + labelExpression="Reference" + domainClass=""> + <controls + xsi:type="properties:ReferenceDescription" + labelExpression="Mono containment ref" + helpExpression="" + valueExpression="aql:self.containmentReference" + displayExpression="aql:self.stringAttribute"> + <actions + labelExpression="Action1"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="Action1"/> + </initialOperation> + </actions> + <actions + labelExpression="Action2"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="Action2"/> + </initialOperation> + </actions> + <actions + labelExpression=""> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="NoLabelAction"/> + </initialOperation> + </actions> + </controls> + <controls + xsi:type="properties:ReferenceDescription" + labelExpression="Mono containment ref" + helpExpression="" + valueExpression="aql:self.containmentReference" + displayExpression="aql:self.stringAttribute"> + <onClickOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="ClickedOnHyperlink"/> + </onClickOperation> + </controls> + <controls + xsi:type="properties:ReferenceDescription" + labelExpression="Mono ref" + helpExpression="" + valueExpression="aql:self.reference" + displayExpression="aql:self.stringAttribute"> + <actions + labelExpression="Action1"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="Action1"/> + </initialOperation> + </actions> + <actions + labelExpression="Action2"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="Action2"/> + </initialOperation> + </actions> + </controls> + <controls + xsi:type="properties:ReferenceDescription" + labelExpression="Multi containment ref" + helpExpression="" + multiple="true" + valueExpression="aql:self.containmentReferences" + displayExpression="aql:self.stringAttribute"> + <actions + labelExpression="Action1"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="Action1"/> + </initialOperation> + </actions> + <actions + labelExpression="Action2"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="Action2"/> + </initialOperation> + </actions> + </controls> + <controls + xsi:type="properties:ReferenceDescription" + labelExpression="Mono without action" + helpExpression="" + valueExpression="aql:self.containmentReference" + displayExpression="aql:self.stringAttribute"/> + <controls + xsi:type="properties:ReferenceDescription" + labelExpression="Multi without action" + helpExpression="" + multiple="true" + valueExpression="aql:self.containmentReferences" + displayExpression="aql:self.stringAttribute"/> + <controls + xsi:type="properties:ReferenceDescription" + labelExpression="Multi containment ref" + helpExpression="" + multiple="true" + valueExpression="aql:self.containmentReferences" + displayExpression="aql:self.stringAttribute"> + <actions + labelExpression="Action1"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="Action1"/> + </initialOperation> + </actions> + </controls> + </groups> + </extensions> +</description:Group> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/plugin.xml new file mode 100644 index 0000000000..1e330a76c9 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="org.eclipse.sirius.tests.rcptt.sample.properties.design.reference.Activator" + id="org.eclipse.sirius.tests.rcptt.sample.properties.design" + name="PropertiesTests"> + </component> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/reference/Activator.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/reference/Activator.java new file mode 100644 index 0000000000..ffdab4d306 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.reference/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/reference/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.rcptt.sample.properties.design.reference; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.sirius.tests.rcptt.sample.properties.design.reference"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign")); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint : viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/.project new file mode 100644 index 0000000000..d7802008af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.design.screenshot</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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..ecc5504cf3 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.sirius.tests.rcptt.sample.properties.design +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.sample.properties.design;singleton:=true +Bundle-Version: 4.1.0 +Bundle-Activator: org.eclipse.sirius.tests.rcptt.sample.properties.design.screenshot.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/description/PropertiesTests.odesign new file mode 100644 index 0000000000..98c4d97bd2 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/description/PropertiesTests.odesign @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<description:Group + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" + xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" + name="PropertiesTests" + version="11.0.0.201601261200"> + <ownedViewpoints + name="PropertiesTestsScreenshot"/> + <extensions + xsi:type="properties:ViewExtensionDescription"> + <pages labelExpression="Page" + groups="//@extensions.0/@groups.0"/> + <groups + labelExpression="Group" + domainClass=""> + <controls + xsi:type="properties:ContainerDescription"> + <controls + xsi:type="properties:TextDescription" + labelExpression="Text" + helpExpression="Help" + valueExpression="aql:self.stringAttribute"/> + <layout + xsi:type="properties:FillLayoutDescription" + orientation="HORIZONTAL"/> + </controls> + </groups> + </extensions> +</description:Group> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/plugin.xml new file mode 100644 index 0000000000..f0b6b908ef --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="org.eclipse.sirius.tests.rcptt.sample.properties.design.screenshot.Activator" + id="org.eclipse.sirius.tests.rcptt.sample.properties.design" + name="PropertiesTests"> + </component> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/screenshot/Activator.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/screenshot/Activator.java new file mode 100644 index 0000000000..9adbaaa867 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.screenshot/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/screenshot/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.rcptt.sample.properties.design.screenshot; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.sirius.tests.rcptt.sample.properties.design.screenshot"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign")); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint : viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/.project new file mode 100644 index 0000000000..7583e7730e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.design.select</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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..e68fdd807a --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.sirius.tests.rcptt.sample.properties.design +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.sample.properties.design;singleton:=true +Bundle-Version: 4.1.0 +Bundle-Activator: org.eclipse.sirius.tests.rcptt.sample.properties.design.select.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/description/PropertiesTests.odesign new file mode 100644 index 0000000000..6ee8ab18bd --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/description/PropertiesTests.odesign @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="UTF-8"?> +<description:Group + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" + xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" + xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" + xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" + name="PropertiesTests" + version="11.0.0.201601261200"> + <ownedViewpoints + name="PropertiesTestsSelect"> + <ownedRepresentations + xsi:type="description_1:DiagramDescription" + enablePopupBars="true"> + <defaultLayer + name="Default"/> + </ownedRepresentations> + </ownedViewpoints> + <extensions + xsi:type="properties:ViewExtensionDescription" + identifier="" + metamodel="http://www.eclipse.org/sirius/tests/properties/1.0.0#/"> + <pages labelExpression="Select" + groups="//@extensions.0/@groups.0"/> + <groups + identifier="Select" + labelExpression="Select" + domainClass=""> + <controls + xsi:type="properties:SelectDescription" + labelExpression="Select" + helpExpression="" + isEnabledExpression="aql:true" + valueExpression="aql:self.reference" + candidatesExpression="aql:self.eResource().getContents().eAllContents()" + candidateDisplayExpression="aql:candidate.stringAttribute"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="reference" + valueExpression="aql:newValue"/> + </initialOperation> + </controls> + <controls + xsi:type="properties:SelectDescription" + labelExpression="Style Select" + helpExpression="" + isEnabledExpression="aql:true" + valueExpression="aql:self.reference" + candidatesExpression="aql:self.eResource().getContents().eAllContents()" + candidateDisplayExpression="aql:candidate.stringAttribute"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + </style> + </controls> + <controls + xsi:type="properties:SelectDescription" + labelExpression="Conditional Style Select" + helpExpression="" + isEnabledExpression="aql:true" + valueExpression="aql:self.reference" + candidatesExpression="aql:self.eResource().getContents().eAllContents()" + candidateDisplayExpression="aql:candidate.stringAttribute"> + <conditionalStyles + preconditionExpression="aql:true"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_green']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + </style> + </conditionalStyles> + </controls> + <controls + xsi:type="properties:SelectDescription" + labelExpression="Disable Select" + helpExpression="" + isEnabledExpression="aql:false" + valueExpression="aql:self.reference" + candidatesExpression="aql:self.eResource().getContents().eAllContents()" + candidateDisplayExpression="aql:candidate.stringAttribute"/> + </groups> + </extensions> +</description:Group> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/plugin.xml new file mode 100644 index 0000000000..4cfdaac9c1 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="org.eclipse.sirius.tests.rcptt.sample.properties.design.select.Activator" + id="org.eclipse.sirius.tests.rcptt.sample.properties.design" + name="PropertiesTests"> + </component> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/select/Activator.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/select/Activator.java new file mode 100644 index 0000000000..2a7a4b5e14 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/select/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.rcptt.sample.properties.design.select; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.sirius.tests.rcptt.sample.properties.design.select"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign")); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint : viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/.project new file mode 100644 index 0000000000..64af1dda9a --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.design.text</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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..b70b60cc69 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.sirius.tests.rcptt.sample.properties.design +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.sample.properties.design;singleton:=true +Bundle-Version: 4.1.0 +Bundle-Activator: org.eclipse.sirius.tests.rcptt.sample.properties.design.text.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/description/PropertiesTests.odesign new file mode 100644 index 0000000000..5a23ab165a --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/description/PropertiesTests.odesign @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="UTF-8"?> +<description:Group + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" + xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" + xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" + name="PropertiesTests" + version="11.0.0.201601261200"> + <ownedViewpoints + name="PropertiesTestsText"/> + <extensions + xsi:type="properties:ViewExtensionDescription"> + <pages identifier="" + labelExpression="Text" + groups="//@extensions.0/@groups.0"/> + <groups + identifier="Text" + labelExpression="Text" + domainClass=""> + <controls + xsi:type="properties:TextDescription" + labelExpression="Text" + valueExpression="aql:self.stringAttribute"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="aql:newValue"/> + </initialOperation> + </controls> + <controls + xsi:type="properties:TextDescription" + identifier="" + labelExpression="Style Text" + valueExpression="aql:self.stringAttribute"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12" + fontNameExpression="Times new roman" + fontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + <backgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + <foregroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <fontFormat>italic</fontFormat> + <fontFormat>bold</fontFormat> + <fontFormat>underline</fontFormat> + <fontFormat>strike_through</fontFormat> + </style> + </controls> + <controls + xsi:type="properties:TextDescription" + labelExpression="Conditional Style Text" + valueExpression="aql:self.stringAttribute"> + <conditionalStyles + preconditionExpression="aql:true"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12" + fontNameExpression="Times new roman" + fontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_green']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + <backgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_green']"/> + <foregroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <fontFormat>italic</fontFormat> + <fontFormat>bold</fontFormat> + <fontFormat>underline</fontFormat> + <fontFormat>strike_through</fontFormat> + </style> + </conditionalStyles> + </controls> + <controls + xsi:type="properties:TextDescription" + labelExpression="Disable Text" + isEnabledExpression="aql:false" + valueExpression="aql:self.stringAttribute"/> + <controls + xsi:type="properties:TextAreaDescription" + identifier="" + labelExpression="Text area" + valueExpression="aql:self.stringAttribute"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="aql:newValue"/> + </initialOperation> + </controls> + <controls + xsi:type="properties:TextAreaDescription" + identifier="" + labelExpression="Style Text area" + valueExpression="aql:self.stringAttribute"> + <style + labelFontNameExpression="Times new roman" + labelFontSize="12" + fontNameExpression="Times new roman" + fontSize="12"> + <labelBackgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <labelForegroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + <labelFontFormat>italic</labelFontFormat> + <labelFontFormat>bold</labelFontFormat> + <labelFontFormat>underline</labelFontFormat> + <labelFontFormat>strike_through</labelFontFormat> + <backgroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/> + <foregroundColor + xsi:type="description:SystemColor" + href="environment:/viewpoint#//@systemColors/@entries[name='dark_gray']"/> + <fontFormat>italic</fontFormat> + <fontFormat>bold</fontFormat> + <fontFormat>underline</fontFormat> + <fontFormat>strike_through</fontFormat> + </style> + </controls> + <controls + xsi:type="properties:TextAreaDescription" + labelExpression="Conditional Style Text area" + valueExpression="aql:self.stringAttribute"> + <initialOperation> + <firstModelOperations + xsi:type="tool:SetValue" + featureName="stringAttribute" + valueExpression="aql:newValue"/> + </initialOperation> + </controls> + <controls + xsi:type="properties:TextAreaDescription" + identifier="" + labelExpression="Disable Text area" + isEnabledExpression="aql:false" + valueExpression="aql:self.stringAttribute"/> + </groups> + </extensions> +</description:Group> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/plugin.xml new file mode 100644 index 0000000000..7c028595c2 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="org.eclipse.sirius.tests.rcptt.sample.properties.design.text.Activator" + id="org.eclipse.sirius.tests.rcptt.sample.properties.design" + name="PropertiesTests"> + </component> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/text/Activator.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/text/Activator.java new file mode 100644 index 0000000000..abcddfb73f --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/text/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.rcptt.sample.properties.design.text; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.sirius.tests.rcptt.sample.properties.design.text"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign")); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint : viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/.project new file mode 100644 index 0000000000..93c3fc401c --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.design</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.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..1d2078d60f --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.sirius.tests.rcptt.sample.properties.design +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.properties.design;singleton:=true +Bundle-Version: 4.1.0 +Bundle-Activator: org.eclipse.sirius.tests.rcptt.sample.properties.design.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign new file mode 100644 index 0000000000..7794841f87 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" name="PropertiesTests" version="11.0.0.201601261200"> + <ownedViewpoints name="PropertiesTests"> + <ownedRepresentations xsi:type="description_1:DiagramDescription" name="Diagram" domainClass="propertiestests.TestRoot" enablePopupBars="true"> + <metamodel href="http://www.eclipse.org/sirius/tests/properties/1.0.0#/"/> + <defaultLayer name="Default"> + <nodeMappings name="TestElement" domainClass="propertiestests.TestElement"> + <style xsi:type="style:SquareDescription" labelExpression="feature:stringAttribute" sizeComputationExpression="10" labelPosition="node" resizeKind="NSEW"> + <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> + <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> + <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/> + </style> + </nodeMappings> + </defaultLayer> + </ownedRepresentations> + </ownedViewpoints> +</description:Group> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/plugin.xml new file mode 100644 index 0000000000..06afe448fe --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="org.eclipse.sirius.tests.rcptt.sample.properties.design.Activator" + id="org.eclipse.sirius.tests.rcptt.sample.properties.design" + name="PropertiesTests"> + </component> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/Activator.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/Activator.java new file mode 100644 index 0000000000..3dfd58e438 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.rcptt.sample.properties.design; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.sirius.tests.rcptt.sample.properties.design"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign")); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint : viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.instance/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.instance/.project new file mode 100644 index 0000000000..c55595b616 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.instance/.project @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.instance</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + </buildSpec> + <natures> + <nature>org.eclipse.sirius.nature.modelingproject</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.instance/PropertiesTestsInstance.propertiestests b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.instance/PropertiesTestsInstance.propertiestests new file mode 100644 index 0000000000..fe133624b1 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.instance/PropertiesTestsInstance.propertiestests @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<propertiestests:TestRoot xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:propertiestests="http://www.eclipse.org/sirius/tests/properties/1.0.0"> + <elements stringAttribute="Element1" reference="//@elements.1" references="//@elements.1 //@elements.2"> + <stringAttributes>Attribute1</stringAttributes> + <stringAttributes>Attribute2</stringAttributes> + <stringAttributes>Attribute3</stringAttributes> + <intAttributes>1</intAttributes> + <intAttributes>2</intAttributes> + <intAttributes>3</intAttributes> + <booleanAttributes>true</booleanAttributes> + <booleanAttributes>false</booleanAttributes> + <enumAttributes>Literal1</enumAttributes> + <enumAttributes>Literal2</enumAttributes> + <enumAttributes>Literal3</enumAttributes> + <containmentReference stringAttribute="Element11"/> + <containmentReferences stringAttribute="Element12"/> + <containmentReferences stringAttribute="Element13"/> + </elements> + <elements stringAttribute="Element2"/> + <elements stringAttribute="Element3"/> +</propertiestests:TestRoot> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.instance/representations.aird b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.instance/representations.aird new file mode 100644 index 0000000000..0de0a56ce0 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.instance/representations.aird @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="UTF-8"?> +<viewpoint:DAnalysis xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:propertiestests="http://www.eclipse.org/sirius/tests/properties/1.0.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style" xmi:id="_n4UK4AhuEea_TaWxXuy80g" selectedViews="_VkPb8AiBEeaRvL3xkYbMuw" version="11.0.0.201604141600"> + <semanticResources>PropertiesTestsInstance.propertiestests</semanticResources> + <ownedViews xmi:type="viewpoint:DView" xmi:id="_VjvFoAiBEeaRvL3xkYbMuw"> + <viewpoint xmi:type="description:Viewpoint" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design.text/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTestsText']"/> + </ownedViews> + <ownedViews xmi:type="viewpoint:DView" xmi:id="_VkPb8AiBEeaRvL3xkYbMuw"> + <viewpoint xmi:type="description:Viewpoint" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']"/> + <ownedRepresentations xmi:type="diagram:DSemanticDiagram" xmi:id="_dK6SYAiBEeaRvL3xkYbMuw" name="RootDiagram"> + <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_dK6SYQiBEeaRvL3xkYbMuw" source="DANNOTATION_CUSTOMIZATION_KEY"> + <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_dK6SYgiBEeaRvL3xkYbMuw"/> + </ownedAnnotationEntries> + <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_dLHtwAiBEeaRvL3xkYbMuw" source="GMF_DIAGRAMS"> + <data xmi:type="notation:Diagram" xmi:id="_dLHtwQiBEeaRvL3xkYbMuw" type="Sirius" element="_dK6SYAiBEeaRvL3xkYbMuw" measurementUnit="Pixel"> + <children xmi:type="notation:Node" xmi:id="_lUgYQAiYEeaQ8eZ7XL4hjg" type="2001" element="_lUWnQAiYEeaQ8eZ7XL4hjg"> + <children xmi:type="notation:Node" xmi:id="_lUntAAiYEeaQ8eZ7XL4hjg" type="5002"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_lUntAQiYEeaQ8eZ7XL4hjg" y="5"/> + </children> + <children xmi:type="notation:Node" xmi:id="_lUqwUAiYEeaQ8eZ7XL4hjg" type="3003" element="_lUX1YAiYEeaQ8eZ7XL4hjg"> + <styles xmi:type="notation:ShapeStyle" xmi:id="_lUqwUQiYEeaQ8eZ7XL4hjg" fontName="Droid Sans"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lUqwUgiYEeaQ8eZ7XL4hjg"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_lUgYQQiYEeaQ8eZ7XL4hjg" fontName="Droid Sans" fontHeight="8"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lUgYQgiYEeaQ8eZ7XL4hjg" width="100" height="100"/> + </children> + <children xmi:type="notation:Node" xmi:id="_lUo7IAiYEeaQ8eZ7XL4hjg" type="2001" element="_lUZDgAiYEeaQ8eZ7XL4hjg"> + <children xmi:type="notation:Node" xmi:id="_lUpiMAiYEeaQ8eZ7XL4hjg" type="5002"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_lUpiMQiYEeaQ8eZ7XL4hjg" y="5"/> + </children> + <children xmi:type="notation:Node" xmi:id="_lUrXYAiYEeaQ8eZ7XL4hjg" type="3003" element="_lUZqkAiYEeaQ8eZ7XL4hjg"> + <styles xmi:type="notation:ShapeStyle" xmi:id="_lUrXYQiYEeaQ8eZ7XL4hjg" fontName="Droid Sans"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lUrXYgiYEeaQ8eZ7XL4hjg"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_lUo7IQiYEeaQ8eZ7XL4hjg" fontName="Droid Sans" fontHeight="8"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lUo7IgiYEeaQ8eZ7XL4hjg" x="160" width="100" height="100"/> + </children> + <children xmi:type="notation:Node" xmi:id="_wbhwAAiYEeaQ8eZ7XL4hjg" type="2001" element="_wbfTwAiYEeaQ8eZ7XL4hjg"> + <children xmi:type="notation:Node" xmi:id="_wbiXEAiYEeaQ8eZ7XL4hjg" type="5002"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_wbiXEQiYEeaQ8eZ7XL4hjg" y="5"/> + </children> + <children xmi:type="notation:Node" xmi:id="_wbi-IAiYEeaQ8eZ7XL4hjg" type="3003" element="_wbf60AiYEeaQ8eZ7XL4hjg"> + <styles xmi:type="notation:ShapeStyle" xmi:id="_wbi-IQiYEeaQ8eZ7XL4hjg" fontName="Droid Sans"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wbi-IgiYEeaQ8eZ7XL4hjg"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_wbhwAQiYEeaQ8eZ7XL4hjg" fontName="Droid Sans" fontHeight="8"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_wbhwAgiYEeaQ8eZ7XL4hjg" x="290" width="100" height="100"/> + </children> + <children xmi:type="notation:Node" xmi:id="_-GQaoAiYEeaQ8eZ7XL4hjg" type="2001" element="_-GMwQAiYEeaQ8eZ7XL4hjg"> + <children xmi:type="notation:Node" xmi:id="_-GRBsAiYEeaQ8eZ7XL4hjg" type="5002"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_-GRBsQiYEeaQ8eZ7XL4hjg" y="5"/> + </children> + <children xmi:type="notation:Node" xmi:id="_-GRowgiYEeaQ8eZ7XL4hjg" type="3003" element="_-GNXUAiYEeaQ8eZ7XL4hjg"> + <styles xmi:type="notation:ShapeStyle" xmi:id="_-GRowwiYEeaQ8eZ7XL4hjg" fontName="Droid Sans"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-GRoxAiYEeaQ8eZ7XL4hjg"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_-GQaoQiYEeaQ8eZ7XL4hjg" fontName="Droid Sans" fontHeight="8"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-GQaogiYEeaQ8eZ7XL4hjg" x="420" width="100" height="100"/> + </children> + <children xmi:type="notation:Node" xmi:id="_-GRBsgiYEeaQ8eZ7XL4hjg" type="2001" element="_-GNXUQiYEeaQ8eZ7XL4hjg"> + <children xmi:type="notation:Node" xmi:id="_-GRowAiYEeaQ8eZ7XL4hjg" type="5002"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_-GRowQiYEeaQ8eZ7XL4hjg" y="5"/> + </children> + <children xmi:type="notation:Node" xmi:id="_-GSP0AiYEeaQ8eZ7XL4hjg" type="3003" element="_-GN-YAiYEeaQ8eZ7XL4hjg"> + <styles xmi:type="notation:ShapeStyle" xmi:id="_-GSP0QiYEeaQ8eZ7XL4hjg" fontName="Droid Sans"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-GSP0giYEeaQ8eZ7XL4hjg"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_-GRBswiYEeaQ8eZ7XL4hjg" fontName="Droid Sans" fontHeight="8"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-GRBtAiYEeaQ8eZ7XL4hjg" x="580" width="100" height="100"/> + </children> + <children xmi:type="notation:Node" xmi:id="_AwcI8AiZEeaQ8eZ7XL4hjg" type="2001" element="_AwZFoAiZEeaQ8eZ7XL4hjg"> + <children xmi:type="notation:Node" xmi:id="_AwcI8wiZEeaQ8eZ7XL4hjg" type="5002"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_AwcI9AiZEeaQ8eZ7XL4hjg" y="5"/> + </children> + <children xmi:type="notation:Node" xmi:id="_AwcwAAiZEeaQ8eZ7XL4hjg" type="3003" element="_AwZFoQiZEeaQ8eZ7XL4hjg"> + <styles xmi:type="notation:ShapeStyle" xmi:id="_AwcwAQiZEeaQ8eZ7XL4hjg" fontName="Droid Sans"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AwcwAgiZEeaQ8eZ7XL4hjg"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_AwcI8QiZEeaQ8eZ7XL4hjg" fontName="Droid Sans" fontHeight="8"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AwcI8giZEeaQ8eZ7XL4hjg" x="710" width="100" height="100"/> + </children> + <styles xmi:type="notation:DiagramStyle" xmi:id="_dLHtwgiBEeaRvL3xkYbMuw"/> + </data> + </ownedAnnotationEntries> + <ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_lUWnQAiYEeaQ8eZ7XL4hjg" name="Element1" width="10" height="10" resizeKind="NSEW"> + <target xmi:type="propertiestests:TestElement" href="PropertiesTestsInstance.propertiestests#//@elements.0"/> + <semanticElements xmi:type="propertiestests:TestElement" href="PropertiesTestsInstance.propertiestests#//@elements.0"/> + <ownedStyle xmi:type="diagram:Square" xmi:id="_lUX1YAiYEeaQ8eZ7XL4hjg" labelPosition="node"> + <description xmi:type="style:SquareDescription" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer/@nodeMappings[name='TestElement']/@style"/> + </ownedStyle> + <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer/@nodeMappings[name='TestElement']"/> + </ownedDiagramElements> + <ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_-GMwQAiYEeaQ8eZ7XL4hjg" name="Element11" width="10" height="10" resizeKind="NSEW"> + <target xmi:type="propertiestests:TestElement" href="PropertiesTestsInstance.propertiestests#//@elements.0/@containmentReference"/> + <semanticElements xmi:type="propertiestests:TestElement" href="PropertiesTestsInstance.propertiestests#//@elements.0/@containmentReference"/> + <ownedStyle xmi:type="diagram:Square" xmi:id="_-GNXUAiYEeaQ8eZ7XL4hjg" labelPosition="node"> + <description xmi:type="style:SquareDescription" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer/@nodeMappings[name='TestElement']/@style"/> + </ownedStyle> + <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer/@nodeMappings[name='TestElement']"/> + </ownedDiagramElements> + <ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_-GNXUQiYEeaQ8eZ7XL4hjg" name="Element12" width="10" height="10" resizeKind="NSEW"> + <target xmi:type="propertiestests:TestElement" href="PropertiesTestsInstance.propertiestests#//@elements.0/@containmentReferences.0"/> + <semanticElements xmi:type="propertiestests:TestElement" href="PropertiesTestsInstance.propertiestests#//@elements.0/@containmentReferences.0"/> + <ownedStyle xmi:type="diagram:Square" xmi:id="_-GN-YAiYEeaQ8eZ7XL4hjg" labelPosition="node"> + <description xmi:type="style:SquareDescription" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer/@nodeMappings[name='TestElement']/@style"/> + </ownedStyle> + <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer/@nodeMappings[name='TestElement']"/> + </ownedDiagramElements> + <ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_AwZFoAiZEeaQ8eZ7XL4hjg" name="Element13" width="10" height="10" resizeKind="NSEW"> + <target xmi:type="propertiestests:TestElement" href="PropertiesTestsInstance.propertiestests#//@elements.0/@containmentReferences.1"/> + <semanticElements xmi:type="propertiestests:TestElement" href="PropertiesTestsInstance.propertiestests#//@elements.0/@containmentReferences.1"/> + <ownedStyle xmi:type="diagram:Square" xmi:id="_AwZFoQiZEeaQ8eZ7XL4hjg" labelPosition="node"> + <description xmi:type="style:SquareDescription" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer/@nodeMappings[name='TestElement']/@style"/> + </ownedStyle> + <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer/@nodeMappings[name='TestElement']"/> + </ownedDiagramElements> + <ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_lUZDgAiYEeaQ8eZ7XL4hjg" name="Element2" width="10" height="10" resizeKind="NSEW"> + <target xmi:type="propertiestests:TestElement" href="PropertiesTestsInstance.propertiestests#//@elements.1"/> + <semanticElements xmi:type="propertiestests:TestElement" href="PropertiesTestsInstance.propertiestests#//@elements.1"/> + <ownedStyle xmi:type="diagram:Square" xmi:id="_lUZqkAiYEeaQ8eZ7XL4hjg" labelPosition="node"> + <description xmi:type="style:SquareDescription" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer/@nodeMappings[name='TestElement']/@style"/> + </ownedStyle> + <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer/@nodeMappings[name='TestElement']"/> + </ownedDiagramElements> + <ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_wbfTwAiYEeaQ8eZ7XL4hjg" name="Element3" width="10" height="10" resizeKind="NSEW"> + <target xmi:type="propertiestests:TestElement" href="PropertiesTestsInstance.propertiestests#//@elements.2"/> + <semanticElements xmi:type="propertiestests:TestElement" href="PropertiesTestsInstance.propertiestests#//@elements.2"/> + <ownedStyle xmi:type="diagram:Square" xmi:id="_wbf60AiYEeaQ8eZ7XL4hjg" labelPosition="node"> + <description xmi:type="style:SquareDescription" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer/@nodeMappings[name='TestElement']/@style"/> + </ownedStyle> + <actualMapping xmi:type="description_1:NodeMapping" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer/@nodeMappings[name='TestElement']"/> + </ownedDiagramElements> + <description xmi:type="description_1:DiagramDescription" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']"/> + <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_dK6SZQiBEeaRvL3xkYbMuw"/> + <activatedLayers xmi:type="description_1:Layer" href="platform:/resource/org.eclipse.sirius.tests.rcptt.properties.design/description/PropertiesTests.odesign#//@ownedViewpoints[name='PropertiesTests']/@ownedRepresentations[name='Diagram']/@defaultLayer"/> + <target xmi:type="propertiestests:TestRoot" href="PropertiesTestsInstance.propertiestests#/"/> + </ownedRepresentations> + </ownedViews> +</viewpoint:DAnalysis> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/plugin.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/plugin.properties new file mode 100644 index 0000000000..95da2aae5d --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/plugin.properties @@ -0,0 +1,12 @@ +# ==================================================================== +# Copyright (c) 2016 Obeo +# 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: +# Obeo - initial API and implementation +# ==================================================================== +pluginName = Sirius RCPTT Tests Samples +providerName = Eclipse Modeling Project diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/plugin.xml new file mode 100644 index 0000000000..fc04647043 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/plugin.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> + <extension + point="org.eclipse.emf.common.ui.examples"> + <example + wizardID="org.eclipse.sirius.tests.properties.samples.wizard"> + <projectDescriptor + contentURI="contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design/" + name="org.eclipse.sirius.tests.rcptt.properties.design"> + </projectDescriptor> + <projectDescriptor + contentURI="contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.text/" + name="org.eclipse.sirius.tests.rcptt.properties.design.text"> + </projectDescriptor> + <projectDescriptor + contentURI="contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.instance/" + name="org.eclipse.sirius.tests.rcptt.properties.instance"> + </projectDescriptor> + </example> + </extension> + <extension + point="org.eclipse.ui.newWizards"> + <wizard + category="org.eclipse.ui.Examples/org.eclipse.sirius.tests.properties.samples.category" + class="org.eclipse.sirius.tests.properties.samples.PropertiesTestsExampleWizard" + finalPerspective="org.eclipse.sirius.ui.tools.perspective.modeling" + id="org.eclipse.sirius.tests.properties.samples.wizard" + name="Sirius Properties Tests Wizard" + project="true"> + </wizard> + <category + id="org.eclipse.sirius.tests.properties.samples.category" + name="Sirius Tests" + parentCategory="org.eclipse.ui.Examples"> + </category> + </extension> + +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/pom.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/pom.xml new file mode 100644 index 0000000000..db9382d562 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/pom.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2016 Obeo + 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: + Obeo - Initial API and implementation +--> +<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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.sirius</groupId> + <artifactId>sirius-parent</artifactId> + <version>4.1.0-SNAPSHOT</version> + <relativePath>../../packaging/org.eclipse.sirius.parent</relativePath> + </parent> + + <artifactId>org.eclipse.sirius.tests.rcptt.properties.samples</artifactId> + <packaging>eclipse-plugin</packaging> + <version>4.1.0-SNAPSHOT</version> + +</project> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/src/org/eclipse/sirius/tests/properties/samples/PropertiesTestsExampleWizard.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/src/org/eclipse/sirius/tests/properties/samples/PropertiesTestsExampleWizard.java new file mode 100644 index 0000000000..7a54ffffb6 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/src/org/eclipse/sirius/tests/properties/samples/PropertiesTestsExampleWizard.java @@ -0,0 +1,57 @@ +package org.eclipse.sirius.tests.properties.samples; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.common.ui.wizard.ExampleInstallerWizard; +import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.WorkbenchException; +import org.eclipse.ui.actions.WorkspaceModifyOperation; +import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; + +public class PropertiesTestsExampleWizard extends ExampleInstallerWizard { + @Override + /** + * Import selected example and switch to modeling perspective. {@inheritDoc} + */ + public boolean performFinish() { + + super.performFinish(); + + final IRunnableWithProgress op = new WorkspaceModifyOperation(null) { + @Override + protected void execute(IProgressMonitor monitor) throws CoreException, InterruptedException { + + // Switch to the modeling perspective + try { + PlatformUI.getWorkbench().showPerspective("org.eclipse.sirius.ui.tools.perspective.modeling", //$NON-NLS-1$ + PlatformUI.getWorkbench().getActiveWorkbenchWindow()); + } catch (final WorkbenchException e) { + ErrorDialog.openError(getContainer().getShell(), "Error while opening example", null, e.getStatus()); + } + } + }; + try { + getContainer().run(false, true, op); + } catch (final InvocationTargetException e) { + if (e.getTargetException() instanceof CoreException) { + ErrorDialog.openError(getContainer().getShell(), "Error while opening example", null, ((CoreException) e.getTargetException()).getStatus()); + } + } catch (final InterruptedException e) { + return false; + } + + // Select it in the explorer + for (final ProjectDescriptor projectDescriptor : getProjectDescriptors()) { + final IProject project = projectDescriptor.getProject(); + BasicNewResourceWizard.selectAndReveal(project, PlatformUI.getWorkbench().getActiveWorkbenchWindow()); + } + + return true; + } + +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties/.classpath new file mode 100644 index 0000000000..664b52ed75 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/.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.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src-gen"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties/.project new file mode 100644 index 0000000000..97f3714c23 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties</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/plugins/org.eclipse.sirius.tests.rcptt.properties/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..a9a4266b04 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.properties;singleton:=true +Bundle-Version: 4.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.eclipse.sirius.tests.rcptt.properties.propertiestests, + org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl, + org.eclipse.sirius.tests.rcptt.properties.propertiestests.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties/build.properties new file mode 100644 index 0000000000..83209311c6 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/build.properties @@ -0,0 +1,14 @@ +# Copyright (c) 2016 Obeo. +# 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.htm + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src-gen/ +output.. = bin/ diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/model/propertiestests.ecore b/plugins/org.eclipse.sirius.tests.rcptt.properties/model/propertiestests.ecore new file mode 100644 index 0000000000..086e6a4c80 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/model/propertiestests.ecore @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="propertiestests" nsURI="http://www.eclipse.org/sirius/tests/properties/1.0.0" + nsPrefix="propertiestests"> + <eClassifiers xsi:type="ecore:EClass" name="TestRoot"> + <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1" + eType="#//TestElement" containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="TestElement"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="stringAttribute" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="stringAttributes" upperBound="-1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="intAttribute" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="intAttributes" upperBound="-1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="booleanAttribute" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="booleanAttributes" upperBound="-1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="enumAttribute" eType="#//TestEnum"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="enumAttributes" upperBound="-1" + eType="#//TestEnum"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="containmentReference" eType="#//TestElement" + containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="containmentReferences" + upperBound="-1" eType="#//TestElement" containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="reference" eType="#//TestElement"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="references" upperBound="-1" + eType="#//TestElement"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EEnum" name="TestEnum"> + <eLiterals name="Literal1"/> + <eLiterals name="Literal2" value="1"/> + <eLiterals name="Literal3" value="2"/> + </eClassifiers> +</ecore:EPackage> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/model/propertiestests.genmodel b/plugins/org.eclipse.sirius.tests.rcptt.properties/model/propertiestests.genmodel new file mode 100644 index 0000000000..461b16fbf4 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/model/propertiestests.genmodel @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" + xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2016 Obeo.
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.htm" + modelDirectory="/org.eclipse.sirius.tests.rcptt.properties/src-gen" editDirectory="/org.eclipse.sirius.tests.rcptt.properties.edit/src-gen" + editorDirectory="/org.eclipse.sirius.tests.rcptt.properties.editor/src-gen" modelPluginID="org.eclipse.sirius.tests.rcptt.properties" + modelName="Propertiestests" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" + importerID="org.eclipse.emf.importer.ecore" complianceLevel="7.0" copyrightFields="false" + operationReflection="true" importOrganizing="true"> + <foreignModel>propertiestests.ecore</foreignModel> + <genPackages prefix="Propertiestests" basePackage="org.eclipse.sirius.tests.rcptt.properties" + disposableProviderFactory="true" ecorePackage="propertiestests.ecore#/"> + <genEnums typeSafeEnumCompatible="false" ecoreEnum="propertiestests.ecore#//TestEnum"> + <genEnumLiterals ecoreEnumLiteral="propertiestests.ecore#//TestEnum/Literal1"/> + <genEnumLiterals ecoreEnumLiteral="propertiestests.ecore#//TestEnum/Literal2"/> + <genEnumLiterals ecoreEnumLiteral="propertiestests.ecore#//TestEnum/Literal3"/> + </genEnums> + <genClasses ecoreClass="propertiestests.ecore#//TestRoot"> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference propertiestests.ecore#//TestRoot/elements"/> + </genClasses> + <genClasses ecoreClass="propertiestests.ecore#//TestElement"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute propertiestests.ecore#//TestElement/stringAttribute"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute propertiestests.ecore#//TestElement/stringAttributes"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute propertiestests.ecore#//TestElement/intAttribute"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute propertiestests.ecore#//TestElement/intAttributes"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute propertiestests.ecore#//TestElement/booleanAttribute"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute propertiestests.ecore#//TestElement/booleanAttributes"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute propertiestests.ecore#//TestElement/enumAttribute"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute propertiestests.ecore#//TestElement/enumAttributes"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference propertiestests.ecore#//TestElement/containmentReference"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference propertiestests.ecore#//TestElement/containmentReferences"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference propertiestests.ecore#//TestElement/reference"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference propertiestests.ecore#//TestElement/references"/> + </genClasses> + </genPackages> +</genmodel:GenModel> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/plugin.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties/plugin.properties new file mode 100644 index 0000000000..5caaaeb223 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/plugin.properties @@ -0,0 +1,8 @@ +# Copyright (c) 2016 Obeo. +# 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.htm + +pluginName = Sirius Properties Tests Model +providerName = Eclipse Modeling Project diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties/plugin.xml new file mode 100644 index 0000000000..c88b18b7de --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/plugin.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- + Copyright (c) 2016 Obeo. + 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.htm +--> + +<plugin> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <!-- @generated propertiestests --> + <package + uri="http://www.eclipse.org/sirius/tests/properties/1.0.0" + class="org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage" + genModel="model/propertiestests.genmodel"/> + </extension> + +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/pom.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties/pom.xml new file mode 100644 index 0000000000..4afb04eb45 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/pom.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2016 Obeo + 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: + Obeo - Initial API and implementation +--> +<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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.sirius</groupId> + <artifactId>sirius-parent</artifactId> + <version>4.1.0-SNAPSHOT</version> + <relativePath>../../packaging/org.eclipse.sirius.parent</relativePath> + </parent> + + <artifactId>org.eclipse.sirius.tests.rcptt.properties</artifactId> + <packaging>eclipse-plugin</packaging> + <version>4.1.0-SNAPSHOT</version> + +</project> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/PropertiestestsFactory.java b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/PropertiestestsFactory.java new file mode 100644 index 0000000000..b88e0ee42d --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/PropertiestestsFactory.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests; + +import org.eclipse.emf.ecore.EFactory; + +/** + * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a + * create method for each non-abstract class of the model. <!-- end-user-doc --> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage + * @generated + */ +public interface PropertiestestsFactory extends EFactory { + /** + * The singleton instance of the factory. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + PropertiestestsFactory eINSTANCE = org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.PropertiestestsFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Test Root</em>'. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Test Root</em>'. + * @generated + */ + TestRoot createTestRoot(); + + /** + * Returns a new object of class '<em>Test Element</em>'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Test Element</em>'. + * @generated + */ + TestElement createTestElement(); + + /** + * Returns the package supported by this factory. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the package supported by this factory. + * @generated + */ + PropertiestestsPackage getPropertiestestsPackage(); + +} // PropertiestestsFactory diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/PropertiestestsPackage.java b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/PropertiestestsPackage.java new file mode 100644 index 0000000000..04de671681 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/PropertiestestsPackage.java @@ -0,0 +1,619 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains + * accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsFactory + * @model kind="package" + * @generated + */ +public interface PropertiestestsPackage extends EPackage { + /** + * The package name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNAME = "propertiestests"; + + /** + * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/sirius/tests/properties/1.0.0"; + + /** + * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNS_PREFIX = "propertiestests"; + + /** + * The singleton instance of the package. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + PropertiestestsPackage eINSTANCE = org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.PropertiestestsPackageImpl.init(); + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestRootImpl + * <em>Test Root</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestRootImpl + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.PropertiestestsPackageImpl#getTestRoot() + * @generated + */ + int TEST_ROOT = 0; + + /** + * The feature id for the '<em><b>Elements</b></em>' containment reference + * list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ROOT__ELEMENTS = 0; + + /** + * The number of structural features of the '<em>Test Root</em>' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ROOT_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Test Root</em>' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ROOT_OPERATION_COUNT = 0; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl + * <em>Test Element</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.PropertiestestsPackageImpl#getTestElement() + * @generated + */ + int TEST_ELEMENT = 1; + + /** + * The feature id for the '<em><b>String Attribute</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT__STRING_ATTRIBUTE = 0; + + /** + * The feature id for the '<em><b>String Attributes</b></em>' attribute + * list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT__STRING_ATTRIBUTES = 1; + + /** + * The feature id for the '<em><b>Int Attribute</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT__INT_ATTRIBUTE = 2; + + /** + * The feature id for the '<em><b>Int Attributes</b></em>' attribute list. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT__INT_ATTRIBUTES = 3; + + /** + * The feature id for the '<em><b>Boolean Attribute</b></em>' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT__BOOLEAN_ATTRIBUTE = 4; + + /** + * The feature id for the '<em><b>Boolean Attributes</b></em>' attribute + * list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT__BOOLEAN_ATTRIBUTES = 5; + + /** + * The feature id for the '<em><b>Enum Attribute</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT__ENUM_ATTRIBUTE = 6; + + /** + * The feature id for the '<em><b>Enum Attributes</b></em>' attribute list. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT__ENUM_ATTRIBUTES = 7; + + /** + * The feature id for the '<em><b>Containment Reference</b></em>' + * containment reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT__CONTAINMENT_REFERENCE = 8; + + /** + * The feature id for the '<em><b>Containment References</b></em>' + * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT__CONTAINMENT_REFERENCES = 9; + + /** + * The feature id for the '<em><b>Reference</b></em>' reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT__REFERENCE = 10; + + /** + * The feature id for the '<em><b>References</b></em>' reference list. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT__REFERENCES = 11; + + /** + * The number of structural features of the '<em>Test Element</em>' class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT_FEATURE_COUNT = 12; + + /** + * The number of operations of the '<em>Test Element</em>' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int TEST_ELEMENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum + * <em>Test Enum</em>}' enum. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.PropertiestestsPackageImpl#getTestEnum() + * @generated + */ + int TEST_ENUM = 2; + + /** + * Returns the meta object for class ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot + * <em>Test Root</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Test Root</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot + * @generated + */ + EClass getTestRoot(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot#getElements + * <em>Elements</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference list ' + * <em>Elements</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot#getElements() + * @see #getTestRoot() + * @generated + */ + EReference getTestRoot_Elements(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement + * <em>Test Element</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Test Element</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement + * @generated + */ + EClass getTestElement(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getStringAttribute + * <em>String Attribute</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @return the meta object for the attribute '<em>String Attribute</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getStringAttribute() + * @see #getTestElement() + * @generated + */ + EAttribute getTestElement_StringAttribute(); + + /** + * Returns the meta object for the attribute list ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getStringAttributes + * <em>String Attributes</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @return the meta object for the attribute list ' + * <em>String Attributes</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getStringAttributes() + * @see #getTestElement() + * @generated + */ + EAttribute getTestElement_StringAttributes(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getIntAttribute + * <em>Int Attribute</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Int Attribute</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getIntAttribute() + * @see #getTestElement() + * @generated + */ + EAttribute getTestElement_IntAttribute(); + + /** + * Returns the meta object for the attribute list ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getIntAttributes + * <em>Int Attributes</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute list '<em>Int Attributes</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getIntAttributes() + * @see #getTestElement() + * @generated + */ + EAttribute getTestElement_IntAttributes(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#isBooleanAttribute + * <em>Boolean Attribute</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @return the meta object for the attribute '<em>Boolean Attribute</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#isBooleanAttribute() + * @see #getTestElement() + * @generated + */ + EAttribute getTestElement_BooleanAttribute(); + + /** + * Returns the meta object for the attribute list ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getBooleanAttributes + * <em>Boolean Attributes</em>}'. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @return the meta object for the attribute list ' + * <em>Boolean Attributes</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getBooleanAttributes() + * @see #getTestElement() + * @generated + */ + EAttribute getTestElement_BooleanAttributes(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getEnumAttribute + * <em>Enum Attribute</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Enum Attribute</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getEnumAttribute() + * @see #getTestElement() + * @generated + */ + EAttribute getTestElement_EnumAttribute(); + + /** + * Returns the meta object for the attribute list ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getEnumAttributes + * <em>Enum Attributes</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute list '<em>Enum Attributes</em> + * '. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getEnumAttributes() + * @see #getTestElement() + * @generated + */ + EAttribute getTestElement_EnumAttributes(); + + /** + * Returns the meta object for the containment reference ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getContainmentReference + * <em>Containment Reference</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for the containment reference ' + * <em>Containment Reference</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getContainmentReference() + * @see #getTestElement() + * @generated + */ + EReference getTestElement_ContainmentReference(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getContainmentReferences + * <em>Containment References</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for the containment reference list ' + * <em>Containment References</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getContainmentReferences() + * @see #getTestElement() + * @generated + */ + EReference getTestElement_ContainmentReferences(); + + /** + * Returns the meta object for the reference ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getReference + * <em>Reference</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Reference</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getReference() + * @see #getTestElement() + * @generated + */ + EReference getTestElement_Reference(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getReferences + * <em>References</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>References</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getReferences() + * @see #getTestElement() + * @generated + */ + EReference getTestElement_References(); + + /** + * Returns the meta object for enum ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum + * <em>Test Enum</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for enum '<em>Test Enum</em>'. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum + * @generated + */ + EEnum getTestEnum(); + + /** + * Returns the factory that creates the instances of the model. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the factory that creates the instances of the model. + * @generated + */ + PropertiestestsFactory getPropertiestestsFactory(); + + /** + * <!-- begin-user-doc --> Defines literals for the meta objects that + * represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * + * @generated + */ + interface Literals { + /** + * The meta object literal for the ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestRootImpl + * <em>Test Root</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestRootImpl + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.PropertiestestsPackageImpl#getTestRoot() + * @generated + */ + EClass TEST_ROOT = PropertiestestsPackage.eINSTANCE.getTestRoot(); + + /** + * The meta object literal for the '<em><b>Elements</b></em>' + * containment reference list feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference TEST_ROOT__ELEMENTS = PropertiestestsPackage.eINSTANCE.getTestRoot_Elements(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl + * <em>Test Element</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.PropertiestestsPackageImpl#getTestElement() + * @generated + */ + EClass TEST_ELEMENT = PropertiestestsPackage.eINSTANCE.getTestElement(); + + /** + * The meta object literal for the '<em><b>String Attribute</b></em>' + * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute TEST_ELEMENT__STRING_ATTRIBUTE = PropertiestestsPackage.eINSTANCE.getTestElement_StringAttribute(); + + /** + * The meta object literal for the '<em><b>String Attributes</b></em>' + * attribute list feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute TEST_ELEMENT__STRING_ATTRIBUTES = PropertiestestsPackage.eINSTANCE.getTestElement_StringAttributes(); + + /** + * The meta object literal for the '<em><b>Int Attribute</b></em>' + * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute TEST_ELEMENT__INT_ATTRIBUTE = PropertiestestsPackage.eINSTANCE.getTestElement_IntAttribute(); + + /** + * The meta object literal for the '<em><b>Int Attributes</b></em>' + * attribute list feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute TEST_ELEMENT__INT_ATTRIBUTES = PropertiestestsPackage.eINSTANCE.getTestElement_IntAttributes(); + + /** + * The meta object literal for the '<em><b>Boolean Attribute</b></em>' + * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute TEST_ELEMENT__BOOLEAN_ATTRIBUTE = PropertiestestsPackage.eINSTANCE.getTestElement_BooleanAttribute(); + + /** + * The meta object literal for the '<em><b>Boolean Attributes</b></em>' + * attribute list feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute TEST_ELEMENT__BOOLEAN_ATTRIBUTES = PropertiestestsPackage.eINSTANCE.getTestElement_BooleanAttributes(); + + /** + * The meta object literal for the '<em><b>Enum Attribute</b></em>' + * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute TEST_ELEMENT__ENUM_ATTRIBUTE = PropertiestestsPackage.eINSTANCE.getTestElement_EnumAttribute(); + + /** + * The meta object literal for the '<em><b>Enum Attributes</b></em>' + * attribute list feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute TEST_ELEMENT__ENUM_ATTRIBUTES = PropertiestestsPackage.eINSTANCE.getTestElement_EnumAttributes(); + + /** + * The meta object literal for the ' + * <em><b>Containment Reference</b></em>' containment reference feature. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference TEST_ELEMENT__CONTAINMENT_REFERENCE = PropertiestestsPackage.eINSTANCE.getTestElement_ContainmentReference(); + + /** + * The meta object literal for the ' + * <em><b>Containment References</b></em>' containment reference list + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference TEST_ELEMENT__CONTAINMENT_REFERENCES = PropertiestestsPackage.eINSTANCE.getTestElement_ContainmentReferences(); + + /** + * The meta object literal for the '<em><b>Reference</b></em>' reference + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference TEST_ELEMENT__REFERENCE = PropertiestestsPackage.eINSTANCE.getTestElement_Reference(); + + /** + * The meta object literal for the '<em><b>References</b></em>' + * reference list feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference TEST_ELEMENT__REFERENCES = PropertiestestsPackage.eINSTANCE.getTestElement_References(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum + * <em>Test Enum</em>}' enum. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.PropertiestestsPackageImpl#getTestEnum() + * @generated + */ + EEnum TEST_ENUM = PropertiestestsPackage.eINSTANCE.getTestEnum(); + + } + +} // PropertiestestsPackage diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/TestElement.java b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/TestElement.java new file mode 100644 index 0000000000..c0f427971a --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/TestElement.java @@ -0,0 +1,361 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> A representation of the model object ' + * <em><b>Test Element</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getStringAttribute + * <em>String Attribute</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getStringAttributes + * <em>String Attributes</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getIntAttribute + * <em>Int Attribute</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getIntAttributes + * <em>Int Attributes</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#isBooleanAttribute + * <em>Boolean Attribute</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getBooleanAttributes + * <em>Boolean Attributes</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getEnumAttribute + * <em>Enum Attribute</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getEnumAttributes + * <em>Enum Attributes</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getContainmentReference + * <em>Containment Reference</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getContainmentReferences + * <em>Containment References</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getReference + * <em>Reference</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getReferences + * <em>References</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement() + * @model + * @generated + */ +public interface TestElement extends EObject { + /** + * Returns the value of the '<em><b>String Attribute</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>String Attribute</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>String Attribute</em>' attribute. + * @see #setStringAttribute(String) + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement_StringAttribute() + * @model + * @generated + */ + String getStringAttribute(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getStringAttribute + * <em>String Attribute</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>String Attribute</em>' attribute. + * @see #getStringAttribute() + * @generated + */ + void setStringAttribute(String value); + + /** + * Returns the value of the '<em><b>String Attributes</b></em>' attribute + * list. The list contents are of type {@link java.lang.String}. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>String Attributes</em>' attribute list isn't + * clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>String Attributes</em>' attribute list. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement_StringAttributes() + * @model + * @generated + */ + EList<String> getStringAttributes(); + + /** + * Returns the value of the '<em><b>Int Attribute</b></em>' attribute. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Int Attribute</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Int Attribute</em>' attribute. + * @see #setIntAttribute(int) + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement_IntAttribute() + * @model + * @generated + */ + int getIntAttribute(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getIntAttribute + * <em>Int Attribute</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Int Attribute</em>' attribute. + * @see #getIntAttribute() + * @generated + */ + void setIntAttribute(int value); + + /** + * Returns the value of the '<em><b>Int Attributes</b></em>' attribute list. + * The list contents are of type {@link java.lang.Integer}. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Int Attributes</em>' attribute list isn't + * clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Int Attributes</em>' attribute list. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement_IntAttributes() + * @model + * @generated + */ + EList<Integer> getIntAttributes(); + + /** + * Returns the value of the '<em><b>Boolean Attribute</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Boolean Attribute</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Boolean Attribute</em>' attribute. + * @see #setBooleanAttribute(boolean) + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement_BooleanAttribute() + * @model + * @generated + */ + boolean isBooleanAttribute(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#isBooleanAttribute + * <em>Boolean Attribute</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Boolean Attribute</em>' attribute. + * @see #isBooleanAttribute() + * @generated + */ + void setBooleanAttribute(boolean value); + + /** + * Returns the value of the '<em><b>Boolean Attributes</b></em>' attribute + * list. The list contents are of type {@link java.lang.Boolean}. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Boolean Attributes</em>' attribute list isn't + * clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Boolean Attributes</em>' attribute list. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement_BooleanAttributes() + * @model + * @generated + */ + EList<Boolean> getBooleanAttributes(); + + /** + * Returns the value of the '<em><b>Enum Attribute</b></em>' attribute. The + * literals are from the enumeration + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum} + * . <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Enum Attribute</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Enum Attribute</em>' attribute. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum + * @see #setEnumAttribute(TestEnum) + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement_EnumAttribute() + * @model + * @generated + */ + TestEnum getEnumAttribute(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getEnumAttribute + * <em>Enum Attribute</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @param value + * the new value of the '<em>Enum Attribute</em>' attribute. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum + * @see #getEnumAttribute() + * @generated + */ + void setEnumAttribute(TestEnum value); + + /** + * Returns the value of the '<em><b>Enum Attributes</b></em>' attribute + * list. The list contents are of type + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum} + * . The literals are from the enumeration + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum} + * . <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Enum Attributes</em>' attribute list isn't + * clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Enum Attributes</em>' attribute list. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement_EnumAttributes() + * @model + * @generated + */ + EList<TestEnum> getEnumAttributes(); + + /** + * Returns the value of the '<em><b>Containment Reference</b></em>' + * containment reference. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Containment Reference</em>' containment + * reference isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Containment Reference</em>' containment + * reference. + * @see #setContainmentReference(TestElement) + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement_ContainmentReference() + * @model containment="true" + * @generated + */ + TestElement getContainmentReference(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getContainmentReference + * <em>Containment Reference</em>}' containment reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Containment Reference</em>' + * containment reference. + * @see #getContainmentReference() + * @generated + */ + void setContainmentReference(TestElement value); + + /** + * Returns the value of the '<em><b>Containment References</b></em>' + * containment reference list. The list contents are of type + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement} + * . <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Containment References</em>' containment + * reference list isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Containment References</em>' containment + * reference list. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement_ContainmentReferences() + * @model containment="true" + * @generated + */ + EList<TestElement> getContainmentReferences(); + + /** + * Returns the value of the '<em><b>Reference</b></em>' reference. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Reference</em>' reference isn't clear, there + * really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Reference</em>' reference. + * @see #setReference(TestElement) + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement_Reference() + * @model + * @generated + */ + TestElement getReference(); + + /** + * Sets the value of the ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement#getReference + * <em>Reference</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @param value + * the new value of the '<em>Reference</em>' reference. + * @see #getReference() + * @generated + */ + void setReference(TestElement value); + + /** + * Returns the value of the '<em><b>References</b></em>' reference list. The + * list contents are of type + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement} + * . <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>References</em>' reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>References</em>' reference list. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestElement_References() + * @model + * @generated + */ + EList<TestElement> getReferences(); + +} // TestElement diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/TestEnum.java b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/TestEnum.java new file mode 100644 index 0000000000..71b286188e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/TestEnum.java @@ -0,0 +1,248 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * <!-- begin-user-doc --> A representation of the literals of the enumeration ' + * <em><b>Test Enum</b></em>', and utility methods for working with them. <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestEnum() + * @model + * @generated + */ +public enum TestEnum implements Enumerator { + /** + * The '<em><b>Literal1</b></em>' literal object. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #LITERAL1_VALUE + * @generated + * @ordered + */ + LITERAL1(0, "Literal1", "Literal1"), + + /** + * The '<em><b>Literal2</b></em>' literal object. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #LITERAL2_VALUE + * @generated + * @ordered + */ + LITERAL2(1, "Literal2", "Literal2"), + + /** + * The '<em><b>Literal3</b></em>' literal object. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #LITERAL3_VALUE + * @generated + * @ordered + */ + LITERAL3(2, "Literal3", "Literal3"); + + /** + * The '<em><b>Literal1</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Literal1</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #LITERAL1 + * @model name="Literal1" + * @generated + * @ordered + */ + public static final int LITERAL1_VALUE = 0; + + /** + * The '<em><b>Literal2</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Literal2</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #LITERAL2 + * @model name="Literal2" + * @generated + * @ordered + */ + public static final int LITERAL2_VALUE = 1; + + /** + * The '<em><b>Literal3</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Literal3</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @see #LITERAL3 + * @model name="Literal3" + * @generated + * @ordered + */ + public static final int LITERAL3_VALUE = 2; + + /** + * An array of all the '<em><b>Test Enum</b></em>' enumerators. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static final TestEnum[] VALUES_ARRAY = new TestEnum[] { LITERAL1, LITERAL2, LITERAL3, }; + + /** + * A public read-only list of all the '<em><b>Test Enum</b></em>' + * enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static final List<TestEnum> VALUES = Collections.unmodifiableList(Arrays.asList(TestEnum.VALUES_ARRAY)); + + /** + * Returns the '<em><b>Test Enum</b></em>' literal with the specified + * literal value. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param literal + * the literal. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static TestEnum get(String literal) { + for (TestEnum result : TestEnum.VALUES_ARRAY) { + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Test Enum</b></em>' literal with the specified name. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param name + * the name. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static TestEnum getByName(String name) { + for (TestEnum result : TestEnum.VALUES_ARRAY) { + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>Test Enum</b></em>' literal with the specified + * integer value. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the integer value. + * @return the matching enumerator or <code>null</code>. + * @generated + */ + public static TestEnum get(int value) { + switch (value) { + case LITERAL1_VALUE: + return LITERAL1; + case LITERAL2_VALUE: + return LITERAL2; + case LITERAL3_VALUE: + return LITERAL3; + } + return null; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + private TestEnum(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string + * representation. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} // TestEnum diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/TestRoot.java b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/TestRoot.java new file mode 100644 index 0000000000..ebe039bc49 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/TestRoot.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> A representation of the model object ' + * <em><b>Test Root</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot#getElements + * <em>Elements</em>}</li> + * </ul> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestRoot() + * @model + * @generated + */ +public interface TestRoot extends EObject { + /** + * Returns the value of the '<em><b>Elements</b></em>' containment reference + * list. The list contents are of type + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement} + * . <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Elements</em>' containment reference list + * isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Elements</em>' containment reference list. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#getTestRoot_Elements() + * @model containment="true" + * @generated + */ + EList<TestElement> getElements(); + +} // TestRoot diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/impl/PropertiestestsFactoryImpl.java b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/impl/PropertiestestsFactoryImpl.java new file mode 100644 index 0000000000..c095ab9c3a --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/impl/PropertiestestsFactoryImpl.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsFactory; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot; + +/** + * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- + * end-user-doc --> + * + * @generated + */ +public class PropertiestestsFactoryImpl extends EFactoryImpl implements PropertiestestsFactory { + /** + * Creates the default factory implementation. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public static PropertiestestsFactory init() { + try { + PropertiestestsFactory thePropertiestestsFactory = (PropertiestestsFactory) EPackage.Registry.INSTANCE.getEFactory(PropertiestestsPackage.eNS_URI); + if (thePropertiestestsFactory != null) { + return thePropertiestestsFactory; + } + } catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new PropertiestestsFactoryImpl(); + } + + /** + * Creates an instance of the factory. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public PropertiestestsFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case PropertiestestsPackage.TEST_ROOT: + return createTestRoot(); + case PropertiestestsPackage.TEST_ELEMENT: + return createTestElement(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case PropertiestestsPackage.TEST_ENUM: + return createTestEnumFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case PropertiestestsPackage.TEST_ENUM: + return convertTestEnumToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public TestRoot createTestRoot() { + TestRootImpl testRoot = new TestRootImpl(); + return testRoot; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public TestElement createTestElement() { + TestElementImpl testElement = new TestElementImpl(); + return testElement; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TestEnum createTestEnumFromString(EDataType eDataType, String initialValue) { + TestEnum result = TestEnum.get(initialValue); + if (result == null) { + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + } + return result; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String convertTestEnumToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public PropertiestestsPackage getPropertiestestsPackage() { + return (PropertiestestsPackage) getEPackage(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @deprecated + * @generated + */ + @Deprecated + public static PropertiestestsPackage getPackage() { + return PropertiestestsPackage.eINSTANCE; + } + +} // PropertiestestsFactoryImpl diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/impl/PropertiestestsPackageImpl.java b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/impl/PropertiestestsPackageImpl.java new file mode 100644 index 0000000000..6a31c1ee37 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/impl/PropertiestestsPackageImpl.java @@ -0,0 +1,405 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsFactory; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot; + +/** + * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- + * end-user-doc --> + * + * @generated + */ +public class PropertiestestsPackageImpl extends EPackageImpl implements PropertiestestsPackage { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass testRootEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass testElementEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EEnum testEnumEEnum = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the + * package package URI value. + * <p> + * Note: the correct way to create the package is via the static factory + * method {@link #init init()}, which also performs initialization of the + * package, or returns the registered package, if one already exists. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage#eNS_URI + * @see #init() + * @generated + */ + private PropertiestestsPackageImpl() { + super(PropertiestestsPackage.eNS_URI, PropertiestestsFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, + * and for any others upon which it depends. + * + * <p> + * This method is used to initialize + * {@link PropertiestestsPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access + * that field to obtain the package. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static PropertiestestsPackage init() { + if (PropertiestestsPackageImpl.isInited) { + return (PropertiestestsPackage) EPackage.Registry.INSTANCE.getEPackage(PropertiestestsPackage.eNS_URI); + } + + // Obtain or create and register package + PropertiestestsPackageImpl thePropertiestestsPackage = (PropertiestestsPackageImpl) (EPackage.Registry.INSTANCE.get(PropertiestestsPackage.eNS_URI) instanceof PropertiestestsPackageImpl + ? EPackage.Registry.INSTANCE.get(PropertiestestsPackage.eNS_URI) : new PropertiestestsPackageImpl()); + + PropertiestestsPackageImpl.isInited = true; + + // Create package meta-data objects + thePropertiestestsPackage.createPackageContents(); + + // Initialize created meta-data + thePropertiestestsPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + thePropertiestestsPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(PropertiestestsPackage.eNS_URI, thePropertiestestsPackage); + return thePropertiestestsPackage; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getTestRoot() { + return testRootEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getTestRoot_Elements() { + return (EReference) testRootEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getTestElement() { + return testElementEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getTestElement_StringAttribute() { + return (EAttribute) testElementEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getTestElement_StringAttributes() { + return (EAttribute) testElementEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getTestElement_IntAttribute() { + return (EAttribute) testElementEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getTestElement_IntAttributes() { + return (EAttribute) testElementEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getTestElement_BooleanAttribute() { + return (EAttribute) testElementEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getTestElement_BooleanAttributes() { + return (EAttribute) testElementEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getTestElement_EnumAttribute() { + return (EAttribute) testElementEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getTestElement_EnumAttributes() { + return (EAttribute) testElementEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getTestElement_ContainmentReference() { + return (EReference) testElementEClass.getEStructuralFeatures().get(8); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getTestElement_ContainmentReferences() { + return (EReference) testElementEClass.getEStructuralFeatures().get(9); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getTestElement_Reference() { + return (EReference) testElementEClass.getEStructuralFeatures().get(10); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getTestElement_References() { + return (EReference) testElementEClass.getEStructuralFeatures().get(11); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EEnum getTestEnum() { + return testEnumEEnum; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public PropertiestestsFactory getPropertiestestsFactory() { + return (PropertiestestsFactory) getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is guarded to + * have no affect on any invocation but its first. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public void createPackageContents() { + if (isCreated) { + return; + } + isCreated = true; + + // Create classes and their features + testRootEClass = createEClass(PropertiestestsPackage.TEST_ROOT); + createEReference(testRootEClass, PropertiestestsPackage.TEST_ROOT__ELEMENTS); + + testElementEClass = createEClass(PropertiestestsPackage.TEST_ELEMENT); + createEAttribute(testElementEClass, PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTE); + createEAttribute(testElementEClass, PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTES); + createEAttribute(testElementEClass, PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTE); + createEAttribute(testElementEClass, PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTES); + createEAttribute(testElementEClass, PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTE); + createEAttribute(testElementEClass, PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTES); + createEAttribute(testElementEClass, PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTE); + createEAttribute(testElementEClass, PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTES); + createEReference(testElementEClass, PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCE); + createEReference(testElementEClass, PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCES); + createEReference(testElementEClass, PropertiestestsPackage.TEST_ELEMENT__REFERENCE); + createEReference(testElementEClass, PropertiestestsPackage.TEST_ELEMENT__REFERENCES); + + // Create enums + testEnumEEnum = createEEnum(PropertiestestsPackage.TEST_ENUM); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) { + return; + } + isInitialized = true; + + // Initialize package + setName(PropertiestestsPackage.eNAME); + setNsPrefix(PropertiestestsPackage.eNS_PREFIX); + setNsURI(PropertiestestsPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + + // Initialize classes, features, and operations; add parameters + initEClass(testRootEClass, TestRoot.class, "TestRoot", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEReference(getTestRoot_Elements(), this.getTestElement(), null, "elements", null, 0, -1, TestRoot.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, + EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + + initEClass(testElementEClass, TestElement.class, "TestElement", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getTestElement_StringAttribute(), ecorePackage.getEString(), "stringAttribute", null, 0, 1, TestElement.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getTestElement_StringAttributes(), ecorePackage.getEString(), "stringAttributes", null, 0, -1, TestElement.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getTestElement_IntAttribute(), ecorePackage.getEInt(), "intAttribute", null, 0, 1, TestElement.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getTestElement_IntAttributes(), ecorePackage.getEInt(), "intAttributes", null, 0, -1, TestElement.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getTestElement_BooleanAttribute(), ecorePackage.getEBoolean(), "booleanAttribute", null, 0, 1, TestElement.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getTestElement_BooleanAttributes(), ecorePackage.getEBoolean(), "booleanAttributes", null, 0, -1, TestElement.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getTestElement_EnumAttribute(), this.getTestEnum(), "enumAttribute", null, 0, 1, TestElement.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEAttribute(getTestElement_EnumAttributes(), this.getTestEnum(), "enumAttributes", null, 0, -1, TestElement.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEReference(getTestElement_ContainmentReference(), this.getTestElement(), null, "containmentReference", null, 0, 1, TestElement.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, + EPackageImpl.IS_ORDERED); + initEReference(getTestElement_ContainmentReferences(), this.getTestElement(), null, "containmentReferences", null, 0, -1, TestElement.class, !EPackageImpl.IS_TRANSIENT, + !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, + !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED); + initEReference(getTestElement_Reference(), this.getTestElement(), null, "reference", null, 0, 1, TestElement.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_COMPOSITE, EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, + EPackageImpl.IS_ORDERED); + initEReference(getTestElement_References(), this.getTestElement(), null, "references", null, 0, -1, TestElement.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, + EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_COMPOSITE, EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, + EPackageImpl.IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(testEnumEEnum, TestEnum.class, "TestEnum"); + addEEnumLiteral(testEnumEEnum, TestEnum.LITERAL1); + addEEnumLiteral(testEnumEEnum, TestEnum.LITERAL2); + addEEnumLiteral(testEnumEEnum, TestEnum.LITERAL3); + + // Create resource + createResource(PropertiestestsPackage.eNS_URI); + } + +} // PropertiestestsPackageImpl diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/impl/TestElementImpl.java b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/impl/TestElementImpl.java new file mode 100644 index 0000000000..681ffa0bab --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/impl/TestElementImpl.java @@ -0,0 +1,763 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestEnum; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' + * <em><b>Test Element</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl#getStringAttribute + * <em>String Attribute</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl#getStringAttributes + * <em>String Attributes</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl#getIntAttribute + * <em>Int Attribute</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl#getIntAttributes + * <em>Int Attributes</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl#isBooleanAttribute + * <em>Boolean Attribute</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl#getBooleanAttributes + * <em>Boolean Attributes</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl#getEnumAttribute + * <em>Enum Attribute</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl#getEnumAttributes + * <em>Enum Attributes</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl#getContainmentReference + * <em>Containment Reference</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl#getContainmentReferences + * <em>Containment References</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl#getReference + * <em>Reference</em>}</li> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestElementImpl#getReferences + * <em>References</em>}</li> + * </ul> + * + * @generated + */ +public class TestElementImpl extends MinimalEObjectImpl.Container implements TestElement { + /** + * The default value of the '{@link #getStringAttribute() + * <em>String Attribute</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getStringAttribute() + * @generated + * @ordered + */ + protected static final String STRING_ATTRIBUTE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getStringAttribute() + * <em>String Attribute</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getStringAttribute() + * @generated + * @ordered + */ + protected String stringAttribute = TestElementImpl.STRING_ATTRIBUTE_EDEFAULT; + + /** + * The cached value of the '{@link #getStringAttributes() + * <em>String Attributes</em>}' attribute list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getStringAttributes() + * @generated + * @ordered + */ + protected EList<String> stringAttributes; + + /** + * The default value of the '{@link #getIntAttribute() + * <em>Int Attribute</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getIntAttribute() + * @generated + * @ordered + */ + protected static final int INT_ATTRIBUTE_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getIntAttribute() <em>Int Attribute</em> + * }' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getIntAttribute() + * @generated + * @ordered + */ + protected int intAttribute = TestElementImpl.INT_ATTRIBUTE_EDEFAULT; + + /** + * The cached value of the '{@link #getIntAttributes() + * <em>Int Attributes</em>}' attribute list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getIntAttributes() + * @generated + * @ordered + */ + protected EList<Integer> intAttributes; + + /** + * The default value of the '{@link #isBooleanAttribute() + * <em>Boolean Attribute</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #isBooleanAttribute() + * @generated + * @ordered + */ + protected static final boolean BOOLEAN_ATTRIBUTE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isBooleanAttribute() + * <em>Boolean Attribute</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #isBooleanAttribute() + * @generated + * @ordered + */ + protected boolean booleanAttribute = TestElementImpl.BOOLEAN_ATTRIBUTE_EDEFAULT; + + /** + * The cached value of the '{@link #getBooleanAttributes() + * <em>Boolean Attributes</em>}' attribute list. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @see #getBooleanAttributes() + * @generated + * @ordered + */ + protected EList<Boolean> booleanAttributes; + + /** + * The default value of the '{@link #getEnumAttribute() + * <em>Enum Attribute</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getEnumAttribute() + * @generated + * @ordered + */ + protected static final TestEnum ENUM_ATTRIBUTE_EDEFAULT = TestEnum.LITERAL1; + + /** + * The cached value of the '{@link #getEnumAttribute() + * <em>Enum Attribute</em>}' attribute. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getEnumAttribute() + * @generated + * @ordered + */ + protected TestEnum enumAttribute = TestElementImpl.ENUM_ATTRIBUTE_EDEFAULT; + + /** + * The cached value of the '{@link #getEnumAttributes() + * <em>Enum Attributes</em>}' attribute list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see #getEnumAttributes() + * @generated + * @ordered + */ + protected EList<TestEnum> enumAttributes; + + /** + * The cached value of the '{@link #getContainmentReference() + * <em>Containment Reference</em>}' containment reference. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see #getContainmentReference() + * @generated + * @ordered + */ + protected TestElement containmentReference; + + /** + * The cached value of the '{@link #getContainmentReferences() + * <em>Containment References</em>}' containment reference list. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see #getContainmentReferences() + * @generated + * @ordered + */ + protected EList<TestElement> containmentReferences; + + /** + * The cached value of the '{@link #getReference() <em>Reference</em>}' + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getReference() + * @generated + * @ordered + */ + protected TestElement reference; + + /** + * The cached value of the '{@link #getReferences() <em>References</em>}' + * reference list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getReferences() + * @generated + * @ordered + */ + protected EList<TestElement> references; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TestElementImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiestestsPackage.Literals.TEST_ELEMENT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getStringAttribute() { + return stringAttribute; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setStringAttribute(String newStringAttribute) { + String oldStringAttribute = stringAttribute; + stringAttribute = newStringAttribute; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTE, oldStringAttribute, stringAttribute)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<String> getStringAttributes() { + if (stringAttributes == null) { + stringAttributes = new EDataTypeUniqueEList<String>(String.class, this, PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTES); + } + return stringAttributes; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public int getIntAttribute() { + return intAttribute; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setIntAttribute(int newIntAttribute) { + int oldIntAttribute = intAttribute; + intAttribute = newIntAttribute; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTE, oldIntAttribute, intAttribute)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<Integer> getIntAttributes() { + if (intAttributes == null) { + intAttributes = new EDataTypeUniqueEList<Integer>(Integer.class, this, PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTES); + } + return intAttributes; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean isBooleanAttribute() { + return booleanAttribute; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setBooleanAttribute(boolean newBooleanAttribute) { + boolean oldBooleanAttribute = booleanAttribute; + booleanAttribute = newBooleanAttribute; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTE, oldBooleanAttribute, booleanAttribute)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<Boolean> getBooleanAttributes() { + if (booleanAttributes == null) { + booleanAttributes = new EDataTypeUniqueEList<Boolean>(Boolean.class, this, PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTES); + } + return booleanAttributes; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public TestEnum getEnumAttribute() { + return enumAttribute; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setEnumAttribute(TestEnum newEnumAttribute) { + TestEnum oldEnumAttribute = enumAttribute; + enumAttribute = newEnumAttribute == null ? TestElementImpl.ENUM_ATTRIBUTE_EDEFAULT : newEnumAttribute; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTE, oldEnumAttribute, enumAttribute)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<TestEnum> getEnumAttributes() { + if (enumAttributes == null) { + enumAttributes = new EDataTypeUniqueEList<TestEnum>(TestEnum.class, this, PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTES); + } + return enumAttributes; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public TestElement getContainmentReference() { + return containmentReference; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public NotificationChain basicSetContainmentReference(TestElement newContainmentReference, NotificationChain msgs) { + TestElement oldContainmentReference = containmentReference; + containmentReference = newContainmentReference; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCE, oldContainmentReference, + newContainmentReference); + if (msgs == null) { + msgs = notification; + } else { + msgs.add(notification); + } + } + return msgs; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setContainmentReference(TestElement newContainmentReference) { + if (newContainmentReference != containmentReference) { + NotificationChain msgs = null; + if (containmentReference != null) { + msgs = ((InternalEObject) containmentReference).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCE, null, msgs); + } + if (newContainmentReference != null) { + msgs = ((InternalEObject) newContainmentReference).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCE, null, msgs); + } + msgs = basicSetContainmentReference(newContainmentReference, msgs); + if (msgs != null) { + msgs.dispatch(); + } + } else if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCE, newContainmentReference, newContainmentReference)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<TestElement> getContainmentReferences() { + if (containmentReferences == null) { + containmentReferences = new EObjectContainmentEList<TestElement>(TestElement.class, this, PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCES); + } + return containmentReferences; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public TestElement getReference() { + if (reference != null && reference.eIsProxy()) { + InternalEObject oldReference = (InternalEObject) reference; + reference = (TestElement) eResolveProxy(oldReference); + if (reference != oldReference) { + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.RESOLVE, PropertiestestsPackage.TEST_ELEMENT__REFERENCE, oldReference, reference)); + } + } + } + return reference; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public TestElement basicGetReference() { + return reference; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setReference(TestElement newReference) { + TestElement oldReference = reference; + reference = newReference; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, PropertiestestsPackage.TEST_ELEMENT__REFERENCE, oldReference, reference)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<TestElement> getReferences() { + if (references == null) { + references = new EObjectResolvingEList<TestElement>(TestElement.class, this, PropertiestestsPackage.TEST_ELEMENT__REFERENCES); + } + return references; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCE: + return basicSetContainmentReference(null, msgs); + case PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCES: + return ((InternalEList<?>) getContainmentReferences()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTE: + return getStringAttribute(); + case PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTES: + return getStringAttributes(); + case PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTE: + return getIntAttribute(); + case PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTES: + return getIntAttributes(); + case PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTE: + return isBooleanAttribute(); + case PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTES: + return getBooleanAttributes(); + case PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTE: + return getEnumAttribute(); + case PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTES: + return getEnumAttributes(); + case PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCE: + return getContainmentReference(); + case PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCES: + return getContainmentReferences(); + case PropertiestestsPackage.TEST_ELEMENT__REFERENCE: + if (resolve) { + return getReference(); + } + return basicGetReference(); + case PropertiestestsPackage.TEST_ELEMENT__REFERENCES: + return getReferences(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTE: + setStringAttribute((String) newValue); + return; + case PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTES: + getStringAttributes().clear(); + getStringAttributes().addAll((Collection<? extends String>) newValue); + return; + case PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTE: + setIntAttribute((Integer) newValue); + return; + case PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTES: + getIntAttributes().clear(); + getIntAttributes().addAll((Collection<? extends Integer>) newValue); + return; + case PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTE: + setBooleanAttribute((Boolean) newValue); + return; + case PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTES: + getBooleanAttributes().clear(); + getBooleanAttributes().addAll((Collection<? extends Boolean>) newValue); + return; + case PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTE: + setEnumAttribute((TestEnum) newValue); + return; + case PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTES: + getEnumAttributes().clear(); + getEnumAttributes().addAll((Collection<? extends TestEnum>) newValue); + return; + case PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCE: + setContainmentReference((TestElement) newValue); + return; + case PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCES: + getContainmentReferences().clear(); + getContainmentReferences().addAll((Collection<? extends TestElement>) newValue); + return; + case PropertiestestsPackage.TEST_ELEMENT__REFERENCE: + setReference((TestElement) newValue); + return; + case PropertiestestsPackage.TEST_ELEMENT__REFERENCES: + getReferences().clear(); + getReferences().addAll((Collection<? extends TestElement>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTE: + setStringAttribute(TestElementImpl.STRING_ATTRIBUTE_EDEFAULT); + return; + case PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTES: + getStringAttributes().clear(); + return; + case PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTE: + setIntAttribute(TestElementImpl.INT_ATTRIBUTE_EDEFAULT); + return; + case PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTES: + getIntAttributes().clear(); + return; + case PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTE: + setBooleanAttribute(TestElementImpl.BOOLEAN_ATTRIBUTE_EDEFAULT); + return; + case PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTES: + getBooleanAttributes().clear(); + return; + case PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTE: + setEnumAttribute(TestElementImpl.ENUM_ATTRIBUTE_EDEFAULT); + return; + case PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTES: + getEnumAttributes().clear(); + return; + case PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCE: + setContainmentReference((TestElement) null); + return; + case PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCES: + getContainmentReferences().clear(); + return; + case PropertiestestsPackage.TEST_ELEMENT__REFERENCE: + setReference((TestElement) null); + return; + case PropertiestestsPackage.TEST_ELEMENT__REFERENCES: + getReferences().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTE: + return TestElementImpl.STRING_ATTRIBUTE_EDEFAULT == null ? stringAttribute != null : !TestElementImpl.STRING_ATTRIBUTE_EDEFAULT.equals(stringAttribute); + case PropertiestestsPackage.TEST_ELEMENT__STRING_ATTRIBUTES: + return stringAttributes != null && !stringAttributes.isEmpty(); + case PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTE: + return intAttribute != TestElementImpl.INT_ATTRIBUTE_EDEFAULT; + case PropertiestestsPackage.TEST_ELEMENT__INT_ATTRIBUTES: + return intAttributes != null && !intAttributes.isEmpty(); + case PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTE: + return booleanAttribute != TestElementImpl.BOOLEAN_ATTRIBUTE_EDEFAULT; + case PropertiestestsPackage.TEST_ELEMENT__BOOLEAN_ATTRIBUTES: + return booleanAttributes != null && !booleanAttributes.isEmpty(); + case PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTE: + return enumAttribute != TestElementImpl.ENUM_ATTRIBUTE_EDEFAULT; + case PropertiestestsPackage.TEST_ELEMENT__ENUM_ATTRIBUTES: + return enumAttributes != null && !enumAttributes.isEmpty(); + case PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCE: + return containmentReference != null; + case PropertiestestsPackage.TEST_ELEMENT__CONTAINMENT_REFERENCES: + return containmentReferences != null && !containmentReferences.isEmpty(); + case PropertiestestsPackage.TEST_ELEMENT__REFERENCE: + return reference != null; + case PropertiestestsPackage.TEST_ELEMENT__REFERENCES: + return references != null && !references.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (stringAttribute: "); + result.append(stringAttribute); + result.append(", stringAttributes: "); + result.append(stringAttributes); + result.append(", intAttribute: "); + result.append(intAttribute); + result.append(", intAttributes: "); + result.append(intAttributes); + result.append(", booleanAttribute: "); + result.append(booleanAttribute); + result.append(", booleanAttributes: "); + result.append(booleanAttributes); + result.append(", enumAttribute: "); + result.append(enumAttribute); + result.append(", enumAttributes: "); + result.append(enumAttributes); + result.append(')'); + return result.toString(); + } + +} // TestElementImpl diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/impl/TestRootImpl.java b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/impl/TestRootImpl.java new file mode 100644 index 0000000000..973be82a2b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/impl/TestRootImpl.java @@ -0,0 +1,154 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' + * <em><b>Test Root</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li> + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.impl.TestRootImpl#getElements + * <em>Elements</em>}</li> + * </ul> + * + * @generated + */ +public class TestRootImpl extends MinimalEObjectImpl.Container implements TestRoot { + /** + * The cached value of the '{@link #getElements() <em>Elements</em>}' + * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getElements() + * @generated + * @ordered + */ + protected EList<TestElement> elements; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TestRootImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiestestsPackage.Literals.TEST_ROOT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<TestElement> getElements() { + if (elements == null) { + elements = new EObjectContainmentEList<TestElement>(TestElement.class, this, PropertiestestsPackage.TEST_ROOT__ELEMENTS); + } + return elements; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertiestestsPackage.TEST_ROOT__ELEMENTS: + return ((InternalEList<?>) getElements()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiestestsPackage.TEST_ROOT__ELEMENTS: + return getElements(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiestestsPackage.TEST_ROOT__ELEMENTS: + getElements().clear(); + getElements().addAll((Collection<? extends TestElement>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiestestsPackage.TEST_ROOT__ELEMENTS: + getElements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiestestsPackage.TEST_ROOT__ELEMENTS: + return elements != null && !elements.isEmpty(); + } + return super.eIsSet(featureID); + } + +} // TestRootImpl diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/util/PropertiestestsAdapterFactory.java b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/util/PropertiestestsAdapterFactory.java new file mode 100644 index 0000000000..0b28c0a95e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/util/PropertiestestsAdapterFactory.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot; + +/** + * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides + * an adapter <code>createXXX</code> method for each class of the model. <!-- + * end-user-doc --> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage + * @generated + */ +public class PropertiestestsAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected static PropertiestestsPackage modelPackage; + + /** + * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public PropertiestestsAdapterFactory() { + if (PropertiestestsAdapterFactory.modelPackage == null) { + PropertiestestsAdapterFactory.modelPackage = PropertiestestsPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> This implementation returns <code>true</code> if + * the object is either the model's package or is an instance object of the + * model. <!-- end-user-doc --> + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == PropertiestestsAdapterFactory.modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject) object).eClass().getEPackage() == PropertiestestsAdapterFactory.modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected PropertiestestsSwitch<Adapter> modelSwitch = new PropertiestestsSwitch<Adapter>() { + @Override + public Adapter caseTestRoot(TestRoot object) { + return createTestRootAdapter(); + } + + @Override + public Adapter caseTestElement(TestElement object) { + return createTestElementAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param target + * the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject) target); + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot + * <em>Test Root</em>}'. <!-- begin-user-doc --> This default implementation + * returns null so that we can easily ignore cases; it's useful to ignore a + * case when inheritance will catch all the cases anyway. <!-- end-user-doc + * --> + * + * @return the new adapter. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot + * @generated + */ + public Adapter createTestRootAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement + * <em>Test Element</em>}'. <!-- begin-user-doc --> This default + * implementation returns null so that we can easily ignore cases; it's + * useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement + * @generated + */ + public Adapter createTestElementAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. <!-- begin-user-doc --> This + * default implementation returns null. <!-- end-user-doc --> + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} // PropertiestestsAdapterFactory diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/util/PropertiestestsSwitch.java b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/util/PropertiestestsSwitch.java new file mode 100644 index 0000000000..64e9066db5 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties/src-gen/org/eclipse/sirius/tests/rcptt/properties/propertiestests/util/PropertiestestsSwitch.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2015 Obeo. + * 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.htm + */ +package org.eclipse.sirius.tests.rcptt.properties.propertiestests.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestElement; +import org.eclipse.sirius.tests.rcptt.properties.propertiestests.TestRoot; + +/** + * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance + * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> method for each class of the model, + * starting with the actual class of the object and proceeding up the + * inheritance hierarchy until a non-null result is returned, which is the + * result of the switch. <!-- end-user-doc --> + * + * @see org.eclipse.sirius.tests.rcptt.properties.propertiestests.PropertiestestsPackage + * @generated + */ +public class PropertiestestsSwitch<T> extends Switch<T> { + /** + * The cached model package <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected static PropertiestestsPackage modelPackage; + + /** + * Creates an instance of the switch. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public PropertiestestsSwitch() { + if (PropertiestestsSwitch.modelPackage == null) { + PropertiestestsSwitch.modelPackage = PropertiestestsPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param ePackage + * the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == PropertiestestsSwitch.modelPackage; + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns + * a non null result; it yields that result. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the first non-null result returned by a <code>caseXXX</code> + * call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case PropertiestestsPackage.TEST_ROOT: { + TestRoot testRoot = (TestRoot) theEObject; + T result = caseTestRoot(testRoot); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case PropertiestestsPackage.TEST_ELEMENT: { + TestElement testElement = (TestElement) theEObject; + T result = caseTestElement(testElement); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of ' + * <em>Test Root</em>'. <!-- begin-user-doc --> This implementation returns + * null; returning a non-null result will terminate the switch. <!-- + * end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * <em>Test Root</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTestRoot(TestRoot object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' + * <em>Test Element</em>'. <!-- begin-user-doc --> This implementation + * returns null; returning a non-null result will terminate the switch. <!-- + * end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * <em>Test Element</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTestElement(TestElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' + * <em>EObject</em>'. <!-- begin-user-doc --> This implementation returns + * null; returning a non-null result will terminate the switch, but this is + * the last case anyway. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' + * <em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} // PropertiestestsSwitch diff --git a/plugins/org.eclipse.sirius.tests.rcptt/.project b/plugins/org.eclipse.sirius.tests.rcptt/.project new file mode 100644 index 0000000000..08d4759169 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.rcptt.core.builder.q7Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.rcptt.core.rcpttnature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/SelectTextViewpoint.ctx b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/SelectTextViewpoint.ctx new file mode 100644 index 0000000000..ef0865e484 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/SelectTextViewpoint.ctx @@ -0,0 +1,25 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.ecl +Element-Name: SelectTextViewpoint +Element-Type: context +Element-Version: 2.0 +Id: _7qJyUAidEea7hcZ9Jto1HQ +Runtime-Version: 2.0.2.201511100828 +Save-Time: 4/22/16 5:30 PM + +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998 +Content-Type: text/ecl +Entry-Name: .ecl.context + +with [get-view "Model Explorer" | get-tree] { + select "org.eclipse.sirius.tests.rcptt.properties.instance" | get-menu "Viewpoints Selection" | click +} +with [get-window "Viewpoints Selection"] { + with [get-table] { + get-item PropertiesTestsText | check + select PropertiesTestsText + } + get-button OK | click +} +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/Text widget.test b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/Text widget.test new file mode 100644 index 0000000000..f8676d3ee9 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/Text widget.test @@ -0,0 +1,159 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Contexts: _N-iakAicEea7hcZ9Jto1HQ,_Sc0HQAidEea7hcZ9Jto1HQ,_ISVO4AheEea7hcZ9Jto1HQ,_CxvK8AicEea7hcZ9Jto1HQ,_1dc_gAidEea7hcZ9Jto1HQ,_7qJyUAidEea7hcZ9Jto1HQ,_ZuJ8AAifEea7hcZ9Jto1HQ +Element-Name: Text widget +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _VvraQAhdEea7hcZ9Jto1HQ +Runtime-Version: 2.0.2.201511100828 +Save-Time: 4/22/16 6:02 PM +Testcase-Type: ecl + +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa +Content-Type: text/plain +Entry-Name: .description + +This test aims to check the text widget. + +The test : +* loads the tests projects released with the Sirius test product, +* opens the test diagram, +* selects the text viewpoint, +* select an element in the diagram, +* checks the properties view : + - checks the label and the value of a default text widget, + - checks the label and the value of a text widget defining a style, + - checks the label and the value of a text widget defining a conditional style. +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +// Check default text label +with [get-view Properties | get-section Group | get-editbox] { + get-property className | equals "org.eclipse.swt.custom.StyledText" | verify-true + get-property enablement | equals true | verify-true + get-property readOnly | equals false | verify-true + get-property text | equals Text | verify-true + get-property backgroundColor | equals "#FCFCFC" | verify-true + get-property foregroundColor | equals "#212121" | verify-true +} + +// Check default text value +with [get-view Properties | get-section Group | get-editbox -index 1] { + get-property className | equals "org.eclipse.swt.custom.StyledText" | verify-true + get-property enablement | equals true | verify-true + get-property readOnly | equals false | verify-true + get-property text | equals Element1 | verify-true + get-property backgroundColor | equals "#FCFCFC" | verify-true + get-property foregroundColor | equals "#212121" | verify-true + get-property "getBounds().height" | equals 17 | verify-true +} + +// Check styled text label +with [get-view Properties | get-section Group | get-editbox -index 2] { + get-property className | equals "org.eclipse.swt.custom.StyledText" | verify-true + get-property enablement | equals true | verify-true + get-property readOnly | equals false | verify-true + get-property text | equals "Style Text" | verify-true + get-property backgroundColor | equals "#454545" | verify-true + get-property foregroundColor | equals "#729FCF" | verify-true +} + +// Check style text value +with [get-view Properties | get-section Group | get-editbox -index 3] { + get-property className | equals "org.eclipse.swt.custom.StyledText" | verify-true + get-property enablement | equals true | verify-true + get-property containMenu | equals false | verify-true + get-property text | equals Element1 | verify-true + get-property backgroundColor | equals "#729FCF" | verify-true + get-property foregroundColor | equals "#454545" | verify-true +} + +// Check conditional style text label +with [get-view Properties | get-section Group | get-editbox -index 4] { + get-property className | equals "org.eclipse.swt.custom.StyledText" | verify-true + get-property enablement | equals true | verify-true + get-property readOnly | equals false | verify-true + get-property text | equals "Conditional Style Text" | verify-true + get-property backgroundColor | equals "#454545" | verify-true + get-property foregroundColor | equals "#4D8914" | verify-true +} + +// Check conditional style text value +with [get-view Properties | get-section Group | get-editbox -index 5] { + get-property className | equals "org.eclipse.swt.custom.StyledText" | verify-true + get-property enablement | equals true | verify-true + get-property readOnly | equals false | verify-true + get-property text | equals Element1 | verify-true + get-property backgroundColor | equals "#4D8914" | verify-true + get-property foregroundColor | equals "#454545" | verify-true +} + +// Check default text area label +with [get-view Properties | get-section Group | get-editbox -index 6] { + get-property className | equals "org.eclipse.swt.custom.StyledText" | verify-true + get-property enablement | equals true | verify-true + get-property readOnly | equals false | verify-true + get-property text | equals "Text area" | verify-true + get-property backgroundColor | equals "#FCFCFC" | verify-true + get-property foregroundColor | equals "#212121" | verify-true +} + +// Check default text area value +with [get-view Properties | get-section Group | get-editbox -index 7] { + get-property className | equals "org.eclipse.swt.custom.StyledText" | verify-true + get-property enablement | equals true | verify-true + get-property readOnly | equals false | verify-true + get-property text | equals Element1 | verify-true + get-property backgroundColor | equals "#FCFCFC" | verify-true + get-property foregroundColor | equals "#212121" | verify-true + get-property "getVerticalBar().isVisible()" | equals true | verify-true + get-property "getBounds().height" | equals 85 | verify-true +} + +// Check style text area label +with [get-view Properties | get-section Group | get-editbox -index 8] { + get-property className | equals "org.eclipse.swt.custom.StyledText" | verify-true + get-property enablement | equals true | verify-true + get-property readOnly | equals false | verify-true + get-property text | equals "Style Text area" | verify-true + get-property backgroundColor | equals "#454545" | verify-true + get-property foregroundColor | equals "#729FCF" | verify-true +} + +// Check style text area value +with [get-view Properties | get-section Group | get-editbox -index 9] { + get-property className | equals "org.eclipse.swt.custom.StyledText" | verify-true + get-property enablement | equals true | verify-true + get-property readOnly | equals false | verify-true + get-property text | equals Element1 | verify-true + get-property backgroundColor | equals "#729FCF" | verify-true + get-property foregroundColor | equals "#454545" | verify-true + get-property "getVerticalBar().isVisible()" | equals true | verify-true + get-property "getBounds().height" | equals 85 | verify-true +} + +// Check conditional style text area label +with [get-view Properties | get-section Group | get-editbox -index 10] { + get-property className | equals "org.eclipse.swt.custom.StyledText" | verify-true + get-property enablement | equals true | verify-true + get-property readOnly | equals false | verify-true + get-property text | equals "Conditional Style Text area" | verify-true + get-property backgroundColor | equals "#454545" | verify-true + get-property foregroundColor | equals "#4D8914" | verify-true +} + +// Check conditional style text area value +with [get-view Properties | get-section Group | get-editbox -index 11] { + get-property className | equals "org.eclipse.swt.custom.StyledText" | verify-true + get-property enablement | equals true | verify-true + get-property readOnly | equals false | verify-true + get-property text | equals Element1 | verify-true + get-property backgroundColor | equals "#4D8914" | verify-true + get-property foregroundColor | equals "#454545" | verify-true + get-property "getVerticalBar().isVisible()" | equals true | verify-true + get-property "getBounds().height" | equals 85 | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/context/CreatePropertiesTestsModel.ctx b/plugins/org.eclipse.sirius.tests.rcptt/context/CreatePropertiesTestsModel.ctx new file mode 100644 index 0000000000..56a3618533 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/context/CreatePropertiesTestsModel.ctx @@ -0,0 +1,84 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.ecl +Element-Name: CreatePropertiesTestsModel +Element-Type: context +Element-Version: 2.0 +Id: _cuIksAheEea7hcZ9Jto1HQ +Runtime-Version: 2.0.2.201511100828 +Save-Time: 4/22/16 9:56 AM + +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998 +Content-Type: text/ecl +Entry-Name: .ecl.context + +get-menu "File/New/Project..." | click +with [get-window "New Project"] { + get-tree | select "Eclipse Modeling Framework/Empty EMF Project" + get-button "Next >" | click +} +with [get-window "New Empty EMF Project"] { + get-editbox -after [get-label "Project name:"] | set-text "org.eclipse.sirius.tests.rcptt.properties.model" + get-button Finish | click +} +get-view "Project Explorer" | get-tree | select "org.eclipse.sirius.tests.rcptt.properties.model/model" + | get-menu "New/Other..." | click +with [get-window New] { + get-tree | select "Eclipse Modeling Framework/Ecore Model" + get-button "Next >" | click + get-editbox -after [get-label "File name:"] | set-text "PropertiesTests.ecore" + get-button Finish | click +} +with [get-editor "PropertiesTests.ecore" | get-tree] { + get-item "platform:\\/resource\\/org.eclipse.sirius.tests.rcptt.properties.model\\/model\\/PropertiesTests.ecore/" + | click + select "platform:\\/resource\\/org.eclipse.sirius.tests.rcptt.properties.model\\/model\\/PropertiesTests.ecore/" + | get-menu "Show Properties View" | click + get-item "platform:\\/resource\\/org.eclipse.sirius.tests.rcptt.properties.model\\/model\\/PropertiesTests.ecore/" + | click +} +with [get-view Properties | get-tree] { + get-item Name | click + select Name | activate-cell-edit -column 1 + get-cell 0 1 | mouse up -count 1 + with [get-editbox] { + set-text propertiestests + key-type "TRAVERSE_TAB_NEXT" + } + apply-cell-edit + select "Ns Prefix" | activate-cell-edit -column 1 + get-editbox | set-text "http://www.obeo.fr/propertiestests" + select "Ns URI" | apply-cell-edit + select "Ns URI" | activate-cell-edit -column 1 + activate-cell-edit -column 1 + apply-cell-edit -deactivate + select "Ns Prefix" | activate-cell-edit -column 1 + with [get-editbox] { + key-type "M1+x" + set-text "" + } + select "Ns URI" | apply-cell-edit + select "Ns URI" | activate-cell-edit -column 1 + deactivate-cell-edit + select "Ns URI" | activate-cell-edit -column 1 + get-editbox | key-type "M1+v" + select "Ns Prefix" | apply-cell-edit + select "Ns Prefix" | activate-cell-edit -column 1 + deactivate-cell-edit + select "Ns Prefix" | activate-cell-edit -column 1 + get-editbox | set-text propertiestests +} +get-button "Save (M1+S)" | click +get-view Properties | get-tree | apply-cell-edit +get-editor "PropertiesTests.ecore" | get-tree + | select "platform:\\/resource\\/org.eclipse.sirius.tests.rcptt.properties.model\\/model\\/PropertiesTests.ecore/propertiestests" + | get-menu "New Child/EClass" | click +with [get-view Properties | get-tree] { + get-item Name | click + select Name | activate-cell-edit -column 1 + get-cell 5 1 | mouse up -count 1 + get-editbox | set-text Root +} +get-button "Save (M1+S)" | click +get-view Properties | get-tree | apply-cell-edit +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/context/EmptyWorkspace.ctx b/plugins/org.eclipse.sirius.tests.rcptt/context/EmptyWorkspace.ctx new file mode 100644 index 0000000000..5276aa471c --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/context/EmptyWorkspace.ctx @@ -0,0 +1,21 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.workspace +Element-Name: EmptyWorkspace +Element-Type: context +Element-Version: 2.0 +Id: _ISVO4AheEea7hcZ9Jto1HQ +Runtime-Version: 2.0.2.201511100828 +Save-Time: 4/22/16 9:45 AM + +------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf +Content-Type: q7/binary +Entry-Name: .q7.content + +UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAkALmNvbnRlbnRVVAUAAQAAAACVj00LgkAYhO/+imXv +7VYElfhBhJBBRAQZXULWTZfcD/Qt7d+3Btoxug3DMzOMF7ayRE9e1UIrH0/IGCOumM6Eyn38gNtogcPA +8XSVE85KYWpOKmYACIOWNLq61yZl3E16tdYKeAuolcIdaqddrR1StWt9HxcAxqW0aRqiZU5sOT3v4h75 +sTXEe6aLfzhqOTpwGKlUWjqSBl7J1xWZj6/x8bSfrQoe8XResMtyC3qyOeDAQchj3QUF1N6m//4OnDdQ +SwcIVgN9asAAAABSAQAAUEsBAhQAFAAICAgAAAAhAFYDfWrAAAAAUgEAAAgACQAAAAAAAAAAAAAAAAAA +AC5jb250ZW50VVQFAAEAAAAAUEsFBgAAAAABAAEAPwAAAP8AAAAAAA== +------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/context/LoadTestsProjects.ctx b/plugins/org.eclipse.sirius.tests.rcptt/context/LoadTestsProjects.ctx new file mode 100644 index 0000000000..f21d547360 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/context/LoadTestsProjects.ctx @@ -0,0 +1,21 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.ecl +Element-Name: LoadTestsProjects +Element-Type: context +Element-Version: 2.0 +Id: _CxvK8AicEea7hcZ9Jto1HQ +Runtime-Version: 2.0.2.201511100828 +Save-Time: 4/22/16 5:08 PM + +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998 +Content-Type: text/ecl +Entry-Name: .ecl.context + +get-menu "File/New/Example..." | click +with [get-window "New Example"] { + get-tree | select "Sirius Properties Tests Wizard" + get-button "Next >" | click + get-button Finish | click +} +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/context/ModelingPerspective.ctx b/plugins/org.eclipse.sirius.tests.rcptt/context/ModelingPerspective.ctx new file mode 100644 index 0000000000..24b836428c --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/context/ModelingPerspective.ctx @@ -0,0 +1,23 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.workbench +Element-Name: ModelingPerspective +Element-Type: context +Element-Version: 2.0 +Id: _Sc0HQAidEea7hcZ9Jto1HQ +Runtime-Version: 2.0.2.201511100828 +Save-Time: 4/22/16 5:18 PM + +------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf +Content-Type: q7/binary +Entry-Name: .q7.content + +UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAkALmNvbnRlbnRVVAUAAQAAAACVkU1LAzEQhu/9FSF3 +k9aLuuxuERFaodBSUPFS2uy4G0wyS5L98N8729rag4oek3med96QdNpbw1rwQaPL+ESMOQOnsNCuzHgT +Xy+u+TQfpehLAcroOoDwqo5RBAVu6zUmT+jfduRUd+gi9JH1VienxMshkXa4kNB9xqsY60TKrusE2lJQ +rnxezI/Iz2tO5nE8mHtEWizAyCNIPnrgzG0tZHwxzOgtS+pTg4q6pZEuMr5Zq/FsdauLe9heVerl5iHi +ZLbirP4i58SdNwra6yaIRouIaII4Q4X9XMTzEWNpq6EL+W/unjhYAvraUGefyoP3fQKpB2npcWfAPtLh +7wZ1je/rCiCenFT+41fz0QdQSwcIdS4QfQ4BAAArAgAAUEsBAhQAFAAICAgAAAAhAHUuEH0OAQAAKwIA +AAgACQAAAAAAAAAAAAAAAAAAAC5jb250ZW50VVQFAAEAAAAAUEsFBgAAAAABAAEAPwAAAE0BAAAAAA== + +------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/context/OpenDiagram.ctx b/plugins/org.eclipse.sirius.tests.rcptt/context/OpenDiagram.ctx new file mode 100644 index 0000000000..5cafda20b6 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/context/OpenDiagram.ctx @@ -0,0 +1,19 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.ecl +Element-Name: OpenDiagram +Element-Type: context +Element-Version: 2.0 +Id: _1dc_gAidEea7hcZ9Jto1HQ +Runtime-Version: 2.0.2.201511100828 +Save-Time: 4/22/16 5:30 PM + +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998 +Content-Type: text/ecl +Entry-Name: .ecl.context + +with [get-view "Model Explorer" | get-tree] { + select "org.eclipse.sirius.tests.rcptt.properties.instance/PropertiesTestsInstance.propertiestests/Test Root/RootDiagram" + | double-click +} +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/context/SelectTestElementInDiagram (1).ctx b/plugins/org.eclipse.sirius.tests.rcptt/context/SelectTestElementInDiagram (1).ctx new file mode 100644 index 0000000000..a281b000ca --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/context/SelectTestElementInDiagram (1).ctx @@ -0,0 +1,24 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.ecl +Element-Name: SelectTestElementInDiagram +Element-Type: context +Element-Version: 2.0 +Id: _ZuJ8AAifEea7hcZ9Jto1HQ +Runtime-Version: 2.0.2.201511100828 +Save-Time: 4/22/16 5:32 PM + +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998 +Content-Type: text/ecl +Entry-Name: .ecl.context + +// Select a TestElement in the diagram +with [get-editor RootDiagram | get-diagram -index 1 | get-edit-part -name RootDiagram] { + mouse-move 79 100 -height 431 -width 922 + with [get-edit-part -name Element1 | get-edit-part -className SquareEditPart] { + mouse-move 42 86 button1 -height 100 -width 100 + mouse-press 42 86 button1 -height 100 -width 100 + mouse-release 42 86 button1 524288 -height 100 -width 100 + } +} +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/context/WorkbenchScreenSize.ctx b/plugins/org.eclipse.sirius.tests.rcptt/context/WorkbenchScreenSize.ctx new file mode 100644 index 0000000000..5f27466888 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/context/WorkbenchScreenSize.ctx @@ -0,0 +1,16 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.ecl +Element-Name: WorkbenchScreenSize +Element-Type: context +Element-Version: 2.0 +Id: _N-iakAicEea7hcZ9Jto1HQ +Runtime-Version: 2.0.2.201511100828 +Save-Time: 4/22/16 5:09 PM + +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998 +Content-Type: text/ecl +Entry-Name: .ecl.context + +get-eclipse-window | get-object | invoke setSize 1440 900 +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/rcptt.properties b/plugins/org.eclipse.sirius.tests.rcptt/rcptt.properties new file mode 100644 index 0000000000..de9a5dc986 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/rcptt.properties @@ -0,0 +1,9 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Element-Name: Project Settings +Element-Type: projectMetadata +Element-Version: 2.0 +Id: _CmPEMAhdEea7hcZ9Jto1HQ +Runtime-Version: 2.0.2.201511100828 +Save-Time: 4/22/16 9:37 AM + diff --git a/plugins/org.eclipse.sirius.tests.rcptt/suite/Properties.suite b/plugins/org.eclipse.sirius.tests.rcptt/suite/Properties.suite new file mode 100644 index 0000000000..912ee7943d --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/suite/Properties.suite @@ -0,0 +1,22 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Element-Name: Properties +Element-Type: testsuite +Element-Version: 2.0 +Id: _F64EwAhdEea7hcZ9Jto1HQ +Runtime-Version: 2.0.2.201511100828 +Save-Time: 4/22/16 5:57 PM + +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa +Content-Type: text/plain +Entry-Name: .description + +Test suite for ell the properties view related tests +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- +------=_testcase-items-62c497da-4241-31f4-811a-6b453a3ecff8 +Content-Type: text/testcase +Entry-Name: testcase-items + +_VvraQAhdEea7hcZ9Jto1HQ // kind: 'test' name: 'Text widgets' path: '../case/properties/widgets/text/Text widgets.test' + +------=_testcase-items-62c497da-4241-31f4-811a-6b453a3ecff8-- |