Difference between revisions of "EMF/MQ, MT, and VF 1.2/New and Noteworthy"

From Eclipsepedia

< EMF
Jump to: navigation, search
 
(4 intermediate revisions by one user not shown)
Line 5: Line 5:
  
 
Back to [[Eclipse Modeling Framework]].
 
Back to [[Eclipse Modeling Framework]].
 +
 +
== 1.2 M6 ==
 +
 +
This milestone was primarily devoted to defect fixing, with a few small-ish enhancements.
 +
 +
=== Query: Disposable OCL Conditions ===
 +
 +
In an earlier iteration of the MDT OCL component's 1.2 release, a
 +
[http://download.eclipse.org/modeling/mdt/ocl/javadoc/1.2.0/org/eclipse/ocl/OCL.html#dispose() OCL::dispose()]
 +
API was introduced for disposal of OCL parsing environments and the EMF objects that they create.
 +
As [http://download.eclipse.org/modeling/emf/query/javadoc/1.2.0/org/eclipse/emf/query/ocl/conditions/AbstractOCLCondition.html AbstractOCLConditions]
 +
create OCL environments in their evaluation, they need to be disposable, also.  Thus, a
 +
<tt style="color:green">dispose()</tt> operation is added to these.
 +
 +
=== Other Bug Fixes ===
 +
 +
For details of other bugs fixed in this milestone, see the
 +
[http://www.eclipse.org/modeling/emf/news/relnotes.php?project=query&version=1.2.x&types=R,S#1.2.0M6 Query],
 +
[http://www.eclipse.org/modeling/emf/news/relnotes.php?project=transaction&version=1.2.x&types=R,S#1.2.0M6 Transaction], and
 +
[http://www.eclipse.org/modeling/emf/news/relnotes.php?project=validation&version=1.2.x&types=R,S#1.2.0M6 Validation] release notes.
 +
 +
== 1.2 M5 ==
 +
 +
This milestone was limited to the fixing of small defects.  For details, see the
 +
[http://www.eclipse.org/modeling/emf/news/relnotes.php?project=query&version=1.2.x&types=R,S#1.2.0M6 Query],
 +
[http://www.eclipse.org/modeling/emf/news/relnotes.php?project=transaction&version=1.2.x&types=R,S#1.2.0M6 Transaction], and
 +
[http://www.eclipse.org/modeling/emf/news/relnotes.php?project=validation&version=1.2.x&types=R,S#1.2.0M6 Validation] release notes.
 +
 +
== 1.2 M4 ==
 +
 +
The major new work in this milestone was the adoption of J2SE 5.0 language features (and API) in these components.
 +
 +
=== Query: J2SE 5.0 Adoption ===
 +
 +
The Query API exploits generic typing and other language features where appropriate.  As an example, the extant condition classes for data types:
 +
 +
* [http://download.eclipse.org/modeling/emf/query/javadoc/1.2.0/org/eclipse/emf/query/conditions/booleans/BooleanCondition.html BooleanCondition]
 +
* [http://download.eclipse.org/modeling/emf/query/javadoc/1.2.0/org/eclipse/emf/query/conditions/numbers/NumberCondition.html NumberCondition] (which hitherto has been an abstract superclass for conditions specific to the various numeric types)
 +
* [http://download.eclipse.org/modeling/emf/query/javadoc/1.2.0/org/eclipse/emf/query/conditions/strings/StringCondition.html StringCondition]
 +
 +
are refactored as specializations of a new generic
 +
[http://download.eclipse.org/modeling/emf/query/javadoc/1.2.0/org/eclipse/emf/query/conditions/DataTypeCondition.html DataTypeCondition&lt;T&gt;].  This new condition provides a convenient superclass for conditions on an EMF model's
 +
<tt style="color:Green">EDataType</tt>s, particularly in conjunction with the new
 +
[http://download.eclipse.org/modeling/emf/query/javadoc/1.2.0/org/eclipse/emf/query/conditions/IDataTypeAdapter.html IDataTypeAdapter&lt;T&gt;] interface for conversion of instance values to the required type.  Extant adapter classes are refactored to implement this new interface.
 +
 +
=== Query: NumberCondition Enhancements ===
 +
 +
The [http://download.eclipse.org/modeling/emf/query/javadoc/1.2.0/org/eclipse/emf/query/conditions/numbers/NumberCondition.html NumberCondition&lt;N&gt;] class is improved in two dimensions.  First, it is no longer abstract, but generically implements all of the capabilities of its subclasses (such as
 +
[http://download.eclipse.org/modeling/emf/query/javadoc/1.2.0/org/eclipse/emf/query/conditions/numbers/NumberCondition.IntegerValue.html NumberCondition::IntegerValue]).  Thus, these inner subclasses specific to each Java numeric primitive type are effectively obsoleted.  One consequence of this improved <tt style="color:Green">NumberCondition</tt> is that it handles Java's arbitrary-precision
 +
<tt style="color:Green">BigInteger</tt> and <tt style="color:Green">BigDecimal</tt> types, which Ecore also supports as data types.  In fact, any user-defined subclass of <tt style="color:Green">java.lang.Number</tt> that is comparable with itself is supported.
 +
 +
Also, support for relational operators and exclusive-bound range conditions is added, most conveniently using static factory methods:
 +
 +
* [http://download.eclipse.org/modeling/emf/query/javadoc/1.2.0/org/eclipse/emf/query/conditions/numbers/NumberCondition.html#between(N,%20boolean,%20N,%20boolean) NumberCondition::between(N lowerBound, boolean lowerInclusive, N upperBound, boolean upperInclusive)]
 +
* [http://download.eclipse.org/modeling/emf/query/javadoc/1.2.0/org/eclipse/emf/query/conditions/numbers/NumberCondition.html#equals(N) NumberCondition::equals(N number)]
 +
* [http://download.eclipse.org/modeling/emf/query/javadoc/1.2.0/org/eclipse/emf/query/conditions/numbers/NumberCondition.html#greaterThan(N) NumberCondition::greaterThan(N number)]
 +
* [http://download.eclipse.org/modeling/emf/query/javadoc/1.2.0/org/eclipse/emf/query/conditions/numbers/NumberCondition.html#greaterThanOrEquals(N) NumberCondition::greaterThanOrEquals(N number)]
 +
* etc.
 +
 +
=== Transaction: J2SE 5.0 Adoption ===
 +
 +
The Transaction API exploits generic typing and other language features where appropriate.  For example:
 +
 +
* the result of the [http://download.eclipse.org/modeling/emf/transaction/javadoc/1.2.0/org/eclipse/emf/transaction/util/Adaptable.html#getAdapter(java.lang.Class) &lt;T&gt; T Adaptable::getAdapter(Class&lt;? extends T&gt;)] method is now covariant with the <tt>adapterType</tt> parameter
 +
* the [http://download.eclipse.org/modeling/emf/transaction/javadoc/1.2.0/org/eclipse/emf/transaction/RunnableWithResult.html RunnableWithResult&lt;T&gt;] interface is parameterized by the result type
 +
* a new [http://download.eclipse.org/modeling/emf/transaction/javadoc/1.2.0/org/eclipse/emf/transaction/util/TransactionUtil.html#runExclusive(org.eclipse.emf.transaction.TransactionalEditingDomain,%20org.eclipse.emf.transaction.RunnableWithResult) &lt;T&gt; T TransactionUtil::runExclusive(TransactionalEditingDomain, RunnableWithResult&lt;? extends T&gt;)] utility method returns the type of result declared by the runnable
 +
 +
=== Transaction: Transactional Editor Example ===
 +
 +
The <tt style="color:Green">org.eclipse.emf.workspace.examples.library.editor</tt> example plug-in demonstrating how to use the Transaction APIs to convert an EMF-generated editor to a transactional editor is updated to clarify the differences.  In particular,
 +
 +
* the editor was synchronized with updates to the editor codegen templates of the last couple of EMF releases, to simplify comparison with the generated version
 +
* methods that are hand-modified are marked as <tt style="color:Green">@generated NOT</tt>
 +
* individual customizations of the generated code are indicated by <tt style="color:Green">//.CUSTOM:</tt> comments
 +
 +
=== Validation: J2SE 5.0 Adoption ===
 +
 +
The Validation framework exploits generic typing and other language features where appropriate.  For example:
 +
 +
* the [http://download.eclipse.org/modeling/emf/validation/javadoc/1.2.0/org/eclipse/emf/validation/model/EvaluationMode.html EvaluationMode&lt;T&gt;] class is parameterized by the type of object that is validated in the indicated mode
 +
* likewise, the [http://download.eclipse.org/modeling/emf/validation/javadoc/1.2.0/org/eclipse/emf/validation/service/IValidator.html IValidator&lt;T&gt;] interface is parameterized by the type of object that it validates.  The [http://download.eclipse.org/modeling/emf/validation/javadoc/1.2.0/org/eclipse/emf/validation/service/IBatchValidator.html IBatchValidator] validates <tt style="color:Green">EObject</tt>s and the [http://download.eclipse.org/modeling/emf/validation/javadoc/1.2.0/org/eclipse/emf/validation/service/ILiveValidator.html ILiveValidator] validates <tt style="color:Green">Notification</tt>s
 +
* the [http://download.eclipse.org/modeling/emf/validation/javadoc/1.2.0/org/eclipse/emf/validation/service/ModelValidationService.html#newValidator(org.eclipse.emf.validation.model.EvaluationMode) &lt;T,V extends IValidator&lt;T&gt;&gt; V newValidator(EvaluationMode&lt;T&gt; mode)] factory method's result is covariant with the evaluation mode parameter
 +
 +
=== Validation: Marker Severities ===
 +
 +
To simplify the handling of markers with different severities, new API is introduced in the
 +
[http://download.eclipse.org/modeling/emf/validation/javadoc/1.2.0/org/eclipse/emf/validation/marker/MarkerUtil.html MarkerUtil]
 +
utility class that filters problems by severity before creating markers.  See
 +
[http://download.eclipse.org/modeling/emf/validation/javadoc/1.2.0/org/eclipse/emf/validation/marker/MarkerUtil.html#createMarkers(org.eclipse.core.runtime.IStatus,%20int) MarkerUtil::createMarkers(IStatus validationStatus, int severityMask)] for details.
 +
 +
=== Other Bug Fixes ===
 +
 +
For details of other bugs fixed in this milestone, see the
 +
[http://www.eclipse.org/modeling/emf/news/relnotes.php?project=query&version=1.2.x&types=R,S#1.2.0M4 Query],
 +
[http://www.eclipse.org/modeling/emf/news/relnotes.php?project=transaction&version=1.2.x&types=R,S#1.2.0M4 Transaction], and
 +
[http://www.eclipse.org/modeling/emf/news/relnotes.php?project=validation&version=1.2.x&types=R,S#1.2.0M4 Validation] release notes.
  
 
== 1.2 M3 ==
 
== 1.2 M3 ==
Line 34: Line 130:
 
<tt style="color:Green">[http://download.eclipse.org/modeling/emf/transaction/javadoc/1.2.0/org/eclipse/emf/transaction/TransactionalEditingDomain.DefaultOptions.html DefaultOptions]</tt> adapter that allows clients to set and query domain-wide default transaction options.  The best opportunity for specifying default transaction options is in the factory implementation for the editing domain, so that they are in place before any client actually creates any transactions in that domain.
 
<tt style="color:Green">[http://download.eclipse.org/modeling/emf/transaction/javadoc/1.2.0/org/eclipse/emf/transaction/TransactionalEditingDomain.DefaultOptions.html DefaultOptions]</tt> adapter that allows clients to set and query domain-wide default transaction options.  The best opportunity for specifying default transaction options is in the factory implementation for the editing domain, so that they are in place before any client actually creates any transactions in that domain.
  
 +
=== Other Bug Fixes ===
 +
 +
For details of other bugs fixed in this milestone, see the
 +
[http://www.eclipse.org/modeling/emf/news/relnotes.php?project=query&version=1.2.x&types=R,S#1.2.0M3 Query],
 +
[http://www.eclipse.org/modeling/emf/news/relnotes.php?project=transaction&version=1.2.x&types=R,S#1.2.0M3 Transaction], and
 +
[http://www.eclipse.org/modeling/emf/news/relnotes.php?project=validation&version=1.2.x&types=R,S#1.2.0M3 Validation] release notes.
 
[[Category:EMF]] [[Category:Modeling]]
 
[[Category:EMF]] [[Category:Modeling]]

Latest revision as of 19:45, 28 May 2008

EMF Model Query, Model Transaction, and Validation Framework Release 1.2 New and Noteworthy Items.

For more details about the milestone-by-milestone development plan, see the 1.2 draft plan.

Back to Eclipse Modeling Framework.

Contents

[edit] 1.2 M6

This milestone was primarily devoted to defect fixing, with a few small-ish enhancements.

[edit] Query: Disposable OCL Conditions

In an earlier iteration of the MDT OCL component's 1.2 release, a OCL::dispose() API was introduced for disposal of OCL parsing environments and the EMF objects that they create. As AbstractOCLConditions create OCL environments in their evaluation, they need to be disposable, also. Thus, a dispose() operation is added to these.

[edit] Other Bug Fixes

For details of other bugs fixed in this milestone, see the Query, Transaction, and Validation release notes.

[edit] 1.2 M5

This milestone was limited to the fixing of small defects. For details, see the Query, Transaction, and Validation release notes.

[edit] 1.2 M4

The major new work in this milestone was the adoption of J2SE 5.0 language features (and API) in these components.

[edit] Query: J2SE 5.0 Adoption

The Query API exploits generic typing and other language features where appropriate. As an example, the extant condition classes for data types:

are refactored as specializations of a new generic DataTypeCondition<T>. This new condition provides a convenient superclass for conditions on an EMF model's EDataTypes, particularly in conjunction with the new IDataTypeAdapter<T> interface for conversion of instance values to the required type. Extant adapter classes are refactored to implement this new interface.

[edit] Query: NumberCondition Enhancements

The NumberCondition<N> class is improved in two dimensions. First, it is no longer abstract, but generically implements all of the capabilities of its subclasses (such as NumberCondition::IntegerValue). Thus, these inner subclasses specific to each Java numeric primitive type are effectively obsoleted. One consequence of this improved NumberCondition is that it handles Java's arbitrary-precision BigInteger and BigDecimal types, which Ecore also supports as data types. In fact, any user-defined subclass of java.lang.Number that is comparable with itself is supported.

Also, support for relational operators and exclusive-bound range conditions is added, most conveniently using static factory methods:

[edit] Transaction: J2SE 5.0 Adoption

The Transaction API exploits generic typing and other language features where appropriate. For example:

[edit] Transaction: Transactional Editor Example

The org.eclipse.emf.workspace.examples.library.editor example plug-in demonstrating how to use the Transaction APIs to convert an EMF-generated editor to a transactional editor is updated to clarify the differences. In particular,

  • the editor was synchronized with updates to the editor codegen templates of the last couple of EMF releases, to simplify comparison with the generated version
  • methods that are hand-modified are marked as @generated NOT
  • individual customizations of the generated code are indicated by //.CUSTOM: comments

[edit] Validation: J2SE 5.0 Adoption

The Validation framework exploits generic typing and other language features where appropriate. For example:

[edit] Validation: Marker Severities

To simplify the handling of markers with different severities, new API is introduced in the MarkerUtil utility class that filters problems by severity before creating markers. See MarkerUtil::createMarkers(IStatus validationStatus, int severityMask) for details.

[edit] Other Bug Fixes

For details of other bugs fixed in this milestone, see the Query, Transaction, and Validation release notes.

[edit] 1.2 M3

[edit] Transaction: Support for Open Composite Operations

The Workspace Integration layer's IOperationHistory-based CommandStack implementation now supports open composite operations. Now, a CompositeEMFOperation can safely implement the ICompositeOperation interface to be "opened" on the history while other operations are executed within its scope. The editing domain will correctly attach ResourceUndoContexts to the composite when it completes, ensuring that it appears on the Undo menu of any editor on the affected Resources.

This works also for AbstractEMFOperations that are executed while a non-EMF composite operation is open on the history.

[edit] Transaction: Workspace Validate-Edit Support

Transactions perform a new validate-edit step in the validation phase of commit. When a root transaction commits, it now checks that the resources affected by the transaction are writable or can be made writable by the appropriate Team Providers. If any resource is not writable, the transaction rolls back.

A new Transaction::OPTION_VALIDATE_EDIT option allows clients to specify whether to perform validate-edit or not (by default, not). Additionally, instead of a boolean value, a custom implementation of a new ValidateEditSupport interface can be supplied to perform a validate-edit better suited to the client's needs. The default implementation simply checks with the editing domain that the resource is not read-only.

The org.eclipse.emf.workspace plug-in specializes the validate-edit support for its editing domains to use the Eclipse Workspace API for validate-edit. This provides a richer team-provider integration in IDE applications.

Because validate-edit is not enabled by default, clients that wish to use it must specify the OPTION_VALIDATE_EDIT on every command or operation execution. To simplify this, the TransactionalEditingDomain interface is extended to support default transaction options. Concrete editing domains may implement a new Adaptable interface to provide a DefaultOptions adapter that allows clients to set and query domain-wide default transaction options. The best opportunity for specifying default transaction options is in the factory implementation for the editing domain, so that they are in place before any client actually creates any transactions in that domain.

[edit] Other Bug Fixes

For details of other bugs fixed in this milestone, see the Query, Transaction, and Validation release notes.