Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-02-20 17:53:13 +0000
committerCamille Letavernier2014-02-25 16:20:02 +0000
commitfebcbd860c478bb7ea05b0087bd745a2c04fc4df (patch)
tree5c2ea5b333194879e9948cdeb9db4f67d3dac076 /extraplugins/robotml
parent00ca40181412dbac25e77d0e9a71d37e2535c567 (diff)
downloadorg.eclipse.papyrus-febcbd860c478bb7ea05b0087bd745a2c04fc4df.tar.gz
org.eclipse.papyrus-febcbd860c478bb7ea05b0087bd745a2c04fc4df.tar.xz
org.eclipse.papyrus-febcbd860c478bb7ea05b0087bd745a2c04fc4df.zip
366029: [Model Explorer] It is impossible to see the additionnal
resources https://bugs.eclipse.org/bugs/show_bug.cgi?id=366029 - Fix profile Property Testers to avoid loading profiles in the current model - Deprecate DiModel (Redundant with SashModel) - Display external resources (libraries) in the ModelExplorer (And other tree-based views)
Diffstat (limited to 'extraplugins/robotml')
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java24
1 files changed, 11 insertions, 13 deletions
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java
index 4f0bebf5341..2b79a800891 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2013 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
@@ -14,7 +14,6 @@ package org.eclipse.papyrus.robotml.diagram.common.utils;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.papyrus.RobotML.RobotMLPackage;
import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
import org.eclipse.papyrus.infra.core.resource.NotFoundException;
import org.eclipse.papyrus.infra.core.services.ServiceException;
@@ -24,8 +23,6 @@ import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Profile;
-import org.eclipse.uml2.uml.util.UMLUtil;
/**
* This class is a Property tester used to check if current model (meaning the model currently opened in Papyrus) is a Proteus Model.
@@ -65,20 +62,21 @@ public class RobotmlSelectionTester extends PropertyTester {
return false;
}
- /** True is root object is a UML Model with Proteus Profile (and sub profiles) applied */
+ /** True is root object is a UML Model with RobotML Profile (and sub profiles) applied */
protected boolean testRobotmlModelNature(Object receiver) {
boolean isRobotmlModel = false;
-
-
EObject root = getRoot(receiver);
if(root instanceof Package) {
-
- Profile robotml = UMLUtil.getProfile(RobotMLPackage.eINSTANCE, root);
-
- if(((Package)root).isProfileApplied(robotml)) {
- isRobotmlModel = true;
- }
+ return (((Package)root).getAppliedProfile("RobotML") != null);
+
+ //FIX: UMLUtil.getProfile() loads the profile into the resource set. This is not desired.
+ //
+ // Profile robotml = UMLUtil.getProfile(RobotMLPackage.eINSTANCE, root);
+ //
+ // if(((Package)root).isProfileApplied(robotml)) {
+ // isRobotmlModel = true;
+ // }
}

Back to the top