Difference between revisions of "Xpand/New And Noteworthy"

From Eclipsepedia

Jump to: navigation, search
m
(Xpand 2.0)
 
(11 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
= Xpand 2.0 =
 +
 +
== General ==
 +
 +
Version 2.0 is the first major release since Xpand's initial transition from former openArchitectureWare. Over the time, Xpand's codebase evolved with solution of numerous issues, while strong backward API compatibility was kept. Although this version is a major version increment, it is mainly a maintenance release. But the breaking API changes made it necessary to declare it as such. Though the release is not strictly backward compatible, large portions of the code are still backward compatible. See below breaking API changes for reference.
 +
 +
== Release Engineering ==
 +
 +
=== Target Platform ===
 +
 +
While we do our best to keep Xpand backward compatible to Eclipse Galileo (3.5), we cannot grant this compatibility to 100%. Xpand is built against Eclipse Juno (3.8). This is mainly caused by other frameworks Xpand is built against.
 +
* EMF Compare 2.1 - Used by Xpand Incremental Feature
 +
* MDT UML2 4.0 - Used by Xpand UML2 Typesystem Adapter
 +
* CDT 5.4 - Used by Xpand CDT Support Feature
 +
 +
=== Software User Agreement & License Update ===
 +
 +
The Eclipse Software User Agreement (SUA) contained a broken link, which made it necessary for all projects participating in the Eclipse Luna Release Train to update distributed files. See [https://bugs.eclipse.org/bugs/show_bug.cgi?id=431255 431255], [https://bugs.eclipse.org/bugs/show_bug.cgi?id=432806 432806] for details. Additionally Xpand's license was upgraded to the current 2014 version.
 +
 +
== API Changes ==
 +
 +
* Class org.eclipse.internal.xtend.util.ProfileCollector removed. It was used by Xpand's MWE components (Generator, CheckComponent, XtendComponent).
 +
* org.eclipse.internal.xtend.expression.ast.Identifier: <tt>toValue()</tt> was removed and replaced by <tt>toString()</tt>.
 +
* org.eclipse.xpand2.output.Outlet#shouldWrite(FileHandleImpl) replaced by org.eclipse.xpand2.output.Outlet#shouldWrite(FileHandle)
 +
* org.eclipse.internal.xpand2.codeassist.XpandTokens removed, replaced by org.eclipse.internal.xpand2.XpandTokens
 +
* org.eclipse.internal.xtend.type.impl.java.JavaBeansMetaModel removed, replaced by org.eclipse.xtend.type.impl.java.JavaBeansMetaModel
 +
* org.eclipse.xtend.check.ui.editor.lang.CheckTokens removed, replaced by org.eclipse.xtend.ui.editor.lang.XtendTokens
 +
* org.eclipse.xtend.typesystem.xsd.XMLMixedContentFormater removed, replaced by org.eclipse.xtend.typesystem.xsd.XMLMixedContentFormatter
 +
* org.eclipse.internal.xtend.xtend.ast.ImportStatement removed, replaced by org.eclipse.internal.xtend.xtend.ast.ExtensionImportStatement
 +
 +
== Bugfixes ==
 +
 +
=== Performance ===
 +
Xpand 2.0 was again optimized in regards of its execution performance ([https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&chfield=resolution&chfieldfrom=2013-06-27&chfieldto=Now&classification=Modeling&columnlist=product%2Ccomponent%2Cassigned_to%2Cbug_status%2Cresolution%2Cshort_desc%2Cchangeddate%2Ckeywords&component=Xpand&f0=OP&f1=OP&f3=CP&f4=CP&keywords=performance%2C%20&keywords_type=allwords&known_name=Xpand%202.0.0&list_id=9157723&product=M2T&query_based_on=Xpand%202.0.0&query_format=advanced Bugzilla Report: Performance])
 +
 +
=== Other Bugfixes ===
 +
For a complete list of changes refer to:
 +
[https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&chfield=resolution&chfieldfrom=2013-06-27&chfieldto=Now&classification=Modeling&component=Xpand&f0=OP&f1=OP&f3=CP&f4=CP&known_name=Xpand%202.0.0&list_id=9156643&product=M2T&query_based_on=Xpand%202.0.0&query_format=advanced Bugzilla Report]
 +
 +
= Version 1.4.0<br>  =
 +
 +
=== General<br>  ===
 +
 +
Xpand 1.4.0 is a maintenance release. Main focus is bugfixing and minor API extension.<br>
 +
 +
=== Changes  ===
 +
 +
[https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=5753739&f0=OP&classification=Modeling&f4=CP&chfieldto=2013-06-26&query_format=advanced&chfield=resolution&f3=CP&chfieldfrom=2013-02-27&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=Xpand&product=M2T Bugzilla Report]
 +
 +
== API Changes<br>  ==
 +
 +
The API is kept backwards compatible. API changes are regarding new API or opened API.<br>
 +
 +
*The main workflow components Generator, XtendComponent and CheckComponent have been refactored to allow easier customization. State accessed by the main methods checkConfigurationInternal() and invokeInternal2() is reachable also from subclasses now by either protected fields or accessor methods. ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=406653 406653]).<br>
 +
*The CDT support plugin org.eclipse.xpand.support.cdt is now build against CDT 5.4. There was usage of internal API of CDT 5.2, which was made public API with CDT 5.3. ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=406300 406300], [https://bugs.eclipse.org/bugs/show_bug.cgi?id=390087 390087])<br>
 +
 +
=== Deprecations  ===
 +
 +
Some methods and fields have been marked deprecated since they are planned for removal for 2.0. Affected classes are:
 +
 +
*org.eclipse.xpand2.Generator
 +
*org.eclipse.xtend.XtendComponent
 +
 +
== Bug Fixes ==
 +
 +
=== Performance related ===
 +
 +
*When dependent resources are not existing, the resource caching in the UI does not work. This leads to performance downgrade during the analysis phase in the case that projects have this consistency error. The bug was introduced with release 1.3.0. ([https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=5753739&f0=OP&classification=Modeling&f4=CP&chfieldto=2013-06-26&query_format=advanced&chfield=resolution&f3=CP&chfieldfrom=2013-02-27&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=Xpand&product=M2T 405165])
 +
 +
=== UI / Build ===
 +
 +
*Only the first Jar of included resources are recognized for Content Assist ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=407934 407934])
 +
 +
=== Runtime ===
 +
 +
*During the build ClassCastExceptions were thrown when EMF classes have properties with array types. ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=406765 406765])
 +
*QualifiedName creation for Windows paths (C:\...) failed ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=407101 407101])
 +
*The hyphen operator "-" in «ENDREM-» was ignored, the following newline was printed to the result. ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=405769 405769])
 +
 
= Version 1.3.0  =
 
= Version 1.3.0  =
  
Line 65: Line 144:
 
*'''XMLBeautifier: '''The XMLBeautifier escaped newline characters with '''&amp;#xD;''' on Windows when using Mixed Content. The beautifier has been extended to configure the desired newline format (SYSTEM, UNIX, WINDOWS). For older Xpand versions it is possible to work around the issue [https://bugs.eclipse.org/bugs/show_bug.cgi?id=356576#c3 by configuration]. ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=356576 356576], [https://bugs.eclipse.org/bugs/show_bug.cgi?id=400672 400672])<br>
 
*'''XMLBeautifier: '''The XMLBeautifier escaped newline characters with '''&amp;#xD;''' on Windows when using Mixed Content. The beautifier has been extended to configure the desired newline format (SYSTEM, UNIX, WINDOWS). For older Xpand versions it is possible to work around the issue [https://bugs.eclipse.org/bugs/show_bug.cgi?id=356576#c3 by configuration]. ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=356576 356576], [https://bugs.eclipse.org/bugs/show_bug.cgi?id=400672 400672])<br>
  
= Version 1.2.1 (Juno)<br> =
+
= Version 1.2.1 (Juno)<br> =
  
=== General<br> ===
+
=== General<br> ===
  
Xpand 1.2.1 is a maintnance release and was released with [http://wiki.eclipse.org/Juno/Simultaneous_Release_Plan Eclipse Juno].<br>
+
Xpand 1.2.1 is a maintnance release and was released with [http://wiki.eclipse.org/Juno/Simultaneous_Release_Plan Eclipse Juno].<br>  
  
=== Changes<br> ===
+
=== Changes<br> ===
  
[https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=4475265&f0=OP&classification=Modeling&f4=CP&chfieldto=2012-05-02&chfield=resolution&query_format=advanced&chfieldfrom=2011-06-07&f3=CP&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=Xpand&product=M2T Bugzilla Report ](33 issues resolved)<br>
+
[https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=4475265&f0=OP&classification=Modeling&f4=CP&chfieldto=2012-05-02&chfield=resolution&query_format=advanced&chfieldfrom=2011-06-07&f3=CP&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=Xpand&product=M2T Bugzilla Report ](33 issues resolved)<br>  
  
= Version 1.1.0 (Indigo)<br> =
+
= Version 1.1.0 (Indigo)<br> =
  
=== General<br> ===
+
=== General<br> ===
  
Xpand 1.1.0 is a maintnance release and was released with [http://wiki.eclipse.org/Indigo/Simultaneous_Release_Plan Eclipse Indigo].<br>
+
Xpand 1.1.0 is a maintnance release and was released with [http://wiki.eclipse.org/Indigo/Simultaneous_Release_Plan Eclipse Indigo].<br>  
  
=== Changes<br> ===
+
=== Changes<br> ===
  
 
*[https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=4475254&f0=OP&classification=Modeling&f4=CP&chfieldto=2011-06-06&chfield=resolution&query_format=advanced&chfieldfrom=2010-06-16&f3=CP&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=Xpand&product=M2T Bugzilla Report] (37 issues resolved)<br>
 
*[https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=4475254&f0=OP&classification=Modeling&f4=CP&chfieldto=2011-06-06&chfield=resolution&query_format=advanced&chfieldfrom=2010-06-16&f3=CP&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&component=Xpand&product=M2T Bugzilla Report] (37 issues resolved)<br>
  
= Version 1.0.0 (Helios)<br> =
+
= Version 1.0.0 (Helios)<br> =
  
 
=== General  ===
 
=== General  ===
Line 136: Line 215:
 
#'''Java extensions:''' Since Xpand 0.8.0 non-static Java method can be called from Xtend.
 
#'''Java extensions:''' Since Xpand 0.8.0 non-static Java method can be called from Xtend.
  
= Version 0.7.0 (Galileo)<br> =
+
= Version 0.7.0 (Galileo)<br> =
  
 
=== General  ===
 
=== General  ===
Line 197: Line 276:
  
 
  Ctrl + &gt; creates "»"
 
  Ctrl + &gt; creates "»"
 +
 +
<br>
  
 
[[Category:Xpand]]
 
[[Category:Xpand]]
  
 
<br>
 
<br>

Latest revision as of 06:06, 20 May 2014

Contents

[edit] Xpand 2.0

[edit] General

Version 2.0 is the first major release since Xpand's initial transition from former openArchitectureWare. Over the time, Xpand's codebase evolved with solution of numerous issues, while strong backward API compatibility was kept. Although this version is a major version increment, it is mainly a maintenance release. But the breaking API changes made it necessary to declare it as such. Though the release is not strictly backward compatible, large portions of the code are still backward compatible. See below breaking API changes for reference.

[edit] Release Engineering

[edit] Target Platform

While we do our best to keep Xpand backward compatible to Eclipse Galileo (3.5), we cannot grant this compatibility to 100%. Xpand is built against Eclipse Juno (3.8). This is mainly caused by other frameworks Xpand is built against.

  • EMF Compare 2.1 - Used by Xpand Incremental Feature
  • MDT UML2 4.0 - Used by Xpand UML2 Typesystem Adapter
  • CDT 5.4 - Used by Xpand CDT Support Feature

[edit] Software User Agreement & License Update

The Eclipse Software User Agreement (SUA) contained a broken link, which made it necessary for all projects participating in the Eclipse Luna Release Train to update distributed files. See 431255, 432806 for details. Additionally Xpand's license was upgraded to the current 2014 version.

[edit] API Changes

  • Class org.eclipse.internal.xtend.util.ProfileCollector removed. It was used by Xpand's MWE components (Generator, CheckComponent, XtendComponent).
  • org.eclipse.internal.xtend.expression.ast.Identifier: toValue() was removed and replaced by toString().
  • org.eclipse.xpand2.output.Outlet#shouldWrite(FileHandleImpl) replaced by org.eclipse.xpand2.output.Outlet#shouldWrite(FileHandle)
  • org.eclipse.internal.xpand2.codeassist.XpandTokens removed, replaced by org.eclipse.internal.xpand2.XpandTokens
  • org.eclipse.internal.xtend.type.impl.java.JavaBeansMetaModel removed, replaced by org.eclipse.xtend.type.impl.java.JavaBeansMetaModel
  • org.eclipse.xtend.check.ui.editor.lang.CheckTokens removed, replaced by org.eclipse.xtend.ui.editor.lang.XtendTokens
  • org.eclipse.xtend.typesystem.xsd.XMLMixedContentFormater removed, replaced by org.eclipse.xtend.typesystem.xsd.XMLMixedContentFormatter
  • org.eclipse.internal.xtend.xtend.ast.ImportStatement removed, replaced by org.eclipse.internal.xtend.xtend.ast.ExtensionImportStatement

[edit] Bugfixes

[edit] Performance

Xpand 2.0 was again optimized in regards of its execution performance (Bugzilla Report: Performance)

[edit] Other Bugfixes

For a complete list of changes refer to: Bugzilla Report

[edit] Version 1.4.0

[edit] General

Xpand 1.4.0 is a maintenance release. Main focus is bugfixing and minor API extension.

[edit] Changes

Bugzilla Report

[edit] API Changes

The API is kept backwards compatible. API changes are regarding new API or opened API.

  • The main workflow components Generator, XtendComponent and CheckComponent have been refactored to allow easier customization. State accessed by the main methods checkConfigurationInternal() and invokeInternal2() is reachable also from subclasses now by either protected fields or accessor methods. (406653).
  • The CDT support plugin org.eclipse.xpand.support.cdt is now build against CDT 5.4. There was usage of internal API of CDT 5.2, which was made public API with CDT 5.3. (406300, 390087)

[edit] Deprecations

Some methods and fields have been marked deprecated since they are planned for removal for 2.0. Affected classes are:

  • org.eclipse.xpand2.Generator
  • org.eclipse.xtend.XtendComponent

[edit] Bug Fixes

[edit] Performance related

  • When dependent resources are not existing, the resource caching in the UI does not work. This leads to performance downgrade during the analysis phase in the case that projects have this consistency error. The bug was introduced with release 1.3.0. (405165)

[edit] UI / Build

  • Only the first Jar of included resources are recognized for Content Assist (407934)

[edit] Runtime

  • During the build ClassCastExceptions were thrown when EMF classes have properties with array types. (406765)
  • QualifiedName creation for Windows paths (C:\...) failed (407101)
  • The hyphen operator "-" in «ENDREM-» was ignored, the following newline was printed to the result. (405769)

[edit] Version 1.3.0

[edit] General

Xpand 1.3.0 is a maintenance release. Main focus in this Xpand release is performance and memory optimization.

[edit] Changes

[edit] Performance and Memory Optimization

Xpand is used in large-scale projects, where overall performance is crucial. For the Kepler release Xpand has been intensively profiled to identify performance hot spots. Performance is meant in both execution performance as well as memory usage. Often the optimization on the one side reduces the performance on the other side: accelerating execution performance often uses caching, which increases memory usage, and vice-versa, reducing memory consumption requires more processing time. It has been taken into account that the performance gain pays off the downside. Sometimes performance could be improved in both ways, e.g. when garbage collection is performed less when unneccessary memory allocation is avoided, this also is positive for the execution performance.

[edit] Parser 

The ANTLR based parser grammars have been refactored to perform better. Adding the location information was performed by subclass of the parser, which was now removed. The respective code has been inlined into the parsers.

[edit] AST 

The AST classes (*.internal.*.ast.*) usually maintain lists or arrays of other AST elements. When these collections are empty, the instance field will be assigned to a constant empty array or collection. This avoids the unneccessary instantiation and references to empty collections.

Class Identifier, which usually makes the largest part of the AST elements, has been refactored. The strings that make up identifiers are separated into segments, which are hold by the newly introduced datastructure QualifiedName. String segments are interned in a weak cache, as well as QualifiedName instances. It is assured that only one instance per string or QualifiedName will exist. The weak cache allows instances to be garbage collected once they are not referenced.

The overall memory consumption of the AST has been decreased by >50%.

Related bugs: 385587 395258

[edit] Typesystem

The BuiltInMetaModel remembered cache misses for any queried type. This caused its cache map to grow and perform less. The BuiltInMetaModel will cache only type mappings for which it is responsible.

The usage of regular expressions for matching type names have been replaced by a faster implementation. (401144)

[edit] Builder

Xpand's builder performs now faster. Xpand searches the classpath for resources when queried by name. Therefore also jar archives are also searched. With Xpand 1.3 a blacklist is maintained to know which jar archives can be ignored in subsequent searches.

The feedback of the builder has been also improved. During a build, the progress monitor will now report detailed feedback on the current processing step and progress.

Related bugs: 395600 388751

[edit] Other performance related changes

  • Resource caching in ExecutionContextImpl fixed (329453)
  • Added caching of results in TypesystemImpl (395727)
  • Improved analysis for ambiguous extensions (401505)

[edit] UML Support

The UML Typesystem adapter has been updated to support MDT UML2 Version 4.x.

Related bugs: 385174 333605 338282 338373

[edit] Build

  • Sources for some plugins (e.g. org.eclipse.xtend.util.stdlib) were missing in the SDK (322980)
  • Tests for XSD Typesystem have been integrated into the build

[edit] Miscellaneous

  • «ENDREM-»: Xpand did not support the newline suppressing operator "-" for the ENDREM tag. Parser, Content Assist and Syntax Coloring have been fixed. (322394)
  • Templates with same file name: In the syntax analysis an error was shown, when two templates have the same file name, but different definitions within. The template that invokes one of these definitions with «EXPAND» might have an error marker ("Couldn't find definition..."). (400105)
  • Extensions from projects in development workspace: When extensions are used from plugin projects in a runtime test environment, the classpath folders from the plugins in development workspace are linked folders that contribute to the plugin classpath in the test environment. This is a quite typical scenario when developing and testing Xpand plugins. Using extensions from these plugin projects failed with exceptions and required to use a deployed version of the plugin, or importing these projects into the test workspace. (338695)
  • XMLBeautifier: The XMLBeautifier escaped newline characters with &#xD; on Windows when using Mixed Content. The beautifier has been extended to configure the desired newline format (SYSTEM, UNIX, WINDOWS). For older Xpand versions it is possible to work around the issue by configuration. (356576, 400672)

[edit] Version 1.2.1 (Juno)

[edit] General

Xpand 1.2.1 is a maintnance release and was released with Eclipse Juno.

[edit] Changes

Bugzilla Report (33 issues resolved)

[edit] Version 1.1.0 (Indigo)

[edit] General

Xpand 1.1.0 is a maintnance release and was released with Eclipse Indigo.

[edit] Changes

[edit] Version 1.0.0 (Helios)

[edit] General

Xpand 1.0.0 is the first graduated release at Eclipse and was released with Eclipse Helios.

[edit] Changes

[edit] Incremental Generation

Xpand is now shipped with an optional incremental generation facility. This works very similar to the incremental Java compiler in Eclipse. It detects which parts of a model have changed since the last generation process. It then determines which files need to be generated due to that change and which are unaffected by it. Only the former are the regenerated, while the latter remain untouched.

Big models benefit from this feature. The generation of models with 1000 elements takes 50% of the time without incremental generation.

[edit] Backend

In large projects, generator speed is an issue, and the backend is designed with performance in mind. This requirement is what actually sparked its development in the first place. For performance and/or obfuscation reasons, the backend will serve as a basis for compilation into Java classes.

The design was driven by the following forces:

  1. Performance
  2. Compiler
  3. Language independence
  4. Independent of parse tree
  5. Language interoperability
  6. Reuse of Tooling

[edit] Profiler

Xpand provides profiler facilities by defining a profiling component. An example workflow using the profiler is shipped with the generator sample project (generatorWithProfiler.mwe).

XpandProfiler.png

[edit] Editor

A lot of enhancements are done for the Xpand editors.

  1. The navigation of the Xpand editors is improved by more specific navigation proposals
  2. Extension imports are now hyperlinks to the extension files
  3. The Xpand project wizard allows a more detailed project configuration
  4. A lot of other enchantments like markers for missing/not existing metamodels
XpandProjectWizard.png

[edit] Further improvements

  1. ONFILECLOSE: The ONFILECLOSE keyword is added to the EXPAND statement and allows a deferred evaluation of the EXPAND statement. The evaluation of the EXPAND statement is deferred until the FILE statement is closed.
  2. Java extensions: Since Xpand 0.8.0 non-static Java method can be called from Xtend.

[edit] Version 0.7.0 (Galileo)

[edit] General

The 0.7.0 version of the Xpand component from M2T is the first official Eclipse release of it. Xpand is a statically typed template language, featuring polymorphic dispatch, extensions and an open pluggable type system. It comes with Eclipse-based IDE support.

Xpand has previously been a part of openArchitectureWare and is used in many big projects and also shipped with some commercial products.

[edit] Changes

[edit] Performance

For the 0.7.0 release, the team has done some major performance improvements. Not only the runtime is up to 60% faster but due to aggressive caching we were able to improve the performance of the static analysis in the IDE about 400%.

[edit] IDE features

As this is the first release at Eclipse, some of the UI-features are outlined here.

[edit] File decorations

When you open Eclipse and import a project into the workspace you can see several file decorating images.

XpandFileImages.jpg

There are specific images for

  • Xpand2 templates (.xpt extension)
  • Extension files (.ext extension)
  • Check constraints (.chk extension)

[edit] Editors

When you double-click on one of the above mentioned file types, special editors will open that provide appropriate syntax coloring. Syntax coloring

Here are examples for the Xpand editor:

XpandCodeHighlighting.jpg

for the Extensions editor:

XtendCodeHighlighting.jpg

and for Check editor:

CheckCodeHighlighting.jpg

[edit] Code completion

The Editors provide extensive code completion support by pressing Ctrl + Space similar to what is known from the Java editor. Available types, properties, and operation, as well as extensions from .ext files will be found. The Xpand editor provides additionally support for the Xpand language statements. Xpand tag delimiter creation support.

XpandCodeCompletion.jpg

In the Xpand editor there is an additional keystroke available to create the opening and closing tag brackets, the guillemets ("«" and "»").

Ctrl + < creates "«"

and

Ctrl + > creates "»"