Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search

OCL/New and Noteworthy/Luna

Eclipse OCL New and Noteworthy items for the Luna 5.0.0 release.

Release Overview

The main features of this release are two long overdue User Interface facilities

  • The Validity View provides fine-grained visibility and control of Constraints and their results
  • The OCL debugger may be launched in a number of ways to inspect the execution of an OCL expression

Milestone 1


  • 414355 JDT-style auto content assist is available following . and ->


  • 410682 Comments on invariants are no longer discarded


  • 411154 Dynamic dispatch now chooses correct dispatch for inherited candidates
  • 411441 UML-style collections such as String[*] may be used as the type of e.g. a let-variable
  • 411826 excludingAll/includingAll, appendAll/prependAll added
  • 412685 Operations and EnumerationLiterals may be used in UML profile constraints
  • 412690 EList results are now BasicInternalEList rather than just BasicEList
  • 412736 Using Ecore data types such as ecore::EDouble as operation parameters no longer fails

Code Generator

  • 414040 Common Subexpression Elimination introduced to save code/remove warnings

Milestone 2

The support for rich invariants has been made extensible.416287


  • the OCLinEcore editor allowed a message expression to follow the invariant name
  • the Complete OCL editor allowed a message expression to follow the invariant name
  • the message was maintained in the ExpressionInOCL::messageExpression property
  • the message was persisted in Ecore as a ...$message EAnnotation detail
  • a validation failure provoked evaluation of the message expression
  • a validation could fail with null for error/false for warning severity


  • the OCLinEcore editor allows a message expression to follow the invariant/precondition/postcondition name
  • the Complete OCL editor allows a message expression to follow the invariant/precondition/postcondition name
  • the underlying ExpressionInOCL::messageExpression property is deprecated and not used.
  • the message is persisted as a Tuple-valued expression
    • with a mandatory 'status : Boolean = <status-expression>' to give pass/fail
    • with an optional 'message : String = <message-expression>' to give a custom failure message
    • with an optional 'severity : Integer = <severity-expression>' to give a custom severity
    • with other optional tuple parts that may be useful to a custom invocation
  • the old ...$message EAnnotation detail is translated to the new Tuple form when loaded from Ecore
  • the old null/false severity capability is deprecated but used when no 'severity' part is defined

The severity Integer signifies

  • 0 - no deficiency (e.g. for an accompanying information message)
  • +ve and not zero - minor deficiency (e.g. a warning)
  • -ve - major deficiency (e.g. an error)

The use of a Tuple-valued expression provides the enrichment within the single OCL invariant expression and so avoids the need for the tooling in which the OCL expression is used to provide any cooperation. The rich invariants may therefore be used in Papyrus or Ecore or ....


invariant nameTooShort('There must be no lower case characters in "' + name + '"'):
    name.toUpperCase() = name;

Rich invariant

invariant nameTooShort: Tuple {
        status : Boolean = name.toUpperCase() = name,
        message : String = 'There must be no lower case characters in "' + name + '"',
        severity : Integer = 1,
        quickfix : String = 'org.examples.quickfixes.ToUpper'


  • 417664 Wizards are now available for creating files


  • 376212 Library references from pivot miodel generally resolveable
  • 402780 Pivot model can be saved and loaded
  • 413476 OCL 2.4 interpretation of Boolean operations on null
  • 415669 Badly type iterator bodies detected

Code Generator

  • 415381 Multi-package static tables initialize without an NPE
  • 416566 Nested references to this are now qualified to disambiguate

Milestone 3


  • 410518 Editing no longer corrupts the relative/absolute characterisrtics of nsURI references
  • 418552 Validation error now reported against useful line than line 1


  • 418282 OppositePropertyCallExp introduced to support serialization

Milestone 4


  • 422296 String.tokenize() with one argument no longer confuses its arguments


  • 421220 InstanceSpecifications as Property defaults no longer cause edit failures


  • 356243 OclAny types no longer causes a save failure
  • 422938 Stereotype application is no longer restricted to just Types.
  • 423174 Ambiguous opposites are no longer erased. They now contribute to error messages
  • 423489 The return type of collectNested is now the element type
  • 423490 The implicit source within an iteration is now the iterator

Code Generator

  • 421738 Bad code is no longer generated for boolean comparisons
  • 423023 The code generator may now use a JRE or a JDK

Milestone 5

This milestone tracks the major version change by the Eclipse UML2 project as it adjusts to UML 2.5. UML-dependent plugins and features therefore change from 4.2.0 to 5.0.0. Non-UML plugins and features are unaffected. UML2 plugins are no longer re-exported. The Pivot plugins which are not subject to API compatibility offer support for Eclipse UML2 4.x and 5.x without a major version change. 424476


  • 421563 Set no longer conformsTo Bag, and OrderedSet no longer conformsTo Sequence
  • 425830 PivotEObjectValidator can now be used to validate a single constraint

Code Generator

  • 424034 Large auto-generated tables are partitioned to avoid exceeding 65536 bytes

Milestone 6

OCL contribution to general purpose menus have been localized under a primary OCL entry to reduce clutter and clarify purpose. 427975

OCL-specific validation can now be used from a variety of contexts. 428898


  • 427007 Type constructors may now have no parts
  • 427866 Complete OCL can now be used in an EmbeddedXtextEditor


  • 425506 Operation bodies with comments no longer get lost
  • 426927 EAnnotation references may now reference Enumeration literals


  • 411614 Multi-package models may now be used

Milestone 7

This milestone sees introduction of the new Validity View supporting fine-grained vuisibility and control of constraints. See the OCL Documentation. 425799

A registry of Complete OCL documents has been added, populated by the complete_ocl_registry extension point. Registrations in plugins or workspace projects are accessible from the OCL->Load Document Dialog. 420821

The spelling of "UML" is clarified. OMG defines the "UML" package but the UML2Ecore conversion adjust names for Java legality and practice; consequently UML.ecore defines a "uml" package. Eclipse UML2 now provides an originalName EAnnotation allowing OCL references to determine the name prior to adjustment. Consequently some existing OCL expressions may now report errors, but at last we have consistency and no errors introduced as OCL migrates from UML to Ecore.


  • 413642 the closure iteration results now include the sources


  • 430122 The last name in a qualified name may now be escaped.


  • 405062 The original UML name spelling is used after OCL in UML is resolved as OCL in Ecore
  • 411603 Confusing and unsuccessful use of the LPG evaluator by Papyrus can be avoided
  • 431638 The Pivot meta-namespace now merges into the user meta-namespace avoiding confusion for Profile namespaces

Code Generator

  • 404660 Code generation now works for nested packages


The extensible OCL debugger appeared in M7 but was marginally useable. It can be launched from Xtext OCL Console or Validity View. See the OCL Documentation. 422933


  • 434541 Leaks on editor invocation fixed



  • 435687 Actual rather than declared stereotype as dynamic type
  • 435732 OCL->Validate no longer marks the Papyrus notation file


The Luna release may be installed on Juno SR2. 436057



The SR1 release is made available concurrently with 5.0.0 as part of the simultaneous release. It contains important bug fixes particularly for UML users. All users are encouraged to upgrade.

Eclipse OCL New and Noteworthy items for the Luna 5.0.1 release.

OCL in Ecore

  • 418551 OCL->Validate checks the OCL content of an Ecore model
  • 425506 Commented GenModel annotations are no longer thrown away
  • 436901 A paste that changes a package nsURI no longer confuses the editor
  • 437723 References to UML are not corrupted when saving


  • 404882 Complete OCL document may be loaded to complement a UML resource
  • 413620 Activity instances no longer inhibit use of OCL with UML
  • 419556 The OCL Console supports evaluation over stereotype instances
  • 419557 Property Stereotypes may now be used
  • 436903 Validations added to UML by a Complete OCL document work again
  • 436945 "result" may be used in postconditions
  • 437715 Stereotype may be used as the type of a Stereotype Property


  • 436165 Results can now be exported
  • 436192 Validate menu action is selective to the invocation context
  • 436905 Papyrus can be used to define the validation context


Eclipse OCL New and Noteworthy items for the Luna 5.0.2 (Luna SR1) release.


  • 439940 selectByKind/selectByType analyzed with derived collection type

Code Gen

  • 440895 Workspaces may now have spaces in their paths


  • 439517 Command line interface added


Eclipse OCL New and Noteworthy items for the Luna 5.0.3 release.


  • 452152 OCLinEcore editing no longer fails when Xtext Complete SDK not installed


  • 448470 UML Enumeration Literals no longer fail as non-navigable objects
  • 452621 UML validation favors Java rather than OCL operation definitions predictably

Code Gen

  • 448927 Code gen for UML references no longer gives UnsupportedOperationException


Eclipse OCL New and Noteworthy items for the Luna 5.0.4 (Luna SR2) release.


  • 455394 EnumerationLiteral-typed Properties can be evaluated
  • 458326 Stereotyped InstanceSpecification validation no longer fails
  • 458470 Multi-model profiles no longer lead to failure of non-first loaded

Code Gen

  • 458774 Library operation inlining disabled to inhibit exponential behavior


Eclipse OCL New and Noteworthy items for the Luna 5.0.5 release.


  • 462552 @pre no longer ignored in the Abstract Syntax for arrow operation calls


  • 460755 Validation for DataTypes such as EDate no longer fails with an UOE


  • 478416 Non-OCL Constraints are now tolerated

Copyright © Eclipse Foundation, Inc. All Rights Reserved.