diff options
Diffstat (limited to 'deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/LifelinePropertiesEditionPartImpl.java')
-rw-r--r-- | deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/LifelinePropertiesEditionPartImpl.java | 861 |
1 files changed, 0 insertions, 861 deletions
diff --git a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/LifelinePropertiesEditionPartImpl.java b/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/LifelinePropertiesEditionPartImpl.java deleted file mode 100644 index 138ecc0bfac..00000000000 --- a/deprecated/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.tabbedproperties.uml/generated/org/eclipse/papyrus/tabbedproperties/uml/parts/impl/LifelinePropertiesEditionPartImpl.java +++ /dev/null @@ -1,861 +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.LifelinePropertiesEditionPart; -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.Composite; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Text; -import org.eclipse.uml2.uml.Comment; -import org.eclipse.uml2.uml.Dependency; -import org.eclipse.uml2.uml.InteractionFragment; -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 LifelinePropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, LifelinePropertiesEditionPart { - - 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 coveredByEditUtil; - - protected ReferencesTable<? extends EObject> coveredBy; - - protected List<ViewerFilter> coveredByBusinessFilters = new ArrayList<ViewerFilter>(); - - protected List<ViewerFilter> coveredByFilters = new ArrayList<ViewerFilter>(); - - - - - - /** - * Default constructor - * - * @param editionComponent - * the {@link IPropertiesEditionComponent} that manage this part - */ - public LifelinePropertiesEditionPartImpl(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.LifelinePropertiesEditionPart_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); - createCoveredByAdvancedReferencesTable(propertiesGroup); - } - - /** - * @param container - */ - protected void createOwnedCommentAdvancedTableComposition(Composite parent) { - this.ownedComment = new ReferencesTable<Comment>(UMLMessages.LifelinePropertiesEditionPart_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.Lifeline.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(LifelinePropertiesEditionPartImpl.this, UMLViewsRepository.Lifeline.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( - LifelinePropertiesEditionPartImpl.this, UMLViewsRepository.Lifeline.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( - LifelinePropertiesEditionPartImpl.this, UMLViewsRepository.Lifeline.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( - LifelinePropertiesEditionPartImpl.this, UMLViewsRepository.Lifeline.ownedComment, - PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createNameText(Composite parent) { - SWTUtils.createPartLabel(parent, UMLMessages.LifelinePropertiesEditionPart_NameLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.Lifeline.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(LifelinePropertiesEditionPartImpl.this, UMLViewsRepository.Lifeline.name, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, name.getText())); - } - - }); - - SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(UMLViewsRepository.Lifeline.name, UMLViewsRepository.SWT_KIND), null); //$NON-NLS-1$ - } - - protected void createVisibilityEMFComboViewer(Composite parent) { - SWTUtils.createPartLabel(parent, UMLMessages.LifelinePropertiesEditionPart_VisibilityLabel, propertiesEditionComponent.isRequired(UMLViewsRepository.Lifeline.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.Lifeline.visibility, UMLViewsRepository.SWT_KIND), null); //$NON-NLS-1$ - } - - protected void createClientDependencyAdvancedReferencesTable(Composite parent) { - this.clientDependency = new ReferencesTable<Dependency>(UMLMessages.LifelinePropertiesEditionPart_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(LifelinePropertiesEditionPartImpl.this, UMLViewsRepository.Lifeline.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.Lifeline.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(LifelinePropertiesEditionPartImpl.this, UMLViewsRepository.Lifeline.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( - LifelinePropertiesEditionPartImpl.this, UMLViewsRepository.Lifeline.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( - LifelinePropertiesEditionPartImpl.this, UMLViewsRepository.Lifeline.clientDependency, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, editedElement, - propertiesEditionObject)); - } - } - // End of user code - - } - - protected void createCoveredByAdvancedReferencesTable(Composite parent) { - this.coveredBy = new ReferencesTable<InteractionFragment>(UMLMessages.LifelinePropertiesEditionPart_CoveredByLabel, new ReferencesTableListener<InteractionFragment>() { - - public void handleAdd() { - TabElementTreeSelectionDialog<InteractionFragment> dialog = new TabElementTreeSelectionDialog<InteractionFragment>(resourceSet, coveredByFilters, coveredByBusinessFilters, - "InteractionFragment", UMLPackage.eINSTANCE.getInteractionFragment(), current.eResource()) { - - public void process(IStructuredSelection selection) { - for(Iterator<?> iter = selection.iterator(); iter.hasNext();) { - EObject elem = (EObject)iter.next(); - if(!coveredByEditUtil.getVirtualList().contains(elem)) - coveredByEditUtil.addElement(elem); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(LifelinePropertiesEditionPartImpl.this, UMLViewsRepository.Lifeline.coveredBy, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem)); - } - coveredBy.refresh(); - } - - }; - dialog.open(); - } - - public void handleEdit(InteractionFragment element) { - editCoveredBy(element); - } - - public void handleMove(InteractionFragment element, int oldIndex, int newIndex) { - moveCoveredBy(element, oldIndex, newIndex); - } - - public void handleRemove(InteractionFragment element) { - removeFromCoveredBy(element); - } - - public void navigateTo(InteractionFragment element) { - } - }); - this.coveredBy.setHelpText(propertiesEditionComponent.getHelpContent(UMLViewsRepository.Lifeline.coveredBy, UMLViewsRepository.SWT_KIND)); - this.coveredBy.createControls(parent); - GridData coveredByData = new GridData(GridData.FILL_HORIZONTAL); - coveredByData.horizontalSpan = 3; - this.coveredBy.setLayoutData(coveredByData); - this.coveredBy.disableMove(); - } - - /**
- *
- */ - protected void moveCoveredBy(InteractionFragment element, int oldIndex, int newIndex) { - } - - /**
- *
- */ - protected void removeFromCoveredBy(InteractionFragment element) { - - // Start of user code removeFromCoveredBy() method body - EObject editedElement = coveredByEditUtil.foundCorrespondingEObject(element); - coveredByEditUtil.removeElement(element); - coveredBy.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - LifelinePropertiesEditionPartImpl.this, UMLViewsRepository.Lifeline.coveredBy, - PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, editedElement)); - // End of user code - - } - - /**
- *
- */ - protected void editCoveredBy(InteractionFragment element) { - - // Start of user code editCoveredBy() method body - EObject editedElement = coveredByEditUtil.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) { - coveredByEditUtil.putElementToRefresh(editedElement, propertiesEditionObject); - coveredBy.refresh(); - propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent( - LifelinePropertiesEditionPartImpl.this, UMLViewsRepository.Lifeline.coveredBy, - 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.LifelinePropertiesEditionPart#getOwnedCommentToAdd() - */ - public List getOwnedCommentToAdd() { - return ownedCommentEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#getOwnedCommentToRemove() - */ - public List getOwnedCommentToRemove() { - return ownedCommentEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#getOwnedCommentToEdit() - */ - public Map getOwnedCommentToEdit() { - return ownedCommentEditUtil.getElementsToRefresh(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#getOwnedCommentToMove() - */ - public List getOwnedCommentToMove() { - return ownedCommentEditUtil.getElementsToMove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#getOwnedCommentTable() - */ - public List getOwnedCommentTable() { - return ownedCommentEditUtil.getVirtualList(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#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.LifelinePropertiesEditionPart#updateOwnedComment(EObject newValue) - */ - public void updateOwnedComment(EObject newValue) { - if(ownedCommentEditUtil != null) { - ownedCommentEditUtil.reinit(newValue); - ownedComment.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#addFilterOwnedComment(ViewerFilter filter) - */ - public void addFilterToOwnedComment(ViewerFilter filter) { - ownedCommentFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#addBusinessFilterOwnedComment(ViewerFilter filter) - */ - public void addBusinessFilterToOwnedComment(ViewerFilter filter) { - ownedCommentBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#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.LifelinePropertiesEditionPart#getName() - */ - public String getName() { - return name.getText(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#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.LifelinePropertiesEditionPart#getVisibility() - */ - public Enumerator getVisibility() { - EEnumLiteral selection = (EEnumLiteral)((StructuredSelection)visibility.getSelection()).getFirstElement(); - return selection.getInstance(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#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.LifelinePropertiesEditionPart#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.LifelinePropertiesEditionPart#getClientDependencyToAdd() - */ - public List getClientDependencyToAdd() { - return clientDependencyEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#getClientDependencyToRemove() - */ - public List getClientDependencyToRemove() { - return clientDependencyEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#getClientDependencyTable() - */ - public List getClientDependencyTable() { - return clientDependencyEditUtil.getVirtualList(); - } - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#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.LifelinePropertiesEditionPart#updateClientDependency(EObject newValue) - */ - public void updateClientDependency(EObject newValue) { - if(clientDependencyEditUtil != null) { - clientDependencyEditUtil.reinit(newValue); - clientDependency.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#addFilterClientDependency(ViewerFilter filter) - */ - public void addFilterToClientDependency(ViewerFilter filter) { - clientDependencyFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#addBusinessFilterClientDependency(ViewerFilter filter) - */ - public void addBusinessFilterToClientDependency(ViewerFilter filter) { - clientDependencyBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#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.LifelinePropertiesEditionPart#getCoveredByToAdd() - */ - public List getCoveredByToAdd() { - return coveredByEditUtil.getElementsToAdd(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#getCoveredByToRemove() - */ - public List getCoveredByToRemove() { - return coveredByEditUtil.getElementsToRemove(); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#getCoveredByTable() - */ - public List getCoveredByTable() { - return coveredByEditUtil.getVirtualList(); - } - - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#initCoveredBy(EObject current, EReference containingFeature, - * EReference feature) - */ - public void initCoveredBy(EObject current, EReference containingFeature, EReference feature) { - if(current.eResource() != null && current.eResource().getResourceSet() != null) - this.resourceSet = current.eResource().getResourceSet(); - if(containingFeature != null) - coveredByEditUtil = new EMFListEditUtil(current, containingFeature, feature); - else - coveredByEditUtil = new EMFListEditUtil(current, feature); - this.coveredBy.setInput(coveredByEditUtil.getVirtualList()); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#updateCoveredBy(EObject newValue) - */ - public void updateCoveredBy(EObject newValue) { - if(coveredByEditUtil != null) { - coveredByEditUtil.reinit(newValue); - coveredBy.refresh(); - } - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#addFilterCoveredBy(ViewerFilter filter) - */ - public void addFilterToCoveredBy(ViewerFilter filter) { - coveredByFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#addBusinessFilterCoveredBy(ViewerFilter filter) - */ - public void addBusinessFilterToCoveredBy(ViewerFilter filter) { - coveredByBusinessFilters.add(filter); - } - - /** - * {@inheritDoc} - * - * @see org.eclipse.papyrus.tabbedproperties.uml.parts.LifelinePropertiesEditionPart#isContainedInCoveredByTable(EObject element) - */ - public boolean isContainedInCoveredByTable(EObject element) { - return coveredByEditUtil.contains(element); - } - - public void setMessageForCoveredBy(String msg, int msgLevel) { - - } - - public void unsetMessageForCoveredBy() { - - } - - - - - - // Start of user code additional methods - - // End of user code - -} |