diff options
Diffstat (limited to 'deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/RegionPropertiesEditionPartImpl.java')
-rw-r--r-- | deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/RegionPropertiesEditionPartImpl.java | 1830 |
1 files changed, 0 insertions, 1830 deletions
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/RegionPropertiesEditionPartImpl.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/RegionPropertiesEditionPartImpl.java deleted file mode 100644 index 89c88bcbb71..00000000000 --- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/RegionPropertiesEditionPartImpl.java +++ /dev/null @@ -1,1830 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Obeo. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Obeo - initial API and implementation - *******************************************************************************/ -package org.eclipse.papyrus.tabbedproperties.uml.parts.impl; - -// Start of user code for imports - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.eclipse.emf.common.util.Enumerator; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EEnumLiteral; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.util.EcoreAdapterFactory; -import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; -import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent; -import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart; -import org.eclipse.emf.eef.runtime.api.policies.IPropertiesEditionPolicy; -import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPolicyProvider; -import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent; -import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart; -import org.eclipse.emf.eef.runtime.impl.policies.EObjectPropertiesEditionContext; -import org.eclipse.emf.eef.runtime.impl.services.PropertiesEditionPolicyProviderService; -import org.eclipse.emf.eef.runtime.impl.utils.EMFListEditUtil; -import org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer; -import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable; -import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils; -import org.eclipse.emf.eef.runtime.ui.widgets.TabElementTreeSelectionDialog; -import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener; -import org.eclipse.jface.viewers.ArrayContentProvider; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.viewers.ViewerFilter; -import org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart; -import org.eclipse.papyrus.tabbedproperties.uml.parts.UMLViewsRepository; -import org.eclipse.papyrus.tabbedproperties.uml.providers.UMLMessages; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Text; -import org.eclipse.uml2.uml.Comment; -import org.eclipse.uml2.uml.Constraint; -import org.eclipse.uml2.uml.Dependency; -import org.eclipse.uml2.uml.ElementImport; -import org.eclipse.uml2.uml.PackageImport; -import org.eclipse.uml2.uml.Transition; -import org.eclipse.uml2.uml.UMLFactory; -import org.eclipse.uml2.uml.UMLPackage; -import org.eclipse.uml2.uml.Vertex; - -// End of user code - -/** - * @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a> - */ -public class RegionPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, RegionPropertiesEditionPart { - - protected EMFListEditUtil ownedCommentEditUtil; - - protected ReferencesTable<? extends EObject> ownedComment; - - protected List<ViewerFilter> ownedCommentBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> ownedCommentFilters = new ArrayList<ViewerFilter>(); - - protected Text name; - - protected EMFComboViewer visibility; - - protected EMFListEditUtil clientDependencyEditUtil; - - protected ReferencesTable<? extends EObject> clientDependency; - - protected List<ViewerFilter> clientDependencyBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> clientDependencyFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil elementImportEditUtil; - - protected ReferencesTable<? extends EObject> elementImport; - - protected List<ViewerFilter> elementImportBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> elementImportFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil packageImportEditUtil; - - protected ReferencesTable<? extends EObject> packageImport; - - protected List<ViewerFilter> packageImportBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> packageImportFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil ownedRuleEditUtil; - - protected ReferencesTable<? extends EObject> ownedRule; - - protected List<ViewerFilter> ownedRuleBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> ownedRuleFilters = new ArrayList<ViewerFilter>(); - - protected Button isLeaf; - - protected EMFListEditUtil subvertexEditUtil; - - protected ReferencesTable<? extends EObject> subvertex; - - protected List<ViewerFilter> subvertexBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> subvertexFilters = new ArrayList<ViewerFilter>(); - - protected EMFListEditUtil transitionEditUtil; - - protected ReferencesTable<? extends EObject> transition; - - protected List<ViewerFilter> transitionBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> transitionFilters = new ArrayList<ViewerFilter>(); - - - - - - /** - * Default constructor - * - * @param editionComponent - * the {@link IPropertiesEditionComponent} that manage this part - */ - public RegionPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) { - super(editionComponent); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart# createFigure(org.eclipse.swt.widgets.Composite) - */ - public Composite createFigure(final Composite parent) { - view = new Composite(parent, SWT.NONE); - GridLayout layout = new GridLayout(); - layout.numColumns = 3; - view.setLayout(layout); - - createControls(view); - return view; - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart# createControls(org.eclipse.swt.widgets.Composite) - */ - public void createControls(Composite view) { - createPropertiesGroup(view); - - // Start of user code for additional ui definition - - // End of user code - - } - - protected void createPropertiesGroup(Composite parent) { - Group propertiesGroup = new Group(parent, SWT.NONE); - propertiesGroup.setText(UMLMessages.RegionPropertiesEditionPart_PropertiesGroupLabel); - GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL); - propertiesGroupData.horizontalSpan = 3; - propertiesGroup.setLayoutData(propertiesGroupData); - GridLayout propertiesGroupLayout = new GridLayout(); - propertiesGroupLayout.numColumns = 3; - propertiesGroup.setLayout(propertiesGroupLayout); - createOwnedCommentAdvancedTableComposition(propertiesGroup); - createNameText(propertiesGroup); - createVisibilityEMFComboViewer(propertiesGroup); - createClientDependencyAdvancedReferencesTable(propertiesGroup); - createElementImportAdvancedTableComposition(propertiesGroup); - createPackageImportAdvancedTableComposition(propertiesGroup); - createOwnedRuleAdvancedTableComposition(propertiesGroup); - createIsLeafCheckbox(propertiesGroup); - createSubvertexAdvancedTableComposition(propertiesGroup); - createTransitionAdvancedTableComposition(propertiesGroup); - } - - /** - * @param container - */ - protected void createOwnedCommentAdvancedTableComposition(Composite parent) { - this.ownedComment = new ReferencesTable<Comment>(UMLMessages.RegionPropertiesEditionPart_OwnedCommentLabel, new ReferencesTableListener<Comment>() { - - public void handleAdd() { - addToOwnedComment(); - } - - public void handleEdit(Comment element) { - editOwnedComment(element); - } - - public void handleMove(Comment element, int oldIndex, int newIndex) { - moveOwnedComment(element, oldIndex, newIndex); - } - - public void handleRemove(Comment element) { - removeFromOwnedComment(element); - } - - public void navigateTo(Comment element) { - } - }); - this.ownedComment.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Region.ownedComment, UMLViewsRepository.SWT_KIND)); - this.ownedComment.createControls(parent); - GridData ownedCommentData = new GridData(GridData.FILL_HORIZONTAL); - ownedCommentData.horizontalSpan = 3; - this.ownedComment.setLayoutData(ownedCommentData); - } - - /**
- *
- */ - protected void moveOwnedComment(Comment element, int oldIndex, int newIndex) { - EObject editedElement = ownedCommentEditUtil.foundCorrespondingEObject(element); - ownedCommentEditUtil.moveElement(element, oldIndex, newIndex); - ownedComment.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.ownedComment, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToOwnedComment() { - - // Start of user code addToOwnedComment() method body - Comment eObject = UMLFactory.eINSTANCE.createComment(); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(eObject); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(eObject); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(propertiesEditionComponent, - eObject, resourceSet)); - if(propertiesEditionObject != null) { - ownedCommentEditUtil.addElement(propertiesEditionObject); - ownedComment.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.ownedComment, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromOwnedComment(Comment element) { - - // Start of user code removeFromOwnedComment() method body - EObject editedElement = ownedCommentEditUtil.foundCorrespondingEObject(element); - ownedCommentEditUtil.removeElement(element); - ownedComment.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.ownedComment, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editOwnedComment(Comment element) { - - // Start of user code editOwnedComment() method body - EObject editedElement = ownedCommentEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - ownedCommentEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - ownedComment.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.ownedComment, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createNameText(Composite parent) { - SWTUtils.createPartLabel(parent, UMLMessages.RegionPropertiesEditionPart_NameLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.Region.name, UMLViewsRepository.SWT_KIND)); - name = new Text(parent, SWT.BORDER); - GridData nameData = new GridData(GridData.FILL_HORIZONTAL); - name.setLayoutData(nameData); - name.addModifyListener(new ModifyListener() { - - /* - * (non-Javadoc) - * - * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent) - */ - public void modifyText(ModifyEvent e) { - if(propertiesEditionComponent != null) - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.name, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, name.getText())); - } - - }); - - SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.Region.name, UMLViewsRepository.SWT_KIND), null); //$NON-NLS-1$ - } - - protected void createVisibilityEMFComboViewer(Composite parent) { - SWTUtils.createPartLabel(parent, UMLMessages.RegionPropertiesEditionPart_VisibilityLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.Region.visibility, UMLViewsRepository.SWT_KIND)); - visibility = new EMFComboViewer(parent); - visibility.setContentProvider(new ArrayContentProvider()); - visibility.setLabelProvider(new AdapterFactoryLabelProvider(new EcoreAdapterFactory())); - GridData visibilityData = new GridData(GridData.FILL_HORIZONTAL); - visibility.getCombo().setLayoutData(visibilityData); - SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.Region.visibility, UMLViewsRepository.SWT_KIND), null); //$NON-NLS-1$ - } - - protected void createClientDependencyAdvancedReferencesTable(Composite parent) { - this.clientDependency = new ReferencesTable<Dependency>(UMLMessages.RegionPropertiesEditionPart_ClientDependencyLabel, new ReferencesTableListener<Dependency>() { - - public void handleAdd() { - TabElementTreeSelectionDialog<Dependency> dialog = new TabElementTreeSelectionDialog<Dependency>(resourceSet, clientDependencyFilters, clientDependencyBusinessFilters, - "Dependency", UMLPackage.eINSTANCE.getDependency(), current.eResource()) { - - public void process(IStructuredSelection selection) { - for(Iterator<?> iter = selection.iterator(); iter.hasNext();) { - EObject elem = (EObject)iter.next(); - if(!clientDependencyEditUtil.getVirtualList().contains(elem)) - clientDependencyEditUtil.addElement(elem); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.clientDependency, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem)); - } - clientDependency.refresh(); - } - - }; - dialog.open(); - } - - public void handleEdit(Dependency element) { - editClientDependency(element); - } - - public void handleMove(Dependency element, int oldIndex, int newIndex) { - moveClientDependency(element, oldIndex, newIndex); - } - - public void handleRemove(Dependency element) { - removeFromClientDependency(element); - } - - public void navigateTo(Dependency element) { - } - }); - this.clientDependency.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Region.clientDependency, UMLViewsRepository.SWT_KIND)); - this.clientDependency.createControls(parent); - GridData clientDependencyData = new GridData(GridData.FILL_HORIZONTAL); - clientDependencyData.horizontalSpan = 3; - this.clientDependency.setLayoutData(clientDependencyData); - this.clientDependency.disableMove(); - } - - /**
- *
- */ - protected void moveClientDependency(Dependency element, int oldIndex, int newIndex) { - EObject editedElement = clientDependencyEditUtil.foundCorrespondingEObject(element); - clientDependencyEditUtil.moveElement(element, oldIndex, newIndex); - clientDependency.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.clientDependency, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void removeFromClientDependency(Dependency element) { - - // Start of user code removeFromClientDependency() method body - EObject editedElement = clientDependencyEditUtil.foundCorrespondingEObject(element); - clientDependencyEditUtil.removeElement(element); - clientDependency.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.clientDependency, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editClientDependency(Dependency element) { - - // Start of user code editClientDependency() method body - EObject editedElement = clientDependencyEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - clientDependencyEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - clientDependency.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.clientDependency, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createElementImportAdvancedTableComposition(Composite parent) { - this.elementImport = new ReferencesTable<ElementImport>(UMLMessages.RegionPropertiesEditionPart_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.Region.elementImport, UMLViewsRepository.SWT_KIND)); - this.elementImport.createControls(parent); - GridData elementImportData = new GridData(GridData.FILL_HORIZONTAL); - elementImportData.horizontalSpan = 3; - this.elementImport.setLayoutData(elementImportData); - } - - /**
- *
- */ - protected void moveElementImport(ElementImport element, int oldIndex, int newIndex) { - EObject editedElement = elementImportEditUtil.foundCorrespondingEObject(element); - elementImportEditUtil.moveElement(element, oldIndex, newIndex); - elementImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.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( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.elementImport, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromElementImport(ElementImport element) { - - // Start of user code removeFromElementImport() method body - EObject editedElement = elementImportEditUtil.foundCorrespondingEObject(element); - elementImportEditUtil.removeElement(element); - elementImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.elementImport, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editElementImport(ElementImport element) { - - // Start of user code editElementImport() method body - EObject editedElement = elementImportEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - elementImportEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - elementImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.elementImport, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createPackageImportAdvancedTableComposition(Composite parent) { - this.packageImport = new ReferencesTable<PackageImport>(UMLMessages.RegionPropertiesEditionPart_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.Region.packageImport, UMLViewsRepository.SWT_KIND)); - this.packageImport.createControls(parent); - GridData packageImportData = new GridData(GridData.FILL_HORIZONTAL); - packageImportData.horizontalSpan = 3; - this.packageImport.setLayoutData(packageImportData); - } - - /**
- *
- */ - protected void movePackageImport(PackageImport element, int oldIndex, int newIndex) { - EObject editedElement = packageImportEditUtil.foundCorrespondingEObject(element); - packageImportEditUtil.moveElement(element, oldIndex, newIndex); - packageImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.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( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.packageImport, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromPackageImport(PackageImport element) { - - // Start of user code removeFromPackageImport() method body - EObject editedElement = packageImportEditUtil.foundCorrespondingEObject(element); - packageImportEditUtil.removeElement(element); - packageImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.packageImport, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editPackageImport(PackageImport element) { - - // Start of user code editPackageImport() method body - EObject editedElement = packageImportEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - packageImportEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - packageImport.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.packageImport, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createOwnedRuleAdvancedTableComposition(Composite parent) { - this.ownedRule = new ReferencesTable<Constraint>(UMLMessages.RegionPropertiesEditionPart_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.Region.ownedRule, UMLViewsRepository.SWT_KIND)); - this.ownedRule.createControls(parent); - GridData ownedRuleData = new GridData(GridData.FILL_HORIZONTAL); - ownedRuleData.horizontalSpan = 3; - this.ownedRule.setLayoutData(ownedRuleData); - } - - /**
- *
- */ - protected void moveOwnedRule(Constraint element, int oldIndex, int newIndex) { - EObject editedElement = ownedRuleEditUtil.foundCorrespondingEObject(element); - ownedRuleEditUtil.moveElement(element, oldIndex, newIndex); - ownedRule.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.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( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.ownedRule, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromOwnedRule(Constraint element) { - - // Start of user code removeFromOwnedRule() method body - EObject editedElement = ownedRuleEditUtil.foundCorrespondingEObject(element); - ownedRuleEditUtil.removeElement(element); - ownedRule.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.ownedRule, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editOwnedRule(Constraint element) { - - // Start of user code editOwnedRule() method body - EObject editedElement = ownedRuleEditUtil.foundCorrespondingEObject(element); - IPropertiesEditionPolicyProvider policyProvider = PropertiesEditionPolicyProviderService.getInstance() - .getProvider(element); - IPropertiesEditionPolicy editionPolicy = policyProvider.getEditionPolicy(editedElement); - if(editionPolicy != null) { - EObject propertiesEditionObject = editionPolicy - .getPropertiesEditionObject(new EObjectPropertiesEditionContext(null, element, resourceSet)); - if(propertiesEditionObject != null) { - ownedRuleEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - ownedRule.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.ownedRule, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createIsLeafCheckbox(Composite parent) { - isLeaf = new Button(parent, SWT.CHECK); - isLeaf.setText(UMLMessages.RegionPropertiesEditionPart_IsLeafLabel); - GridData isLeafData = new GridData(GridData.FILL_HORIZONTAL); - isLeafData.horizontalSpan = 2; - isLeaf.setLayoutData(isLeafData); - SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.Region.isLeaf, UMLViewsRepository.SWT_KIND), null); //$NON-NLS-1$ - } - - /** - * @param container - */ - protected void createSubvertexAdvancedTableComposition(Composite parent) { - this.subvertex = new ReferencesTable<Vertex>(UMLMessages.RegionPropertiesEditionPart_SubvertexLabel, new ReferencesTableListener<Vertex>() { - - public void handleAdd() { - addToSubvertex(); - } - - public void handleEdit(Vertex element) { - editSubvertex(element); - } - - public void handleMove(Vertex element, int oldIndex, int newIndex) { - moveSubvertex(element, oldIndex, newIndex); - } - - public void handleRemove(Vertex element) { - removeFromSubvertex(element); - } - - public void navigateTo(Vertex element) { - } - }); - this.subvertex.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Region.subvertex, UMLViewsRepository.SWT_KIND)); - this.subvertex.createControls(parent); - GridData subvertexData = new GridData(GridData.FILL_HORIZONTAL); - subvertexData.horizontalSpan = 3; - this.subvertex.setLayoutData(subvertexData); - } - - /**
- *
- */ - protected void moveSubvertex(Vertex element, int oldIndex, int newIndex) { - } - - /**
- *
- */ - protected void addToSubvertex() { - - // Start of user code addToSubvertex() method body - // End of user code - - } - - /**
- *
- */ - protected void removeFromSubvertex(Vertex element) { - - // Start of user code removeFromSubvertex() method body - EObject editedElement = subvertexEditUtil.foundCorrespondingEObject(element); - subvertexEditUtil.removeElement(element); - subvertex.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.subvertex, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editSubvertex(Vertex element) { - - // Start of user code editSubvertex() method body - EObject editedElement = subvertexEditUtil.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) { - subvertexEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - subvertex.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.subvertex, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - /** - * @param container - */ - protected void createTransitionAdvancedTableComposition(Composite parent) { - this.transition = new ReferencesTable<Transition>(UMLMessages.RegionPropertiesEditionPart_TransitionLabel, new ReferencesTableListener<Transition>() { - - public void handleAdd() { - addToTransition(); - } - - public void handleEdit(Transition element) { - editTransition(element); - } - - public void handleMove(Transition element, int oldIndex, int newIndex) { - moveTransition(element, oldIndex, newIndex); - } - - public void handleRemove(Transition element) { - removeFromTransition(element); - } - - public void navigateTo(Transition element) { - } - }); - this.transition.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Region.transition, UMLViewsRepository.SWT_KIND)); - this.transition.createControls(parent); - GridData transitionData = new GridData(GridData.FILL_HORIZONTAL); - transitionData.horizontalSpan = 3; - this.transition.setLayoutData(transitionData); - } - - /**
- *
- */ - protected void moveTransition(Transition element, int oldIndex, int newIndex) { - EObject editedElement = transitionEditUtil.foundCorrespondingEObject(element); - transitionEditUtil.moveElement(element, oldIndex, newIndex); - transition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.transition, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, editedElement, newIndex)); - } - - /**
- *
- */ - protected void addToTransition() { - - // Start of user code addToTransition() method body - Transition eObject = UMLFactory.eINSTANCE.createTransition(); - 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) { - transitionEditUtil.addElement(propertiesEditionObject); - transition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.transition, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.ADD, null, propertiesEditionObject)); - } - } - // End of user code - - } - - /**
- *
- */ - protected void removeFromTransition(Transition element) { - - // Start of user code removeFromTransition() method body - EObject editedElement = transitionEditUtil.foundCorrespondingEObject(element); - transitionEditUtil.removeElement(element); - transition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.transition, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editTransition(Transition element) { - - // Start of user code editTransition() method body - EObject editedElement = transitionEditUtil.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) { - transitionEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - transition.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - RegionPropertiesEditionPartImpl.this, UMLViewsRepository.Region.transition, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - - public void firePropertiesChanged(PropertiesEditionEvent event) { - // Start of user code for tab synchronization - - // End of user code - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getOwnedCommentToAdd() - */ - public List getOwnedCommentToAdd() { - return ownedCommentEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getOwnedCommentToRemove() - */ - public List getOwnedCommentToRemove() { - return ownedCommentEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getOwnedCommentToEdit() - */ - public Map getOwnedCommentToEdit() { - return ownedCommentEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getOwnedCommentToMove() - */ - public List getOwnedCommentToMove() { - return ownedCommentEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getOwnedCommentTable() - */ - public List getOwnedCommentTable() { - return ownedCommentEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#initOwnedComment(EObject current, EReference containingFeature, - * EReference feature) - */ - public void initOwnedComment(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - ownedCommentEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - ownedCommentEditUtil = new EMFListEditUtil(current, feature); - this.ownedComment.setInput(ownedCommentEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#updateOwnedComment(EObject newValue) - */ - public void updateOwnedComment(EObject newValue) { - if(ownedCommentEditUtil != null) { - ownedCommentEditUtil.reinit(newValue); - ownedComment.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addFilterOwnedComment(ViewerFilter filter) - */ - public void addFilterToOwnedComment(ViewerFilter filter) { - ownedCommentFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addBusinessFilterOwnedComment(ViewerFilter filter) - */ - public void addBusinessFilterToOwnedComment(ViewerFilter filter) { - ownedCommentBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#isContainedInOwnedCommentTable(EObject element) - */ - public boolean isContainedInOwnedCommentTable(EObject element) { - return ownedCommentEditUtil.contains(element); - } - - public void setMessageForOwnedComment(String msg, int msgLevel) { - - } - - public void unsetMessageForOwnedComment() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getName() - */ - public String getName() { - return name.getText(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#setName(String newValue) - */ - public void setName(String newValue) { - if(newValue != null) { - name.setText(newValue); - } else { - name.setText(""); //$NON-NLS-1$ - } - } - - public void setMessageForName(String msg, int msgLevel) { - - } - - public void unsetMessageForName() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getVisibility() - */ - public Enumerator getVisibility() { - EEnumLiteral selection = (EEnumLiteral)((StructuredSelection)visibility.getSelection()).getFirstElement(); - return selection.getInstance(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#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.RegionPropertiesEditionPart#setVisibility(Enumerator newValue) - */ - public void setVisibility(Enumerator newValue) { - visibility.modelUpdating(new StructuredSelection(newValue)); - } - - public void setMessageForVisibility(String msg, int msgLevel) { - - } - - public void unsetMessageForVisibility() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getClientDependencyToAdd() - */ - public List getClientDependencyToAdd() { - return clientDependencyEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getClientDependencyToRemove() - */ - public List getClientDependencyToRemove() { - return clientDependencyEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getClientDependencyTable() - */ - public List getClientDependencyTable() { - return clientDependencyEditUtil.getVirtualList(); - } - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#initClientDependency(EObject current, EReference - * containingFeature, EReference feature) - */ - public void initClientDependency(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - clientDependencyEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - clientDependencyEditUtil = new EMFListEditUtil(current, feature); - this.clientDependency.setInput(clientDependencyEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#updateClientDependency(EObject newValue) - */ - public void updateClientDependency(EObject newValue) { - if(clientDependencyEditUtil != null) { - clientDependencyEditUtil.reinit(newValue); - clientDependency.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addFilterClientDependency(ViewerFilter filter) - */ - public void addFilterToClientDependency(ViewerFilter filter) { - clientDependencyFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addBusinessFilterClientDependency(ViewerFilter filter) - */ - public void addBusinessFilterToClientDependency(ViewerFilter filter) { - clientDependencyBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#isContainedInClientDependencyTable(EObject element) - */ - public boolean isContainedInClientDependencyTable(EObject element) { - return clientDependencyEditUtil.contains(element); - } - - public void setMessageForClientDependency(String msg, int msgLevel) { - - } - - public void unsetMessageForClientDependency() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getElementImportToAdd() - */ - public List getElementImportToAdd() { - return elementImportEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getElementImportToRemove() - */ - public List getElementImportToRemove() { - return elementImportEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getElementImportToEdit() - */ - public Map getElementImportToEdit() { - return elementImportEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getElementImportToMove() - */ - public List getElementImportToMove() { - return elementImportEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getElementImportTable() - */ - public List getElementImportTable() { - return elementImportEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#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.RegionPropertiesEditionPart#updateElementImport(EObject newValue) - */ - public void updateElementImport(EObject newValue) { - if(elementImportEditUtil != null) { - elementImportEditUtil.reinit(newValue); - elementImport.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addFilterElementImport(ViewerFilter filter) - */ - public void addFilterToElementImport(ViewerFilter filter) { - elementImportFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addBusinessFilterElementImport(ViewerFilter filter) - */ - public void addBusinessFilterToElementImport(ViewerFilter filter) { - elementImportBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#isContainedInElementImportTable(EObject element) - */ - public boolean isContainedInElementImportTable(EObject element) { - return elementImportEditUtil.contains(element); - } - - public void setMessageForElementImport(String msg, int msgLevel) { - - } - - public void unsetMessageForElementImport() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getPackageImportToAdd() - */ - public List getPackageImportToAdd() { - return packageImportEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getPackageImportToRemove() - */ - public List getPackageImportToRemove() { - return packageImportEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getPackageImportToEdit() - */ - public Map getPackageImportToEdit() { - return packageImportEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getPackageImportToMove() - */ - public List getPackageImportToMove() { - return packageImportEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getPackageImportTable() - */ - public List getPackageImportTable() { - return packageImportEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#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.RegionPropertiesEditionPart#updatePackageImport(EObject newValue) - */ - public void updatePackageImport(EObject newValue) { - if(packageImportEditUtil != null) { - packageImportEditUtil.reinit(newValue); - packageImport.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addFilterPackageImport(ViewerFilter filter) - */ - public void addFilterToPackageImport(ViewerFilter filter) { - packageImportFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addBusinessFilterPackageImport(ViewerFilter filter) - */ - public void addBusinessFilterToPackageImport(ViewerFilter filter) { - packageImportBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#isContainedInPackageImportTable(EObject element) - */ - public boolean isContainedInPackageImportTable(EObject element) { - return packageImportEditUtil.contains(element); - } - - public void setMessageForPackageImport(String msg, int msgLevel) { - - } - - public void unsetMessageForPackageImport() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getOwnedRuleToAdd() - */ - public List getOwnedRuleToAdd() { - return ownedRuleEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getOwnedRuleToRemove() - */ - public List getOwnedRuleToRemove() { - return ownedRuleEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getOwnedRuleToEdit() - */ - public Map getOwnedRuleToEdit() { - return ownedRuleEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getOwnedRuleToMove() - */ - public List getOwnedRuleToMove() { - return ownedRuleEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getOwnedRuleTable() - */ - public List getOwnedRuleTable() { - return ownedRuleEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#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.RegionPropertiesEditionPart#updateOwnedRule(EObject newValue) - */ - public void updateOwnedRule(EObject newValue) { - if(ownedRuleEditUtil != null) { - ownedRuleEditUtil.reinit(newValue); - ownedRule.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addFilterOwnedRule(ViewerFilter filter) - */ - public void addFilterToOwnedRule(ViewerFilter filter) { - ownedRuleFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addBusinessFilterOwnedRule(ViewerFilter filter) - */ - public void addBusinessFilterToOwnedRule(ViewerFilter filter) { - ownedRuleBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#isContainedInOwnedRuleTable(EObject element) - */ - public boolean isContainedInOwnedRuleTable(EObject element) { - return ownedRuleEditUtil.contains(element); - } - - public void setMessageForOwnedRule(String msg, int msgLevel) { - - } - - public void unsetMessageForOwnedRule() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getIsLeaf() - */ - public Boolean getIsLeaf() { - return Boolean.valueOf(isLeaf.getSelection()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#setIsLeaf(Boolean newValue) - */ - public void setIsLeaf(Boolean newValue) { - if(newValue != null) { - isLeaf.setSelection(newValue.booleanValue()); - } else { - isLeaf.setSelection(false); - } - } - - public void setMessageForIsLeaf(String msg, int msgLevel) { - - } - - public void unsetMessageForIsLeaf() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getSubvertexToAdd() - */ - public List getSubvertexToAdd() { - return subvertexEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getSubvertexToRemove() - */ - public List getSubvertexToRemove() { - return subvertexEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getSubvertexToEdit() - */ - public Map getSubvertexToEdit() { - return subvertexEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getSubvertexToMove() - */ - public List getSubvertexToMove() { - return subvertexEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getSubvertexTable() - */ - public List getSubvertexTable() { - return subvertexEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#initSubvertex(EObject current, EReference containingFeature, - * EReference feature) - */ - public void initSubvertex(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - subvertexEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - subvertexEditUtil = new EMFListEditUtil(current, feature); - this.subvertex.setInput(subvertexEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#updateSubvertex(EObject newValue) - */ - public void updateSubvertex(EObject newValue) { - if(subvertexEditUtil != null) { - subvertexEditUtil.reinit(newValue); - subvertex.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addFilterSubvertex(ViewerFilter filter) - */ - public void addFilterToSubvertex(ViewerFilter filter) { - subvertexFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addBusinessFilterSubvertex(ViewerFilter filter) - */ - public void addBusinessFilterToSubvertex(ViewerFilter filter) { - subvertexBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#isContainedInSubvertexTable(EObject element) - */ - public boolean isContainedInSubvertexTable(EObject element) { - return subvertexEditUtil.contains(element); - } - - public void setMessageForSubvertex(String msg, int msgLevel) { - - } - - public void unsetMessageForSubvertex() { - - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getTransitionToAdd() - */ - public List getTransitionToAdd() { - return transitionEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getTransitionToRemove() - */ - public List getTransitionToRemove() { - return transitionEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getTransitionToEdit() - */ - public Map getTransitionToEdit() { - return transitionEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getTransitionToMove() - */ - public List getTransitionToMove() { - return transitionEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#getTransitionTable() - */ - public List getTransitionTable() { - return transitionEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#initTransition(EObject current, EReference containingFeature, - * EReference feature) - */ - public void initTransition(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - transitionEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - transitionEditUtil = new EMFListEditUtil(current, feature); - this.transition.setInput(transitionEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#updateTransition(EObject newValue) - */ - public void updateTransition(EObject newValue) { - if(transitionEditUtil != null) { - transitionEditUtil.reinit(newValue); - transition.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addFilterTransition(ViewerFilter filter) - */ - public void addFilterToTransition(ViewerFilter filter) { - transitionFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#addBusinessFilterTransition(ViewerFilter filter) - */ - public void addBusinessFilterToTransition(ViewerFilter filter) { - transitionBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.RegionPropertiesEditionPart#isContainedInTransitionTable(EObject element) - */ - public boolean isContainedInTransitionTable(EObject element) { - return transitionEditUtil.contains(element); - } - - public void setMessageForTransition(String msg, int msgLevel) { - - } - - public void unsetMessageForTransition() { - - } - - - - - - // Start of user code additional methods - - // End of user code - -} |