[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.modeling.mdt.uml2.ocl] OCL Recursive Functions
|
https://bugs.eclipse.org/bugs/show_bug.cgi?id=152018
The Bug is still open, maybe someone could look to the patch applied.
It works now for serveral month very good for me.
Is it possible to undefine Operations.
try{
feature = TypeUtil.defineOperation(
contextEnv.getContextClassifier(),
unquote(operCS.getSimpleNameCS().getValue()),
params, type);
expression = oclExpressionCS(defExpr.getExpressionCS(), contextEnv);
}catch (SemanticException e) {
//undefine the operation
throw e;
}
Here the actual patch:
Index: src/org/eclipse/emf/ocl/internal/parser/OCLParser.java
===================================================================
RCS file:
/cvsroot/technology/org.eclipse.emft/ocl/plugins/org.eclipse.emf.ocl/src/org/eclipse/emf/ocl/internal/parser/OCLParser.java,v
retrieving revision 1.17
diff -u -r1.17 OCLParser.java
--- src/org/eclipse/emf/ocl/internal/parser/OCLParser.java 10 Oct 2006
14:29:26 -0000 1.17
+++ src/org/eclipse/emf/ocl/internal/parser/OCLParser.java 2 Jan 2007
13:59:17 -0000
@@ -1512,11 +1512,16 @@
contextEnv.getContextClassifier().getName()));
}
- expression = oclExpressionCS(defExpr.getExpressionCS(), contextEnv);
- feature = TypeUtil.defineOperation(
- contextEnv.getContextClassifier(),
- unquote(operCS.getSimpleNameCS().getValue()),
- params, type);
+ try{
+ feature = TypeUtil.defineOperation(
+ contextEnv.getContextClassifier(),
+ unquote(operCS.getSimpleNameCS().getValue()),
+ params, type);
+ expression = oclExpressionCS(defExpr.getExpressionCS(), contextEnv);
+ }catch (SemanticException e) {
+ //undefine the operation
+ throw e;
+ }
}
Constraint astNode = umlFactory.createConstraint();