Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java')
-rw-r--r--plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java62
1 files changed, 0 insertions, 62 deletions
diff --git a/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java b/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java
deleted file mode 100644
index 39e1a4013a8..00000000000
--- a/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetImageQuery.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- *
- * 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:
- * Patrick Tessier (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.sysml.modelexplorer.query;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.papyrus.emf.facet.custom.metamodel.custompt.IImage;
-import org.eclipse.papyrus.emf.facet.custom.ui.ImageUtils;
-import org.eclipse.papyrus.emf.facet.custom.ui.internal.query.ImageQuery;
-import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
-import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
-import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
-import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
-import org.eclipse.papyrus.uml.tools.utils.ElementUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Stereotype;
-
-/** Create a basic label based on element name */
-public class GetImageQuery implements IJavaQuery2<Element, IImage> {
-
- public static final String sysml_plugin_path = "platform:/plugin/org.eclipse.papyrus.sysml/";
-
-
- @Override
- public IImage evaluate(Element source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException {
- String iconPath = "";
- if (!source.getAppliedStereotypes().isEmpty()) {
- Stereotype first_stereotype = source.getAppliedStereotypes().get(0);
-
- if (!first_stereotype.getIcons().isEmpty()) {
- org.eclipse.uml2.uml.Image icon = ElementUtil.getStereotypeImage(source, first_stereotype, "icon");
- if (icon != null) {
- iconPath = icon.getLocation();
- }
- }
- }
-
- String imagePath = "";
-
- if (iconPath != null && !"".equals(iconPath)) {
- URI iconURI = URI.createURI(iconPath);
- if (iconURI.isRelative()) {
- imagePath = sysml_plugin_path + iconPath;
- } else {
- imagePath = iconURI.toString();
- }
- }
- if ("".equals(imagePath)) {
- return ImageQuery.getEObjectImage(source);
- }
- return ImageUtils.wrap(imagePath);
- }
-}

Back to the top