Jump to: navigation, search

M2T-JET/Whats New in 1.0 (Galileo)

Revision as of 13:41, 1 May 2009 by Pelder.ca.ibm.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

JET transformations now sensitive to Cancel

Executing JET transformations can now be canceled. Note that canceling may not terminate recursive loops.

Tag and template developers may check for cancellation by using TransformContextExtender.isCanceled() and may call TransformContextExtender.checkCanceled() to automatically abort if the transformation is canceled.

If a transformation is aborted, the JET2Platform runTransform() methods will return Status.CANCEL_STATUS.

See Bug 273913

Easily format generated Java code

A new tag <java:format> allows you to format its contents according to the Java formatting rules of the workspace or a specific project.

See Bug 262915

XPath function for accessing EMF EClass

A new XPath function, emf.eClass() will access the EClass of an object, if it has one. If object is an XPath variable referring to an EMF Object, then emf.eClass($object)/@name will return its EClass name.

If the argument is not specified, then it defaults to the current XPath context object.

See Bug 273331

XPath function for accessing UML2 Stereotypes

A new Xpath function, uml2.stereotype will access a stereotype on a UML2 Element, if it has one. If element is an XPath variable referring to a UML2 element, then uml2.stereotype($element, "Profile-name::Stereotype-name") will access the applied stereotype.

The first argument is optional. If not specified, it defaults to the current XPath context object.

See Bug 215339

The f:indent tag now preserves user regions

The f:indent tag now preserves user regions that it contains. In previous releases, information necessary to process these user regions was lost.

See Bug 272045

Improved integration with PDE build and international characters

PDE build assumes that all Java files have the same encoding (the default for the JVM executing the build). Prior to this release, JET would set the encoding a the Java class generated from each template to the same encoding as the template. This could be problematic if the selected encoding was not the one used by PDE build.

The JET compiler now compiles templates into Java classes that always have the default Java encoding. Characters that cannot be represented in that encoding are transformed into Unicode escape sequences.

In addition, a new JET template extension has been defined (.jet2) whose default encoding is UTF-8. The default encoding of files with a .jet use the platform's default encoding for text files - this can change from installation to installation.

See Bug 270985