Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/MergeNodePropertiesEditionPartImpl.java')
-rw-r--r--extraplugins/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/MergeNodePropertiesEditionPartImpl.java1687
1 files changed, 1687 insertions, 0 deletions
diff --git a/extraplugins/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/MergeNodePropertiesEditionPartImpl.java b/extraplugins/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/MergeNodePropertiesEditionPartImpl.java
new file mode 100644
index 00000000000..e5a4e1d405f
--- /dev/null
+++ b/extraplugins/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/MergeNodePropertiesEditionPartImpl.java
@@ -0,0 +1,1687 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.tabbedproperties.uml.parts.impl;
+
+// Start of user code for imports
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.Enumerator;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EEnumLiteral;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.util.EcoreAdapterFactory;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
+import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.api.policies.IPropertiesEditionPolicy;
+import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPolicyProvider;
+import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
+import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
+import org.eclipse.emf.eef.runtime.impl.policies.EObjectPropertiesEditionContext;
+import org.eclipse.emf.eef.runtime.impl.services.PropertiesEditionPolicyProviderService;
+import org.eclipse.emf.eef.runtime.impl.utils.EMFListEditUtil;
+import org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
+import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
+import org.eclipse.emf.eef.runtime.ui.widgets.TabElementTreeSelectionDialog;
+import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart;
+import org.eclipse.papyrus.tabbedproperties.uml.parts.UMLViewsRepository;
+import org.eclipse.papyrus.tabbedproperties.uml.providers.UMLMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.ActivityNode;
+import org.eclipse.uml2.uml.ActivityPartition;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.InterruptibleActivityRegion;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+// End of user code
+
+/**
+ * @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
+ */
+public class MergeNodePropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, MergeNodePropertiesEditionPart {
+
+ protected EMFListEditUtil ownedCommentEditUtil;
+
+ protected ReferencesTable<? extends EObject> ownedComment;
+
+ protected List<ViewerFilter> ownedCommentBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> ownedCommentFilters = new ArrayList<ViewerFilter>();
+
+ protected Text name;
+
+ protected EMFComboViewer visibility;
+
+ protected EMFListEditUtil clientDependencyEditUtil;
+
+ protected ReferencesTable<? extends EObject> clientDependency;
+
+ protected List<ViewerFilter> clientDependencyBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> clientDependencyFilters = new ArrayList<ViewerFilter>();
+
+ protected Button isLeaf;
+
+ protected EMFListEditUtil outgoingEditUtil;
+
+ protected ReferencesTable<? extends EObject> outgoing;
+
+ protected List<ViewerFilter> outgoingBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> outgoingFilters = new ArrayList<ViewerFilter>();
+
+ protected EMFListEditUtil incomingEditUtil;
+
+ protected ReferencesTable<? extends EObject> incoming;
+
+ protected List<ViewerFilter> incomingBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> incomingFilters = new ArrayList<ViewerFilter>();
+
+ protected EMFListEditUtil inPartitionEditUtil;
+
+ protected ReferencesTable<? extends EObject> inPartition;
+
+ protected List<ViewerFilter> inPartitionBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> inPartitionFilters = new ArrayList<ViewerFilter>();
+
+ protected EMFListEditUtil inInterruptibleRegionEditUtil;
+
+ protected ReferencesTable<? extends EObject> inInterruptibleRegion;
+
+ protected List<ViewerFilter> inInterruptibleRegionBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> inInterruptibleRegionFilters = new ArrayList<ViewerFilter>();
+
+ protected EMFListEditUtil redefinedNodeEditUtil;
+
+ protected ReferencesTable<? extends EObject> redefinedNode;
+
+ protected List<ViewerFilter> redefinedNodeBusinessFilters = new ArrayList<ViewerFilter>();
+
+ protected List<ViewerFilter> redefinedNodeFilters = new ArrayList<ViewerFilter>();
+
+
+
+
+
+ /**
+ * Default constructor
+ *
+ * @param editionComponent
+ * the {@link IPropertiesEditionComponent} that manage this part
+ */
+ public MergeNodePropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) {
+ super(editionComponent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart# createFigure(org.eclipse.swt.widgets.Composite)
+ */
+ public Composite createFigure(final Composite parent) {
+ view = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ view.setLayout(layout);
+
+ createControls(view);
+ return view;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart# createControls(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControls(Composite view) {
+ createPropertiesGroup(view);
+
+ // Start of user code for additional ui definition
+
+ // End of user code
+
+ }
+
+ protected void createPropertiesGroup(Composite parent) {
+ Group propertiesGroup = new Group(parent, SWT.NONE);
+ propertiesGroup.setText(UMLMessages.MergeNodePropertiesEditionPart_PropertiesGroupLabel);
+ GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
+ propertiesGroupData.horizontalSpan = 3;
+ propertiesGroup.setLayoutData(propertiesGroupData);
+ GridLayout propertiesGroupLayout = new GridLayout();
+ propertiesGroupLayout.numColumns = 3;
+ propertiesGroup.setLayout(propertiesGroupLayout);
+ createOwnedCommentAdvancedTableComposition(propertiesGroup);
+ createNameText(propertiesGroup);
+ createVisibilityEMFComboViewer(propertiesGroup);
+ createClientDependencyAdvancedReferencesTable(propertiesGroup);
+ createIsLeafCheckbox(propertiesGroup);
+ createOutgoingAdvancedReferencesTable(propertiesGroup);
+ createIncomingAdvancedReferencesTable(propertiesGroup);
+ createInPartitionAdvancedReferencesTable(propertiesGroup);
+ createInInterruptibleRegionAdvancedReferencesTable(propertiesGroup);
+ createRedefinedNodeAdvancedReferencesTable(propertiesGroup);
+ }
+
+ /**
+ * @param container
+ */
+ protected void createOwnedCommentAdvancedTableComposition(Composite parent) {
+ this.ownedComment = new ReferencesTable<Comment>(UMLMessages.MergeNodePropertiesEditionPart_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.MergeNode.ownedComment, UMLViewsRepository.SWT_KIND));
+ this.ownedComment.createControls(parent);
+ GridData ownedCommentData = new GridData(GridData.FILL_HORIZONTAL);
+ ownedCommentData.horizontalSpan = 3;
+ this.ownedComment.setLayoutData(ownedCommentData);
+ }
+
+ /**
+ *
+ */
+ protected void moveOwnedComment(Comment element, int oldIndex, int newIndex) {
+ EObject editedElement = ownedCommentEditUtil.foundCorrespondingEObject(element);
+ ownedCommentEditUtil.moveElement(element, oldIndex, newIndex);
+ ownedComment.refresh();
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.ownedComment,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject));
+ }
+ }
+ // End of user code
+
+ }
+
+ /**
+ *
+ */
+ protected void removeFromOwnedComment(Comment element) {
+
+ // Start of user code removeFromOwnedComment() method body
+ EObject editedElement = ownedCommentEditUtil.foundCorrespondingEObject(element);
+ ownedCommentEditUtil.removeElement(element);
+ ownedComment.refresh();
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.ownedComment,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement));
+ // End of user code
+
+ }
+
+ /**
+ *
+ */
+ protected void editOwnedComment(Comment element) {
+
+ // Start of user code editOwnedComment() method body
+ EObject editedElement = ownedCommentEditUtil.foundCorrespondingEObject(element);
+ IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance()
+ .getProvider(element);
+ IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement);
+ if(editionPolicy != null) {
+ EObject propertiesEditionObject = editionPolicy
+ .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet));
+ if(propertiesEditionObject != null) {
+ ownedCommentEditUtil.putElementToRefresh(editedElement, propertiesEditionObject);
+ ownedComment.refresh();
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.ownedComment,
+ PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement,
+ propertiesEditionObject));
+ }
+ }
+ // End of user code
+
+ }
+
+ protected void createNameText(Composite parent) {
+ SWTUtils.createPartLabel(parent, UMLMessages.MergeNodePropertiesEditionPart_NameLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.MergeNode.name, UMLViewsRepository.SWT_KIND));
+ name = new Text(parent, SWT.BORDER);
+ GridData nameData = new GridData(GridData.FILL_HORIZONTAL);
+ name.setLayoutData(nameData);
+ name.addModifyListener(new ModifyListener() {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
+ */
+ public void modifyText(ModifyEvent e) {
+ if(propertiesEditionComponent != null)
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.name, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, name.getText()));
+ }
+
+ });
+
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.MergeNode.name, UMLViewsRepository.SWT_KIND), null); //$NON-NLS-1$
+ }
+
+ protected void createVisibilityEMFComboViewer(Composite parent) {
+ SWTUtils.createPartLabel(parent, UMLMessages.MergeNodePropertiesEditionPart_VisibilityLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.MergeNode.visibility, UMLViewsRepository.SWT_KIND));
+ visibility = new EMFComboViewer(parent);
+ visibility.setContentProvider(new ArrayContentProvider());
+ visibility.setLabelProvider(new AdapterFactoryLabelProvider(new EcoreAdapterFactory()));
+ GridData visibilityData = new GridData(GridData.FILL_HORIZONTAL);
+ visibility.getCombo().setLayoutData(visibilityData);
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.MergeNode.visibility, UMLViewsRepository.SWT_KIND), null); //$NON-NLS-1$
+ }
+
+ protected void createClientDependencyAdvancedReferencesTable(Composite parent) {
+ this.clientDependency = new ReferencesTable<Dependency>(UMLMessages.MergeNodePropertiesEditionPart_ClientDependencyLabel, new ReferencesTableListener<Dependency>() {
+
+ public void handleAdd() {
+ TabElementTreeSelectionDialog<Dependency> dialog = new TabElementTreeSelectionDialog<Dependency>(resourceSet, clientDependencyFilters, clientDependencyBusinessFilters,
+ "Dependency", UMLPackage.eINSTANCE.getDependency(), current.eResource()) {
+
+ public void process(IStructuredSelection selection) {
+ for(Iterator<?> iter = selection.iterator(); iter.hasNext();) {
+ EObject elem = (EObject)iter.next();
+ if(!clientDependencyEditUtil.getVirtualList().contains(elem))
+ clientDependencyEditUtil.addElement(elem);
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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.MergeNode.clientDependency, UMLViewsRepository.SWT_KIND));
+ this.clientDependency.createControls(parent);
+ GridData clientDependencyData = new GridData(GridData.FILL_HORIZONTAL);
+ clientDependencyData.horizontalSpan = 3;
+ this.clientDependency.setLayoutData(clientDependencyData);
+ this.clientDependency.disableMove();
+ }
+
+ /**
+ *
+ */
+ protected void moveClientDependency(Dependency element, int oldIndex, int newIndex) {
+ EObject editedElement = clientDependencyEditUtil.foundCorrespondingEObject(element);
+ clientDependencyEditUtil.moveElement(element, oldIndex, newIndex);
+ clientDependency.refresh();
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.clientDependency, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex));
+ }
+
+ /**
+ *
+ */
+ protected void removeFromClientDependency(Dependency element) {
+
+ // Start of user code removeFromClientDependency() method body
+ EObject editedElement = clientDependencyEditUtil.foundCorrespondingEObject(element);
+ clientDependencyEditUtil.removeElement(element);
+ clientDependency.refresh();
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.clientDependency,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement,
+ propertiesEditionObject));
+ }
+ }
+ // End of user code
+
+ }
+
+ protected void createIsLeafCheckbox(Composite parent) {
+ isLeaf = new Button(parent, SWT.CHECK);
+ isLeaf.setText(UMLMessages.MergeNodePropertiesEditionPart_IsLeafLabel);
+ GridData isLeafData = new GridData(GridData.FILL_HORIZONTAL);
+ isLeafData.horizontalSpan = 2;
+ isLeaf.setLayoutData(isLeafData);
+ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.MergeNode.isLeaf, UMLViewsRepository.SWT_KIND), null); //$NON-NLS-1$
+ }
+
+ protected void createOutgoingAdvancedReferencesTable(Composite parent) {
+ this.outgoing = new ReferencesTable<ActivityEdge>(UMLMessages.MergeNodePropertiesEditionPart_OutgoingLabel, new ReferencesTableListener<ActivityEdge>() {
+
+ public void handleAdd() {
+ TabElementTreeSelectionDialog<ActivityEdge> dialog = new TabElementTreeSelectionDialog<ActivityEdge>(resourceSet, outgoingFilters, outgoingBusinessFilters,
+ "ActivityEdge", UMLPackage.eINSTANCE.getActivityEdge(), current.eResource()) {
+
+ 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(MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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.MergeNode.outgoing, UMLViewsRepository.SWT_KIND));
+ this.outgoing.createControls(parent);
+ 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 removeFromOutgoing() method body
+ EObject editedElement = outgoingEditUtil.foundCorrespondingEObject(element);
+ outgoingEditUtil.removeElement(element);
+ outgoing.refresh();
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.outgoing,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement,
+ propertiesEditionObject));
+ }
+ }
+ // End of user code
+
+ }
+
+ protected void createIncomingAdvancedReferencesTable(Composite parent) {
+ this.incoming = new ReferencesTable<ActivityEdge>(UMLMessages.MergeNodePropertiesEditionPart_IncomingLabel, new ReferencesTableListener<ActivityEdge>() {
+
+ public void handleAdd() {
+ TabElementTreeSelectionDialog<ActivityEdge> dialog = new TabElementTreeSelectionDialog<ActivityEdge>(resourceSet, incomingFilters, incomingBusinessFilters,
+ "ActivityEdge", UMLPackage.eINSTANCE.getActivityEdge(), current.eResource()) {
+
+ 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(MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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.MergeNode.incoming, UMLViewsRepository.SWT_KIND));
+ this.incoming.createControls(parent);
+ 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 removeFromIncoming() method body
+ EObject editedElement = incomingEditUtil.foundCorrespondingEObject(element);
+ incomingEditUtil.removeElement(element);
+ incoming.refresh();
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.incoming,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement,
+ propertiesEditionObject));
+ }
+ }
+ // End of user code
+
+ }
+
+ protected void createInPartitionAdvancedReferencesTable(Composite parent) {
+ this.inPartition = new ReferencesTable<ActivityPartition>(UMLMessages.MergeNodePropertiesEditionPart_InPartitionLabel, new ReferencesTableListener<ActivityPartition>() {
+
+ public void handleAdd() {
+ TabElementTreeSelectionDialog<ActivityPartition> dialog = new TabElementTreeSelectionDialog<ActivityPartition>(resourceSet, inPartitionFilters, inPartitionBusinessFilters,
+ "ActivityPartition", UMLPackage.eINSTANCE.getActivityPartition(), current.eResource()) {
+
+ 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(MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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.MergeNode.inPartition, UMLViewsRepository.SWT_KIND));
+ this.inPartition.createControls(parent);
+ 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(MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.inPartition, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex));
+ }
+
+ /**
+ *
+ */
+ protected void removeFromInPartition(ActivityPartition element) {
+
+ // Start of user code removeFromInPartition() method body
+ EObject editedElement = inPartitionEditUtil.foundCorrespondingEObject(element);
+ inPartitionEditUtil.removeElement(element);
+ inPartition.refresh();
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.inPartition,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement,
+ propertiesEditionObject));
+ }
+ }
+ // End of user code
+
+ }
+
+ protected void createInInterruptibleRegionAdvancedReferencesTable(Composite parent) {
+ this.inInterruptibleRegion = new ReferencesTable<InterruptibleActivityRegion>(UMLMessages.MergeNodePropertiesEditionPart_InInterruptibleRegionLabel, new ReferencesTableListener<InterruptibleActivityRegion>() {
+
+ public void handleAdd() {
+ TabElementTreeSelectionDialog<InterruptibleActivityRegion> dialog = new TabElementTreeSelectionDialog<InterruptibleActivityRegion>(resourceSet, inInterruptibleRegionFilters, inInterruptibleRegionBusinessFilters,
+ "InterruptibleActivityRegion", UMLPackage.eINSTANCE.getInterruptibleActivityRegion(), current.eResource()) {
+
+ 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(MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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.MergeNode.inInterruptibleRegion, UMLViewsRepository.SWT_KIND));
+ this.inInterruptibleRegion.createControls(parent);
+ 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(MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.inInterruptibleRegion, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex));
+ }
+
+ /**
+ *
+ */
+ protected void removeFromInInterruptibleRegion(InterruptibleActivityRegion element) {
+
+ // Start of user code removeFromInInterruptibleRegion() method body
+ EObject editedElement = inInterruptibleRegionEditUtil.foundCorrespondingEObject(element);
+ inInterruptibleRegionEditUtil.removeElement(element);
+ inInterruptibleRegion.refresh();
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.inInterruptibleRegion,
+ PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement,
+ propertiesEditionObject));
+ }
+ }
+ // End of user code
+
+ }
+
+ protected void createRedefinedNodeAdvancedReferencesTable(Composite parent) {
+ this.redefinedNode = new ReferencesTable<ActivityNode>(UMLMessages.MergeNodePropertiesEditionPart_RedefinedNodeLabel, new ReferencesTableListener<ActivityNode>() {
+
+ public void handleAdd() {
+ TabElementTreeSelectionDialog<ActivityNode> dialog = new TabElementTreeSelectionDialog<ActivityNode>(resourceSet, redefinedNodeFilters, redefinedNodeBusinessFilters,
+ "ActivityNode", UMLPackage.eINSTANCE.getActivityNode(), current.eResource()) {
+
+ 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(MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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.MergeNode.redefinedNode, UMLViewsRepository.SWT_KIND));
+ this.redefinedNode.createControls(parent);
+ 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 removeFromRedefinedNode() method body
+ EObject editedElement = redefinedNodeEditUtil.foundCorrespondingEObject(element);
+ redefinedNodeEditUtil.removeElement(element);
+ redefinedNode.refresh();
+ propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.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(
+ MergeNodePropertiesEditionPartImpl.this, UMLViewsRepository.MergeNode.redefinedNode,
+ 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.MergeNodePropertiesEditionPart#getOwnedCommentToAdd()
+ */
+ public List getOwnedCommentToAdd() {
+ return ownedCommentEditUtil.getElementsToAdd();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getOwnedCommentToRemove()
+ */
+ public List getOwnedCommentToRemove() {
+ return ownedCommentEditUtil.getElementsToRemove();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getOwnedCommentToEdit()
+ */
+ public Map getOwnedCommentToEdit() {
+ return ownedCommentEditUtil.getElementsToRefresh();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getOwnedCommentToMove()
+ */
+ public List getOwnedCommentToMove() {
+ return ownedCommentEditUtil.getElementsToMove();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getOwnedCommentTable()
+ */
+ public List getOwnedCommentTable() {
+ return ownedCommentEditUtil.getVirtualList();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#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.MergeNodePropertiesEditionPart#updateOwnedComment(EObject newValue)
+ */
+ public void updateOwnedComment(EObject newValue) {
+ if(ownedCommentEditUtil != null) {
+ ownedCommentEditUtil.reinit(newValue);
+ ownedComment.refresh();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addFilterOwnedComment(ViewerFilter filter)
+ */
+ public void addFilterToOwnedComment(ViewerFilter filter) {
+ ownedCommentFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addBusinessFilterOwnedComment(ViewerFilter filter)
+ */
+ public void addBusinessFilterToOwnedComment(ViewerFilter filter) {
+ ownedCommentBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#isContainedInOwnedCommentTable(EObject element)
+ */
+ public boolean isContainedInOwnedCommentTable(EObject element) {
+ return ownedCommentEditUtil.contains(element);
+ }
+
+ public void setMessageForOwnedComment(String msg, int msgLevel) {
+
+ }
+
+ public void unsetMessageForOwnedComment() {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getName()
+ */
+ public String getName() {
+ return name.getText();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#setName(String newValue)
+ */
+ public void setName(String newValue) {
+ if(newValue != null) {
+ name.setText(newValue);
+ } else {
+ name.setText(""); //$NON-NLS-1$
+ }
+ }
+
+ public void setMessageForName(String msg, int msgLevel) {
+
+ }
+
+ public void unsetMessageForName() {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getVisibility()
+ */
+ public Enumerator getVisibility() {
+ EEnumLiteral selection = (EEnumLiteral)((StructuredSelection)visibility.getSelection()).getFirstElement();
+ return selection.getInstance();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#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.MergeNodePropertiesEditionPart#setVisibility(Enumerator newValue)
+ */
+ public void setVisibility(Enumerator newValue) {
+ visibility.modelUpdating(new StructuredSelection(newValue));
+ }
+
+ public void setMessageForVisibility(String msg, int msgLevel) {
+
+ }
+
+ public void unsetMessageForVisibility() {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getClientDependencyToAdd()
+ */
+ public List getClientDependencyToAdd() {
+ return clientDependencyEditUtil.getElementsToAdd();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getClientDependencyToRemove()
+ */
+ public List getClientDependencyToRemove() {
+ return clientDependencyEditUtil.getElementsToRemove();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getClientDependencyTable()
+ */
+ public List getClientDependencyTable() {
+ return clientDependencyEditUtil.getVirtualList();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#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.MergeNodePropertiesEditionPart#updateClientDependency(EObject newValue)
+ */
+ public void updateClientDependency(EObject newValue) {
+ if(clientDependencyEditUtil != null) {
+ clientDependencyEditUtil.reinit(newValue);
+ clientDependency.refresh();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addFilterClientDependency(ViewerFilter filter)
+ */
+ public void addFilterToClientDependency(ViewerFilter filter) {
+ clientDependencyFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addBusinessFilterClientDependency(ViewerFilter filter)
+ */
+ public void addBusinessFilterToClientDependency(ViewerFilter filter) {
+ clientDependencyBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#isContainedInClientDependencyTable(EObject element)
+ */
+ public boolean isContainedInClientDependencyTable(EObject element) {
+ return clientDependencyEditUtil.contains(element);
+ }
+
+ public void setMessageForClientDependency(String msg, int msgLevel) {
+
+ }
+
+ public void unsetMessageForClientDependency() {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getIsLeaf()
+ */
+ public Boolean getIsLeaf() {
+ return Boolean.valueOf(isLeaf.getSelection());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#setIsLeaf(Boolean newValue)
+ */
+ public void setIsLeaf(Boolean newValue) {
+ if(newValue != null) {
+ isLeaf.setSelection(newValue.booleanValue());
+ } else {
+ isLeaf.setSelection(false);
+ }
+ }
+
+ public void setMessageForIsLeaf(String msg, int msgLevel) {
+
+ }
+
+ public void unsetMessageForIsLeaf() {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getOutgoingToAdd()
+ */
+ public List getOutgoingToAdd() {
+ return outgoingEditUtil.getElementsToAdd();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getOutgoingToRemove()
+ */
+ public List getOutgoingToRemove() {
+ return outgoingEditUtil.getElementsToRemove();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getOutgoingTable()
+ */
+ public List getOutgoingTable() {
+ return outgoingEditUtil.getVirtualList();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#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.MergeNodePropertiesEditionPart#updateOutgoing(EObject newValue)
+ */
+ public void updateOutgoing(EObject newValue) {
+ if(outgoingEditUtil != null) {
+ outgoingEditUtil.reinit(newValue);
+ outgoing.refresh();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addFilterOutgoing(ViewerFilter filter)
+ */
+ public void addFilterToOutgoing(ViewerFilter filter) {
+ outgoingFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addBusinessFilterOutgoing(ViewerFilter filter)
+ */
+ public void addBusinessFilterToOutgoing(ViewerFilter filter) {
+ outgoingBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#isContainedInOutgoingTable(EObject element)
+ */
+ public boolean isContainedInOutgoingTable(EObject element) {
+ return outgoingEditUtil.contains(element);
+ }
+
+ public void setMessageForOutgoing(String msg, int msgLevel) {
+
+ }
+
+ public void unsetMessageForOutgoing() {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getIncomingToAdd()
+ */
+ public List getIncomingToAdd() {
+ return incomingEditUtil.getElementsToAdd();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getIncomingToRemove()
+ */
+ public List getIncomingToRemove() {
+ return incomingEditUtil.getElementsToRemove();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getIncomingTable()
+ */
+ public List getIncomingTable() {
+ return incomingEditUtil.getVirtualList();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#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.MergeNodePropertiesEditionPart#updateIncoming(EObject newValue)
+ */
+ public void updateIncoming(EObject newValue) {
+ if(incomingEditUtil != null) {
+ incomingEditUtil.reinit(newValue);
+ incoming.refresh();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addFilterIncoming(ViewerFilter filter)
+ */
+ public void addFilterToIncoming(ViewerFilter filter) {
+ incomingFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addBusinessFilterIncoming(ViewerFilter filter)
+ */
+ public void addBusinessFilterToIncoming(ViewerFilter filter) {
+ incomingBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#isContainedInIncomingTable(EObject element)
+ */
+ public boolean isContainedInIncomingTable(EObject element) {
+ return incomingEditUtil.contains(element);
+ }
+
+ public void setMessageForIncoming(String msg, int msgLevel) {
+
+ }
+
+ public void unsetMessageForIncoming() {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getInPartitionToAdd()
+ */
+ public List getInPartitionToAdd() {
+ return inPartitionEditUtil.getElementsToAdd();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getInPartitionToRemove()
+ */
+ public List getInPartitionToRemove() {
+ return inPartitionEditUtil.getElementsToRemove();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getInPartitionTable()
+ */
+ public List getInPartitionTable() {
+ return inPartitionEditUtil.getVirtualList();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#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.MergeNodePropertiesEditionPart#updateInPartition(EObject newValue)
+ */
+ public void updateInPartition(EObject newValue) {
+ if(inPartitionEditUtil != null) {
+ inPartitionEditUtil.reinit(newValue);
+ inPartition.refresh();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addFilterInPartition(ViewerFilter filter)
+ */
+ public void addFilterToInPartition(ViewerFilter filter) {
+ inPartitionFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addBusinessFilterInPartition(ViewerFilter filter)
+ */
+ public void addBusinessFilterToInPartition(ViewerFilter filter) {
+ inPartitionBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#isContainedInInPartitionTable(EObject element)
+ */
+ public boolean isContainedInInPartitionTable(EObject element) {
+ return inPartitionEditUtil.contains(element);
+ }
+
+ public void setMessageForInPartition(String msg, int msgLevel) {
+
+ }
+
+ public void unsetMessageForInPartition() {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getInInterruptibleRegionToAdd()
+ */
+ public List getInInterruptibleRegionToAdd() {
+ return inInterruptibleRegionEditUtil.getElementsToAdd();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getInInterruptibleRegionToRemove()
+ */
+ public List getInInterruptibleRegionToRemove() {
+ return inInterruptibleRegionEditUtil.getElementsToRemove();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getInInterruptibleRegionTable()
+ */
+ public List getInInterruptibleRegionTable() {
+ return inInterruptibleRegionEditUtil.getVirtualList();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#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.MergeNodePropertiesEditionPart#updateInInterruptibleRegion(EObject newValue)
+ */
+ public void updateInInterruptibleRegion(EObject newValue) {
+ if(inInterruptibleRegionEditUtil != null) {
+ inInterruptibleRegionEditUtil.reinit(newValue);
+ inInterruptibleRegion.refresh();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addFilterInInterruptibleRegion(ViewerFilter filter)
+ */
+ public void addFilterToInInterruptibleRegion(ViewerFilter filter) {
+ inInterruptibleRegionFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addBusinessFilterInInterruptibleRegion(ViewerFilter filter)
+ */
+ public void addBusinessFilterToInInterruptibleRegion(ViewerFilter filter) {
+ inInterruptibleRegionBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#isContainedInInInterruptibleRegionTable(EObject element)
+ */
+ public boolean isContainedInInInterruptibleRegionTable(EObject element) {
+ return inInterruptibleRegionEditUtil.contains(element);
+ }
+
+ public void setMessageForInInterruptibleRegion(String msg, int msgLevel) {
+
+ }
+
+ public void unsetMessageForInInterruptibleRegion() {
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getRedefinedNodeToAdd()
+ */
+ public List getRedefinedNodeToAdd() {
+ return redefinedNodeEditUtil.getElementsToAdd();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getRedefinedNodeToRemove()
+ */
+ public List getRedefinedNodeToRemove() {
+ return redefinedNodeEditUtil.getElementsToRemove();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#getRedefinedNodeTable()
+ */
+ public List getRedefinedNodeTable() {
+ return redefinedNodeEditUtil.getVirtualList();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#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.MergeNodePropertiesEditionPart#updateRedefinedNode(EObject newValue)
+ */
+ public void updateRedefinedNode(EObject newValue) {
+ if(redefinedNodeEditUtil != null) {
+ redefinedNodeEditUtil.reinit(newValue);
+ redefinedNode.refresh();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addFilterRedefinedNode(ViewerFilter filter)
+ */
+ public void addFilterToRedefinedNode(ViewerFilter filter) {
+ redefinedNodeFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#addBusinessFilterRedefinedNode(ViewerFilter filter)
+ */
+ public void addBusinessFilterToRedefinedNode(ViewerFilter filter) {
+ redefinedNodeBusinessFilters.add(filter);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.tabbedproperties.uml.parts.MergeNodePropertiesEditionPart#isContainedInRedefinedNodeTable(EObject element)
+ */
+ public boolean isContainedInRedefinedNodeTable(EObject element) {
+ return redefinedNodeEditUtil.contains(element);
+ }
+
+ public void setMessageForRedefinedNode(String msg, int msgLevel) {
+
+ }
+
+ public void unsetMessageForRedefinedNode() {
+
+ }
+
+
+
+
+
+ // Start of user code additional methods
+
+ // End of user code
+
+}

Back to the top