Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'deprecated/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.blockdiagram/custom-src/org/eclipse/papyrus/sysml/diagram/blockdiagram/parsers/SysMLMessageFormatParser.java')
-rw-r--r--deprecated/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.blockdiagram/custom-src/org/eclipse/papyrus/sysml/diagram/blockdiagram/parsers/SysMLMessageFormatParser.java82
1 files changed, 0 insertions, 82 deletions
diff --git a/deprecated/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.blockdiagram/custom-src/org/eclipse/papyrus/sysml/diagram/blockdiagram/parsers/SysMLMessageFormatParser.java b/deprecated/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.blockdiagram/custom-src/org/eclipse/papyrus/sysml/diagram/blockdiagram/parsers/SysMLMessageFormatParser.java
deleted file mode 100644
index 30d0b624863..00000000000
--- a/deprecated/deprecated-plugins/sysml.deprecated/org.eclipse.papyrus.sysml.diagram.blockdiagram/custom-src/org/eclipse/papyrus/sysml/diagram/blockdiagram/parsers/SysMLMessageFormatParser.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * 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:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.sysml.diagram.blockdiagram.parsers;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.diagram.clazz.parsers.MessageFormatParser;
-import org.eclipse.papyrus.sysml.blocks.Block;
-import org.eclipse.uml2.uml.UMLPackage;
-
-
-public class SysMLMessageFormatParser extends MessageFormatParser implements ISemanticParser {
-
- public SysMLMessageFormatParser(EAttribute[] features) {
- super(features);
- }
-
- public SysMLMessageFormatParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- /**
- *
- */
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /**
- *
- */
- public List getSemanticElementsBeingParsed(EObject element) {
- List<EObject> semanticElementsBeingParsed = new ArrayList<EObject>();
- if(element instanceof Block) {
- Block block = (Block)element;
- semanticElementsBeingParsed.add(block);
- semanticElementsBeingParsed.add(block.getBase_Class());
- }
- return semanticElementsBeingParsed;
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if(notification instanceof Notification) {
- Object feature = ((Notification)notification).getFeature();
- if(feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature)feature;
- }
- }
- return featureImpl;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- protected boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature);
- }
-
-}

Back to the top