Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to be able to override EOperation execution to support stereotyped EClass equality comparison #16

Closed
eclipse-ocl-bot opened this issue Sep 18, 2024 · 7 comments

Comments

@eclipse-ocl-bot
Copy link
Collaborator

| --- | --- |
| Bugzilla Link | 117542 |
| Status | CLOSED FIXED |
| Importance | P3 blocker |
| Reported | Nov 22, 2005 13:43 EDT |
| Modified | May 17, 2013 15:16 EDT |
| Version | 1.0.0 |
| Reporter | Natalia Balaba |

Description

When executing OCL query such as self.oclIsTypeOf(uml::aEClass) on objects of the same aEClass, but stereotyped the evalution produces false result, when it should be true.

E.g. create two activity objects A and B stereotype one of them and evaluate self.oclIsTypeOf(uml::Activity) on each - in non-stereotyped case expression evaluates to true, in other - to false.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Christian Vogt on Nov 25, 2005 09:50

Created attachment 30612
patch for org.eclipse.emf.ocl

:notepad_spiral: 2005-11-24_org.eclipse.emf.ocl.txt

@eclipse-ocl-bot
Copy link
Collaborator Author

By Christian Vogt on Nov 25, 2005 09:50

Created attachment 30613
patch for org.eclipse.emf.ocl.tests

:notepad_spiral: 2005-11-24_org.eclipse.emf.ocl.tests.txt

@eclipse-ocl-bot
Copy link
Collaborator Author

By Christian Vogt on Nov 25, 2005 10:04

The EvaluationVisitor now supports delgating the operation evaluation responsibility to the EvaluationEnvironment.

Two new interface methods have been added to the OCL EvaluationEnvironment.

 * Queries whether this evaluation environment provides a custom
 * implementation of the specified OCL opeartion.  In the case
 * that the receiver does, then it must implement the
 * evaluate method to apply
 * the operation.\
boolean canEvaluate(EOperation operation, int opcode);\

 * Evaluates the specified opeartion on a given
 * target object with arguments.\
Object evaluate(EOperation operation, int opcode,\
    Object target, Object[] args)\
	    throws UnsupportedOperationException;

JUnits were added to org.eclipse.emf.ocl.tests.RegresstionTests
These JUnits provide an example of how to use the new interface for overriding the oclIsTypeOf operation.
See test cases:

  • test_canEvaluateOverrideOperation_bugzilla117542
  • test_canEvaluateUnsupportedOperation_bugzilla117542

@eclipse-ocl-bot
Copy link
Collaborator Author

By Christian Damus on Dec 20, 2005 09:47

*** Bug 112953 has been marked as a duplicate of this bug. ***

@eclipse-ocl-bot
Copy link
Collaborator Author

By Nick Boldt on Jan 28, 2008 16:34

Move to verified as per bug 206558.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Ed Willink on May 27, 2011 02:39

Closing after over a year in verified state.

@eclipse-ocl-bot
Copy link
Collaborator Author

By Ed Willink on May 27, 2011 02:41

Closing after over a year in verified state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant