diff options
Diffstat (limited to 'deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/forms/ExpansionRegionPropertiesEditionPartForm.java')
1 files changed, 0 insertions, 4158 deletions
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/forms/ExpansionRegionPropertiesEditionPartForm.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/forms/ExpansionRegionPropertiesEditionPartForm.java deleted file mode 100644 index 6a32171f079..00000000000 --- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/forms/ExpansionRegionPropertiesEditionPartForm.java +++ /dev/null @@ -1,4158 +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.forms; - -// 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.EEFMessageManager; -import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart; -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.FormUtils; -import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable; -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.ISelectionChangedListener; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.viewers.ViewerFilter; -import org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart; -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.FocusAdapter; -import org.eclipse.swt.events.FocusEvent; -import org.eclipse.swt.events.KeyAdapter; -import org.eclipse.swt.events.KeyEvent; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -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.IMessageManager; -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.uml2.uml.ActivityEdge; -import org.eclipse.uml2.uml.ActivityNode; -import org.eclipse.uml2.uml.ActivityPartition; -import org.eclipse.uml2.uml.Comment; -import org.eclipse.uml2.uml.Constraint; -import org.eclipse.uml2.uml.Dependency; -import org.eclipse.uml2.uml.ElementImport; -import org.eclipse.uml2.uml.ExceptionHandler; -import org.eclipse.uml2.uml.ExpansionNode; -import org.eclipse.uml2.uml.InterruptibleActivityRegion; -import org.eclipse.uml2.uml.PackageImport; -import org.eclipse.uml2.uml.UMLFactory; -import org.eclipse.uml2.uml.UMLPackage; -import org.eclipse.uml2.uml.Variable; - -// End of user code - -/** - * @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a> - */ -public class ExpansionRegionPropertiesEditionPartForm extends CompositePropertiesEditionPart implements IFormPropertiesEditionPart, ExpansionRegionPropertiesEditionPart { - - 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; - - private EMFListEditUtil clientDependencyEditUtil; - - protected ReferencesTable<? extends EObject> clientDependency; - - protected List<ViewerFilter> clientDependencyBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> clientDependencyFilters = new ArrayList<ViewerFilter>(); - - protected Button isLeaf; - - private EMFListEditUtil outgoingEditUtil; - - protected ReferencesTable<? extends EObject> outgoing; - - protected List<ViewerFilter> outgoingBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> outgoingFilters = new ArrayList<ViewerFilter>(); - - private EMFListEditUtil incomingEditUtil; - - protected ReferencesTable<? extends EObject> incoming; - - protected List<ViewerFilter> incomingBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> incomingFilters = new ArrayList<ViewerFilter>(); - - private EMFListEditUtil inPartitionEditUtil; - - protected ReferencesTable<? extends EObject> inPartition; - - protected List<ViewerFilter> inPartitionBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> inPartitionFilters = new ArrayList<ViewerFilter>(); - - private EMFListEditUtil inInterruptibleRegionEditUtil; - - protected ReferencesTable<? extends EObject> inInterruptibleRegion; - - protected List<ViewerFilter> inInterruptibleRegionBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> inInterruptibleRegionFilters = new ArrayList<ViewerFilter>(); - - private EMFListEditUtil redefinedNodeEditUtil; - - protected ReferencesTable<? extends EObject> redefinedNode; - - protected List<ViewerFilter> redefinedNodeBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> redefinedNodeFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil handlerEditUtil; - - protected ReferencesTable<? extends EObject> handler; - - protected List<ViewerFilter> handlerBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> handlerFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil localPreconditionEditUtil; - - protected ReferencesTable<? extends EObject> localPrecondition; - - protected List<ViewerFilter> localPreconditionBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> localPreconditionFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil localPostconditionEditUtil; - - protected ReferencesTable<? extends EObject> localPostcondition; - - protected List<ViewerFilter> localPostconditionBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> localPostconditionFilters = 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 EMFListEditUtil variableEditUtil; - - protected ReferencesTable<? extends EObject> variable; - - protected List<ViewerFilter> variableBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> variableFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil edgeEditUtil; - - protected ReferencesTable<? extends EObject> edge; - - protected List<ViewerFilter> edgeBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> edgeFilters = new ArrayList<ViewerFilter>(); - - protected Button mustIsolate; - - protected EMFListEditUtil nodeEditUtil; - - protected ReferencesTable<? extends EObject> node; - - protected List<ViewerFilter> nodeBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> nodeFilters = new ArrayList<ViewerFilter>(); - - protected EMFComboViewer mode; - - private EMFListEditUtil inputElementEditUtil; - - protected ReferencesTable<? extends EObject> inputElement; - - protected List<ViewerFilter> inputElementBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> inputElementFilters = new ArrayList<ViewerFilter>(); - - private EMFListEditUtil outputElementEditUtil; - - protected ReferencesTable<? extends EObject> outputElement; - - protected List<ViewerFilter> outputElementBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> outputElementFilters = new ArrayList<ViewerFilter>(); - - - - - - /** - * Default constructor - * - * @param editionComponent - * the {@link IPropertiesEditionComponent} that manage this part - */ - public ExpansionRegionPropertiesEditionPartForm(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, new EEFMessageManager(scrolledForm, widgetFactory)); - return scrolledForm; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart# createControls(org.eclipse.ui.forms.widgets.FormToolkit, - * org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.IMessageManager) - */ - public void createControls(final FormToolkit widgetFactory, Composite view, IMessageManager messageManager) { - this.messageManager = messageManager; - createPropertiesGroup(widgetFactory, view); - // Start of user code for additional ui definition - - // End of user code - - } - - protected void createPropertiesGroup(FormToolkit widgetFactory, final Composite view) { - Section propertiesSection = widgetFactory.createSection(view, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED); - propertiesSection.setText(UMLMessages.ExpansionRegionPropertiesEditionPart_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); - createOwnedCommentTableComposition(widgetFactory, propertiesGroup); - createNameText(widgetFactory, propertiesGroup); - createVisibilityEMFComboViewer(widgetFactory, propertiesGroup); - createClientDependencyReferencesTable(widgetFactory, propertiesGroup); - createIsLeafCheckbox(widgetFactory, propertiesGroup); - createOutgoingReferencesTable(widgetFactory, propertiesGroup); - createIncomingReferencesTable(widgetFactory, propertiesGroup); - createInPartitionReferencesTable(widgetFactory, propertiesGroup); - createInInterruptibleRegionReferencesTable(widgetFactory, propertiesGroup); - createRedefinedNodeReferencesTable(widgetFactory, propertiesGroup); - createHandlerTableComposition(widgetFactory, propertiesGroup); - createLocalPreconditionTableComposition(widgetFactory, propertiesGroup); - createLocalPostconditionTableComposition(widgetFactory, propertiesGroup); - createElementImportTableComposition(widgetFactory, propertiesGroup); - createPackageImportTableComposition(widgetFactory, propertiesGroup); - createOwnedRuleTableComposition(widgetFactory, propertiesGroup); - createVariableTableComposition(widgetFactory, propertiesGroup); - createEdgeTableComposition(widgetFactory, propertiesGroup); - createMustIsolateCheckbox(widgetFactory, propertiesGroup); - createNodeTableComposition(widgetFactory, propertiesGroup); - createModeEMFComboViewer(widgetFactory, propertiesGroup); - createInputElementReferencesTable(widgetFactory, propertiesGroup); - createOutputElementReferencesTable(widgetFactory, propertiesGroup); - propertiesSection.setClient(propertiesGroup); - } - - /** - * @param container - */ - protected void createOwnedCommentTableComposition(FormToolkit widgetFactory, Composite parent) { - this.ownedComment = new ReferencesTable<Comment>(UMLMessages.ExpansionRegionPropertiesEditionPart_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.ExpansionRegion.ownedComment, UMLViewsRepository.FORM_KIND)); - this.ownedComment.createControls(parent, widgetFactory); - 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(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.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( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.ownedComment, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromOwnedComment(Comment element) { - // Start of user code for the removeFromOwnedComment() method body - EObject editedElement = ownedCommentEditUtil.foundCorrespondingEObject(element); - ownedCommentEditUtil.removeElement(element); - ownedComment.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.ownedComment, - PropertiesEditionEvent.COMMIT, 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( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.ownedComment, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createNameText(FormToolkit widgetFactory, Composite parent) { - FormUtils.createPartLabel(widgetFactory, parent, UMLMessages.ExpansionRegionPropertiesEditionPart_NameLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.ExpansionRegion.name, UMLViewsRepository.FORM_KIND)); - name = widgetFactory.createText(parent, ""); //$NON-NLS-1$ - name.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); - widgetFactory.paintBordersFor(parent); - GridData nameData = new GridData(GridData.FILL_HORIZONTAL); - name.setLayoutData(nameData); - name.addModifyListener(new ModifyListener() { - - /** - * {@inheritDoc} - * - * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent) - */ - public void modifyText(ModifyEvent e) { - if(propertiesEditionComponent != null) - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.name, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, name.getText())); - } - - }); - name.addFocusListener(new FocusAdapter() { - - /** - * {@inheritDoc} - * - * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent) - */ - public void focusLost(FocusEvent e) { - if(propertiesEditionComponent != null) - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.name, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, name.getText())); - } - - }); - name.addKeyListener(new KeyAdapter() { - - /** - * {@inheritDoc} - * - * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent) - */ - public void keyPressed(KeyEvent e) { - if(e.character == SWT.CR) { - if(propertiesEditionComponent != null) - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.name, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, name.getText())); - } - } - - }); - FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.name, UMLViewsRepository.FORM_KIND), null); //$NON-NLS-1$ - } - - protected void createVisibilityEMFComboViewer(FormToolkit widgetFactory, Composite parent) { - FormUtils.createPartLabel(widgetFactory, parent, UMLMessages.ExpansionRegionPropertiesEditionPart_VisibilityLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.ExpansionRegion.visibility, UMLViewsRepository.FORM_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); - visibility.addSelectionChangedListener(new ISelectionChangedListener() { - - /** - * {@inheritDoc} - * - * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent) - */ - public void selectionChanged(SelectionChangedEvent event) { - if(propertiesEditionComponent != null) - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.visibility, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getVisibility())); - } - - }); - FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.visibility, UMLViewsRepository.FORM_KIND), null); //$NON-NLS-1$ - } - - protected void createClientDependencyReferencesTable(FormToolkit widgetFactory, Composite parent) { - this.clientDependency = new ReferencesTable<Dependency>(UMLMessages.ExpansionRegionPropertiesEditionPart_ClientDependencyLabel, new ReferencesTableListener<Dependency>() { - - public void handleAdd() { - TabElementTreeSelectionDialog<Dependency> dialog = new TabElementTreeSelectionDialog<Dependency>(resourceSet, clientDependencyFilters, clientDependencyBusinessFilters, - "Dependency", UMLPackage.eINSTANCE.getDependency(), current.eResource()) { - - @Override - 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(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.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.ExpansionRegion.clientDependency, UMLViewsRepository.FORM_KIND)); - this.clientDependency.createControls(parent, widgetFactory); - 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(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.clientDependency, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void removeFromClientDependency(Dependency element) { - // Start of user code for the removeFromClientDependency() method body - EObject editedElement = clientDependencyEditUtil.foundCorrespondingEObject(element); - clientDependencyEditUtil.removeElement(element); - clientDependency.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.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( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.clientDependency, PropertiesEditionEvent.COMMIT, - PropertiesEditionEvent.SET, editedElement, propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createIsLeafCheckbox(FormToolkit widgetFactory, Composite parent) { - isLeaf = widgetFactory.createButton(parent, UMLMessages.ExpansionRegionPropertiesEditionPart_IsLeafLabel, SWT.CHECK); - isLeaf.addSelectionListener(new SelectionAdapter() { - - /** - * {@inheritDoc} - * - * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) - */ - public void widgetSelected(SelectionEvent e) { - if(propertiesEditionComponent != null) - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.isLeaf, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new Boolean(isLeaf.getSelection()))); - } - - }); - GridData isLeafData = new GridData(GridData.FILL_HORIZONTAL); - isLeafData.horizontalSpan = 2; - isLeaf.setLayoutData(isLeafData); - FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.isLeaf, UMLViewsRepository.FORM_KIND), null); //$NON-NLS-1$ - } - - protected void createOutgoingReferencesTable(FormToolkit widgetFactory, Composite parent) { - this.outgoing = new ReferencesTable<ActivityEdge>(UMLMessages.ExpansionRegionPropertiesEditionPart_OutgoingLabel, new ReferencesTableListener<ActivityEdge>() { - - public void handleAdd() { - TabElementTreeSelectionDialog<ActivityEdge> dialog = new TabElementTreeSelectionDialog<ActivityEdge>(resourceSet, outgoingFilters, outgoingBusinessFilters, - "ActivityEdge", UMLPackage.eINSTANCE.getActivityEdge(), current.eResource()) { - - @Override - public void process(IStructuredSelection selection) { - for(Iterator<?> iter = selection.iterator(); iter.hasNext();) { - EObject elem = (EObject)iter.next(); - if(!outgoingEditUtil.getVirtualList().contains(elem)) - outgoingEditUtil.addElement(elem); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.outgoing, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem)); - } - outgoing.refresh(); - } - }; - dialog.open(); - } - - public void handleEdit(ActivityEdge element) { - editOutgoing(element); - } - - public void handleMove(ActivityEdge element, int oldIndex, int newIndex) { - moveOutgoing(element, oldIndex, newIndex); - } - - public void handleRemove(ActivityEdge element) { - removeFromOutgoing(element); - } - - public void navigateTo(ActivityEdge element) { - } - }); - this.outgoing.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.outgoing, UMLViewsRepository.FORM_KIND)); - this.outgoing.createControls(parent, widgetFactory); - GridData outgoingData = new GridData(GridData.FILL_HORIZONTAL); - outgoingData.horizontalSpan = 3; - this.outgoing.setLayoutData(outgoingData); - this.outgoing.disableMove(); - } - - /**
- *
- */ - protected void moveOutgoing(ActivityEdge element, int oldIndex, int newIndex) { - } - - /**
- *
- */ - protected void removeFromOutgoing(ActivityEdge element) { - // Start of user code for the removeFromOutgoing() method body - EObject editedElement = outgoingEditUtil.foundCorrespondingEObject(element); - outgoingEditUtil.removeElement(element); - outgoing.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.outgoing, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editOutgoing(ActivityEdge element) { - // Start of user code editOutgoing() method body - - EObject editedElement = outgoingEditUtil.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) { - outgoingEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - outgoing.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.outgoing, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createIncomingReferencesTable(FormToolkit widgetFactory, Composite parent) { - this.incoming = new ReferencesTable<ActivityEdge>(UMLMessages.ExpansionRegionPropertiesEditionPart_IncomingLabel, new ReferencesTableListener<ActivityEdge>() { - - public void handleAdd() { - TabElementTreeSelectionDialog<ActivityEdge> dialog = new TabElementTreeSelectionDialog<ActivityEdge>(resourceSet, incomingFilters, incomingBusinessFilters, - "ActivityEdge", UMLPackage.eINSTANCE.getActivityEdge(), current.eResource()) { - - @Override - public void process(IStructuredSelection selection) { - for(Iterator<?> iter = selection.iterator(); iter.hasNext();) { - EObject elem = (EObject)iter.next(); - if(!incomingEditUtil.getVirtualList().contains(elem)) - incomingEditUtil.addElement(elem); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.incoming, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem)); - } - incoming.refresh(); - } - }; - dialog.open(); - } - - public void handleEdit(ActivityEdge element) { - editIncoming(element); - } - - public void handleMove(ActivityEdge element, int oldIndex, int newIndex) { - moveIncoming(element, oldIndex, newIndex); - } - - public void handleRemove(ActivityEdge element) { - removeFromIncoming(element); - } - - public void navigateTo(ActivityEdge element) { - } - }); - this.incoming.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.incoming, UMLViewsRepository.FORM_KIND)); - this.incoming.createControls(parent, widgetFactory); - GridData incomingData = new GridData(GridData.FILL_HORIZONTAL); - incomingData.horizontalSpan = 3; - this.incoming.setLayoutData(incomingData); - this.incoming.disableMove(); - } - - /**
- *
- */ - protected void moveIncoming(ActivityEdge element, int oldIndex, int newIndex) { - } - - /**
- *
- */ - protected void removeFromIncoming(ActivityEdge element) { - // Start of user code for the removeFromIncoming() method body - EObject editedElement = incomingEditUtil.foundCorrespondingEObject(element); - incomingEditUtil.removeElement(element); - incoming.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.incoming, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editIncoming(ActivityEdge element) { - // Start of user code editIncoming() method body - - EObject editedElement = incomingEditUtil.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) { - incomingEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - incoming.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.incoming, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createInPartitionReferencesTable(FormToolkit widgetFactory, Composite parent) { - this.inPartition = new ReferencesTable<ActivityPartition>(UMLMessages.ExpansionRegionPropertiesEditionPart_InPartitionLabel, new ReferencesTableListener<ActivityPartition>() { - - public void handleAdd() { - TabElementTreeSelectionDialog<ActivityPartition> dialog = new TabElementTreeSelectionDialog<ActivityPartition>(resourceSet, inPartitionFilters, inPartitionBusinessFilters, - "ActivityPartition", UMLPackage.eINSTANCE.getActivityPartition(), current.eResource()) { - - @Override - public void process(IStructuredSelection selection) { - for(Iterator<?> iter = selection.iterator(); iter.hasNext();) { - EObject elem = (EObject)iter.next(); - if(!inPartitionEditUtil.getVirtualList().contains(elem)) - inPartitionEditUtil.addElement(elem); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.inPartition, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem)); - } - inPartition.refresh(); - } - }; - dialog.open(); - } - - public void handleEdit(ActivityPartition element) { - editInPartition(element); - } - - public void handleMove(ActivityPartition element, int oldIndex, int newIndex) { - moveInPartition(element, oldIndex, newIndex); - } - - public void handleRemove(ActivityPartition element) { - removeFromInPartition(element); - } - - public void navigateTo(ActivityPartition element) { - } - }); - this.inPartition.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.inPartition, UMLViewsRepository.FORM_KIND)); - this.inPartition.createControls(parent, widgetFactory); - GridData inPartitionData = new GridData(GridData.FILL_HORIZONTAL); - inPartitionData.horizontalSpan = 3; - this.inPartition.setLayoutData(inPartitionData); - this.inPartition.disableMove(); - } - - /**
- *
- */ - protected void moveInPartition(ActivityPartition element, int oldIndex, int newIndex) { - EObject editedElement = inPartitionEditUtil.foundCorrespondingEObject(element); - inPartitionEditUtil.moveElement(element, oldIndex, newIndex); - inPartition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.inPartition, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void removeFromInPartition(ActivityPartition element) { - // Start of user code for the removeFromInPartition() method body - EObject editedElement = inPartitionEditUtil.foundCorrespondingEObject(element); - inPartitionEditUtil.removeElement(element); - inPartition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.inPartition, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editInPartition(ActivityPartition element) { - // Start of user code editInPartition() method body - - EObject editedElement = inPartitionEditUtil.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) { - inPartitionEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - inPartition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.inPartition, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createInInterruptibleRegionReferencesTable(FormToolkit widgetFactory, Composite parent) { - this.inInterruptibleRegion = new ReferencesTable<InterruptibleActivityRegion>(UMLMessages.ExpansionRegionPropertiesEditionPart_InInterruptibleRegionLabel, new ReferencesTableListener<InterruptibleActivityRegion>() { - - public void handleAdd() { - TabElementTreeSelectionDialog<InterruptibleActivityRegion> dialog = new TabElementTreeSelectionDialog<InterruptibleActivityRegion>(resourceSet, inInterruptibleRegionFilters, inInterruptibleRegionBusinessFilters, - "InterruptibleActivityRegion", UMLPackage.eINSTANCE.getInterruptibleActivityRegion(), current.eResource()) { - - @Override - public void process(IStructuredSelection selection) { - for(Iterator<?> iter = selection.iterator(); iter.hasNext();) { - EObject elem = (EObject)iter.next(); - if(!inInterruptibleRegionEditUtil.getVirtualList().contains(elem)) - inInterruptibleRegionEditUtil.addElement(elem); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.inInterruptibleRegion, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem)); - } - inInterruptibleRegion.refresh(); - } - }; - dialog.open(); - } - - public void handleEdit(InterruptibleActivityRegion element) { - editInInterruptibleRegion(element); - } - - public void handleMove(InterruptibleActivityRegion element, int oldIndex, int newIndex) { - moveInInterruptibleRegion(element, oldIndex, newIndex); - } - - public void handleRemove(InterruptibleActivityRegion element) { - removeFromInInterruptibleRegion(element); - } - - public void navigateTo(InterruptibleActivityRegion element) { - } - }); - this.inInterruptibleRegion.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.inInterruptibleRegion, UMLViewsRepository.FORM_KIND)); - this.inInterruptibleRegion.createControls(parent, widgetFactory); - GridData inInterruptibleRegionData = new GridData(GridData.FILL_HORIZONTAL); - inInterruptibleRegionData.horizontalSpan = 3; - this.inInterruptibleRegion.setLayoutData(inInterruptibleRegionData); - this.inInterruptibleRegion.disableMove(); - } - - /**
- *
- */ - protected void moveInInterruptibleRegion(InterruptibleActivityRegion element, int oldIndex, int newIndex) { - EObject editedElement = inInterruptibleRegionEditUtil.foundCorrespondingEObject(element); - inInterruptibleRegionEditUtil.moveElement(element, oldIndex, newIndex); - inInterruptibleRegion.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.inInterruptibleRegion, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void removeFromInInterruptibleRegion(InterruptibleActivityRegion element) { - // Start of user code for the removeFromInInterruptibleRegion() method body - EObject editedElement = inInterruptibleRegionEditUtil.foundCorrespondingEObject(element); - inInterruptibleRegionEditUtil.removeElement(element); - inInterruptibleRegion.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.inInterruptibleRegion, PropertiesEditionEvent.COMMIT, - PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editInInterruptibleRegion(InterruptibleActivityRegion element) { - // Start of user code editInInterruptibleRegion() method body - - EObject editedElement = inInterruptibleRegionEditUtil.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) { - inInterruptibleRegionEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - inInterruptibleRegion.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.inInterruptibleRegion, PropertiesEditionEvent.COMMIT, - PropertiesEditionEvent.SET, editedElement, propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createRedefinedNodeReferencesTable(FormToolkit widgetFactory, Composite parent) { - this.redefinedNode = new ReferencesTable<ActivityNode>(UMLMessages.ExpansionRegionPropertiesEditionPart_RedefinedNodeLabel, new ReferencesTableListener<ActivityNode>() { - - public void handleAdd() { - TabElementTreeSelectionDialog<ActivityNode> dialog = new TabElementTreeSelectionDialog<ActivityNode>(resourceSet, redefinedNodeFilters, redefinedNodeBusinessFilters, - "ActivityNode", UMLPackage.eINSTANCE.getActivityNode(), current.eResource()) { - - @Override - public void process(IStructuredSelection selection) { - for(Iterator<?> iter = selection.iterator(); iter.hasNext();) { - EObject elem = (EObject)iter.next(); - if(!redefinedNodeEditUtil.getVirtualList().contains(elem)) - redefinedNodeEditUtil.addElement(elem); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.redefinedNode, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem)); - } - redefinedNode.refresh(); - } - }; - dialog.open(); - } - - public void handleEdit(ActivityNode element) { - editRedefinedNode(element); - } - - public void handleMove(ActivityNode element, int oldIndex, int newIndex) { - moveRedefinedNode(element, oldIndex, newIndex); - } - - public void handleRemove(ActivityNode element) { - removeFromRedefinedNode(element); - } - - public void navigateTo(ActivityNode element) { - } - }); - this.redefinedNode.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.redefinedNode, UMLViewsRepository.FORM_KIND)); - this.redefinedNode.createControls(parent, widgetFactory); - GridData redefinedNodeData = new GridData(GridData.FILL_HORIZONTAL); - redefinedNodeData.horizontalSpan = 3; - this.redefinedNode.setLayoutData(redefinedNodeData); - this.redefinedNode.disableMove(); - } - - /**
- *
- */ - protected void moveRedefinedNode(ActivityNode element, int oldIndex, int newIndex) { - } - - /**
- *
- */ - protected void removeFromRedefinedNode(ActivityNode element) { - // Start of user code for the removeFromRedefinedNode() method body - EObject editedElement = redefinedNodeEditUtil.foundCorrespondingEObject(element); - redefinedNodeEditUtil.removeElement(element); - redefinedNode.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.redefinedNode, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editRedefinedNode(ActivityNode element) { - // Start of user code editRedefinedNode() method body - - EObject editedElement = redefinedNodeEditUtil.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) { - redefinedNodeEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - redefinedNode.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.redefinedNode, PropertiesEditionEvent.COMMIT, - PropertiesEditionEvent.SET, editedElement, propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createHandlerTableComposition(FormToolkit widgetFactory, Composite parent) { - this.handler = new ReferencesTable<ExceptionHandler>(UMLMessages.ExpansionRegionPropertiesEditionPart_HandlerLabel, new ReferencesTableListener<ExceptionHandler>() { - - public void handleAdd() { - addToHandler(); - } - - public void handleEdit(ExceptionHandler element) { - editHandler(element); - } - - public void handleMove(ExceptionHandler element, int oldIndex, int newIndex) { - moveHandler(element, oldIndex, newIndex); - } - - public void handleRemove(ExceptionHandler element) { - removeFromHandler(element); - } - - public void navigateTo(ExceptionHandler element) { - } - }); - this.handler.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.handler, UMLViewsRepository.FORM_KIND)); - this.handler.createControls(parent, widgetFactory); - GridData handlerData = new GridData(GridData.FILL_HORIZONTAL); - handlerData.horizontalSpan = 3; - this.handler.setLayoutData(handlerData); - } - - /**
- *
- */ - protected void moveHandler(ExceptionHandler element, int oldIndex, int newIndex) { - EObject editedElement = handlerEditUtil.foundCorrespondingEObject(element); - handlerEditUtil.moveElement(element, oldIndex, newIndex); - handler.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.handler, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToHandler() { - // Start of user code addToHandler() method body - ExceptionHandler eObject = UMLFactory.eINSTANCE.createExceptionHandler(); - 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) { - handlerEditUtil.addElement(propertiesEditionObject); - handler.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.handler, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromHandler(ExceptionHandler element) { - // Start of user code for the removeFromHandler() method body - EObject editedElement = handlerEditUtil.foundCorrespondingEObject(element); - handlerEditUtil.removeElement(element); - handler.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.handler, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editHandler(ExceptionHandler element) { - // Start of user code editHandler() method body - EObject editedElement = handlerEditUtil.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) { - handlerEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - handler.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.handler, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createLocalPreconditionTableComposition(FormToolkit widgetFactory, Composite parent) { - this.localPrecondition = new ReferencesTable<Constraint>(UMLMessages.ExpansionRegionPropertiesEditionPart_LocalPreconditionLabel, new ReferencesTableListener<Constraint>() { - - public void handleAdd() { - addToLocalPrecondition(); - } - - public void handleEdit(Constraint element) { - editLocalPrecondition(element); - } - - public void handleMove(Constraint element, int oldIndex, int newIndex) { - moveLocalPrecondition(element, oldIndex, newIndex); - } - - public void handleRemove(Constraint element) { - removeFromLocalPrecondition(element); - } - - public void navigateTo(Constraint element) { - } - }); - this.localPrecondition.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.localPrecondition, UMLViewsRepository.FORM_KIND)); - this.localPrecondition.createControls(parent, widgetFactory); - GridData localPreconditionData = new GridData(GridData.FILL_HORIZONTAL); - localPreconditionData.horizontalSpan = 3; - this.localPrecondition.setLayoutData(localPreconditionData); - } - - /**
- *
- */ - protected void moveLocalPrecondition(Constraint element, int oldIndex, int newIndex) { - EObject editedElement = localPreconditionEditUtil.foundCorrespondingEObject(element); - localPreconditionEditUtil.moveElement(element, oldIndex, newIndex); - localPrecondition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.localPrecondition, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToLocalPrecondition() { - // Start of user code addToLocalPrecondition() 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) { - localPreconditionEditUtil.addElement(propertiesEditionObject); - localPrecondition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.localPrecondition, PropertiesEditionEvent.COMMIT, - PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromLocalPrecondition(Constraint element) { - // Start of user code for the removeFromLocalPrecondition() method body - EObject editedElement = localPreconditionEditUtil.foundCorrespondingEObject(element); - localPreconditionEditUtil.removeElement(element); - localPrecondition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.localPrecondition, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editLocalPrecondition(Constraint element) { - // Start of user code editLocalPrecondition() method body - EObject editedElement = localPreconditionEditUtil.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) { - localPreconditionEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - localPrecondition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.localPrecondition, PropertiesEditionEvent.COMMIT, - PropertiesEditionEvent.SET, editedElement, propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createLocalPostconditionTableComposition(FormToolkit widgetFactory, Composite parent) { - this.localPostcondition = new ReferencesTable<Constraint>(UMLMessages.ExpansionRegionPropertiesEditionPart_LocalPostconditionLabel, new ReferencesTableListener<Constraint>() { - - public void handleAdd() { - addToLocalPostcondition(); - } - - public void handleEdit(Constraint element) { - editLocalPostcondition(element); - } - - public void handleMove(Constraint element, int oldIndex, int newIndex) { - moveLocalPostcondition(element, oldIndex, newIndex); - } - - public void handleRemove(Constraint element) { - removeFromLocalPostcondition(element); - } - - public void navigateTo(Constraint element) { - } - }); - this.localPostcondition.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.localPostcondition, UMLViewsRepository.FORM_KIND)); - this.localPostcondition.createControls(parent, widgetFactory); - GridData localPostconditionData = new GridData(GridData.FILL_HORIZONTAL); - localPostconditionData.horizontalSpan = 3; - this.localPostcondition.setLayoutData(localPostconditionData); - } - - /**
- *
- */ - protected void moveLocalPostcondition(Constraint element, int oldIndex, int newIndex) { - EObject editedElement = localPostconditionEditUtil.foundCorrespondingEObject(element); - localPostconditionEditUtil.moveElement(element, oldIndex, newIndex); - localPostcondition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.localPostcondition, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToLocalPostcondition() { - // Start of user code addToLocalPostcondition() 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) { - localPostconditionEditUtil.addElement(propertiesEditionObject); - localPostcondition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.localPostcondition, PropertiesEditionEvent.COMMIT, - PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromLocalPostcondition(Constraint element) { - // Start of user code for the removeFromLocalPostcondition() method body - EObject editedElement = localPostconditionEditUtil.foundCorrespondingEObject(element); - localPostconditionEditUtil.removeElement(element); - localPostcondition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.localPostcondition, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editLocalPostcondition(Constraint element) { - // Start of user code editLocalPostcondition() method body - EObject editedElement = localPostconditionEditUtil.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) { - localPostconditionEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - localPostcondition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.localPostcondition, PropertiesEditionEvent.COMMIT, - PropertiesEditionEvent.SET, editedElement, propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createElementImportTableComposition(FormToolkit widgetFactory, Composite parent) { - this.elementImport = new ReferencesTable<ElementImport>(UMLMessages.ExpansionRegionPropertiesEditionPart_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.ExpansionRegion.elementImport, UMLViewsRepository.FORM_KIND)); - this.elementImport.createControls(parent, widgetFactory); - 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(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.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( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.elementImport, PropertiesEditionEvent.COMMIT, - PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromElementImport(ElementImport element) { - // Start of user code for the removeFromElementImport() method body - EObject editedElement = elementImportEditUtil.foundCorrespondingEObject(element); - elementImportEditUtil.removeElement(element); - elementImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.elementImport, - PropertiesEditionEvent.COMMIT, 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( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.elementImport, PropertiesEditionEvent.COMMIT, - PropertiesEditionEvent.SET, editedElement, propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createPackageImportTableComposition(FormToolkit widgetFactory, Composite parent) { - this.packageImport = new ReferencesTable<PackageImport>(UMLMessages.ExpansionRegionPropertiesEditionPart_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.ExpansionRegion.packageImport, UMLViewsRepository.FORM_KIND)); - this.packageImport.createControls(parent, widgetFactory); - 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(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.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( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.packageImport, PropertiesEditionEvent.COMMIT, - PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromPackageImport(PackageImport element) { - // Start of user code for the removeFromPackageImport() method body - EObject editedElement = packageImportEditUtil.foundCorrespondingEObject(element); - packageImportEditUtil.removeElement(element); - packageImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.packageImport, - PropertiesEditionEvent.COMMIT, 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( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.packageImport, PropertiesEditionEvent.COMMIT, - PropertiesEditionEvent.SET, editedElement, propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createOwnedRuleTableComposition(FormToolkit widgetFactory, Composite parent) { - this.ownedRule = new ReferencesTable<Constraint>(UMLMessages.ExpansionRegionPropertiesEditionPart_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.ExpansionRegion.ownedRule, UMLViewsRepository.FORM_KIND)); - this.ownedRule.createControls(parent, widgetFactory); - 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(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.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( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.ownedRule, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromOwnedRule(Constraint element) { - // Start of user code for the removeFromOwnedRule() method body - EObject editedElement = ownedRuleEditUtil.foundCorrespondingEObject(element); - ownedRuleEditUtil.removeElement(element); - ownedRule.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.ownedRule, - PropertiesEditionEvent.COMMIT, 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( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.ownedRule, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createVariableTableComposition(FormToolkit widgetFactory, Composite parent) { - this.variable = new ReferencesTable<Variable>(UMLMessages.ExpansionRegionPropertiesEditionPart_VariableLabel, new ReferencesTableListener<Variable>() { - - public void handleAdd() { - addToVariable(); - } - - public void handleEdit(Variable element) { - editVariable(element); - } - - public void handleMove(Variable element, int oldIndex, int newIndex) { - moveVariable(element, oldIndex, newIndex); - } - - public void handleRemove(Variable element) { - removeFromVariable(element); - } - - public void navigateTo(Variable element) { - } - }); - this.variable.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.variable, UMLViewsRepository.FORM_KIND)); - this.variable.createControls(parent, widgetFactory); - GridData variableData = new GridData(GridData.FILL_HORIZONTAL); - variableData.horizontalSpan = 3; - this.variable.setLayoutData(variableData); - } - - /**
- *
- */ - protected void moveVariable(Variable element, int oldIndex, int newIndex) { - EObject editedElement = variableEditUtil.foundCorrespondingEObject(element); - variableEditUtil.moveElement(element, oldIndex, newIndex); - variable.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.variable, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToVariable() { - // Start of user code addToVariable() method body - Variable eObject = UMLFactory.eINSTANCE.createVariable(); - 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) { - variableEditUtil.addElement(propertiesEditionObject); - variable.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.variable, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromVariable(Variable element) { - // Start of user code for the removeFromVariable() method body - EObject editedElement = variableEditUtil.foundCorrespondingEObject(element); - variableEditUtil.removeElement(element); - variable.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.variable, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editVariable(Variable element) { - // Start of user code editVariable() method body - EObject editedElement = variableEditUtil.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) { - variableEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - variable.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.variable, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createEdgeTableComposition(FormToolkit widgetFactory, Composite parent) { - this.edge = new ReferencesTable<ActivityEdge>(UMLMessages.ExpansionRegionPropertiesEditionPart_EdgeLabel, new ReferencesTableListener<ActivityEdge>() { - - public void handleAdd() { - addToEdge(); - } - - public void handleEdit(ActivityEdge element) { - editEdge(element); - } - - public void handleMove(ActivityEdge element, int oldIndex, int newIndex) { - moveEdge(element, oldIndex, newIndex); - } - - public void handleRemove(ActivityEdge element) { - removeFromEdge(element); - } - - public void navigateTo(ActivityEdge element) { - } - }); - this.edge.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.edge, UMLViewsRepository.FORM_KIND)); - this.edge.createControls(parent, widgetFactory); - GridData edgeData = new GridData(GridData.FILL_HORIZONTAL); - edgeData.horizontalSpan = 3; - this.edge.setLayoutData(edgeData); - } - - /**
- *
- */ - protected void moveEdge(ActivityEdge element, int oldIndex, int newIndex) { - } - - /**
- *
- */ - protected void addToEdge() { - // Start of user code addToEdge() method body - // End of user code - - } - - /**
- *
- */ - protected void removeFromEdge(ActivityEdge element) { - // Start of user code for the removeFromEdge() method body - EObject editedElement = edgeEditUtil.foundCorrespondingEObject(element); - edgeEditUtil.removeElement(element); - edge.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.edge, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editEdge(ActivityEdge element) { - // Start of user code editEdge() method body - EObject editedElement = edgeEditUtil.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) { - edgeEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - edge.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.edge, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createMustIsolateCheckbox(FormToolkit widgetFactory, Composite parent) { - mustIsolate = widgetFactory.createButton(parent, UMLMessages.ExpansionRegionPropertiesEditionPart_MustIsolateLabel, SWT.CHECK); - mustIsolate.addSelectionListener(new SelectionAdapter() { - - /** - * {@inheritDoc} - * - * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) - */ - public void widgetSelected(SelectionEvent e) { - if(propertiesEditionComponent != null) - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.mustIsolate, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new Boolean(mustIsolate.getSelection()))); - } - - }); - GridData mustIsolateData = new GridData(GridData.FILL_HORIZONTAL); - mustIsolateData.horizontalSpan = 2; - mustIsolate.setLayoutData(mustIsolateData); - FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.mustIsolate, UMLViewsRepository.FORM_KIND), null); //$NON-NLS-1$ - } - - /** - * @param container - */ - protected void createNodeTableComposition(FormToolkit widgetFactory, Composite parent) { - this.node = new ReferencesTable<ActivityNode>(UMLMessages.ExpansionRegionPropertiesEditionPart_NodeLabel, new ReferencesTableListener<ActivityNode>() { - - public void handleAdd() { - addToNode(); - } - - public void handleEdit(ActivityNode element) { - editNode(element); - } - - public void handleMove(ActivityNode element, int oldIndex, int newIndex) { - moveNode(element, oldIndex, newIndex); - } - - public void handleRemove(ActivityNode element) { - removeFromNode(element); - } - - public void navigateTo(ActivityNode element) { - } - }); - this.node.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.node, UMLViewsRepository.FORM_KIND)); - this.node.createControls(parent, widgetFactory); - GridData nodeData = new GridData(GridData.FILL_HORIZONTAL); - nodeData.horizontalSpan = 3; - this.node.setLayoutData(nodeData); - } - - /**
- *
- */ - protected void moveNode(ActivityNode element, int oldIndex, int newIndex) { - } - - /**
- *
- */ - protected void addToNode() { - // Start of user code addToNode() method body - // End of user code - - } - - /**
- *
- */ - protected void removeFromNode(ActivityNode element) { - // Start of user code for the removeFromNode() method body - EObject editedElement = nodeEditUtil.foundCorrespondingEObject(element); - nodeEditUtil.removeElement(element); - node.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.node, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editNode(ActivityNode element) { - // Start of user code editNode() method body - EObject editedElement = nodeEditUtil.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) { - nodeEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - node.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.node, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createModeEMFComboViewer(FormToolkit widgetFactory, Composite parent) { - FormUtils.createPartLabel(widgetFactory, parent, UMLMessages.ExpansionRegionPropertiesEditionPart_ModeLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.ExpansionRegion.mode, UMLViewsRepository.FORM_KIND)); - mode = new EMFComboViewer(parent); - mode.setContentProvider(new ArrayContentProvider()); - mode.setLabelProvider(new AdapterFactoryLabelProvider(new EcoreAdapterFactory())); - GridData modeData = new GridData(GridData.FILL_HORIZONTAL); - mode.getCombo().setLayoutData(modeData); - mode.addSelectionChangedListener(new ISelectionChangedListener() { - - /** - * {@inheritDoc} - * - * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent) - */ - public void selectionChanged(SelectionChangedEvent event) { - if(propertiesEditionComponent != null) - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.mode, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getMode())); - } - - }); - FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.mode, UMLViewsRepository.FORM_KIND), null); //$NON-NLS-1$ - } - - protected void createInputElementReferencesTable(FormToolkit widgetFactory, Composite parent) { - this.inputElement = new ReferencesTable<ExpansionNode>(UMLMessages.ExpansionRegionPropertiesEditionPart_InputElementLabel, new ReferencesTableListener<ExpansionNode>() { - - public void handleAdd() { - TabElementTreeSelectionDialog<ExpansionNode> dialog = new TabElementTreeSelectionDialog<ExpansionNode>(resourceSet, inputElementFilters, inputElementBusinessFilters, - "ExpansionNode", UMLPackage.eINSTANCE.getExpansionNode(), current.eResource()) { - - @Override - public void process(IStructuredSelection selection) { - for(Iterator<?> iter = selection.iterator(); iter.hasNext();) { - EObject elem = (EObject)iter.next(); - if(!inputElementEditUtil.getVirtualList().contains(elem)) - inputElementEditUtil.addElement(elem); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.inputElement, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem)); - } - inputElement.refresh(); - } - }; - dialog.open(); - } - - public void handleEdit(ExpansionNode element) { - editInputElement(element); - } - - public void handleMove(ExpansionNode element, int oldIndex, int newIndex) { - moveInputElement(element, oldIndex, newIndex); - } - - public void handleRemove(ExpansionNode element) { - removeFromInputElement(element); - } - - public void navigateTo(ExpansionNode element) { - } - }); - this.inputElement.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.inputElement, UMLViewsRepository.FORM_KIND)); - this.inputElement.createControls(parent, widgetFactory); - GridData inputElementData = new GridData(GridData.FILL_HORIZONTAL); - inputElementData.horizontalSpan = 3; - this.inputElement.setLayoutData(inputElementData); - this.inputElement.disableMove(); - } - - /**
- *
- */ - protected void moveInputElement(ExpansionNode element, int oldIndex, int newIndex) { - EObject editedElement = inputElementEditUtil.foundCorrespondingEObject(element); - inputElementEditUtil.moveElement(element, oldIndex, newIndex); - inputElement.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.inputElement, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void removeFromInputElement(ExpansionNode element) { - // Start of user code for the removeFromInputElement() method body - EObject editedElement = inputElementEditUtil.foundCorrespondingEObject(element); - inputElementEditUtil.removeElement(element); - inputElement.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.inputElement, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editInputElement(ExpansionNode element) { - // Start of user code editInputElement() method body - - EObject editedElement = inputElementEditUtil.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) { - inputElementEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - inputElement.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.inputElement, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createOutputElementReferencesTable(FormToolkit widgetFactory, Composite parent) { - this.outputElement = new ReferencesTable<ExpansionNode>(UMLMessages.ExpansionRegionPropertiesEditionPart_OutputElementLabel, new ReferencesTableListener<ExpansionNode>() { - - public void handleAdd() { - TabElementTreeSelectionDialog<ExpansionNode> dialog = new TabElementTreeSelectionDialog<ExpansionNode>(resourceSet, outputElementFilters, outputElementBusinessFilters, - "ExpansionNode", UMLPackage.eINSTANCE.getExpansionNode(), current.eResource()) { - - @Override - public void process(IStructuredSelection selection) { - for(Iterator<?> iter = selection.iterator(); iter.hasNext();) { - EObject elem = (EObject)iter.next(); - if(!outputElementEditUtil.getVirtualList().contains(elem)) - outputElementEditUtil.addElement(elem); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.outputElement, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem)); - } - outputElement.refresh(); - } - }; - dialog.open(); - } - - public void handleEdit(ExpansionNode element) { - editOutputElement(element); - } - - public void handleMove(ExpansionNode element, int oldIndex, int newIndex) { - moveOutputElement(element, oldIndex, newIndex); - } - - public void handleRemove(ExpansionNode element) { - removeFromOutputElement(element); - } - - public void navigateTo(ExpansionNode element) { - } - }); - this.outputElement.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.ExpansionRegion.outputElement, UMLViewsRepository.FORM_KIND)); - this.outputElement.createControls(parent, widgetFactory); - GridData outputElementData = new GridData(GridData.FILL_HORIZONTAL); - outputElementData.horizontalSpan = 3; - this.outputElement.setLayoutData(outputElementData); - this.outputElement.disableMove(); - } - - /**
- *
- */ - protected void moveOutputElement(ExpansionNode element, int oldIndex, int newIndex) { - EObject editedElement = outputElementEditUtil.foundCorrespondingEObject(element); - outputElementEditUtil.moveElement(element, oldIndex, newIndex); - outputElement.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.outputElement, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void removeFromOutputElement(ExpansionNode element) { - // Start of user code for the removeFromOutputElement() method body - EObject editedElement = outputElementEditUtil.foundCorrespondingEObject(element); - outputElementEditUtil.removeElement(element); - outputElement.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, UMLViewsRepository.ExpansionRegion.outputElement, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editOutputElement(ExpansionNode element) { - // Start of user code editOutputElement() method body - - EObject editedElement = outputElementEditUtil.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) { - outputElementEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - outputElement.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - ExpansionRegionPropertiesEditionPartForm.this, - UMLViewsRepository.ExpansionRegion.outputElement, PropertiesEditionEvent.COMMIT, - 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.ExpansionRegionPropertiesEditionPart#getOwnedCommentToAdd() - */ - public List getOwnedCommentToAdd() { - return ownedCommentEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOwnedCommentToRemove() - */ - public List getOwnedCommentToRemove() { - return ownedCommentEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOwnedCommentToEdit() - */ - public Map getOwnedCommentToEdit() { - return ownedCommentEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOwnedCommentToMove() - */ - public List getOwnedCommentToMove() { - return ownedCommentEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOwnedCommentTable() - */ - public List getOwnedCommentTable() { - return ownedCommentEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#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.ExpansionRegionPropertiesEditionPart#updateOwnedComment(EObject newValue) - */ - public void updateOwnedComment(EObject newValue) { - if(ownedCommentEditUtil != null) { - ownedCommentEditUtil.reinit(newValue); - ownedComment.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterOwnedComment(ViewerFilter filter) - */ - public void addFilterToOwnedComment(ViewerFilter filter) { - ownedCommentFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterOwnedComment(ViewerFilter filter) - */ - public void addBusinessFilterToOwnedComment(ViewerFilter filter) { - ownedCommentBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInOwnedCommentTable(EObject element) - */ - public boolean isContainedInOwnedCommentTable(EObject element) { - return ownedCommentEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getName() - */ - public String getName() { - return name.getText(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#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) { - messageManager.addMessage("Name_key", msg, null, msgLevel, name); - } - - public void unsetMessageForName() { - messageManager.removeMessage("Name_key", name); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getVisibility() - */ - public Enumerator getVisibility() { - EEnumLiteral selection = (EEnumLiteral)((StructuredSelection)visibility.getSelection()).getFirstElement(); - return selection.getInstance(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#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.ExpansionRegionPropertiesEditionPart#setVisibility(Enumerator newValue) - */ - public void setVisibility(Enumerator newValue) { - visibility.modelUpdating(new StructuredSelection(newValue)); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getClientDependencyToAdd() - */ - public List getClientDependencyToAdd() { - return clientDependencyEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getClientDependencyToRemove() - */ - public List getClientDependencyToRemove() { - return clientDependencyEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getClientDependencyTable() - */ - public List getClientDependencyTable() { - return clientDependencyEditUtil.getVirtualList(); - } - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#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.ExpansionRegionPropertiesEditionPart#updateClientDependency(EObject newValue) - */ - public void updateClientDependency(EObject newValue) { - if(clientDependencyEditUtil != null) { - clientDependencyEditUtil.reinit(newValue); - clientDependency.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterClientDependency(ViewerFilter filter) - */ - public void addFilterToClientDependency(ViewerFilter filter) { - clientDependencyFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterClientDependency(ViewerFilter filter) - */ - public void addBusinessFilterToClientDependency(ViewerFilter filter) { - clientDependencyBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInClientDependencyTable(EObject element) - */ - public boolean isContainedInClientDependencyTable(EObject element) { - return clientDependencyEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getIsLeaf() - */ - public Boolean getIsLeaf() { - return Boolean.valueOf(isLeaf.getSelection()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#setIsLeaf(Boolean newValue) - */ - public void setIsLeaf(Boolean newValue) { - if(newValue != null) { - isLeaf.setSelection(newValue.booleanValue()); - } else { - isLeaf.setSelection(false); - } - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOutgoingToAdd() - */ - public List getOutgoingToAdd() { - return outgoingEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOutgoingToRemove() - */ - public List getOutgoingToRemove() { - return outgoingEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOutgoingTable() - */ - public List getOutgoingTable() { - return outgoingEditUtil.getVirtualList(); - } - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initOutgoing(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initOutgoing(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - outgoingEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - outgoingEditUtil = new EMFListEditUtil(current, feature); - this.outgoing.setInput(outgoingEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateOutgoing(EObject newValue) - */ - public void updateOutgoing(EObject newValue) { - if(outgoingEditUtil != null) { - outgoingEditUtil.reinit(newValue); - outgoing.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterOutgoing(ViewerFilter filter) - */ - public void addFilterToOutgoing(ViewerFilter filter) { - outgoingFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterOutgoing(ViewerFilter filter) - */ - public void addBusinessFilterToOutgoing(ViewerFilter filter) { - outgoingBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInOutgoingTable(EObject element) - */ - public boolean isContainedInOutgoingTable(EObject element) { - return outgoingEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getIncomingToAdd() - */ - public List getIncomingToAdd() { - return incomingEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getIncomingToRemove() - */ - public List getIncomingToRemove() { - return incomingEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getIncomingTable() - */ - public List getIncomingTable() { - return incomingEditUtil.getVirtualList(); - } - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initIncoming(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initIncoming(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - incomingEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - incomingEditUtil = new EMFListEditUtil(current, feature); - this.incoming.setInput(incomingEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateIncoming(EObject newValue) - */ - public void updateIncoming(EObject newValue) { - if(incomingEditUtil != null) { - incomingEditUtil.reinit(newValue); - incoming.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterIncoming(ViewerFilter filter) - */ - public void addFilterToIncoming(ViewerFilter filter) { - incomingFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterIncoming(ViewerFilter filter) - */ - public void addBusinessFilterToIncoming(ViewerFilter filter) { - incomingBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInIncomingTable(EObject element) - */ - public boolean isContainedInIncomingTable(EObject element) { - return incomingEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getInPartitionToAdd() - */ - public List getInPartitionToAdd() { - return inPartitionEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getInPartitionToRemove() - */ - public List getInPartitionToRemove() { - return inPartitionEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getInPartitionTable() - */ - public List getInPartitionTable() { - return inPartitionEditUtil.getVirtualList(); - } - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initInPartition(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initInPartition(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - inPartitionEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - inPartitionEditUtil = new EMFListEditUtil(current, feature); - this.inPartition.setInput(inPartitionEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateInPartition(EObject newValue) - */ - public void updateInPartition(EObject newValue) { - if(inPartitionEditUtil != null) { - inPartitionEditUtil.reinit(newValue); - inPartition.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterInPartition(ViewerFilter filter) - */ - public void addFilterToInPartition(ViewerFilter filter) { - inPartitionFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterInPartition(ViewerFilter filter) - */ - public void addBusinessFilterToInPartition(ViewerFilter filter) { - inPartitionBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInInPartitionTable(EObject element) - */ - public boolean isContainedInInPartitionTable(EObject element) { - return inPartitionEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getInInterruptibleRegionToAdd() - */ - public List getInInterruptibleRegionToAdd() { - return inInterruptibleRegionEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getInInterruptibleRegionToRemove() - */ - public List getInInterruptibleRegionToRemove() { - return inInterruptibleRegionEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getInInterruptibleRegionTable() - */ - public List getInInterruptibleRegionTable() { - return inInterruptibleRegionEditUtil.getVirtualList(); - } - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initInInterruptibleRegion(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initInInterruptibleRegion(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - inInterruptibleRegionEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - inInterruptibleRegionEditUtil = new EMFListEditUtil(current, feature); - this.inInterruptibleRegion.setInput(inInterruptibleRegionEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateInInterruptibleRegion(EObject newValue) - */ - public void updateInInterruptibleRegion(EObject newValue) { - if(inInterruptibleRegionEditUtil != null) { - inInterruptibleRegionEditUtil.reinit(newValue); - inInterruptibleRegion.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterInInterruptibleRegion(ViewerFilter filter) - */ - public void addFilterToInInterruptibleRegion(ViewerFilter filter) { - inInterruptibleRegionFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterInInterruptibleRegion(ViewerFilter - * filter) - */ - public void addBusinessFilterToInInterruptibleRegion(ViewerFilter filter) { - inInterruptibleRegionBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInInInterruptibleRegionTable(EObject - * element) - */ - public boolean isContainedInInInterruptibleRegionTable(EObject element) { - return inInterruptibleRegionEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getRedefinedNodeToAdd() - */ - public List getRedefinedNodeToAdd() { - return redefinedNodeEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getRedefinedNodeToRemove() - */ - public List getRedefinedNodeToRemove() { - return redefinedNodeEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getRedefinedNodeTable() - */ - public List getRedefinedNodeTable() { - return redefinedNodeEditUtil.getVirtualList(); - } - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initRedefinedNode(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initRedefinedNode(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - redefinedNodeEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - redefinedNodeEditUtil = new EMFListEditUtil(current, feature); - this.redefinedNode.setInput(redefinedNodeEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateRedefinedNode(EObject newValue) - */ - public void updateRedefinedNode(EObject newValue) { - if(redefinedNodeEditUtil != null) { - redefinedNodeEditUtil.reinit(newValue); - redefinedNode.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterRedefinedNode(ViewerFilter filter) - */ - public void addFilterToRedefinedNode(ViewerFilter filter) { - redefinedNodeFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterRedefinedNode(ViewerFilter filter) - */ - public void addBusinessFilterToRedefinedNode(ViewerFilter filter) { - redefinedNodeBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInRedefinedNodeTable(EObject element) - */ - public boolean isContainedInRedefinedNodeTable(EObject element) { - return redefinedNodeEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getHandlerToAdd() - */ - public List getHandlerToAdd() { - return handlerEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getHandlerToRemove() - */ - public List getHandlerToRemove() { - return handlerEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getHandlerToEdit() - */ - public Map getHandlerToEdit() { - return handlerEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getHandlerToMove() - */ - public List getHandlerToMove() { - return handlerEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getHandlerTable() - */ - public List getHandlerTable() { - return handlerEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initHandler(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initHandler(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - handlerEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - handlerEditUtil = new EMFListEditUtil(current, feature); - this.handler.setInput(handlerEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateHandler(EObject newValue) - */ - public void updateHandler(EObject newValue) { - if(handlerEditUtil != null) { - handlerEditUtil.reinit(newValue); - handler.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterHandler(ViewerFilter filter) - */ - public void addFilterToHandler(ViewerFilter filter) { - handlerFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterHandler(ViewerFilter filter) - */ - public void addBusinessFilterToHandler(ViewerFilter filter) { - handlerBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInHandlerTable(EObject element) - */ - public boolean isContainedInHandlerTable(EObject element) { - return handlerEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getLocalPreconditionToAdd() - */ - public List getLocalPreconditionToAdd() { - return localPreconditionEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getLocalPreconditionToRemove() - */ - public List getLocalPreconditionToRemove() { - return localPreconditionEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getLocalPreconditionToEdit() - */ - public Map getLocalPreconditionToEdit() { - return localPreconditionEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getLocalPreconditionToMove() - */ - public List getLocalPreconditionToMove() { - return localPreconditionEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getLocalPreconditionTable() - */ - public List getLocalPreconditionTable() { - return localPreconditionEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initLocalPrecondition(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initLocalPrecondition(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - localPreconditionEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - localPreconditionEditUtil = new EMFListEditUtil(current, feature); - this.localPrecondition.setInput(localPreconditionEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateLocalPrecondition(EObject newValue) - */ - public void updateLocalPrecondition(EObject newValue) { - if(localPreconditionEditUtil != null) { - localPreconditionEditUtil.reinit(newValue); - localPrecondition.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterLocalPrecondition(ViewerFilter filter) - */ - public void addFilterToLocalPrecondition(ViewerFilter filter) { - localPreconditionFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterLocalPrecondition(ViewerFilter - * filter) - */ - public void addBusinessFilterToLocalPrecondition(ViewerFilter filter) { - localPreconditionBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInLocalPreconditionTable(EObject element) - */ - public boolean isContainedInLocalPreconditionTable(EObject element) { - return localPreconditionEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getLocalPostconditionToAdd() - */ - public List getLocalPostconditionToAdd() { - return localPostconditionEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getLocalPostconditionToRemove() - */ - public List getLocalPostconditionToRemove() { - return localPostconditionEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getLocalPostconditionToEdit() - */ - public Map getLocalPostconditionToEdit() { - return localPostconditionEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getLocalPostconditionToMove() - */ - public List getLocalPostconditionToMove() { - return localPostconditionEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getLocalPostconditionTable() - */ - public List getLocalPostconditionTable() { - return localPostconditionEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initLocalPostcondition(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initLocalPostcondition(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - localPostconditionEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - localPostconditionEditUtil = new EMFListEditUtil(current, feature); - this.localPostcondition.setInput(localPostconditionEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateLocalPostcondition(EObject newValue) - */ - public void updateLocalPostcondition(EObject newValue) { - if(localPostconditionEditUtil != null) { - localPostconditionEditUtil.reinit(newValue); - localPostcondition.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterLocalPostcondition(ViewerFilter filter) - */ - public void addFilterToLocalPostcondition(ViewerFilter filter) { - localPostconditionFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterLocalPostcondition(ViewerFilter - * filter) - */ - public void addBusinessFilterToLocalPostcondition(ViewerFilter filter) { - localPostconditionBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInLocalPostconditionTable(EObject element) - */ - public boolean isContainedInLocalPostconditionTable(EObject element) { - return localPostconditionEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getElementImportToAdd() - */ - public List getElementImportToAdd() { - return elementImportEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getElementImportToRemove() - */ - public List getElementImportToRemove() { - return elementImportEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getElementImportToEdit() - */ - public Map getElementImportToEdit() { - return elementImportEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getElementImportToMove() - */ - public List getElementImportToMove() { - return elementImportEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getElementImportTable() - */ - public List getElementImportTable() { - return elementImportEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#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.ExpansionRegionPropertiesEditionPart#updateElementImport(EObject newValue) - */ - public void updateElementImport(EObject newValue) { - if(elementImportEditUtil != null) { - elementImportEditUtil.reinit(newValue); - elementImport.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterElementImport(ViewerFilter filter) - */ - public void addFilterToElementImport(ViewerFilter filter) { - elementImportFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterElementImport(ViewerFilter filter) - */ - public void addBusinessFilterToElementImport(ViewerFilter filter) { - elementImportBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInElementImportTable(EObject element) - */ - public boolean isContainedInElementImportTable(EObject element) { - return elementImportEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getPackageImportToAdd() - */ - public List getPackageImportToAdd() { - return packageImportEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getPackageImportToRemove() - */ - public List getPackageImportToRemove() { - return packageImportEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getPackageImportToEdit() - */ - public Map getPackageImportToEdit() { - return packageImportEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getPackageImportToMove() - */ - public List getPackageImportToMove() { - return packageImportEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getPackageImportTable() - */ - public List getPackageImportTable() { - return packageImportEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#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.ExpansionRegionPropertiesEditionPart#updatePackageImport(EObject newValue) - */ - public void updatePackageImport(EObject newValue) { - if(packageImportEditUtil != null) { - packageImportEditUtil.reinit(newValue); - packageImport.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterPackageImport(ViewerFilter filter) - */ - public void addFilterToPackageImport(ViewerFilter filter) { - packageImportFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterPackageImport(ViewerFilter filter) - */ - public void addBusinessFilterToPackageImport(ViewerFilter filter) { - packageImportBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInPackageImportTable(EObject element) - */ - public boolean isContainedInPackageImportTable(EObject element) { - return packageImportEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOwnedRuleToAdd() - */ - public List getOwnedRuleToAdd() { - return ownedRuleEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOwnedRuleToRemove() - */ - public List getOwnedRuleToRemove() { - return ownedRuleEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOwnedRuleToEdit() - */ - public Map getOwnedRuleToEdit() { - return ownedRuleEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOwnedRuleToMove() - */ - public List getOwnedRuleToMove() { - return ownedRuleEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOwnedRuleTable() - */ - public List getOwnedRuleTable() { - return ownedRuleEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#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.ExpansionRegionPropertiesEditionPart#updateOwnedRule(EObject newValue) - */ - public void updateOwnedRule(EObject newValue) { - if(ownedRuleEditUtil != null) { - ownedRuleEditUtil.reinit(newValue); - ownedRule.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterOwnedRule(ViewerFilter filter) - */ - public void addFilterToOwnedRule(ViewerFilter filter) { - ownedRuleFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterOwnedRule(ViewerFilter filter) - */ - public void addBusinessFilterToOwnedRule(ViewerFilter filter) { - ownedRuleBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInOwnedRuleTable(EObject element) - */ - public boolean isContainedInOwnedRuleTable(EObject element) { - return ownedRuleEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getVariableToAdd() - */ - public List getVariableToAdd() { - return variableEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getVariableToRemove() - */ - public List getVariableToRemove() { - return variableEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getVariableToEdit() - */ - public Map getVariableToEdit() { - return variableEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getVariableToMove() - */ - public List getVariableToMove() { - return variableEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getVariableTable() - */ - public List getVariableTable() { - return variableEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initVariable(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initVariable(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - variableEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - variableEditUtil = new EMFListEditUtil(current, feature); - this.variable.setInput(variableEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateVariable(EObject newValue) - */ - public void updateVariable(EObject newValue) { - if(variableEditUtil != null) { - variableEditUtil.reinit(newValue); - variable.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterVariable(ViewerFilter filter) - */ - public void addFilterToVariable(ViewerFilter filter) { - variableFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterVariable(ViewerFilter filter) - */ - public void addBusinessFilterToVariable(ViewerFilter filter) { - variableBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInVariableTable(EObject element) - */ - public boolean isContainedInVariableTable(EObject element) { - return variableEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getEdgeToAdd() - */ - public List getEdgeToAdd() { - return edgeEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getEdgeToRemove() - */ - public List getEdgeToRemove() { - return edgeEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getEdgeToEdit() - */ - public Map getEdgeToEdit() { - return edgeEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getEdgeToMove() - */ - public List getEdgeToMove() { - return edgeEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getEdgeTable() - */ - public List getEdgeTable() { - return edgeEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initEdge(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initEdge(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - edgeEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - edgeEditUtil = new EMFListEditUtil(current, feature); - this.edge.setInput(edgeEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateEdge(EObject newValue) - */ - public void updateEdge(EObject newValue) { - if(edgeEditUtil != null) { - edgeEditUtil.reinit(newValue); - edge.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterEdge(ViewerFilter filter) - */ - public void addFilterToEdge(ViewerFilter filter) { - edgeFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterEdge(ViewerFilter filter) - */ - public void addBusinessFilterToEdge(ViewerFilter filter) { - edgeBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInEdgeTable(EObject element) - */ - public boolean isContainedInEdgeTable(EObject element) { - return edgeEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getMustIsolate() - */ - public Boolean getMustIsolate() { - return Boolean.valueOf(mustIsolate.getSelection()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#setMustIsolate(Boolean newValue) - */ - public void setMustIsolate(Boolean newValue) { - if(newValue != null) { - mustIsolate.setSelection(newValue.booleanValue()); - } else { - mustIsolate.setSelection(false); - } - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getNodeToAdd() - */ - public List getNodeToAdd() { - return nodeEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getNodeToRemove() - */ - public List getNodeToRemove() { - return nodeEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getNodeToEdit() - */ - public Map getNodeToEdit() { - return nodeEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getNodeToMove() - */ - public List getNodeToMove() { - return nodeEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getNodeTable() - */ - public List getNodeTable() { - return nodeEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initNode(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initNode(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - nodeEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - nodeEditUtil = new EMFListEditUtil(current, feature); - this.node.setInput(nodeEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateNode(EObject newValue) - */ - public void updateNode(EObject newValue) { - if(nodeEditUtil != null) { - nodeEditUtil.reinit(newValue); - node.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterNode(ViewerFilter filter) - */ - public void addFilterToNode(ViewerFilter filter) { - nodeFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterNode(ViewerFilter filter) - */ - public void addBusinessFilterToNode(ViewerFilter filter) { - nodeBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInNodeTable(EObject element) - */ - public boolean isContainedInNodeTable(EObject element) { - return nodeEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getMode() - */ - public Enumerator getMode() { - EEnumLiteral selection = (EEnumLiteral)((StructuredSelection)mode.getSelection()).getFirstElement(); - return selection.getInstance(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initMode(EEnum eenum, Enumerator current) - */ - public void initMode(EEnum eenum, Enumerator current) { - mode.setInput(eenum.getELiterals()); - mode.modelUpdating(new StructuredSelection(current)); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#setMode(Enumerator newValue) - */ - public void setMode(Enumerator newValue) { - mode.modelUpdating(new StructuredSelection(newValue)); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getInputElementToAdd() - */ - public List getInputElementToAdd() { - return inputElementEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getInputElementToRemove() - */ - public List getInputElementToRemove() { - return inputElementEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getInputElementTable() - */ - public List getInputElementTable() { - return inputElementEditUtil.getVirtualList(); - } - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initInputElement(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initInputElement(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - inputElementEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - inputElementEditUtil = new EMFListEditUtil(current, feature); - this.inputElement.setInput(inputElementEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateInputElement(EObject newValue) - */ - public void updateInputElement(EObject newValue) { - if(inputElementEditUtil != null) { - inputElementEditUtil.reinit(newValue); - inputElement.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterInputElement(ViewerFilter filter) - */ - public void addFilterToInputElement(ViewerFilter filter) { - inputElementFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterInputElement(ViewerFilter filter) - */ - public void addBusinessFilterToInputElement(ViewerFilter filter) { - inputElementBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInInputElementTable(EObject element) - */ - public boolean isContainedInInputElementTable(EObject element) { - return inputElementEditUtil.contains(element); - } - - - - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOutputElementToAdd() - */ - public List getOutputElementToAdd() { - return outputElementEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOutputElementToRemove() - */ - public List getOutputElementToRemove() { - return outputElementEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#getOutputElementTable() - */ - public List getOutputElementTable() { - return outputElementEditUtil.getVirtualList(); - } - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#initOutputElement(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initOutputElement(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - outputElementEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - outputElementEditUtil = new EMFListEditUtil(current, feature); - this.outputElement.setInput(outputElementEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#updateOutputElement(EObject newValue) - */ - public void updateOutputElement(EObject newValue) { - if(outputElementEditUtil != null) { - outputElementEditUtil.reinit(newValue); - outputElement.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addFilterOutputElement(ViewerFilter filter) - */ - public void addFilterToOutputElement(ViewerFilter filter) { - outputElementFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#addBusinessFilterOutputElement(ViewerFilter filter) - */ - public void addBusinessFilterToOutputElement(ViewerFilter filter) { - outputElementBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.ExpansionRegionPropertiesEditionPart#isContainedInOutputElementTable(EObject element) - */ - public boolean isContainedInOutputElementTable(EObject element) { - return outputElementEditUtil.contains(element); - } - - - - - - // Start of user code additional methods - - // End of user code - -} |