Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2014-03-10 19:20:04 +0000
committerChristian W. Damus2014-03-10 19:20:04 +0000
commit999616da64f24cf97b90b34cbb1d9de9a7f83efe (patch)
treefb32b74935eab5087bb2993b1a930b2b0929ee24 /plugins/uml
parentf08cbd7b4497a17388bc220b8af9c60b93e2254b (diff)
parent9af541ce3c243a283cb32f0fe33e4effbb0b7ec4 (diff)
downloadorg.eclipse.papyrus-999616da64f24cf97b90b34cbb1d9de9a7f83efe.tar.gz
org.eclipse.papyrus-999616da64f24cf97b90b34cbb1d9de9a7f83efe.tar.xz
org.eclipse.papyrus-999616da64f24cf97b90b34cbb1d9de9a7f83efe.zip
Merge branch 'refs/heads/master' into bugs/429826-ro-axes
Diffstat (limited to 'plugins/uml')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLModelTester.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusOCLQuery.java4
-rw-r--r--plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.validation/plugin.xml19
3 files changed, 7 insertions, 26 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLModelTester.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLModelTester.java
index c539f1c4d93..ccd7fe52909 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLModelTester.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLModelTester.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
@@ -25,9 +25,9 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Profile;
/**
- *
+ *
* @author Camille Letavernier
- *
+ *
*/
public class UMLModelTester extends PropertyTester {
@@ -38,6 +38,7 @@ public class UMLModelTester extends PropertyTester {
public final static String IS_UML_PROFILE = "isUMLProfile";
/** Test the receiver against the selected property */
+ @Override
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
Object currentValue = null;
if(IS_UML_MODEL.equals(property)) {
@@ -69,6 +70,9 @@ public class UMLModelTester extends PropertyTester {
private EObject getRoot(Object receiver) {
ModelSet modelSet = getModelSet(receiver);
+ if(modelSet == null) {
+ return null;
+ }
return getRoot(modelSet);
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusOCLQuery.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusOCLQuery.java
index 6e9a377efed..7ffdcef936f 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusOCLQuery.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusOCLQuery.java
@@ -31,7 +31,6 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.text.IDocument;
import org.eclipse.ocl.examples.domain.evaluation.DomainModelManager;
-import org.eclipse.ocl.examples.domain.evaluation.EvaluationHaltedException;
import org.eclipse.ocl.examples.domain.utilities.DomainUtil;
import org.eclipse.ocl.examples.domain.values.CollectionValue;
import org.eclipse.ocl.examples.domain.values.impl.InvalidValueException;
@@ -44,7 +43,6 @@ import org.eclipse.ocl.examples.pivot.context.ParserContext;
import org.eclipse.ocl.examples.pivot.evaluation.EvaluationEnvironment;
import org.eclipse.ocl.examples.pivot.evaluation.EvaluationVisitor;
import org.eclipse.ocl.examples.pivot.evaluation.EvaluationVisitorImpl;
-import org.eclipse.ocl.examples.pivot.evaluation.PivotEvaluationEnvironment;
import org.eclipse.ocl.examples.pivot.manager.MetaModelManager;
import org.eclipse.ocl.examples.pivot.utilities.BaseResource;
import org.eclipse.ocl.examples.pivot.utilities.PivotEnvironment;
@@ -243,8 +241,6 @@ public class PapyrusOCLQuery extends AbstractPapyrusQuery {
value = evaluationVisitor.visitExpressionInOCL(expressionInOCL);
} catch (InvalidValueException e) {
value = e;
- } catch (EvaluationHaltedException e) {
- value = new InvalidValueException(ConsoleMessages.Result_EvaluationTerminated);
} catch (Exception e) {
value = new InvalidValueException(e, ConsoleMessages.Result_EvaluationFailure);
} finally {
diff --git a/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.validation/plugin.xml b/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.validation/plugin.xml
index fecdb0836e0..3b7c5bf747a 100644
--- a/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.validation/plugin.xml
+++ b/plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.validation/plugin.xml
@@ -33,25 +33,6 @@
class="uml.Element">
</target>
</constraint>
- <constraint
- class="org.eclipse.papyrus.uml.xtext.integration.validation.ValidateOCLViaXtext"
- id="org.eclipse.papyrus.uml.xtext.integration.validation.ValidateOCLViaXtext"
- isEnabledByDefault="true"
- lang="Java"
- mode="Batch"
- name="Validate OCL constraints via xtext"
- severity="ERROR"
- statusCode="0">
- <message>
- A {0} OCL validation problems found
- </message>
- <description>
- If xtext finds validation errors within a UML constraint
- </description>
- <target
- class="uml.Element">
- </target>
- </constraint>
</constraints>
</constraintProvider>
</extension>

Back to the top