diff options
author | Camille Letavernier | 2015-12-16 12:46:44 +0000 |
---|---|---|
committer | Camille Letavernier | 2015-12-16 12:46:44 +0000 |
commit | e3155394f1d12d061193f5726ef74e28498f224c (patch) | |
tree | bbbeb4a4027cd867fb6413179fa2edc28d3f28d6 /plugins/uml | |
parent | 1811680b89946b741263e70c56e912a146bd6e12 (diff) | |
download | org.eclipse.papyrus-e3155394f1d12d061193f5726ef74e28498f224c.tar.gz org.eclipse.papyrus-e3155394f1d12d061193f5726ef74e28498f224c.tar.xz org.eclipse.papyrus-e3155394f1d12d061193f5726ef74e28498f224c.zip |
Revert "Bug 484464 - [Papyrus DSML Validation] nsURI is taken from definition in case of static profile"1.2.0M4
This reverts commit 1811680b89946b741263e70c56e912a146bd6e12.
Diffstat (limited to 'plugins/uml')
-rw-r--r-- | plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/StaticProfileUtil.java | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/StaticProfileUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/StaticProfileUtil.java deleted file mode 100644 index a71c6acf9aa..00000000000 --- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/StaticProfileUtil.java +++ /dev/null @@ -1,90 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2015 CEA LIST and others. - * - * 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: - * CEA LIST - Initial API and implementation (Ansgar Radermacher) - * - *****************************************************************************/ - -package org.eclipse.papyrus.uml.tools.utils; - -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EcoreFactory; -import org.eclipse.uml2.uml.Profile; -import org.eclipse.uml2.uml.Stereotype; - - -/** - * Obtain information about an eventually applied Ecore::EPackage stereotype. - * The ecore profile should be a static one, but it is not. Therefore, information - * needs to be retrieved using the generic functions and string constants. - */ -public class StaticProfileUtil { - - /** - * qualified name of EPackage stereotype (used for static profile detection) - */ - public static final String EPackage_QNAME = "Ecore::EPackage"; //$NON-NLS-1$ - /** - * Attributes of EPackage stereotype - */ - public static final String EPKG_BASE_PACKAGE = "basePackage"; //$NON-NLS-1$ - public static final String EPKG_PACKAGE_NAME = "packageName"; //$NON-NLS-1$ - public static final String EPKG_NS_URI = "nsURI"; //$NON-NLS-1$ - public static final String EPKG_NS_PREFIX = "nsPrefix"; //$NON-NLS-1$ - - /** - * set the profile information - * @param profile - */ - public StaticProfileUtil(Profile profile) { - Stereotype ePkg = profile.getAppliedStereotype(EPackage_QNAME); - if (ePkg != null) { - basePackage = (String) profile.getValue(ePkg, EPKG_BASE_PACKAGE); - packageName = (String) profile.getValue(ePkg, EPKG_PACKAGE_NAME); - // create definition from stereotype - definition = EcoreFactory.eINSTANCE.createEPackage(); - definition.setNsPrefix((String) profile.getValue(ePkg, EPKG_NS_PREFIX)); - definition.setNsURI((String) profile.getValue(ePkg, EPKG_NS_URI)); - } - else { - basePackage = null; - packageName = null; - definition = null; - } - } - - /** - * @return the base package. - */ - public String getBasePackage() { - return basePackage; - } - - /** - * @return the package name. - */ - public String getPackageName() { - return packageName; - } - - /** - * @return a "definition" filled with information about nsPrefix and nsURI. - */ - public EPackage getDefinition() { - return definition; - } - - protected static String basePackage; - - protected static String packageName; - - protected static EPackage definition; -} - - |