/*******************************************************************************
 * Copyright (c) 2016, 2017 Artal Technologies and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Aurelien Didier (Artal Technologies) - initial API and implementation
 *******************************************************************************/
/**
 * Generated with Acceleo
 */
package org.polarsys.time4sys.ui.views.srm.parts.forms;

// Start of user code for imports
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
import org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext;
import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
import org.eclipse.emf.eef.runtime.part.impl.SectionPropertiesEditingPart;
import org.eclipse.emf.eef.runtime.policies.PropertiesEditingPolicy;
import org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider;
import org.eclipse.emf.eef.runtime.ui.parts.PartComposer;
import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence;
import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence;
import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep;
import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
import org.eclipse.emf.eef.runtime.ui.widgets.EEFFeatureEditorDialog;
import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
import org.eclipse.emf.eef.runtime.ui.widgets.TabElementTreeSelectionDialog;
import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.widgets.Form;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.views.properties.tabbed.ISection;
import org.polarsys.time4sys.marte.srm.SrmPackage;
import org.polarsys.time4sys.ui.views.srm.parts.OtherPropertiesEditionPart;
import org.polarsys.time4sys.ui.views.srm.parts.SrmViewsRepository;
import org.polarsys.time4sys.ui.views.srm.providers.SrmMessages;

// End of user code

/**
 * 
 * 
 */
public class OtherPropertiesEditionPartForm extends SectionPropertiesEditingPart
		implements IFormPropertiesEditionPart, OtherPropertiesEditionPart {

	protected Text packetSize;
	protected Button isMaskable;
	protected Button isStaticSchedulingFeature;
	protected Button isIntraMemoryPartitionInteraction;
	protected Text memoryBlockAddressElements;
	protected Button editMemoryBlockAddressElements;
	private EList memoryBlockAddressElementsList;
	protected Text stackSizeElements;
	protected Button editStackSizeElements;
	private EList stackSizeElementsList;
	protected Text heapSizeElements;
	protected Button editHeapSizeElements;
	private EList heapSizeElementsList;
	protected Text maskElements;
	protected Button editMaskElements;
	private EList maskElementsList;
	protected Text vectorElements;
	protected Button editVectorElements;
	private EList vectorElementsList;
	protected Text memoryBlockSizeElements;
	protected Button editMemoryBlockSizeElements;
	private EList memoryBlockSizeElementsList;
	protected ReferencesTable ownedService;
	protected List<ViewerFilter> ownedServiceBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> ownedServiceFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable pInterface;
	protected List<ViewerFilter> pInterfaceBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> pInterfaceFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable rInterface;
	protected List<ViewerFilter> rInterfaceBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> rInterfaceFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable pServices;
	protected List<ViewerFilter> pServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> pServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable rServices;
	protected List<ViewerFilter> rServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> rServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable createServices;
	protected List<ViewerFilter> createServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> createServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable deleteServices;
	protected List<ViewerFilter> deleteServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> deleteServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable initializeServices;
	protected List<ViewerFilter> initializeServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> initializeServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable activateServices;
	protected List<ViewerFilter> activateServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> activateServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable resumeServices;
	protected List<ViewerFilter> resumeServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> resumeServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable suspendServices;
	protected List<ViewerFilter> suspendServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> suspendServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable enableConcurrencyServices;
	protected List<ViewerFilter> enableConcurrencyServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> enableConcurrencyServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable disableConcurrencyServices;
	protected List<ViewerFilter> disableConcurrencyServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> disableConcurrencyServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable forkServices;
	protected List<ViewerFilter> forkServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> forkServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable exitServices;
	protected List<ViewerFilter> exitServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> exitServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable memorySpaces;
	protected List<ViewerFilter> memorySpacesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> memorySpacesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable closeServices;
	protected List<ViewerFilter> closeServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> closeServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable openServices;
	protected List<ViewerFilter> openServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> openServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable acquireServices;
	protected List<ViewerFilter> acquireServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> acquireServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable releaseServices;
	protected List<ViewerFilter> releaseServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> releaseServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable controlServices;
	protected List<ViewerFilter> controlServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> controlServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable sendServices;
	protected List<ViewerFilter> sendServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> sendServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable receiveServices;
	protected List<ViewerFilter> receiveServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> receiveServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable readServices;
	protected List<ViewerFilter> readServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> readServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable writeServices;
	protected List<ViewerFilter> writeServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> writeServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable flushServices;
	protected List<ViewerFilter> flushServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> flushServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable signalServices;
	protected List<ViewerFilter> signalServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> signalServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable waitServices;
	protected List<ViewerFilter> waitServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> waitServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable clearServices;
	protected List<ViewerFilter> clearServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> clearServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable lockServices;
	protected List<ViewerFilter> lockServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> lockServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable unlockServices;
	protected List<ViewerFilter> unlockServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> unlockServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable joinServices;
	protected List<ViewerFilter> joinServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> joinServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable yieldServices;
	protected List<ViewerFilter> yieldServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> yieldServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable delayServices;
	protected List<ViewerFilter> delayServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> delayServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable mapServices;
	protected List<ViewerFilter> mapServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> mapServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable unmapServices;
	protected List<ViewerFilter> unmapServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> unmapServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable terminateServices;
	protected List<ViewerFilter> terminateServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> terminateServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable routineConnectServices;
	protected List<ViewerFilter> routineConnectServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> routineConnectServicesFilters = new ArrayList<ViewerFilter>();
	protected ReferencesTable routineDisconnectServices;
	protected List<ViewerFilter> routineDisconnectServicesBusinessFilters = new ArrayList<ViewerFilter>();
	protected List<ViewerFilter> routineDisconnectServicesFilters = new ArrayList<ViewerFilter>();

	/**
	 * For {@link ISection} use only.
	 */
	public OtherPropertiesEditionPartForm() {
		super();
	}

	/**
	 * Default constructor
	 * 
	 * @param editionComponent
	 *            the {@link IPropertiesEditionComponent} that manage this part
	 * 
	 */
	public OtherPropertiesEditionPartForm(IPropertiesEditionComponent editionComponent) {
		super(editionComponent);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
	 *      createFigure(org.eclipse.swt.widgets.Composite,
	 *      org.eclipse.ui.forms.widgets.FormToolkit)
	 * 
	 */
	public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
		ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
		Form form = scrolledForm.getForm();
		view = form.getBody();
		GridLayout layout = new GridLayout();
		layout.numColumns = 3;
		view.setLayout(layout);
		createControls(widgetFactory, view);
		return scrolledForm;
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
	 *      createControls(org.eclipse.ui.forms.widgets.FormToolkit,
	 *      org.eclipse.swt.widgets.Composite)
	 * 
	 */
	public void createControls(final FormToolkit widgetFactory, Composite view) {
		CompositionSequence otherStep = new BindingCompositionSequence(propertiesEditionComponent);
		CompositionStep propertiesStep = otherStep.addStep(SrmViewsRepository.Other.Properties.class);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.packetSize);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.isMaskable);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.isStaticSchedulingFeature);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.isIntraMemoryPartitionInteraction);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.memoryBlockAddressElements);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.stackSizeElements);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.heapSizeElements);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.maskElements);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.vectorElements);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.memoryBlockSizeElements);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.ownedService);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.pInterface);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.rInterface);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.pServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.rServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.createServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.deleteServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.initializeServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.activateServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.resumeServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.suspendServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.enableConcurrencyServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.disableConcurrencyServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.forkServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.exitServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.memorySpaces);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.closeServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.openServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.acquireServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.releaseServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.controlServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.sendServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.receiveServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.readServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.writeServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.flushServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.signalServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.waitServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.clearServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.lockServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.unlockServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.joinServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.yieldServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.delayServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.mapServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.unmapServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.terminateServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.routineConnectServices);
		propertiesStep.addStep(SrmViewsRepository.Other.Properties.routineDisconnectServices);

		composer = new PartComposer(otherStep) {

			@Override
			public Composite addToPart(Composite parent, Object key) {
				if (key == SrmViewsRepository.Other.Properties.class) {
					return createPropertiesGroup(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.packetSize) {
					return createPacketSizeText(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.isMaskable) {
					return createIsMaskableCheckbox(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.isStaticSchedulingFeature) {
					return createIsStaticSchedulingFeatureCheckbox(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.isIntraMemoryPartitionInteraction) {
					return createIsIntraMemoryPartitionInteractionCheckbox(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.memoryBlockAddressElements) {
					return createMemoryBlockAddressElementsMultiValuedEditor(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.stackSizeElements) {
					return createStackSizeElementsMultiValuedEditor(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.heapSizeElements) {
					return createHeapSizeElementsMultiValuedEditor(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.maskElements) {
					return createMaskElementsMultiValuedEditor(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.vectorElements) {
					return createVectorElementsMultiValuedEditor(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.memoryBlockSizeElements) {
					return createMemoryBlockSizeElementsMultiValuedEditor(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.ownedService) {
					return createOwnedServiceTableComposition(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.pInterface) {
					return createPInterfaceReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.rInterface) {
					return createRInterfaceReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.pServices) {
					return createPServicesTableComposition(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.rServices) {
					return createRServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.createServices) {
					return createCreateServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.deleteServices) {
					return createDeleteServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.initializeServices) {
					return createInitializeServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.activateServices) {
					return createActivateServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.resumeServices) {
					return createResumeServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.suspendServices) {
					return createSuspendServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.enableConcurrencyServices) {
					return createEnableConcurrencyServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.disableConcurrencyServices) {
					return createDisableConcurrencyServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.forkServices) {
					return createForkServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.exitServices) {
					return createExitServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.memorySpaces) {
					return createMemorySpacesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.closeServices) {
					return createCloseServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.openServices) {
					return createOpenServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.acquireServices) {
					return createAcquireServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.releaseServices) {
					return createReleaseServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.controlServices) {
					return createControlServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.sendServices) {
					return createSendServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.receiveServices) {
					return createReceiveServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.readServices) {
					return createReadServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.writeServices) {
					return createWriteServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.flushServices) {
					return createFlushServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.signalServices) {
					return createSignalServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.waitServices) {
					return createWaitServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.clearServices) {
					return createClearServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.lockServices) {
					return createLockServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.unlockServices) {
					return createUnlockServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.joinServices) {
					return createJoinServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.yieldServices) {
					return createYieldServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.delayServices) {
					return createDelayServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.mapServices) {
					return createMapServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.unmapServices) {
					return createUnmapServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.terminateServices) {
					return createTerminateServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.routineConnectServices) {
					return createRoutineConnectServicesReferencesTable(widgetFactory, parent);
				}
				if (key == SrmViewsRepository.Other.Properties.routineDisconnectServices) {
					return createRoutineDisconnectServicesReferencesTable(widgetFactory, parent);
				}
				return parent;
			}
		};
		composer.compose(view);
	}

	/**
	 * 
	 */
	protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
		Section propertiesSection = widgetFactory.createSection(parent,
				Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
		propertiesSection.setText(SrmMessages.OtherPropertiesEditionPart_PropertiesGroupLabel);
		GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
		propertiesSectionData.horizontalSpan = 3;
		propertiesSection.setLayoutData(propertiesSectionData);
		Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
		GridLayout propertiesGroupLayout = new GridLayout();
		propertiesGroupLayout.numColumns = 3;
		propertiesGroup.setLayout(propertiesGroupLayout);
		propertiesSection.setClient(propertiesGroup);
		return propertiesGroup;
	}

	protected Composite createPacketSizeText(FormToolkit widgetFactory, Composite parent) {
		createDescription(parent, SrmViewsRepository.Other.Properties.packetSize,
				SrmMessages.OtherPropertiesEditionPart_PacketSizeLabel);
		packetSize = widgetFactory.createText(parent, ""); //$NON-NLS-1$
		packetSize.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
		widgetFactory.paintBordersFor(parent);
		GridData packetSizeData = new GridData(GridData.FILL_HORIZONTAL);
		packetSize.setLayoutData(packetSizeData);
		packetSize.addFocusListener(new FocusAdapter() {
			/**
			 * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
			 * 
			 */