You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| --- | --- |
| Bugzilla Link | 126872 |
| Status | CLOSED FIXED |
| Importance | P3 normal |
| Reported | Feb 08, 2006 03:39 EDT |
| Modified | May 27, 2011 02:40 EDT |
| Reporter | Radomil Dvorak |
Description
Excerpt from 'eclipse.technology.emft',
thread: 'EDataType and '<' operation in OCL expression'
Hi, Radek,
You should absolutely expect that '<', '>', '<=', and '>=' would be
supported for EDataTypes implementing the Comparable interface. As I read
the OCL spec, any OCL type (including types defined by a model) should be
able to define these infix operations (also arithmetic and boolean
operations, but that's another matter).
Sounds like a bug!
Cheers,
Christian
Radek Dvorak wrote:
Is '<' operation defined for EDataType which points by
EDataType::instanceClass to a java class which
implements Comparable?
As mentioned in the thread 'order of returned items', the 'sortedBy'
operation on collections implemented by EMFT
understands the definition of '<' operation as implementation of
'java.lang.Comparable' interface.
It works for me in the following example with use of ecore::EDate:
This is the context classifier described in emfatic source.
class Topic {
attr String[1] name;
attr Date startDate;
attr Date endDate;
}
the following expression works fine and is evaluated by using
'java.util.Date.compareTo'.
Bag { startDate, endDate }->sortedBy(d|d)->last() = endDate
but the expression below fails with: "AnyType: the source of operation:
(lessThan) must be an EClass"
startDate < endDate
Am I wrong to expect that if '<' was found as defined in 'sortedBy' it
should be resolved also in the second expression?
The text was updated successfully, but these errors were encountered:
| --- | --- |
| Bugzilla Link | 126872 |
| Status | CLOSED FIXED |
| Importance | P3 normal |
| Reported | Feb 08, 2006 03:39 EDT |
| Modified | May 27, 2011 02:40 EDT |
| Reporter | Radomil Dvorak |
Description
Excerpt from 'eclipse.technology.emft',
thread: 'EDataType and '<' operation in OCL expression'
Hi, Radek,
You should absolutely expect that '<', '>', '<=', and '>=' would be
supported for EDataTypes implementing the Comparable interface. As I read
the OCL spec, any OCL type (including types defined by a model) should be
able to define these infix operations (also arithmetic and boolean
operations, but that's another matter).
Sounds like a bug!
Cheers,
Christian
Radek Dvorak wrote:
The text was updated successfully, but these errors were encountered: