diff options
Diffstat (limited to 'deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/FinalStatePropertiesEditionPartImpl.java')
1 files changed, 0 insertions, 2306 deletions
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/FinalStatePropertiesEditionPartImpl.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/FinalStatePropertiesEditionPartImpl.java deleted file mode 100644 index 159d2ef940e..00000000000 --- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/FinalStatePropertiesEditionPartImpl.java +++ /dev/null @@ -1,2306 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 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.papyrus.tabbedproperties.uml.parts.impl; - -// Start of user code for imports - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.eclipse.emf.common.util.Enumerator; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EEnumLiteral; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.util.EcoreAdapterFactory; -import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; -import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent; -import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart; -import org.eclipse.emf.eef.runtime.api.policies.IPropertiesEditionPolicy; -import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPolicyProvider; -import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent; -import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart; -import org.eclipse.emf.eef.runtime.impl.policies.EObjectPropertiesEditionContext; -import org.eclipse.emf.eef.runtime.impl.services.PropertiesEditionPolicyProviderService; -import org.eclipse.emf.eef.runtime.impl.utils.EMFListEditUtil; -import org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer; -import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable; -import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils; -import org.eclipse.emf.eef.runtime.ui.widgets.TabElementTreeSelectionDialog; -import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener; -import org.eclipse.jface.viewers.ArrayContentProvider; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.viewers.ViewerFilter; -import org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart; -import org.eclipse.papyrus.tabbedproperties.uml.parts.UMLViewsRepository; -import org.eclipse.papyrus.tabbedproperties.uml.providers.UMLMessages; -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.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Text; -import org.eclipse.uml2.uml.Comment; -import org.eclipse.uml2.uml.ConnectionPointReference; -import org.eclipse.uml2.uml.Constraint; -import org.eclipse.uml2.uml.Dependency; -import org.eclipse.uml2.uml.ElementImport; -import org.eclipse.uml2.uml.PackageImport; -import org.eclipse.uml2.uml.Pseudostate; -import org.eclipse.uml2.uml.Region; -import org.eclipse.uml2.uml.Trigger; -import org.eclipse.uml2.uml.UMLFactory; -import org.eclipse.uml2.uml.UMLPackage; - -// End of user code - -/** - * @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a> - */ -public class FinalStatePropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, FinalStatePropertiesEditionPart { - - protected EMFListEditUtil ownedCommentEditUtil; - - protected ReferencesTable<? extends EObject> ownedComment; - - protected List<ViewerFilter> ownedCommentBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> ownedCommentFilters = new ArrayList<ViewerFilter>(); - - protected Text name; - - protected EMFComboViewer visibility; - - protected EMFListEditUtil clientDependencyEditUtil; - - protected ReferencesTable<? extends EObject> clientDependency; - - protected List<ViewerFilter> clientDependencyBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> clientDependencyFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil elementImportEditUtil; - - protected ReferencesTable<? extends EObject> elementImport; - - protected List<ViewerFilter> elementImportBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> elementImportFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil packageImportEditUtil; - - protected ReferencesTable<? extends EObject> packageImport; - - protected List<ViewerFilter> packageImportBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> packageImportFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil ownedRuleEditUtil; - - protected ReferencesTable<? extends EObject> ownedRule; - - protected List<ViewerFilter> ownedRuleBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> ownedRuleFilters = new ArrayList<ViewerFilter>(); - - protected Button isLeaf; - - protected EMFListEditUtil connectionEditUtil; - - protected ReferencesTable<? extends EObject> connection; - - protected List<ViewerFilter> connectionBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> connectionFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil connectionPointEditUtil; - - protected ReferencesTable<? extends EObject> connectionPoint; - - protected List<ViewerFilter> connectionPointBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> connectionPointFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil deferrableTriggerEditUtil; - - protected ReferencesTable<? extends EObject> deferrableTrigger; - - protected List<ViewerFilter> deferrableTriggerBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> deferrableTriggerFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil regionEditUtil; - - protected ReferencesTable<? extends EObject> region; - - protected List<ViewerFilter> regionBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> regionFilters = new ArrayList<ViewerFilter>(); - - - - - - /** - * Default constructor - * - * @param editionComponent - * the {@link IPropertiesEditionComponent} that manage this part - */ - public FinalStatePropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) { - super(editionComponent); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart# createFigure(org.eclipse.swt.widgets.Composite) - */ - public Composite createFigure(final Composite parent) { - view = new Composite(parent, SWT.NONE); - GridLayout layout = new GridLayout(); - layout.numColumns = 3; - view.setLayout(layout); - - createControls(view); - return view; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart# createControls(org.eclipse.swt.widgets.Composite) - */ - public void createControls(Composite view) { - createPropertiesGroup(view); - - // Start of user code for additional ui definition - - // End of user code - - } - - protected void createPropertiesGroup(Composite parent) { - Group propertiesGroup = new Group(parent, SWT.NONE); - propertiesGroup.setText(UMLMessages.FinalStatePropertiesEditionPart_PropertiesGroupLabel); - GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL); - propertiesGroupData.horizontalSpan = 3; - propertiesGroup.setLayoutData(propertiesGroupData); - GridLayout propertiesGroupLayout = new GridLayout(); - propertiesGroupLayout.numColumns = 3; - propertiesGroup.setLayout(propertiesGroupLayout); - createOwnedCommentAdvancedTableComposition(propertiesGroup); - createNameText(propertiesGroup); - createVisibilityEMFComboViewer(propertiesGroup); - createClientDependencyAdvancedReferencesTable(propertiesGroup); - createElementImportAdvancedTableComposition(propertiesGroup); - createPackageImportAdvancedTableComposition(propertiesGroup); - createOwnedRuleAdvancedTableComposition(propertiesGroup); - createIsLeafCheckbox(propertiesGroup); - createConnectionAdvancedTableComposition(propertiesGroup); - createConnectionPointAdvancedTableComposition(propertiesGroup); - createDeferrableTriggerAdvancedTableComposition(propertiesGroup); - createRegionAdvancedTableComposition(propertiesGroup); - } - - /** - * @param container - */ - protected void createOwnedCommentAdvancedTableComposition(Composite parent) { - this.ownedComment = new ReferencesTable<Comment>(UMLMessages.FinalStatePropertiesEditionPart_OwnedCommentLabel, new ReferencesTableListener<Comment>() { - - public void handleAdd() { - addToOwnedComment(); - } - - public void handleEdit(Comment element) { - editOwnedComment(element); - } - - public void handleMove(Comment element, int oldIndex, int newIndex) { - moveOwnedComment(element, oldIndex, newIndex); - } - - public void handleRemove(Comment element) { - removeFromOwnedComment(element); - } - - public void navigateTo(Comment element) { - } - }); - this.ownedComment.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.FinalState.ownedComment, UMLViewsRepository.SWT_KIND)); - this.ownedComment.createControls(parent); - GridData ownedCommentData = new GridData(GridData.FILL_HORIZONTAL); - ownedCommentData.horizontalSpan = 3; - this.ownedComment.setLayoutData(ownedCommentData); - } - - /**
- *
- */ - protected void moveOwnedComment(Comment element, int oldIndex, int newIndex) { - EObject editedElement = ownedCommentEditUtil.foundCorrespondingEObject(element); - ownedCommentEditUtil.moveElement(element, oldIndex, newIndex); - ownedComment.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.ownedComment, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToOwnedComment() { - - // Start of user code addToOwnedComment() method body - Comment eObject = UMLFactory.eINSTANCE.createComment(); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(eObject); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(eObject); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(propertiesEditionComponent, - eObject, resourceSet)); - if(propertiesEditionObject != null) { - ownedCommentEditUtil.addElement(propertiesEditionObject); - ownedComment.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.ownedComment, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromOwnedComment(Comment element) { - - // Start of user code removeFromOwnedComment() method body - EObject editedElement = ownedCommentEditUtil.foundCorrespondingEObject(element); - ownedCommentEditUtil.removeElement(element); - ownedComment.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.ownedComment, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editOwnedComment(Comment element) { - - // Start of user code editOwnedComment() method body - EObject editedElement = ownedCommentEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - ownedCommentEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - ownedComment.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.ownedComment, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createNameText(Composite parent) { - SWTUtils.createPartLabel(parent, UMLMessages.FinalStatePropertiesEditionPart_NameLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.FinalState.name, UMLViewsRepository.SWT_KIND)); - name = new Text(parent, SWT.BORDER); - GridData nameData = new GridData(GridData.FILL_HORIZONTAL); - name.setLayoutData(nameData); - name.addModifyListener(new ModifyListener() { - - /* - * (non-Javadoc) - * - * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent) - */ - public void modifyText(ModifyEvent e) { - if(propertiesEditionComponent != null) - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.name, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, name.getText())); - } - - }); - - SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.FinalState.name, UMLViewsRepository.SWT_KIND), null); //$NON-NLS-1$ - } - - protected void createVisibilityEMFComboViewer(Composite parent) { - SWTUtils.createPartLabel(parent, UMLMessages.FinalStatePropertiesEditionPart_VisibilityLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.FinalState.visibility, UMLViewsRepository.SWT_KIND)); - visibility = new EMFComboViewer(parent); - visibility.setContentProvider(new ArrayContentProvider()); - visibility.setLabelProvider(new AdapterFactoryLabelProvider(new EcoreAdapterFactory())); - GridData visibilityData = new GridData(GridData.FILL_HORIZONTAL); - visibility.getCombo().setLayoutData(visibilityData); - SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.FinalState.visibility, UMLViewsRepository.SWT_KIND), null); //$NON-NLS-1$ - } - - protected void createClientDependencyAdvancedReferencesTable(Composite parent) { - this.clientDependency = new ReferencesTable<Dependency>(UMLMessages.FinalStatePropertiesEditionPart_ClientDependencyLabel, new ReferencesTableListener<Dependency>() { - - public void handleAdd() { - TabElementTreeSelectionDialog<Dependency> dialog = new TabElementTreeSelectionDialog<Dependency>(resourceSet, clientDependencyFilters, clientDependencyBusinessFilters, - "Dependency", UMLPackage.eINSTANCE.getDependency(), current.eResource()) { - - public void process(IStructuredSelection selection) { - for(Iterator<?> iter = selection.iterator(); iter.hasNext();) { - EObject elem = (EObject)iter.next(); - if(!clientDependencyEditUtil.getVirtualList().contains(elem)) - clientDependencyEditUtil.addElement(elem); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.clientDependency, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem)); - } - clientDependency.refresh(); - } - - }; - dialog.open(); - } - - public void handleEdit(Dependency element) { - editClientDependency(element); - } - - public void handleMove(Dependency element, int oldIndex, int newIndex) { - moveClientDependency(element, oldIndex, newIndex); - } - - public void handleRemove(Dependency element) { - removeFromClientDependency(element); - } - - public void navigateTo(Dependency element) { - } - }); - this.clientDependency.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.FinalState.clientDependency, UMLViewsRepository.SWT_KIND)); - this.clientDependency.createControls(parent); - GridData clientDependencyData = new GridData(GridData.FILL_HORIZONTAL); - clientDependencyData.horizontalSpan = 3; - this.clientDependency.setLayoutData(clientDependencyData); - this.clientDependency.disableMove(); - } - - /**
- *
- */ - protected void moveClientDependency(Dependency element, int oldIndex, int newIndex) { - EObject editedElement = clientDependencyEditUtil.foundCorrespondingEObject(element); - clientDependencyEditUtil.moveElement(element, oldIndex, newIndex); - clientDependency.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.clientDependency, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void removeFromClientDependency(Dependency element) { - - // Start of user code removeFromClientDependency() method body - EObject editedElement = clientDependencyEditUtil.foundCorrespondingEObject(element); - clientDependencyEditUtil.removeElement(element); - clientDependency.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.clientDependency, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editClientDependency(Dependency element) { - - // Start of user code editClientDependency() method body - EObject editedElement = clientDependencyEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - clientDependencyEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - clientDependency.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.clientDependency, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createElementImportAdvancedTableComposition(Composite parent) { - this.elementImport = new ReferencesTable<ElementImport>(UMLMessages.FinalStatePropertiesEditionPart_ElementImportLabel, new ReferencesTableListener<ElementImport>() { - - public void handleAdd() { - addToElementImport(); - } - - public void handleEdit(ElementImport element) { - editElementImport(element); - } - - public void handleMove(ElementImport element, int oldIndex, int newIndex) { - moveElementImport(element, oldIndex, newIndex); - } - - public void handleRemove(ElementImport element) { - removeFromElementImport(element); - } - - public void navigateTo(ElementImport element) { - } - }); - this.elementImport.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.FinalState.elementImport, UMLViewsRepository.SWT_KIND)); - this.elementImport.createControls(parent); - GridData elementImportData = new GridData(GridData.FILL_HORIZONTAL); - elementImportData.horizontalSpan = 3; - this.elementImport.setLayoutData(elementImportData); - } - - /**
- *
- */ - protected void moveElementImport(ElementImport element, int oldIndex, int newIndex) { - EObject editedElement = elementImportEditUtil.foundCorrespondingEObject(element); - elementImportEditUtil.moveElement(element, oldIndex, newIndex); - elementImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.elementImport, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToElementImport() { - - // Start of user code addToElementImport() method body - ElementImport eObject = UMLFactory.eINSTANCE.createElementImport(); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(eObject); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(eObject); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(propertiesEditionComponent, - eObject, resourceSet)); - if(propertiesEditionObject != null) { - elementImportEditUtil.addElement(propertiesEditionObject); - elementImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.elementImport, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromElementImport(ElementImport element) { - - // Start of user code removeFromElementImport() method body - EObject editedElement = elementImportEditUtil.foundCorrespondingEObject(element); - elementImportEditUtil.removeElement(element); - elementImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.elementImport, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editElementImport(ElementImport element) { - - // Start of user code editElementImport() method body - EObject editedElement = elementImportEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - elementImportEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - elementImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.elementImport, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createPackageImportAdvancedTableComposition(Composite parent) { - this.packageImport = new ReferencesTable<PackageImport>(UMLMessages.FinalStatePropertiesEditionPart_PackageImportLabel, new ReferencesTableListener<PackageImport>() { - - public void handleAdd() { - addToPackageImport(); - } - - public void handleEdit(PackageImport element) { - editPackageImport(element); - } - - public void handleMove(PackageImport element, int oldIndex, int newIndex) { - movePackageImport(element, oldIndex, newIndex); - } - - public void handleRemove(PackageImport element) { - removeFromPackageImport(element); - } - - public void navigateTo(PackageImport element) { - } - }); - this.packageImport.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.FinalState.packageImport, UMLViewsRepository.SWT_KIND)); - this.packageImport.createControls(parent); - GridData packageImportData = new GridData(GridData.FILL_HORIZONTAL); - packageImportData.horizontalSpan = 3; - this.packageImport.setLayoutData(packageImportData); - } - - /**
- *
- */ - protected void movePackageImport(PackageImport element, int oldIndex, int newIndex) { - EObject editedElement = packageImportEditUtil.foundCorrespondingEObject(element); - packageImportEditUtil.moveElement(element, oldIndex, newIndex); - packageImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.packageImport, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToPackageImport() { - - // Start of user code addToPackageImport() method body - PackageImport eObject = UMLFactory.eINSTANCE.createPackageImport(); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(eObject); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(eObject); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(propertiesEditionComponent, - eObject, resourceSet)); - if(propertiesEditionObject != null) { - packageImportEditUtil.addElement(propertiesEditionObject); - packageImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.packageImport, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromPackageImport(PackageImport element) { - - // Start of user code removeFromPackageImport() method body - EObject editedElement = packageImportEditUtil.foundCorrespondingEObject(element); - packageImportEditUtil.removeElement(element); - packageImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.packageImport, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editPackageImport(PackageImport element) { - - // Start of user code editPackageImport() method body - EObject editedElement = packageImportEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - packageImportEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - packageImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.packageImport, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createOwnedRuleAdvancedTableComposition(Composite parent) { - this.ownedRule = new ReferencesTable<Constraint>(UMLMessages.FinalStatePropertiesEditionPart_OwnedRuleLabel, new ReferencesTableListener<Constraint>() { - - public void handleAdd() { - addToOwnedRule(); - } - - public void handleEdit(Constraint element) { - editOwnedRule(element); - } - - public void handleMove(Constraint element, int oldIndex, int newIndex) { - moveOwnedRule(element, oldIndex, newIndex); - } - - public void handleRemove(Constraint element) { - removeFromOwnedRule(element); - } - - public void navigateTo(Constraint element) { - } - }); - this.ownedRule.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.FinalState.ownedRule, UMLViewsRepository.SWT_KIND)); - this.ownedRule.createControls(parent); - GridData ownedRuleData = new GridData(GridData.FILL_HORIZONTAL); - ownedRuleData.horizontalSpan = 3; - this.ownedRule.setLayoutData(ownedRuleData); - } - - /**
- *
- */ - protected void moveOwnedRule(Constraint element, int oldIndex, int newIndex) { - EObject editedElement = ownedRuleEditUtil.foundCorrespondingEObject(element); - ownedRuleEditUtil.moveElement(element, oldIndex, newIndex); - ownedRule.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.ownedRule, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToOwnedRule() { - - // Start of user code addToOwnedRule() method body - Constraint eObject = UMLFactory.eINSTANCE.createConstraint(); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(eObject); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(eObject); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(propertiesEditionComponent, - eObject, resourceSet)); - if(propertiesEditionObject != null) { - ownedRuleEditUtil.addElement(propertiesEditionObject); - ownedRule.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.ownedRule, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromOwnedRule(Constraint element) { - - // Start of user code removeFromOwnedRule() method body - EObject editedElement = ownedRuleEditUtil.foundCorrespondingEObject(element); - ownedRuleEditUtil.removeElement(element); - ownedRule.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.ownedRule, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editOwnedRule(Constraint element) { - - // Start of user code editOwnedRule() method body - EObject editedElement = ownedRuleEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - ownedRuleEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - ownedRule.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.ownedRule, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createIsLeafCheckbox(Composite parent) { - isLeaf = new Button(parent, SWT.CHECK); - isLeaf.setText(UMLMessages.FinalStatePropertiesEditionPart_IsLeafLabel); - GridData isLeafData = new GridData(GridData.FILL_HORIZONTAL); - isLeafData.horizontalSpan = 2; - isLeaf.setLayoutData(isLeafData); - SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.FinalState.isLeaf, UMLViewsRepository.SWT_KIND), null); //$NON-NLS-1$ - } - - /** - * @param container - */ - protected void createConnectionAdvancedTableComposition(Composite parent) { - this.connection = new ReferencesTable<ConnectionPointReference>(UMLMessages.FinalStatePropertiesEditionPart_ConnectionLabel, new ReferencesTableListener<ConnectionPointReference>() { - - public void handleAdd() { - addToConnection(); - } - - public void handleEdit(ConnectionPointReference element) { - editConnection(element); - } - - public void handleMove(ConnectionPointReference element, int oldIndex, int newIndex) { - moveConnection(element, oldIndex, newIndex); - } - - public void handleRemove(ConnectionPointReference element) { - removeFromConnection(element); - } - - public void navigateTo(ConnectionPointReference element) { - } - }); - this.connection.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.FinalState.connection, UMLViewsRepository.SWT_KIND)); - this.connection.createControls(parent); - GridData connectionData = new GridData(GridData.FILL_HORIZONTAL); - connectionData.horizontalSpan = 3; - this.connection.setLayoutData(connectionData); - } - - /**
- *
- */ - protected void moveConnection(ConnectionPointReference element, int oldIndex, int newIndex) { - EObject editedElement = connectionEditUtil.foundCorrespondingEObject(element); - connectionEditUtil.moveElement(element, oldIndex, newIndex); - connection.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.connection, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToConnection() { - - // Start of user code addToConnection() method body - ConnectionPointReference eObject = UMLFactory.eINSTANCE.createConnectionPointReference(); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(eObject); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(eObject); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(propertiesEditionComponent, - eObject, resourceSet)); - if(propertiesEditionObject != null) { - connectionEditUtil.addElement(propertiesEditionObject); - connection.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.connection, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromConnection(ConnectionPointReference element) { - - // Start of user code removeFromConnection() method body - EObject editedElement = connectionEditUtil.foundCorrespondingEObject(element); - connectionEditUtil.removeElement(element); - connection.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.connection, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editConnection(ConnectionPointReference element) { - - // Start of user code editConnection() method body - EObject editedElement = connectionEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - connectionEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - connection.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.connection, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createConnectionPointAdvancedTableComposition(Composite parent) { - this.connectionPoint = new ReferencesTable<Pseudostate>(UMLMessages.FinalStatePropertiesEditionPart_ConnectionPointLabel, new ReferencesTableListener<Pseudostate>() { - - public void handleAdd() { - addToConnectionPoint(); - } - - public void handleEdit(Pseudostate element) { - editConnectionPoint(element); - } - - public void handleMove(Pseudostate element, int oldIndex, int newIndex) { - moveConnectionPoint(element, oldIndex, newIndex); - } - - public void handleRemove(Pseudostate element) { - removeFromConnectionPoint(element); - } - - public void navigateTo(Pseudostate element) { - } - }); - this.connectionPoint.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.FinalState.connectionPoint, UMLViewsRepository.SWT_KIND)); - this.connectionPoint.createControls(parent); - GridData connectionPointData = new GridData(GridData.FILL_HORIZONTAL); - connectionPointData.horizontalSpan = 3; - this.connectionPoint.setLayoutData(connectionPointData); - } - - /**
- *
- */ - protected void moveConnectionPoint(Pseudostate element, int oldIndex, int newIndex) { - EObject editedElement = connectionPointEditUtil.foundCorrespondingEObject(element); - connectionPointEditUtil.moveElement(element, oldIndex, newIndex); - connectionPoint.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.connectionPoint, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToConnectionPoint() { - - // Start of user code addToConnectionPoint() method body - Pseudostate eObject = UMLFactory.eINSTANCE.createPseudostate(); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(eObject); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(eObject); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(propertiesEditionComponent, - eObject, resourceSet)); - if(propertiesEditionObject != null) { - connectionPointEditUtil.addElement(propertiesEditionObject); - connectionPoint.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.connectionPoint, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromConnectionPoint(Pseudostate element) { - - // Start of user code removeFromConnectionPoint() method body - EObject editedElement = connectionPointEditUtil.foundCorrespondingEObject(element); - connectionPointEditUtil.removeElement(element); - connectionPoint.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.connectionPoint, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editConnectionPoint(Pseudostate element) { - - // Start of user code editConnectionPoint() method body - EObject editedElement = connectionPointEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - connectionPointEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - connectionPoint.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.connectionPoint, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createDeferrableTriggerAdvancedTableComposition(Composite parent) { - this.deferrableTrigger = new ReferencesTable<Trigger>(UMLMessages.FinalStatePropertiesEditionPart_DeferrableTriggerLabel, new ReferencesTableListener<Trigger>() { - - public void handleAdd() { - addToDeferrableTrigger(); - } - - public void handleEdit(Trigger element) { - editDeferrableTrigger(element); - } - - public void handleMove(Trigger element, int oldIndex, int newIndex) { - moveDeferrableTrigger(element, oldIndex, newIndex); - } - - public void handleRemove(Trigger element) { - removeFromDeferrableTrigger(element); - } - - public void navigateTo(Trigger element) { - } - }); - this.deferrableTrigger.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.FinalState.deferrableTrigger, UMLViewsRepository.SWT_KIND)); - this.deferrableTrigger.createControls(parent); - GridData deferrableTriggerData = new GridData(GridData.FILL_HORIZONTAL); - deferrableTriggerData.horizontalSpan = 3; - this.deferrableTrigger.setLayoutData(deferrableTriggerData); - } - - /**
- *
- */ - protected void moveDeferrableTrigger(Trigger element, int oldIndex, int newIndex) { - EObject editedElement = deferrableTriggerEditUtil.foundCorrespondingEObject(element); - deferrableTriggerEditUtil.moveElement(element, oldIndex, newIndex); - deferrableTrigger.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.deferrableTrigger, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToDeferrableTrigger() { - - // Start of user code addToDeferrableTrigger() method body - Trigger eObject = UMLFactory.eINSTANCE.createTrigger(); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(eObject); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(eObject); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(propertiesEditionComponent, - eObject, resourceSet)); - if(propertiesEditionObject != null) { - deferrableTriggerEditUtil.addElement(propertiesEditionObject); - deferrableTrigger.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.deferrableTrigger, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromDeferrableTrigger(Trigger element) { - - // Start of user code removeFromDeferrableTrigger() method body - EObject editedElement = deferrableTriggerEditUtil.foundCorrespondingEObject(element); - deferrableTriggerEditUtil.removeElement(element); - deferrableTrigger.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.deferrableTrigger, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editDeferrableTrigger(Trigger element) { - - // Start of user code editDeferrableTrigger() method body - EObject editedElement = deferrableTriggerEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - deferrableTriggerEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - deferrableTrigger.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.deferrableTrigger, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createRegionAdvancedTableComposition(Composite parent) { - this.region = new ReferencesTable<Region>(UMLMessages.FinalStatePropertiesEditionPart_RegionLabel, new ReferencesTableListener<Region>() { - - public void handleAdd() { - addToRegion(); - } - - public void handleEdit(Region element) { - editRegion(element); - } - - public void handleMove(Region element, int oldIndex, int newIndex) { - moveRegion(element, oldIndex, newIndex); - } - - public void handleRemove(Region element) { - removeFromRegion(element); - } - - public void navigateTo(Region element) { - } - }); - this.region.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.FinalState.region, UMLViewsRepository.SWT_KIND)); - this.region.createControls(parent); - GridData regionData = new GridData(GridData.FILL_HORIZONTAL); - regionData.horizontalSpan = 3; - this.region.setLayoutData(regionData); - } - - /**
- *
- */ - protected void moveRegion(Region element, int oldIndex, int newIndex) { - EObject editedElement = regionEditUtil.foundCorrespondingEObject(element); - regionEditUtil.moveElement(element, oldIndex, newIndex); - region.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.region, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToRegion() { - - // Start of user code addToRegion() method body - Region eObject = UMLFactory.eINSTANCE.createRegion(); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(eObject); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(eObject); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(propertiesEditionComponent, - eObject, resourceSet)); - if(propertiesEditionObject != null) { - regionEditUtil.addElement(propertiesEditionObject); - region.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.region, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromRegion(Region element) { - - // Start of user code removeFromRegion() method body - EObject editedElement = regionEditUtil.foundCorrespondingEObject(element); - regionEditUtil.removeElement(element); - region.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.region, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editRegion(Region element) { - - // Start of user code editRegion() method body - EObject editedElement = regionEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - regionEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - region.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - FinalStatePropertiesEditionPartImpl.this, UMLViewsRepository.FinalState.region, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - - public void firePropertiesChanged(PropertiesEditionEvent event) { - // Start of user code for tab synchronization - - // End of user code - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getOwnedCommentToAdd() - */ - public List getOwnedCommentToAdd() { - return ownedCommentEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getOwnedCommentToRemove() - */ - public List getOwnedCommentToRemove() { - return ownedCommentEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getOwnedCommentToEdit() - */ - public Map getOwnedCommentToEdit() { - return ownedCommentEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getOwnedCommentToMove() - */ - public List getOwnedCommentToMove() { - return ownedCommentEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getOwnedCommentTable() - */ - public List getOwnedCommentTable() { - return ownedCommentEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#initOwnedComment(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initOwnedComment(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - ownedCommentEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - ownedCommentEditUtil = new EMFListEditUtil(current, feature); - this.ownedComment.setInput(ownedCommentEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#updateOwnedComment(EObject newValue) - */ - public void updateOwnedComment(EObject newValue) { - if(ownedCommentEditUtil != null) { - ownedCommentEditUtil.reinit(newValue); - ownedComment.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addFilterOwnedComment(ViewerFilter filter) - */ - public void addFilterToOwnedComment(ViewerFilter filter) { - ownedCommentFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addBusinessFilterOwnedComment(ViewerFilter filter) - */ - public void addBusinessFilterToOwnedComment(ViewerFilter filter) { - ownedCommentBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#isContainedInOwnedCommentTable(EObject element) - */ - public boolean isContainedInOwnedCommentTable(EObject element) { - return ownedCommentEditUtil.contains(element); - } - - public void setMessageForOwnedComment(String msg, int msgLevel) { - - } - - public void unsetMessageForOwnedComment() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getName() - */ - public String getName() { - return name.getText(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#setName(String newValue) - */ - public void setName(String newValue) { - if(newValue != null) { - name.setText(newValue); - } else { - name.setText(""); //$NON-NLS-1$ - } - } - - public void setMessageForName(String msg, int msgLevel) { - - } - - public void unsetMessageForName() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getVisibility() - */ - public Enumerator getVisibility() { - EEnumLiteral selection = (EEnumLiteral)((StructuredSelection)visibility.getSelection()).getFirstElement(); - return selection.getInstance(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#initVisibility(EEnum eenum, Enumerator current) - */ - public void initVisibility(EEnum eenum, Enumerator current) { - visibility.setInput(eenum.getELiterals()); - visibility.modelUpdating(new StructuredSelection(current)); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#setVisibility(Enumerator newValue) - */ - public void setVisibility(Enumerator newValue) { - visibility.modelUpdating(new StructuredSelection(newValue)); - } - - public void setMessageForVisibility(String msg, int msgLevel) { - - } - - public void unsetMessageForVisibility() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getClientDependencyToAdd() - */ - public List getClientDependencyToAdd() { - return clientDependencyEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getClientDependencyToRemove() - */ - public List getClientDependencyToRemove() { - return clientDependencyEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getClientDependencyTable() - */ - public List getClientDependencyTable() { - return clientDependencyEditUtil.getVirtualList(); - } - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#initClientDependency(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initClientDependency(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - clientDependencyEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - clientDependencyEditUtil = new EMFListEditUtil(current, feature); - this.clientDependency.setInput(clientDependencyEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#updateClientDependency(EObject newValue) - */ - public void updateClientDependency(EObject newValue) { - if(clientDependencyEditUtil != null) { - clientDependencyEditUtil.reinit(newValue); - clientDependency.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addFilterClientDependency(ViewerFilter filter) - */ - public void addFilterToClientDependency(ViewerFilter filter) { - clientDependencyFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addBusinessFilterClientDependency(ViewerFilter filter) - */ - public void addBusinessFilterToClientDependency(ViewerFilter filter) { - clientDependencyBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#isContainedInClientDependencyTable(EObject element) - */ - public boolean isContainedInClientDependencyTable(EObject element) { - return clientDependencyEditUtil.contains(element); - } - - public void setMessageForClientDependency(String msg, int msgLevel) { - - } - - public void unsetMessageForClientDependency() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getElementImportToAdd() - */ - public List getElementImportToAdd() { - return elementImportEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getElementImportToRemove() - */ - public List getElementImportToRemove() { - return elementImportEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getElementImportToEdit() - */ - public Map getElementImportToEdit() { - return elementImportEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getElementImportToMove() - */ - public List getElementImportToMove() { - return elementImportEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getElementImportTable() - */ - public List getElementImportTable() { - return elementImportEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#initElementImport(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initElementImport(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - elementImportEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - elementImportEditUtil = new EMFListEditUtil(current, feature); - this.elementImport.setInput(elementImportEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#updateElementImport(EObject newValue) - */ - public void updateElementImport(EObject newValue) { - if(elementImportEditUtil != null) { - elementImportEditUtil.reinit(newValue); - elementImport.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addFilterElementImport(ViewerFilter filter) - */ - public void addFilterToElementImport(ViewerFilter filter) { - elementImportFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addBusinessFilterElementImport(ViewerFilter filter) - */ - public void addBusinessFilterToElementImport(ViewerFilter filter) { - elementImportBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#isContainedInElementImportTable(EObject element) - */ - public boolean isContainedInElementImportTable(EObject element) { - return elementImportEditUtil.contains(element); - } - - public void setMessageForElementImport(String msg, int msgLevel) { - - } - - public void unsetMessageForElementImport() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getPackageImportToAdd() - */ - public List getPackageImportToAdd() { - return packageImportEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getPackageImportToRemove() - */ - public List getPackageImportToRemove() { - return packageImportEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getPackageImportToEdit() - */ - public Map getPackageImportToEdit() { - return packageImportEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getPackageImportToMove() - */ - public List getPackageImportToMove() { - return packageImportEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getPackageImportTable() - */ - public List getPackageImportTable() { - return packageImportEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#initPackageImport(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initPackageImport(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - packageImportEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - packageImportEditUtil = new EMFListEditUtil(current, feature); - this.packageImport.setInput(packageImportEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#updatePackageImport(EObject newValue) - */ - public void updatePackageImport(EObject newValue) { - if(packageImportEditUtil != null) { - packageImportEditUtil.reinit(newValue); - packageImport.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addFilterPackageImport(ViewerFilter filter) - */ - public void addFilterToPackageImport(ViewerFilter filter) { - packageImportFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addBusinessFilterPackageImport(ViewerFilter filter) - */ - public void addBusinessFilterToPackageImport(ViewerFilter filter) { - packageImportBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#isContainedInPackageImportTable(EObject element) - */ - public boolean isContainedInPackageImportTable(EObject element) { - return packageImportEditUtil.contains(element); - } - - public void setMessageForPackageImport(String msg, int msgLevel) { - - } - - public void unsetMessageForPackageImport() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getOwnedRuleToAdd() - */ - public List getOwnedRuleToAdd() { - return ownedRuleEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getOwnedRuleToRemove() - */ - public List getOwnedRuleToRemove() { - return ownedRuleEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getOwnedRuleToEdit() - */ - public Map getOwnedRuleToEdit() { - return ownedRuleEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getOwnedRuleToMove() - */ - public List getOwnedRuleToMove() { - return ownedRuleEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getOwnedRuleTable() - */ - public List getOwnedRuleTable() { - return ownedRuleEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#initOwnedRule(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initOwnedRule(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - ownedRuleEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - ownedRuleEditUtil = new EMFListEditUtil(current, feature); - this.ownedRule.setInput(ownedRuleEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#updateOwnedRule(EObject newValue) - */ - public void updateOwnedRule(EObject newValue) { - if(ownedRuleEditUtil != null) { - ownedRuleEditUtil.reinit(newValue); - ownedRule.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addFilterOwnedRule(ViewerFilter filter) - */ - public void addFilterToOwnedRule(ViewerFilter filter) { - ownedRuleFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addBusinessFilterOwnedRule(ViewerFilter filter) - */ - public void addBusinessFilterToOwnedRule(ViewerFilter filter) { - ownedRuleBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#isContainedInOwnedRuleTable(EObject element) - */ - public boolean isContainedInOwnedRuleTable(EObject element) { - return ownedRuleEditUtil.contains(element); - } - - public void setMessageForOwnedRule(String msg, int msgLevel) { - - } - - public void unsetMessageForOwnedRule() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getIsLeaf() - */ - public Boolean getIsLeaf() { - return Boolean.valueOf(isLeaf.getSelection()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#setIsLeaf(Boolean newValue) - */ - public void setIsLeaf(Boolean newValue) { - if(newValue != null) { - isLeaf.setSelection(newValue.booleanValue()); - } else { - isLeaf.setSelection(false); - } - } - - public void setMessageForIsLeaf(String msg, int msgLevel) { - - } - - public void unsetMessageForIsLeaf() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getConnectionToAdd() - */ - public List getConnectionToAdd() { - return connectionEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getConnectionToRemove() - */ - public List getConnectionToRemove() { - return connectionEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getConnectionToEdit() - */ - public Map getConnectionToEdit() { - return connectionEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getConnectionToMove() - */ - public List getConnectionToMove() { - return connectionEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getConnectionTable() - */ - public List getConnectionTable() { - return connectionEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#initConnection(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initConnection(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - connectionEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - connectionEditUtil = new EMFListEditUtil(current, feature); - this.connection.setInput(connectionEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#updateConnection(EObject newValue) - */ - public void updateConnection(EObject newValue) { - if(connectionEditUtil != null) { - connectionEditUtil.reinit(newValue); - connection.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addFilterConnection(ViewerFilter filter) - */ - public void addFilterToConnection(ViewerFilter filter) { - connectionFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addBusinessFilterConnection(ViewerFilter filter) - */ - public void addBusinessFilterToConnection(ViewerFilter filter) { - connectionBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#isContainedInConnectionTable(EObject element) - */ - public boolean isContainedInConnectionTable(EObject element) { - return connectionEditUtil.contains(element); - } - - public void setMessageForConnection(String msg, int msgLevel) { - - } - - public void unsetMessageForConnection() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getConnectionPointToAdd() - */ - public List getConnectionPointToAdd() { - return connectionPointEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getConnectionPointToRemove() - */ - public List getConnectionPointToRemove() { - return connectionPointEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getConnectionPointToEdit() - */ - public Map getConnectionPointToEdit() { - return connectionPointEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getConnectionPointToMove() - */ - public List getConnectionPointToMove() { - return connectionPointEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getConnectionPointTable() - */ - public List getConnectionPointTable() { - return connectionPointEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#initConnectionPoint(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initConnectionPoint(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - connectionPointEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - connectionPointEditUtil = new EMFListEditUtil(current, feature); - this.connectionPoint.setInput(connectionPointEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#updateConnectionPoint(EObject newValue) - */ - public void updateConnectionPoint(EObject newValue) { - if(connectionPointEditUtil != null) { - connectionPointEditUtil.reinit(newValue); - connectionPoint.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addFilterConnectionPoint(ViewerFilter filter) - */ - public void addFilterToConnectionPoint(ViewerFilter filter) { - connectionPointFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addBusinessFilterConnectionPoint(ViewerFilter filter) - */ - public void addBusinessFilterToConnectionPoint(ViewerFilter filter) { - connectionPointBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#isContainedInConnectionPointTable(EObject element) - */ - public boolean isContainedInConnectionPointTable(EObject element) { - return connectionPointEditUtil.contains(element); - } - - public void setMessageForConnectionPoint(String msg, int msgLevel) { - - } - - public void unsetMessageForConnectionPoint() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getDeferrableTriggerToAdd() - */ - public List getDeferrableTriggerToAdd() { - return deferrableTriggerEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getDeferrableTriggerToRemove() - */ - public List getDeferrableTriggerToRemove() { - return deferrableTriggerEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getDeferrableTriggerToEdit() - */ - public Map getDeferrableTriggerToEdit() { - return deferrableTriggerEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getDeferrableTriggerToMove() - */ - public List getDeferrableTriggerToMove() { - return deferrableTriggerEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getDeferrableTriggerTable() - */ - public List getDeferrableTriggerTable() { - return deferrableTriggerEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#initDeferrableTrigger(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initDeferrableTrigger(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - deferrableTriggerEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - deferrableTriggerEditUtil = new EMFListEditUtil(current, feature); - this.deferrableTrigger.setInput(deferrableTriggerEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#updateDeferrableTrigger(EObject newValue) - */ - public void updateDeferrableTrigger(EObject newValue) { - if(deferrableTriggerEditUtil != null) { - deferrableTriggerEditUtil.reinit(newValue); - deferrableTrigger.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addFilterDeferrableTrigger(ViewerFilter filter) - */ - public void addFilterToDeferrableTrigger(ViewerFilter filter) { - deferrableTriggerFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addBusinessFilterDeferrableTrigger(ViewerFilter filter) - */ - public void addBusinessFilterToDeferrableTrigger(ViewerFilter filter) { - deferrableTriggerBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#isContainedInDeferrableTriggerTable(EObject element) - */ - public boolean isContainedInDeferrableTriggerTable(EObject element) { - return deferrableTriggerEditUtil.contains(element); - } - - public void setMessageForDeferrableTrigger(String msg, int msgLevel) { - - } - - public void unsetMessageForDeferrableTrigger() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getRegionToAdd() - */ - public List getRegionToAdd() { - return regionEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getRegionToRemove() - */ - public List getRegionToRemove() { - return regionEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getRegionToEdit() - */ - public Map getRegionToEdit() { - return regionEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getRegionToMove() - */ - public List getRegionToMove() { - return regionEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#getRegionTable() - */ - public List getRegionTable() { - return regionEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#initRegion(EObject current, EReference containingFeature, - * EReference feature) - */ - public void initRegion(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - regionEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - regionEditUtil = new EMFListEditUtil(current, feature); - this.region.setInput(regionEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#updateRegion(EObject newValue) - */ - public void updateRegion(EObject newValue) { - if(regionEditUtil != null) { - regionEditUtil.reinit(newValue); - region.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addFilterRegion(ViewerFilter filter) - */ - public void addFilterToRegion(ViewerFilter filter) { - regionFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#addBusinessFilterRegion(ViewerFilter filter) - */ - public void addBusinessFilterToRegion(ViewerFilter filter) { - regionBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.FinalStatePropertiesEditionPart#isContainedInRegionTable(EObject element) - */ - public boolean isContainedInRegionTable(EObject element) { - return regionEditUtil.contains(element); - } - - public void setMessageForRegion(String msg, int msgLevel) { - - } - - public void unsetMessageForRegion() { - - } - - - - - - // Start of user code additional methods - - // End of user code - -} |