Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/forms/OperationPropertiesEditionPartForm.java')
-rw-r--r--deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/forms/OperationPropertiesEditionPartForm.java2892
1 files changed, 0 insertions, 2892 deletions
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/forms/OperationPropertiesEditionPartForm.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/forms/OperationPropertiesEditionPartForm.java
deleted file mode 100644
index ec5a1899235..00000000000
--- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/forms/OperationPropertiesEditionPartForm.java
+++ /dev/null
@@ -1,2892 +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.HorizontalBox;
-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.OperationPropertiesEditionPart;
-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.Behavior;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.ElementImport;
-import org.eclipse.uml2.uml.Operation;
-import org.eclipse.uml2.uml.PackageImport;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.ParameterSet;
-import org.eclipse.uml2.uml.TemplateBinding;
-import org.eclipse.uml2.uml.Type;
-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 OperationPropertiesEditionPartForm extends CompositePropertiesEditionPart implements IFormPropertiesEditionPart, OperationPropertiesEditionPart {
-
- protected Text name;
-
- protected EMFComboViewer visibility;
-
- protected EMFComboViewer concurrency;
-
- protected Button isAbstract;
-
- protected Button isStatic;
-
- protected Button isLeaf;
-
- protected Button isQuery;
-
- protected EMFListEditUtil ownedParameterEditUtil;
-
- protected ReferencesTable<? extends EObject> ownedParameter;
-
- protected List<ViewerFilter> ownedParameterBusinessFilters = new ArrayList<ViewerFilter>();
-
- protected List<ViewerFilter> ownedParameterFilters = new ArrayList<ViewerFilter>();
-
- private EMFListEditUtil raisedExceptionEditUtil;
-
- protected ReferencesTable<? extends EObject> raisedException;
-
- protected List<ViewerFilter> raisedExceptionBusinessFilters = new ArrayList<ViewerFilter>();
-
- protected List<ViewerFilter> raisedExceptionFilters = new ArrayList<ViewerFilter>();
-
- private EMFListEditUtil methodEditUtil;
-
- protected ReferencesTable<? extends EObject> method;
-
- protected List<ViewerFilter> methodBusinessFilters = new ArrayList<ViewerFilter>();
-
- protected List<ViewerFilter> methodFilters = new ArrayList<ViewerFilter>();
-
- protected EMFListEditUtil templateBindingEditUtil;
-
- protected ReferencesTable<? extends EObject> templateBinding;
-
- protected List<ViewerFilter> templateBindingBusinessFilters = new ArrayList<ViewerFilter>();
-
- protected List<ViewerFilter> templateBindingFilters = new ArrayList<ViewerFilter>();
-
- protected EMFListEditUtil ownedParameterSetEditUtil;
-
- protected ReferencesTable<? extends EObject> ownedParameterSet;
-
- protected List<ViewerFilter> ownedParameterSetBusinessFilters = new ArrayList<ViewerFilter>();
-
- protected List<ViewerFilter> ownedParameterSetFilters = new ArrayList<ViewerFilter>();
-
- private EMFListEditUtil preconditionEditUtil;
-
- protected ReferencesTable<? extends EObject> precondition;
-
- protected List<ViewerFilter> preconditionBusinessFilters = new ArrayList<ViewerFilter>();
-
- protected List<ViewerFilter> preconditionFilters = new ArrayList<ViewerFilter>();
-
- private EMFListEditUtil postconditionEditUtil;
-
- protected ReferencesTable<? extends EObject> postcondition;
-
- protected List<ViewerFilter> postconditionBusinessFilters = new ArrayList<ViewerFilter>();
-
- protected List<ViewerFilter> postconditionFilters = new ArrayList<ViewerFilter>();
-
- private EMFListEditUtil redefinedOperationEditUtil;
-
- protected ReferencesTable<? extends EObject> redefinedOperation;
-
- protected List<ViewerFilter> redefinedOperationBusinessFilters = new ArrayList<ViewerFilter>();
-
- protected List<ViewerFilter> redefinedOperationFilters = 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 packageImportEditUtil;
-
- protected ReferencesTable<? extends EObject> packageImport;
-
- protected List<ViewerFilter> packageImportBusinessFilters = new ArrayList<ViewerFilter>();
-
- protected List<ViewerFilter> packageImportFilters = 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>();
-
-
-
-
-
- /**
- * Default constructor
- *
- * @param editionComponent
- * the {@link IPropertiesEditionComponent} that manage this part
- */
- public OperationPropertiesEditionPartForm(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;
- createGeneralGroup(widgetFactory, view);
- createOthersGroup(widgetFactory, view);
- // Start of user code for additional ui definition
-
- // End of user code
-
- }
-
- protected void createGeneralGroup(FormToolkit widgetFactory, final Composite view) {
- Section generalSection = widgetFactory.createSection(view, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
- generalSection.setText(UMLMessages.OperationPropertiesEditionPart_GeneralGroupLabel);
- GridData generalSectionData = new GridData(GridData.FILL_HORIZONTAL);
- generalSectionData.horizontalSpan = 3;
- generalSection.setLayoutData(generalSectionData);
- Composite generalGroup = widgetFactory.createComposite(generalSection);
- GridLayout generalGroupLayout = new GridLayout();
- generalGroupLayout.numColumns = 3;
- generalGroup.setLayout(generalGroupLayout);
- createNameText(widgetFactory, generalGroup);
- createVisibilityEMFComboViewer(widgetFactory, generalGroup);
- createConcurrencyEMFComboViewer(widgetFactory, generalGroup);
- createGeneralHBox1HBox(widgetFactory, generalGroup);
- createGeneralHBox2HBox(widgetFactory, generalGroup);
- generalSection.setClient(generalGroup);
- }
-
- protected void createNameText(FormToolkit widgetFactory, Composite parent) {
- FormUtils.createPartLabel(widgetFactory, parent, UMLMessages.OperationPropertiesEditionPart_NameLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.Operation.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(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.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(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.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(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.name, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, name.getText()));
- }
- }
-
- });
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.name, UMLViewsRepository.FORM_KIND), null); //$NON-NLS-1$
- }
-
- protected void createVisibilityEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
- FormUtils.createPartLabel(widgetFactory, parent, UMLMessages.OperationPropertiesEditionPart_VisibilityLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.Operation.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(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.visibility, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getVisibility()));
- }
-
- });
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.visibility, UMLViewsRepository.FORM_KIND), null); //$NON-NLS-1$
- }
-
- protected void createConcurrencyEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
- FormUtils.createPartLabel(widgetFactory, parent, UMLMessages.OperationPropertiesEditionPart_ConcurrencyLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.Operation.concurrency, UMLViewsRepository.FORM_KIND));
- concurrency = new EMFComboViewer(parent);
- concurrency.setContentProvider(new ArrayContentProvider());
- concurrency.setLabelProvider(new AdapterFactoryLabelProvider(new EcoreAdapterFactory()));
- GridData concurrencyData = new GridData(GridData.FILL_HORIZONTAL);
- concurrency.getCombo().setLayoutData(concurrencyData);
- concurrency.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(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.concurrency, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getConcurrency()));
- }
-
- });
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.concurrency, UMLViewsRepository.FORM_KIND), null); //$NON-NLS-1$
- }
-
- protected void createGeneralHBox1HBox(FormToolkit widgetFactory, Composite parent) {
- Composite container = widgetFactory.createComposite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.horizontalSpan = 3;
- container.setLayoutData(gridData);
- HorizontalBox generalHBox1HBox = new HorizontalBox(container);
- //Apply constraint for checkbox
- GridData constraint = new GridData(GridData.FILL_HORIZONTAL);
- constraint.horizontalAlignment = GridData.BEGINNING;
- generalHBox1HBox.setLayoutData(constraint);
- //create sub figures
- createIsAbstractCheckbox(widgetFactory, generalHBox1HBox);
- createIsStaticCheckbox(widgetFactory, generalHBox1HBox);
- createIsLeafCheckbox(widgetFactory, generalHBox1HBox);
- createIsQueryCheckbox(widgetFactory, generalHBox1HBox);
- container.pack();
- }
-
- protected void createIsAbstractCheckbox(FormToolkit widgetFactory, Composite parent) {
- isAbstract = widgetFactory.createButton(parent, UMLMessages.OperationPropertiesEditionPart_IsAbstractLabel, SWT.CHECK);
- isAbstract.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(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.isAbstract, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new Boolean(isAbstract.getSelection())));
- }
-
- });
- GridData isAbstractData = new GridData(GridData.FILL_HORIZONTAL);
- isAbstractData.horizontalSpan = 2;
- isAbstract.setLayoutData(isAbstractData);
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.isAbstract, UMLViewsRepository.FORM_KIND), null); //$NON-NLS-1$
- }
-
- protected void createIsStaticCheckbox(FormToolkit widgetFactory, Composite parent) {
- isStatic = widgetFactory.createButton(parent, UMLMessages.OperationPropertiesEditionPart_IsStaticLabel, SWT.CHECK);
- isStatic.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(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.isStatic, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new Boolean(isStatic.getSelection())));
- }
-
- });
- GridData isStaticData = new GridData(GridData.FILL_HORIZONTAL);
- isStaticData.horizontalSpan = 2;
- isStatic.setLayoutData(isStaticData);
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.isStatic, UMLViewsRepository.FORM_KIND), null); //$NON-NLS-1$
- }
-
- protected void createIsLeafCheckbox(FormToolkit widgetFactory, Composite parent) {
- isLeaf = widgetFactory.createButton(parent, UMLMessages.OperationPropertiesEditionPart_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(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.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.Operation.isLeaf, UMLViewsRepository.FORM_KIND), null); //$NON-NLS-1$
- }
-
- protected void createIsQueryCheckbox(FormToolkit widgetFactory, Composite parent) {
- isQuery = widgetFactory.createButton(parent, UMLMessages.OperationPropertiesEditionPart_IsQueryLabel, SWT.CHECK);
- isQuery.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(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.isQuery, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new Boolean(isQuery.getSelection())));
- }
-
- });
- GridData isQueryData = new GridData(GridData.FILL_HORIZONTAL);
- isQueryData.horizontalSpan = 2;
- isQuery.setLayoutData(isQueryData);
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.isQuery, UMLViewsRepository.FORM_KIND), null); //$NON-NLS-1$
- }
-
- protected void createGeneralHBox2HBox(FormToolkit widgetFactory, Composite parent) {
- Composite container = widgetFactory.createComposite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.horizontalSpan = 3;
- container.setLayoutData(gridData);
- HorizontalBox generalHBox2HBox = new HorizontalBox(container);
- //create sub figures
- createOwnedParameterTableComposition(widgetFactory, generalHBox2HBox);
- createRaisedExceptionReferencesTable(widgetFactory, generalHBox2HBox);
- container.pack();
- }
-
- /**
- * @param container
- */
- protected void createOwnedParameterTableComposition(FormToolkit widgetFactory, Composite parent) {
- this.ownedParameter = new ReferencesTable<Parameter>(UMLMessages.OperationPropertiesEditionPart_OwnedParameterLabel, new ReferencesTableListener<Parameter>() {
-
- public void handleAdd() {
- addToOwnedParameter();
- }
-
- public void handleEdit(Parameter element) {
- editOwnedParameter(element);
- }
-
- public void handleMove(Parameter element, int oldIndex, int newIndex) {
- moveOwnedParameter(element, oldIndex, newIndex);
- }
-
- public void handleRemove(Parameter element) {
- removeFromOwnedParameter(element);
- }
-
- public void navigateTo(Parameter element) {
- }
- });
- this.ownedParameter.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.ownedParameter, UMLViewsRepository.FORM_KIND));
- this.ownedParameter.createControls(parent, widgetFactory);
- GridData ownedParameterData = new GridData(GridData.FILL_HORIZONTAL);
- ownedParameterData.horizontalSpan = 3;
- this.ownedParameter.setLayoutData(ownedParameterData);
- }
-
- /**
- *
- */
- protected void moveOwnedParameter(Parameter element, int oldIndex, int newIndex) {
- EObject editedElement = ownedParameterEditUtil.foundCorrespondingEObject(element);
- ownedParameterEditUtil.moveElement(element, oldIndex, newIndex);
- ownedParameter.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.ownedParameter, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex));
- }
-
- /**
- *
- */
- protected void addToOwnedParameter() {
- // Start of user code addToOwnedParameter() method body
- Parameter eObject = UMLFactory.eINSTANCE.createParameter();
- 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) {
- ownedParameterEditUtil.addElement(propertiesEditionObject);
- ownedParameter.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.ownedParameter,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, propertiesEditionObject));
- }
- }
- // End of user code
-
- }
-
- /**
- *
- */
- protected void removeFromOwnedParameter(Parameter element) {
- // Start of user code for the removeFromOwnedParameter() method body
- EObject editedElement = ownedParameterEditUtil.foundCorrespondingEObject(element);
- ownedParameterEditUtil.removeElement(element);
- ownedParameter.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.ownedParameter,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement));
- // End of user code
-
- }
-
- /**
- *
- */
- protected void editOwnedParameter(Parameter element) {
- // Start of user code editOwnedParameter() method body
- EObject editedElement = ownedParameterEditUtil.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) {
- ownedParameterEditUtil.putElementToRefresh(editedElement, propertiesEditionObject);
- ownedParameter.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.ownedParameter,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement,
- propertiesEditionObject));
- }
- }
- // End of user code
-
- }
-
- protected void createRaisedExceptionReferencesTable(FormToolkit widgetFactory, Composite parent) {
- this.raisedException = new ReferencesTable<Type>(UMLMessages.OperationPropertiesEditionPart_RaisedExceptionLabel, new ReferencesTableListener<Type>() {
-
- public void handleAdd() {
- TabElementTreeSelectionDialog<Type> dialog = new TabElementTreeSelectionDialog<Type>(resourceSet, raisedExceptionFilters, raisedExceptionBusinessFilters,
- "Type", UMLPackage.eINSTANCE.getType(), current.eResource()) {
-
- @Override
- public void process(IStructuredSelection selection) {
- for(Iterator<?> iter = selection.iterator(); iter.hasNext();) {
- EObject elem = (EObject)iter.next();
- if(!raisedExceptionEditUtil.getVirtualList().contains(elem))
- raisedExceptionEditUtil.addElement(elem);
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.raisedException,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
- }
- raisedException.refresh();
- }
- };
- dialog.open();
- }
-
- public void handleEdit(Type element) {
- editRaisedException(element);
- }
-
- public void handleMove(Type element, int oldIndex, int newIndex) {
- moveRaisedException(element, oldIndex, newIndex);
- }
-
- public void handleRemove(Type element) {
- removeFromRaisedException(element);
- }
-
- public void navigateTo(Type element) {
- }
- });
- this.raisedException.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.raisedException, UMLViewsRepository.FORM_KIND));
- this.raisedException.createControls(parent, widgetFactory);
- GridData raisedExceptionData = new GridData(GridData.FILL_HORIZONTAL);
- raisedExceptionData.horizontalSpan = 3;
- this.raisedException.setLayoutData(raisedExceptionData);
- this.raisedException.disableMove();
- }
-
- /**
- *
- */
- protected void moveRaisedException(Type element, int oldIndex, int newIndex) {
- }
-
- /**
- *
- */
- protected void removeFromRaisedException(Type element) {
- // Start of user code for the removeFromRaisedException() method body
- EObject editedElement = raisedExceptionEditUtil.foundCorrespondingEObject(element);
- raisedExceptionEditUtil.removeElement(element);
- raisedException.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.raisedException,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement));
- // End of user code
-
- }
-
- /**
- *
- */
- protected void editRaisedException(Type element) {
- // Start of user code editRaisedException() method body
-
- EObject editedElement = raisedExceptionEditUtil.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) {
- raisedExceptionEditUtil.putElementToRefresh(editedElement, propertiesEditionObject);
- raisedException.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.raisedException,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement,
- propertiesEditionObject));
- }
- }
- // End of user code
-
- }
-
- protected void createOthersGroup(FormToolkit widgetFactory, final Composite view) {
- Section othersSection = widgetFactory.createSection(view, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
- othersSection.setText(UMLMessages.OperationPropertiesEditionPart_OthersGroupLabel);
- GridData othersSectionData = new GridData(GridData.FILL_HORIZONTAL);
- othersSectionData.horizontalSpan = 3;
- othersSection.setLayoutData(othersSectionData);
- Composite othersGroup = widgetFactory.createComposite(othersSection);
- GridLayout othersGroupLayout = new GridLayout();
- othersGroupLayout.numColumns = 3;
- othersGroup.setLayout(othersGroupLayout);
- createOthersHBox1HBox(widgetFactory, othersGroup);
- othersSection.setClient(othersGroup);
- }
-
- protected void createOthersHBox1HBox(FormToolkit widgetFactory, Composite parent) {
- Composite container = widgetFactory.createComposite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.horizontalSpan = 3;
- container.setLayoutData(gridData);
- HorizontalBox othersHBox1HBox = new HorizontalBox(container);
- //create sub figures
- createMethodReferencesTable(widgetFactory, othersHBox1HBox);
- createTemplateBindingTableComposition(widgetFactory, othersHBox1HBox);
- createOwnedParameterSetTableComposition(widgetFactory, othersHBox1HBox);
- createPreconditionReferencesTable(widgetFactory, othersHBox1HBox);
- createPostconditionReferencesTable(widgetFactory, othersHBox1HBox);
- createRedefinedOperationReferencesTable(widgetFactory, othersHBox1HBox);
- createOwnedRuleTableComposition(widgetFactory, othersHBox1HBox);
- createPackageImportTableComposition(widgetFactory, othersHBox1HBox);
- createElementImportTableComposition(widgetFactory, othersHBox1HBox);
- container.pack();
- }
-
- protected void createMethodReferencesTable(FormToolkit widgetFactory, Composite parent) {
- this.method = new ReferencesTable<Behavior>(UMLMessages.OperationPropertiesEditionPart_MethodLabel, new ReferencesTableListener<Behavior>() {
-
- public void handleAdd() {
- TabElementTreeSelectionDialog<Behavior> dialog = new TabElementTreeSelectionDialog<Behavior>(resourceSet, methodFilters, methodBusinessFilters,
- "Behavior", UMLPackage.eINSTANCE.getBehavior(), current.eResource()) {
-
- @Override
- public void process(IStructuredSelection selection) {
- for(Iterator<?> iter = selection.iterator(); iter.hasNext();) {
- EObject elem = (EObject)iter.next();
- if(!methodEditUtil.getVirtualList().contains(elem))
- methodEditUtil.addElement(elem);
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.method,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
- }
- method.refresh();
- }
- };
- dialog.open();
- }
-
- public void handleEdit(Behavior element) {
- editMethod(element);
- }
-
- public void handleMove(Behavior element, int oldIndex, int newIndex) {
- moveMethod(element, oldIndex, newIndex);
- }
-
- public void handleRemove(Behavior element) {
- removeFromMethod(element);
- }
-
- public void navigateTo(Behavior element) {
- }
- });
- this.method.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.method, UMLViewsRepository.FORM_KIND));
- this.method.createControls(parent, widgetFactory);
- GridData methodData = new GridData(GridData.FILL_HORIZONTAL);
- methodData.horizontalSpan = 3;
- this.method.setLayoutData(methodData);
- this.method.disableMove();
- }
-
- /**
- *
- */
- protected void moveMethod(Behavior element, int oldIndex, int newIndex) {
- }
-
- /**
- *
- */
- protected void removeFromMethod(Behavior element) {
- // Start of user code for the removeFromMethod() method body
- EObject editedElement = methodEditUtil.foundCorrespondingEObject(element);
- methodEditUtil.removeElement(element);
- method.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.method,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement));
- // End of user code
-
- }
-
- /**
- *
- */
- protected void editMethod(Behavior element) {
- // Start of user code editMethod() method body
-
- EObject editedElement = methodEditUtil.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) {
- methodEditUtil.putElementToRefresh(editedElement, propertiesEditionObject);
- method.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.method,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement,
- propertiesEditionObject));
- }
- }
- // End of user code
-
- }
-
- /**
- * @param container
- */
- protected void createTemplateBindingTableComposition(FormToolkit widgetFactory, Composite parent) {
- this.templateBinding = new ReferencesTable<TemplateBinding>(UMLMessages.OperationPropertiesEditionPart_TemplateBindingLabel, new ReferencesTableListener<TemplateBinding>() {
-
- public void handleAdd() {
- addToTemplateBinding();
- }
-
- public void handleEdit(TemplateBinding element) {
- editTemplateBinding(element);
- }
-
- public void handleMove(TemplateBinding element, int oldIndex, int newIndex) {
- moveTemplateBinding(element, oldIndex, newIndex);
- }
-
- public void handleRemove(TemplateBinding element) {
- removeFromTemplateBinding(element);
- }
-
- public void navigateTo(TemplateBinding element) {
- }
- });
- this.templateBinding.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.templateBinding, UMLViewsRepository.FORM_KIND));
- this.templateBinding.createControls(parent, widgetFactory);
- GridData templateBindingData = new GridData(GridData.FILL_HORIZONTAL);
- templateBindingData.horizontalSpan = 3;
- this.templateBinding.setLayoutData(templateBindingData);
- }
-
- /**
- *
- */
- protected void moveTemplateBinding(TemplateBinding element, int oldIndex, int newIndex) {
- EObject editedElement = templateBindingEditUtil.foundCorrespondingEObject(element);
- templateBindingEditUtil.moveElement(element, oldIndex, newIndex);
- templateBinding.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.templateBinding, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex));
- }
-
- /**
- *
- */
- protected void addToTemplateBinding() {
- // Start of user code addToTemplateBinding() method body
- TemplateBinding eObject = UMLFactory.eINSTANCE.createTemplateBinding();
- 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) {
- templateBindingEditUtil.addElement(propertiesEditionObject);
- templateBinding.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.templateBinding,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, propertiesEditionObject));
- }
- }
- // End of user code
-
- }
-
- /**
- *
- */
- protected void removeFromTemplateBinding(TemplateBinding element) {
- // Start of user code for the removeFromTemplateBinding() method body
- EObject editedElement = templateBindingEditUtil.foundCorrespondingEObject(element);
- templateBindingEditUtil.removeElement(element);
- templateBinding.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.templateBinding,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement));
- // End of user code
-
- }
-
- /**
- *
- */
- protected void editTemplateBinding(TemplateBinding element) {
- // Start of user code editTemplateBinding() method body
- EObject editedElement = templateBindingEditUtil.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) {
- templateBindingEditUtil.putElementToRefresh(editedElement, propertiesEditionObject);
- templateBinding.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.templateBinding,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement,
- propertiesEditionObject));
- }
- }
- // End of user code
-
- }
-
- /**
- * @param container
- */
- protected void createOwnedParameterSetTableComposition(FormToolkit widgetFactory, Composite parent) {
- this.ownedParameterSet = new ReferencesTable<ParameterSet>(UMLMessages.OperationPropertiesEditionPart_OwnedParameterSetLabel, new ReferencesTableListener<ParameterSet>() {
-
- public void handleAdd() {
- addToOwnedParameterSet();
- }
-
- public void handleEdit(ParameterSet element) {
- editOwnedParameterSet(element);
- }
-
- public void handleMove(ParameterSet element, int oldIndex, int newIndex) {
- moveOwnedParameterSet(element, oldIndex, newIndex);
- }
-
- public void handleRemove(ParameterSet element) {
- removeFromOwnedParameterSet(element);
- }
-
- public void navigateTo(ParameterSet element) {
- }
- });
- this.ownedParameterSet.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.ownedParameterSet, UMLViewsRepository.FORM_KIND));
- this.ownedParameterSet.createControls(parent, widgetFactory);
- GridData ownedParameterSetData = new GridData(GridData.FILL_HORIZONTAL);
- ownedParameterSetData.horizontalSpan = 3;
- this.ownedParameterSet.setLayoutData(ownedParameterSetData);
- }
-
- /**
- *
- */
- protected void moveOwnedParameterSet(ParameterSet element, int oldIndex, int newIndex) {
- EObject editedElement = ownedParameterSetEditUtil.foundCorrespondingEObject(element);
- ownedParameterSetEditUtil.moveElement(element, oldIndex, newIndex);
- ownedParameterSet.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.ownedParameterSet, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex));
- }
-
- /**
- *
- */
- protected void addToOwnedParameterSet() {
- // Start of user code addToOwnedParameterSet() method body
- ParameterSet eObject = UMLFactory.eINSTANCE.createParameterSet();
- 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) {
- ownedParameterSetEditUtil.addElement(propertiesEditionObject);
- ownedParameterSet.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.ownedParameterSet,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, propertiesEditionObject));
- }
- }
- // End of user code
-
- }
-
- /**
- *
- */
- protected void removeFromOwnedParameterSet(ParameterSet element) {
- // Start of user code for the removeFromOwnedParameterSet() method body
- EObject editedElement = ownedParameterSetEditUtil.foundCorrespondingEObject(element);
- ownedParameterSetEditUtil.removeElement(element);
- ownedParameterSet.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.ownedParameterSet,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement));
- // End of user code
-
- }
-
- /**
- *
- */
- protected void editOwnedParameterSet(ParameterSet element) {
- // Start of user code editOwnedParameterSet() method body
- EObject editedElement = ownedParameterSetEditUtil.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) {
- ownedParameterSetEditUtil.putElementToRefresh(editedElement, propertiesEditionObject);
- ownedParameterSet.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.ownedParameterSet,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement,
- propertiesEditionObject));
- }
- }
- // End of user code
-
- }
-
- protected void createPreconditionReferencesTable(FormToolkit widgetFactory, Composite parent) {
- this.precondition = new ReferencesTable<Constraint>(UMLMessages.OperationPropertiesEditionPart_PreconditionLabel, new ReferencesTableListener<Constraint>() {
-
- public void handleAdd() {
- TabElementTreeSelectionDialog<Constraint> dialog = new TabElementTreeSelectionDialog<Constraint>(resourceSet, preconditionFilters, preconditionBusinessFilters,
- "Constraint", UMLPackage.eINSTANCE.getConstraint(), current.eResource()) {
-
- @Override
- public void process(IStructuredSelection selection) {
- for(Iterator<?> iter = selection.iterator(); iter.hasNext();) {
- EObject elem = (EObject)iter.next();
- if(!preconditionEditUtil.getVirtualList().contains(elem))
- preconditionEditUtil.addElement(elem);
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.precondition,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
- }
- precondition.refresh();
- }
- };
- dialog.open();
- }
-
- public void handleEdit(Constraint element) {
- editPrecondition(element);
- }
-
- public void handleMove(Constraint element, int oldIndex, int newIndex) {
- movePrecondition(element, oldIndex, newIndex);
- }
-
- public void handleRemove(Constraint element) {
- removeFromPrecondition(element);
- }
-
- public void navigateTo(Constraint element) {
- }
- });
- this.precondition.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.precondition, UMLViewsRepository.FORM_KIND));
- this.precondition.createControls(parent, widgetFactory);
- GridData preconditionData = new GridData(GridData.FILL_HORIZONTAL);
- preconditionData.horizontalSpan = 3;
- this.precondition.setLayoutData(preconditionData);
- this.precondition.disableMove();
- }
-
- /**
- *
- */
- protected void movePrecondition(Constraint element, int oldIndex, int newIndex) {
- EObject editedElement = preconditionEditUtil.foundCorrespondingEObject(element);
- preconditionEditUtil.moveElement(element, oldIndex, newIndex);
- precondition.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.precondition, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex));
- }
-
- /**
- *
- */
- protected void removeFromPrecondition(Constraint element) {
- // Start of user code for the removeFromPrecondition() method body
- EObject editedElement = preconditionEditUtil.foundCorrespondingEObject(element);
- preconditionEditUtil.removeElement(element);
- precondition.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.precondition,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement));
- // End of user code
-
- }
-
- /**
- *
- */
- protected void editPrecondition(Constraint element) {
- // Start of user code editPrecondition() method body
-
- EObject editedElement = preconditionEditUtil.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) {
- preconditionEditUtil.putElementToRefresh(editedElement, propertiesEditionObject);
- precondition.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.precondition,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement,
- propertiesEditionObject));
- }
- }
- // End of user code
-
- }
-
- protected void createPostconditionReferencesTable(FormToolkit widgetFactory, Composite parent) {
- this.postcondition = new ReferencesTable<Constraint>(UMLMessages.OperationPropertiesEditionPart_PostconditionLabel, new ReferencesTableListener<Constraint>() {
-
- public void handleAdd() {
- TabElementTreeSelectionDialog<Constraint> dialog = new TabElementTreeSelectionDialog<Constraint>(resourceSet, postconditionFilters, postconditionBusinessFilters,
- "Constraint", UMLPackage.eINSTANCE.getConstraint(), current.eResource()) {
-
- @Override
- public void process(IStructuredSelection selection) {
- for(Iterator<?> iter = selection.iterator(); iter.hasNext();) {
- EObject elem = (EObject)iter.next();
- if(!postconditionEditUtil.getVirtualList().contains(elem))
- postconditionEditUtil.addElement(elem);
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.postcondition,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
- }
- postcondition.refresh();
- }
- };
- dialog.open();
- }
-
- public void handleEdit(Constraint element) {
- editPostcondition(element);
- }
-
- public void handleMove(Constraint element, int oldIndex, int newIndex) {
- movePostcondition(element, oldIndex, newIndex);
- }
-
- public void handleRemove(Constraint element) {
- removeFromPostcondition(element);
- }
-
- public void navigateTo(Constraint element) {
- }
- });
- this.postcondition.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.postcondition, UMLViewsRepository.FORM_KIND));
- this.postcondition.createControls(parent, widgetFactory);
- GridData postconditionData = new GridData(GridData.FILL_HORIZONTAL);
- postconditionData.horizontalSpan = 3;
- this.postcondition.setLayoutData(postconditionData);
- this.postcondition.disableMove();
- }
-
- /**
- *
- */
- protected void movePostcondition(Constraint element, int oldIndex, int newIndex) {
- EObject editedElement = postconditionEditUtil.foundCorrespondingEObject(element);
- postconditionEditUtil.moveElement(element, oldIndex, newIndex);
- postcondition.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.postcondition, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex));
- }
-
- /**
- *
- */
- protected void removeFromPostcondition(Constraint element) {
- // Start of user code for the removeFromPostcondition() method body
- EObject editedElement = postconditionEditUtil.foundCorrespondingEObject(element);
- postconditionEditUtil.removeElement(element);
- postcondition.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.postcondition,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement));
- // End of user code
-
- }
-
- /**
- *
- */
- protected void editPostcondition(Constraint element) {
- // Start of user code editPostcondition() method body
-
- EObject editedElement = postconditionEditUtil.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) {
- postconditionEditUtil.putElementToRefresh(editedElement, propertiesEditionObject);
- postcondition.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.postcondition,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement,
- propertiesEditionObject));
- }
- }
- // End of user code
-
- }
-
- protected void createRedefinedOperationReferencesTable(FormToolkit widgetFactory, Composite parent) {
- this.redefinedOperation = new ReferencesTable<Operation>(UMLMessages.OperationPropertiesEditionPart_RedefinedOperationLabel, new ReferencesTableListener<Operation>() {
-
- public void handleAdd() {
- TabElementTreeSelectionDialog<Operation> dialog = new TabElementTreeSelectionDialog<Operation>(resourceSet, redefinedOperationFilters, redefinedOperationBusinessFilters,
- "Operation", UMLPackage.eINSTANCE.getOperation(), current.eResource()) {
-
- @Override
- public void process(IStructuredSelection selection) {
- for(Iterator<?> iter = selection.iterator(); iter.hasNext();) {
- EObject elem = (EObject)iter.next();
- if(!redefinedOperationEditUtil.getVirtualList().contains(elem))
- redefinedOperationEditUtil.addElement(elem);
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.redefinedOperation,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
- }
- redefinedOperation.refresh();
- }
- };
- dialog.open();
- }
-
- public void handleEdit(Operation element) {
- editRedefinedOperation(element);
- }
-
- public void handleMove(Operation element, int oldIndex, int newIndex) {
- moveRedefinedOperation(element, oldIndex, newIndex);
- }
-
- public void handleRemove(Operation element) {
- removeFromRedefinedOperation(element);
- }
-
- public void navigateTo(Operation element) {
- }
- });
- this.redefinedOperation.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Operation.redefinedOperation, UMLViewsRepository.FORM_KIND));
- this.redefinedOperation.createControls(parent, widgetFactory);
- GridData redefinedOperationData = new GridData(GridData.FILL_HORIZONTAL);
- redefinedOperationData.horizontalSpan = 3;
- this.redefinedOperation.setLayoutData(redefinedOperationData);
- this.redefinedOperation.disableMove();
- }
-
- /**
- *
- */
- protected void moveRedefinedOperation(Operation element, int oldIndex, int newIndex) {
- EObject editedElement = redefinedOperationEditUtil.foundCorrespondingEObject(element);
- redefinedOperationEditUtil.moveElement(element, oldIndex, newIndex);
- redefinedOperation.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.redefinedOperation, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex));
- }
-
- /**
- *
- */
- protected void removeFromRedefinedOperation(Operation element) {
- // Start of user code for the removeFromRedefinedOperation() method body
- EObject editedElement = redefinedOperationEditUtil.foundCorrespondingEObject(element);
- redefinedOperationEditUtil.removeElement(element);
- redefinedOperation.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.redefinedOperation,
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement));
- // End of user code
-
- }
-
- /**
- *
- */
- protected void editRedefinedOperation(Operation element) {
- // Start of user code editRedefinedOperation() method body
-
- EObject editedElement = redefinedOperationEditUtil.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) {
- redefinedOperationEditUtil.putElementToRefresh(editedElement, propertiesEditionObject);
- redefinedOperation.refresh();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.redefinedOperation,
- 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.OperationPropertiesEditionPart_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.Operation.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(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.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(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.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(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.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(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.ownedRule,
- 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.OperationPropertiesEditionPart_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.Operation.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(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.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(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.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(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.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(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.packageImport,
- 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.OperationPropertiesEditionPart_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.Operation.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(OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.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(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.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(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.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(
- OperationPropertiesEditionPartForm.this, UMLViewsRepository.Operation.elementImport,
- 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.OperationPropertiesEditionPart#getName()
- */
- public String getName() {
- return name.getText();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#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.OperationPropertiesEditionPart#getVisibility()
- */
- public Enumerator getVisibility() {
- EEnumLiteral selection = (EEnumLiteral)((StructuredSelection)visibility.getSelection()).getFirstElement();
- return selection.getInstance();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#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.OperationPropertiesEditionPart#setVisibility(Enumerator newValue)
- */
- public void setVisibility(Enumerator newValue) {
- visibility.modelUpdating(new StructuredSelection(newValue));
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getConcurrency()
- */
- public Enumerator getConcurrency() {
- EEnumLiteral selection = (EEnumLiteral)((StructuredSelection)concurrency.getSelection()).getFirstElement();
- return selection.getInstance();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#initConcurrency(EEnum eenum, Enumerator current)
- */
- public void initConcurrency(EEnum eenum, Enumerator current) {
- concurrency.setInput(eenum.getELiterals());
- concurrency.modelUpdating(new StructuredSelection(current));
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#setConcurrency(Enumerator newValue)
- */
- public void setConcurrency(Enumerator newValue) {
- concurrency.modelUpdating(new StructuredSelection(newValue));
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getIsAbstract()
- */
- public Boolean getIsAbstract() {
- return Boolean.valueOf(isAbstract.getSelection());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#setIsAbstract(Boolean newValue)
- */
- public void setIsAbstract(Boolean newValue) {
- if(newValue != null) {
- isAbstract.setSelection(newValue.booleanValue());
- } else {
- isAbstract.setSelection(false);
- }
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getIsStatic()
- */
- public Boolean getIsStatic() {
- return Boolean.valueOf(isStatic.getSelection());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#setIsStatic(Boolean newValue)
- */
- public void setIsStatic(Boolean newValue) {
- if(newValue != null) {
- isStatic.setSelection(newValue.booleanValue());
- } else {
- isStatic.setSelection(false);
- }
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getIsLeaf()
- */
- public Boolean getIsLeaf() {
- return Boolean.valueOf(isLeaf.getSelection());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#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.OperationPropertiesEditionPart#getIsQuery()
- */
- public Boolean getIsQuery() {
- return Boolean.valueOf(isQuery.getSelection());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#setIsQuery(Boolean newValue)
- */
- public void setIsQuery(Boolean newValue) {
- if(newValue != null) {
- isQuery.setSelection(newValue.booleanValue());
- } else {
- isQuery.setSelection(false);
- }
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedParameterToAdd()
- */
- public List getOwnedParameterToAdd() {
- return ownedParameterEditUtil.getElementsToAdd();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedParameterToRemove()
- */
- public List getOwnedParameterToRemove() {
- return ownedParameterEditUtil.getElementsToRemove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedParameterToEdit()
- */
- public Map getOwnedParameterToEdit() {
- return ownedParameterEditUtil.getElementsToRefresh();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedParameterToMove()
- */
- public List getOwnedParameterToMove() {
- return ownedParameterEditUtil.getElementsToMove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedParameterTable()
- */
- public List getOwnedParameterTable() {
- return ownedParameterEditUtil.getVirtualList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#initOwnedParameter(EObject current, EReference
- * containingFeature, EReference feature)
- */
- public void initOwnedParameter(EObject current, EReference containingFeature, EReference feature) {
- if(current.eResource() != null && current.eResource().getResourceSet() != null)
- this.resourceSet = current.eResource().getResourceSet();
- if(containingFeature != null)
- ownedParameterEditUtil = new EMFListEditUtil(current, containingFeature, feature);
- else
- ownedParameterEditUtil = new EMFListEditUtil(current, feature);
- this.ownedParameter.setInput(ownedParameterEditUtil.getVirtualList());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#updateOwnedParameter(EObject newValue)
- */
- public void updateOwnedParameter(EObject newValue) {
- if(ownedParameterEditUtil != null) {
- ownedParameterEditUtil.reinit(newValue);
- ownedParameter.refresh();
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addFilterOwnedParameter(ViewerFilter filter)
- */
- public void addFilterToOwnedParameter(ViewerFilter filter) {
- ownedParameterFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addBusinessFilterOwnedParameter(ViewerFilter filter)
- */
- public void addBusinessFilterToOwnedParameter(ViewerFilter filter) {
- ownedParameterBusinessFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#isContainedInOwnedParameterTable(EObject element)
- */
- public boolean isContainedInOwnedParameterTable(EObject element) {
- return ownedParameterEditUtil.contains(element);
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getRaisedExceptionToAdd()
- */
- public List getRaisedExceptionToAdd() {
- return raisedExceptionEditUtil.getElementsToAdd();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getRaisedExceptionToRemove()
- */
- public List getRaisedExceptionToRemove() {
- return raisedExceptionEditUtil.getElementsToRemove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getRaisedExceptionTable()
- */
- public List getRaisedExceptionTable() {
- return raisedExceptionEditUtil.getVirtualList();
- }
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#initRaisedException(EObject current, EReference
- * containingFeature, EReference feature)
- */
- public void initRaisedException(EObject current, EReference containingFeature, EReference feature) {
- if(current.eResource() != null && current.eResource().getResourceSet() != null)
- this.resourceSet = current.eResource().getResourceSet();
- if(containingFeature != null)
- raisedExceptionEditUtil = new EMFListEditUtil(current, containingFeature, feature);
- else
- raisedExceptionEditUtil = new EMFListEditUtil(current, feature);
- this.raisedException.setInput(raisedExceptionEditUtil.getVirtualList());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#updateRaisedException(EObject newValue)
- */
- public void updateRaisedException(EObject newValue) {
- if(raisedExceptionEditUtil != null) {
- raisedExceptionEditUtil.reinit(newValue);
- raisedException.refresh();
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addFilterRaisedException(ViewerFilter filter)
- */
- public void addFilterToRaisedException(ViewerFilter filter) {
- raisedExceptionFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addBusinessFilterRaisedException(ViewerFilter filter)
- */
- public void addBusinessFilterToRaisedException(ViewerFilter filter) {
- raisedExceptionBusinessFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#isContainedInRaisedExceptionTable(EObject element)
- */
- public boolean isContainedInRaisedExceptionTable(EObject element) {
- return raisedExceptionEditUtil.contains(element);
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getMethodToAdd()
- */
- public List getMethodToAdd() {
- return methodEditUtil.getElementsToAdd();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getMethodToRemove()
- */
- public List getMethodToRemove() {
- return methodEditUtil.getElementsToRemove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getMethodTable()
- */
- public List getMethodTable() {
- return methodEditUtil.getVirtualList();
- }
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#initMethod(EObject current, EReference containingFeature,
- * EReference feature)
- */
- public void initMethod(EObject current, EReference containingFeature, EReference feature) {
- if(current.eResource() != null && current.eResource().getResourceSet() != null)
- this.resourceSet = current.eResource().getResourceSet();
- if(containingFeature != null)
- methodEditUtil = new EMFListEditUtil(current, containingFeature, feature);
- else
- methodEditUtil = new EMFListEditUtil(current, feature);
- this.method.setInput(methodEditUtil.getVirtualList());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#updateMethod(EObject newValue)
- */
- public void updateMethod(EObject newValue) {
- if(methodEditUtil != null) {
- methodEditUtil.reinit(newValue);
- method.refresh();
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addFilterMethod(ViewerFilter filter)
- */
- public void addFilterToMethod(ViewerFilter filter) {
- methodFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addBusinessFilterMethod(ViewerFilter filter)
- */
- public void addBusinessFilterToMethod(ViewerFilter filter) {
- methodBusinessFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#isContainedInMethodTable(EObject element)
- */
- public boolean isContainedInMethodTable(EObject element) {
- return methodEditUtil.contains(element);
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getTemplateBindingToAdd()
- */
- public List getTemplateBindingToAdd() {
- return templateBindingEditUtil.getElementsToAdd();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getTemplateBindingToRemove()
- */
- public List getTemplateBindingToRemove() {
- return templateBindingEditUtil.getElementsToRemove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getTemplateBindingToEdit()
- */
- public Map getTemplateBindingToEdit() {
- return templateBindingEditUtil.getElementsToRefresh();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getTemplateBindingToMove()
- */
- public List getTemplateBindingToMove() {
- return templateBindingEditUtil.getElementsToMove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getTemplateBindingTable()
- */
- public List getTemplateBindingTable() {
- return templateBindingEditUtil.getVirtualList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#initTemplateBinding(EObject current, EReference
- * containingFeature, EReference feature)
- */
- public void initTemplateBinding(EObject current, EReference containingFeature, EReference feature) {
- if(current.eResource() != null && current.eResource().getResourceSet() != null)
- this.resourceSet = current.eResource().getResourceSet();
- if(containingFeature != null)
- templateBindingEditUtil = new EMFListEditUtil(current, containingFeature, feature);
- else
- templateBindingEditUtil = new EMFListEditUtil(current, feature);
- this.templateBinding.setInput(templateBindingEditUtil.getVirtualList());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#updateTemplateBinding(EObject newValue)
- */
- public void updateTemplateBinding(EObject newValue) {
- if(templateBindingEditUtil != null) {
- templateBindingEditUtil.reinit(newValue);
- templateBinding.refresh();
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addFilterTemplateBinding(ViewerFilter filter)
- */
- public void addFilterToTemplateBinding(ViewerFilter filter) {
- templateBindingFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addBusinessFilterTemplateBinding(ViewerFilter filter)
- */
- public void addBusinessFilterToTemplateBinding(ViewerFilter filter) {
- templateBindingBusinessFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#isContainedInTemplateBindingTable(EObject element)
- */
- public boolean isContainedInTemplateBindingTable(EObject element) {
- return templateBindingEditUtil.contains(element);
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedParameterSetToAdd()
- */
- public List getOwnedParameterSetToAdd() {
- return ownedParameterSetEditUtil.getElementsToAdd();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedParameterSetToRemove()
- */
- public List getOwnedParameterSetToRemove() {
- return ownedParameterSetEditUtil.getElementsToRemove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedParameterSetToEdit()
- */
- public Map getOwnedParameterSetToEdit() {
- return ownedParameterSetEditUtil.getElementsToRefresh();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedParameterSetToMove()
- */
- public List getOwnedParameterSetToMove() {
- return ownedParameterSetEditUtil.getElementsToMove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedParameterSetTable()
- */
- public List getOwnedParameterSetTable() {
- return ownedParameterSetEditUtil.getVirtualList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#initOwnedParameterSet(EObject current, EReference
- * containingFeature, EReference feature)
- */
- public void initOwnedParameterSet(EObject current, EReference containingFeature, EReference feature) {
- if(current.eResource() != null && current.eResource().getResourceSet() != null)
- this.resourceSet = current.eResource().getResourceSet();
- if(containingFeature != null)
- ownedParameterSetEditUtil = new EMFListEditUtil(current, containingFeature, feature);
- else
- ownedParameterSetEditUtil = new EMFListEditUtil(current, feature);
- this.ownedParameterSet.setInput(ownedParameterSetEditUtil.getVirtualList());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#updateOwnedParameterSet(EObject newValue)
- */
- public void updateOwnedParameterSet(EObject newValue) {
- if(ownedParameterSetEditUtil != null) {
- ownedParameterSetEditUtil.reinit(newValue);
- ownedParameterSet.refresh();
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addFilterOwnedParameterSet(ViewerFilter filter)
- */
- public void addFilterToOwnedParameterSet(ViewerFilter filter) {
- ownedParameterSetFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addBusinessFilterOwnedParameterSet(ViewerFilter filter)
- */
- public void addBusinessFilterToOwnedParameterSet(ViewerFilter filter) {
- ownedParameterSetBusinessFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#isContainedInOwnedParameterSetTable(EObject element)
- */
- public boolean isContainedInOwnedParameterSetTable(EObject element) {
- return ownedParameterSetEditUtil.contains(element);
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getPreconditionToAdd()
- */
- public List getPreconditionToAdd() {
- return preconditionEditUtil.getElementsToAdd();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getPreconditionToRemove()
- */
- public List getPreconditionToRemove() {
- return preconditionEditUtil.getElementsToRemove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getPreconditionTable()
- */
- public List getPreconditionTable() {
- return preconditionEditUtil.getVirtualList();
- }
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#initPrecondition(EObject current, EReference
- * containingFeature, EReference feature)
- */
- public void initPrecondition(EObject current, EReference containingFeature, EReference feature) {
- if(current.eResource() != null && current.eResource().getResourceSet() != null)
- this.resourceSet = current.eResource().getResourceSet();
- if(containingFeature != null)
- preconditionEditUtil = new EMFListEditUtil(current, containingFeature, feature);
- else
- preconditionEditUtil = new EMFListEditUtil(current, feature);
- this.precondition.setInput(preconditionEditUtil.getVirtualList());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#updatePrecondition(EObject newValue)
- */
- public void updatePrecondition(EObject newValue) {
- if(preconditionEditUtil != null) {
- preconditionEditUtil.reinit(newValue);
- precondition.refresh();
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addFilterPrecondition(ViewerFilter filter)
- */
- public void addFilterToPrecondition(ViewerFilter filter) {
- preconditionFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addBusinessFilterPrecondition(ViewerFilter filter)
- */
- public void addBusinessFilterToPrecondition(ViewerFilter filter) {
- preconditionBusinessFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#isContainedInPreconditionTable(EObject element)
- */
- public boolean isContainedInPreconditionTable(EObject element) {
- return preconditionEditUtil.contains(element);
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getPostconditionToAdd()
- */
- public List getPostconditionToAdd() {
- return postconditionEditUtil.getElementsToAdd();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getPostconditionToRemove()
- */
- public List getPostconditionToRemove() {
- return postconditionEditUtil.getElementsToRemove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getPostconditionTable()
- */
- public List getPostconditionTable() {
- return postconditionEditUtil.getVirtualList();
- }
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#initPostcondition(EObject current, EReference
- * containingFeature, EReference feature)
- */
- public void initPostcondition(EObject current, EReference containingFeature, EReference feature) {
- if(current.eResource() != null && current.eResource().getResourceSet() != null)
- this.resourceSet = current.eResource().getResourceSet();
- if(containingFeature != null)
- postconditionEditUtil = new EMFListEditUtil(current, containingFeature, feature);
- else
- postconditionEditUtil = new EMFListEditUtil(current, feature);
- this.postcondition.setInput(postconditionEditUtil.getVirtualList());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#updatePostcondition(EObject newValue)
- */
- public void updatePostcondition(EObject newValue) {
- if(postconditionEditUtil != null) {
- postconditionEditUtil.reinit(newValue);
- postcondition.refresh();
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addFilterPostcondition(ViewerFilter filter)
- */
- public void addFilterToPostcondition(ViewerFilter filter) {
- postconditionFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addBusinessFilterPostcondition(ViewerFilter filter)
- */
- public void addBusinessFilterToPostcondition(ViewerFilter filter) {
- postconditionBusinessFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#isContainedInPostconditionTable(EObject element)
- */
- public boolean isContainedInPostconditionTable(EObject element) {
- return postconditionEditUtil.contains(element);
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getRedefinedOperationToAdd()
- */
- public List getRedefinedOperationToAdd() {
- return redefinedOperationEditUtil.getElementsToAdd();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getRedefinedOperationToRemove()
- */
- public List getRedefinedOperationToRemove() {
- return redefinedOperationEditUtil.getElementsToRemove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getRedefinedOperationTable()
- */
- public List getRedefinedOperationTable() {
- return redefinedOperationEditUtil.getVirtualList();
- }
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#initRedefinedOperation(EObject current, EReference
- * containingFeature, EReference feature)
- */
- public void initRedefinedOperation(EObject current, EReference containingFeature, EReference feature) {
- if(current.eResource() != null && current.eResource().getResourceSet() != null)
- this.resourceSet = current.eResource().getResourceSet();
- if(containingFeature != null)
- redefinedOperationEditUtil = new EMFListEditUtil(current, containingFeature, feature);
- else
- redefinedOperationEditUtil = new EMFListEditUtil(current, feature);
- this.redefinedOperation.setInput(redefinedOperationEditUtil.getVirtualList());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#updateRedefinedOperation(EObject newValue)
- */
- public void updateRedefinedOperation(EObject newValue) {
- if(redefinedOperationEditUtil != null) {
- redefinedOperationEditUtil.reinit(newValue);
- redefinedOperation.refresh();
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addFilterRedefinedOperation(ViewerFilter filter)
- */
- public void addFilterToRedefinedOperation(ViewerFilter filter) {
- redefinedOperationFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addBusinessFilterRedefinedOperation(ViewerFilter filter)
- */
- public void addBusinessFilterToRedefinedOperation(ViewerFilter filter) {
- redefinedOperationBusinessFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#isContainedInRedefinedOperationTable(EObject element)
- */
- public boolean isContainedInRedefinedOperationTable(EObject element) {
- return redefinedOperationEditUtil.contains(element);
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedRuleToAdd()
- */
- public List getOwnedRuleToAdd() {
- return ownedRuleEditUtil.getElementsToAdd();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedRuleToRemove()
- */
- public List getOwnedRuleToRemove() {
- return ownedRuleEditUtil.getElementsToRemove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedRuleToEdit()
- */
- public Map getOwnedRuleToEdit() {
- return ownedRuleEditUtil.getElementsToRefresh();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedRuleToMove()
- */
- public List getOwnedRuleToMove() {
- return ownedRuleEditUtil.getElementsToMove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getOwnedRuleTable()
- */
- public List getOwnedRuleTable() {
- return ownedRuleEditUtil.getVirtualList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#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.OperationPropertiesEditionPart#updateOwnedRule(EObject newValue)
- */
- public void updateOwnedRule(EObject newValue) {
- if(ownedRuleEditUtil != null) {
- ownedRuleEditUtil.reinit(newValue);
- ownedRule.refresh();
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addFilterOwnedRule(ViewerFilter filter)
- */
- public void addFilterToOwnedRule(ViewerFilter filter) {
- ownedRuleFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addBusinessFilterOwnedRule(ViewerFilter filter)
- */
- public void addBusinessFilterToOwnedRule(ViewerFilter filter) {
- ownedRuleBusinessFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#isContainedInOwnedRuleTable(EObject element)
- */
- public boolean isContainedInOwnedRuleTable(EObject element) {
- return ownedRuleEditUtil.contains(element);
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getPackageImportToAdd()
- */
- public List getPackageImportToAdd() {
- return packageImportEditUtil.getElementsToAdd();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getPackageImportToRemove()
- */
- public List getPackageImportToRemove() {
- return packageImportEditUtil.getElementsToRemove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getPackageImportToEdit()
- */
- public Map getPackageImportToEdit() {
- return packageImportEditUtil.getElementsToRefresh();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getPackageImportToMove()
- */
- public List getPackageImportToMove() {
- return packageImportEditUtil.getElementsToMove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getPackageImportTable()
- */
- public List getPackageImportTable() {
- return packageImportEditUtil.getVirtualList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#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.OperationPropertiesEditionPart#updatePackageImport(EObject newValue)
- */
- public void updatePackageImport(EObject newValue) {
- if(packageImportEditUtil != null) {
- packageImportEditUtil.reinit(newValue);
- packageImport.refresh();
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addFilterPackageImport(ViewerFilter filter)
- */
- public void addFilterToPackageImport(ViewerFilter filter) {
- packageImportFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addBusinessFilterPackageImport(ViewerFilter filter)
- */
- public void addBusinessFilterToPackageImport(ViewerFilter filter) {
- packageImportBusinessFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#isContainedInPackageImportTable(EObject element)
- */
- public boolean isContainedInPackageImportTable(EObject element) {
- return packageImportEditUtil.contains(element);
- }
-
-
-
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getElementImportToAdd()
- */
- public List getElementImportToAdd() {
- return elementImportEditUtil.getElementsToAdd();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getElementImportToRemove()
- */
- public List getElementImportToRemove() {
- return elementImportEditUtil.getElementsToRemove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getElementImportToEdit()
- */
- public Map getElementImportToEdit() {
- return elementImportEditUtil.getElementsToRefresh();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getElementImportToMove()
- */
- public List getElementImportToMove() {
- return elementImportEditUtil.getElementsToMove();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#getElementImportTable()
- */
- public List getElementImportTable() {
- return elementImportEditUtil.getVirtualList();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#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.OperationPropertiesEditionPart#updateElementImport(EObject newValue)
- */
- public void updateElementImport(EObject newValue) {
- if(elementImportEditUtil != null) {
- elementImportEditUtil.reinit(newValue);
- elementImport.refresh();
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addFilterElementImport(ViewerFilter filter)
- */
- public void addFilterToElementImport(ViewerFilter filter) {
- elementImportFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#addBusinessFilterElementImport(ViewerFilter filter)
- */
- public void addBusinessFilterToElementImport(ViewerFilter filter) {
- elementImportBusinessFilters.add(filter);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.papyrus.tabbedproperties.uml.parts.OperationPropertiesEditionPart#isContainedInElementImportTable(EObject element)
- */
- public boolean isContainedInElementImportTable(EObject element) {
- return elementImportEditUtil.contains(element);
- }
-
-
-
-
-
- // Start of user code additional methods
-
- // End of user code
-
-}

Back to the top