Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "QVTo/New and Noteworthy/Helios"

 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
Eclipse QVT Operational New and Noteworthy items for the Helios 3.0.0 release.
 +
 
==Milestone 2==
 
==Milestone 2==
  
Line 6: Line 8:
  
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=204085 204085] XMI serialization of AST models created by the QVTo parser
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=204085 204085] XMI serialization of AST models created by the QVTo parser
 +
 +
The saved XMI is directly executable (see unit tests that compile
 +
QVTo source files into XMI files and load its AST model contents for test case transformations execution).
 +
 +
This feature can be activated by <i>boolean "internal.save.xmi"</i> argument of the QVTo builder.
  
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=256149 256149] Contextual operation in Java black-box library as non-static Java method
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=256149 256149] Contextual operation in Java black-box library as non-static Java method
 +
 +
The following Java black-box library code declares contextual operation for QVTo:
 +
<source lang="java">
 +
class FooLib {
 +
    @Operation (contextual = true)
 +
    public String myOperation(String self) {
 +
      return self;
 +
  }
 +
}
 +
</source>
 +
This gets a chance to maintain module instance data that is accessible to a contextual operation (in contrast to static Java method declaration).
 +
  
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=267493 267493] UI creation wizard for QVTo Ant tasks
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=267493 267493] UI creation wizard for QVTo Ant tasks
 +
 +
QVTo Ant tasks wizard allows to easily create composite transformation chain from existing QVTo launch configurations:
 +
<br/><br/>
 +
[[Image:qvto-ant-wizard.PNG]]<br/><br/>
 +
 +
Ant scripts created by the wizard looks like follows:
 +
<source lang="xml">
 +
<project name="project" default="default" xmlns:qvto="http://www.eclipse.org/qvt/1.0.0/Operational">
 +
    <target name="default">
 +
   
 +
        <qvto:transformation
 +
            uri="../transforms/Ecore2UML.qvto"
 +
            >
 +
       
 +
            <in
 +
                uri="../model/SimpleUML.ecore"
 +
            />
 +
            <out
 +
                uri="../output/SimpleUML.uml"
 +
            />
 +
        </qvto:transformation>
 +
 +
    <qvto:transformation
 +
            uri="../transforms/Uml2Xhtml_vfinal.qvto"
 +
            >
 +
       
 +
            <in
 +
                uri="../output/SimpleUML.uml"
 +
            />
 +
            <out
 +
                uri="../output/SimpleUML.html"
 +
            />
 +
        </qvto:transformation>
 +
   
 +
    </target>
 +
</project>
 +
</source>
  
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=284989 284989] QVTo Invocation API now handles dynamic models
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=284989 284989] QVTo Invocation API now handles dynamic models
 +
 +
Now transformation executor client is able to provide a custom registry, possibly initialized with packages loaded from the workspace located .ecore files.
 +
 +
Invocation sample:
 +
<source lang="java">
 +
EPackage.Registry registry = new EPackageRegistryImpl();
 +
EPackage dynPackage = (EPackage) ecoreFile.getContents().get(0);
 +
registry.put(dynPackage.getNsURI(), dynPackage);
 +
 +
TransformationExecutor executor = new TransformationExecutor(transfURI, registry);
 +
...
 +
</source>
  
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=285007 285007] Semantic highlighting to QVTo editor
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=285007 285007] Semantic highlighting to QVTo editor
 +
 +
Keyword, string, comment only based highlighting was enhanced to increase QVTo source code readability. QVTo element specific highlighting is supported in the editor. Coloring preference page and sample code preview are also provided:
 +
<br/><br/>
 +
[[Image:qvto-editor.PNG]]<br/><br/>
 +
  
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=287589 287589] Performance improvement of trace generation and look up
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=287589 287589] Performance improvement of trace generation and look up
  
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=287594 287594] Direct support for 'nullable' enumerations
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=287594 287594] Direct support for 'nullable' enumerations
 +
 +
Now QVTo directly supports EMF/Ecore nullable enumerations pattern.
 +
Sample code that tests this feature:
 +
<source lang="java">
 +
main() {
 +
var c := object Shapes::Line
 +
{
 +
// This is what we want nullable enumerations for to begin with ...
 +
Style := null;
 +
};
 +
assert fatal (c.Style = null);
 +
 +
object c:Shapes::Line
 +
{
 +
-- Assignment with typecast
 +
Style := StyleEnum::Dotted.oclAsType(Shapes::StyleEnumObject);
 +
};
 +
assert fatal (c.Style = StyleEnum::Dotted);
 +
 +
object c:Shapes::Line
 +
{
 +
-- Direct assignment
 +
Style := StyleEnum::Dotted;
 +
};
 +
assert fatal (c.Style = StyleEnum::Dotted.oclAsType(Shapes::StyleEnumObject));
 +
}
 +
</source>
 +
 +
And input model looks like follows:
 +
<br/><br/>
 +
[[Image:qvto-ecore-nullablenum.PNG]]<br/><br/>
  
 
====Bugs====
 
====Bugs====
  
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=287711 287711] Input EObjects having eContainer != null can't be accessed as model extent root objects
+
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=287711 287711] QVTo model extent accepts EObjects having eContainer != null as model root objects
 +
 
 +
Now QVTo supports use-case when user pass EObjects that are children of an existing object tree as input to QVTo transformation execution. As a consequence input EObjects having <source lang="java">eContainer != null</source> are now correctly returned by the following call:
 +
<source lang="java">
 +
transformation ClassesTransf(inout model : UML20);
 +
main() {
 +
  var classes := model.objects()[uml20::classes::Class];
 +
  ...
 +
</source>
  
 
==Milestone 3==
 
==Milestone 3==
  
 
The milestone was completed on Tuesday, 10 November 2009
 
The milestone was completed on Tuesday, 10 November 2009
 +
 +
====Enhancements====
  
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=291458 291458] Content viewer for QVTo concrete syntax files
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=291458 291458] Content viewer for QVTo concrete syntax files
 +
 +
QVTo specific syntax highlighting viewer is available in Compare, Merge views.
  
 
==Milestone 4==
 
==Milestone 4==
Line 33: Line 149:
 
The milestone was completed on Wednesday, 16 December 2009
 
The milestone was completed on Wednesday, 16 December 2009
  
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=290002 290002] Adopt QVT CST to latest OCL 3.0.0 CST
+
====Migration====
 +
 
 +
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=290002 290002] QVTo parser model (CST model) adopted to OCL parser model
 +
 
 +
OCL grammar has been substantially revised to align with the likely OCL 2.1 specification. Since QVTo grammar is based on OCL is was necessary to modify QVTo LPG grammar to stay in sync with it.
  
 
====Enhancements====
 
====Enhancements====
  
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=295060 295060] Transformation executor must accept a generic transformation URI
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=295060 295060] Transformation executor must accept a generic transformation URI
 +
 +
Transformation executor (described here [http://wiki.eclipse.org/QVTOML/Examples/InvokeInJava Executing QVTo transformations from Java]) now accepts all kind of URI schemes generally accepted by EMF resource implementation (like file:/.., etc.).
  
 
====Debug facility====
 
====Debug facility====
Line 54: Line 176:
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=296633 296633] Provide debug.ui implementation <br/>
 
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=296633 296633] Provide debug.ui implementation <br/>
  
QVTo remote debug launch configuration page. It allows to debug Java black-box implementation along with QVTo script in one workspace: <br/>
+
QVTo remote debug launch configuration page (provides all standart Eclipse Application configurations pages). It allows to debug Java black-box implementation along with QVTo script in one workspace:<br/><br/>
[[Image:qvto-remote-debug.PNG]]<br>
+
[[Image:qvto-remote-debug.PNG]]<br/><br/>
  
QVTo workspace debug launch configuration page. Allows to debug QVTo script right in working workspace: <br/>
+
QVTo workspace debug launch configuration page (only Transformation and Configuration Properties pages). Allows to debug QVTo script right in working workspace:
[[Image:qvto-workspace-debug.PNG]]<br>
+
<br/><br/>
 +
[[Image:qvto-workspace-debug.PNG]]<br/><br/>
  
Sample of QVTo debug process with all standard debug facilities: <br/>
+
Sample of QVTo debug process with all standard debug facilities (conditional breakpoints written in QVTo are supported as well):
[[Image:qvto-workspace-debug-ui.PNG]]<br>
+
<br/><br/>
 +
[[Image:qvto-workspace-debug-ui.PNG]]<br/><br/>
  
 
==Milestone 5==
 
==Milestone 5==

Latest revision as of 13:36, 18 May 2014

Eclipse QVT Operational New and Noteworthy items for the Helios 3.0.0 release.

Milestone 2

The milestone was completed on Wednesday, 30 September 2009

Enhancements

204085 XMI serialization of AST models created by the QVTo parser

The saved XMI is directly executable (see unit tests that compile QVTo source files into XMI files and load its AST model contents for test case transformations execution).

This feature can be activated by boolean "internal.save.xmi" argument of the QVTo builder.

256149 Contextual operation in Java black-box library as non-static Java method

The following Java black-box library code declares contextual operation for QVTo:

class FooLib {
    @Operation (contextual = true)
    public String myOperation(String self) {
      return self;
   }
}

This gets a chance to maintain module instance data that is accessible to a contextual operation (in contrast to static Java method declaration).


267493 UI creation wizard for QVTo Ant tasks

QVTo Ant tasks wizard allows to easily create composite transformation chain from existing QVTo launch configurations:

Qvto-ant-wizard.PNG

Ant scripts created by the wizard looks like follows:

<project name="project" default="default" xmlns:qvto="http://www.eclipse.org/qvt/1.0.0/Operational">
    <target name="default">
 
        <qvto:transformation
            uri="../transforms/Ecore2UML.qvto"
            >
 
            <in
                uri="../model/SimpleUML.ecore"
            />
            <out
                uri="../output/SimpleUML.uml"
            />
        </qvto:transformation>
 
    	<qvto:transformation
            uri="../transforms/Uml2Xhtml_vfinal.qvto"
            >
 
            <in
                uri="../output/SimpleUML.uml"
            />
            <out
                uri="../output/SimpleUML.html"
            />
        </qvto:transformation>
 
    </target>
</project>

284989 QVTo Invocation API now handles dynamic models

Now transformation executor client is able to provide a custom registry, possibly initialized with packages loaded from the workspace located .ecore files.

Invocation sample:

EPackage.Registry registry = new EPackageRegistryImpl();
EPackage dynPackage = (EPackage) ecoreFile.getContents().get(0);
registry.put(dynPackage.getNsURI(), dynPackage);
 
TransformationExecutor executor = new TransformationExecutor(transfURI, registry);		
...

285007 Semantic highlighting to QVTo editor

Keyword, string, comment only based highlighting was enhanced to increase QVTo source code readability. QVTo element specific highlighting is supported in the editor. Coloring preference page and sample code preview are also provided:

Qvto-editor.PNG


287589 Performance improvement of trace generation and look up

287594 Direct support for 'nullable' enumerations

Now QVTo directly supports EMF/Ecore nullable enumerations pattern. Sample code that tests this feature:

main() {
	var c := object Shapes::Line
	{
		// This is what we want nullable enumerations for to begin with ...
		Style := null;
	};
	assert fatal (c.Style = null);
 
	object c:Shapes::Line 
	{
		-- Assignment with typecast
		Style := StyleEnum::Dotted.oclAsType(Shapes::StyleEnumObject);
	};
	assert fatal (c.Style = StyleEnum::Dotted);
 
	object c:Shapes::Line 
	{
		-- Direct assignment
		Style := StyleEnum::Dotted;
	};
	assert fatal (c.Style = StyleEnum::Dotted.oclAsType(Shapes::StyleEnumObject));
}

And input model looks like follows:

Qvto-ecore-nullablenum.PNG

Bugs

287711 QVTo model extent accepts EObjects having eContainer != null as model root objects

Now QVTo supports use-case when user pass EObjects that are children of an existing object tree as input to QVTo transformation execution. As a consequence input EObjects having
eContainer != null
are now correctly returned by the following call:
transformation ClassesTransf(inout model : UML20);
main() {
   var classes := model.objects()[uml20::classes::Class];
   ...

Milestone 3

The milestone was completed on Tuesday, 10 November 2009

Enhancements

291458 Content viewer for QVTo concrete syntax files

QVTo specific syntax highlighting viewer is available in Compare, Merge views.

Milestone 4

The milestone was completed on Wednesday, 16 December 2009

Migration

290002 QVTo parser model (CST model) adopted to OCL parser model

OCL grammar has been substantially revised to align with the likely OCL 2.1 specification. Since QVTo grammar is based on OCL is was necessary to modify QVTo LPG grammar to stay in sync with it.

Enhancements

295060 Transformation executor must accept a generic transformation URI

Transformation executor (described here Executing QVTo transformations from Java) now accepts all kind of URI schemes generally accepted by EMF resource implementation (like file:/.., etc.).

Debug facility

In M4 QVTo Debug tooling was implemented (QVTo debugger runs on top of Eclipse debugging framework, source lookup mechanism). It provides basic debug features:

* breakpoints
* StepOver, StepIn, StepOut, Run to Line
* variables view
* expressions view
* watches

Some bugzillas related to this new QVTo Debug configuration:

295844 Implement concept of debuggable QVT Virtual Machine
295845 Provide QVT debug core implementation
296633 Provide debug.ui implementation

QVTo remote debug launch configuration page (provides all standart Eclipse Application configurations pages). It allows to debug Java black-box implementation along with QVTo script in one workspace:

Qvto-remote-debug.PNG

QVTo workspace debug launch configuration page (only Transformation and Configuration Properties pages). Allows to debug QVTo script right in working workspace:

Qvto-workspace-debug.PNG

Sample of QVTo debug process with all standard debug facilities (conditional breakpoints written in QVTo are supported as well):

Qvto-workspace-debug-ui.PNG

Milestone 5

The milestone was completed on Tuesday, 2 February 2010

Enhancements

287685 Support for standalone QVTO execution

Now transformation can be invoked outside Eclipse from Java via org.eclipse.m2m.qvt.oml.TransformationExecutor (see Executing QVTo transformations from Java.

Required dependencies:

//-- EMF and OCL jars ----------
org.eclipse.emf.ecore_2.6.0.v200912121603.jar
org.eclipse.emf.common_2.6.0.v200912121603.jar
org.eclipse.emf.ecore.xmi_2.5.0.v200912121603.jar
net.sourceforge.lpg.lpgjavaruntime_1.1.0.v200803061910.jar
org.eclipse.ocl_3.0.0.v200912161120.jar
org.eclipse.ocl.ecore_3.0.0.v200912161120.jar
//-- QVTo jars ----------
org.eclipse.m2m.qvt.oml
org.eclipse.m2m.qvt.oml.common
org.eclipse.m2m.qvt.oml.cst.parser
org.eclipse.m2m.qvt.oml.emf.util
org.eclipse.m2m.qvt.oml.ecore.imperativeocl

For package (metamodel) registry, resource factories initialization see EMF use in standalone applications

287714 Revise excessive checking for [inout] and [out] transformation parameter types

Now QVTo support custom EMF resource implementations, such as cdo:// etc. resources, as transformation [inout/out] parameters. Before these changes such inputs were only available for [in] parameter types.

LPG v2.0.17 adoption

Parsing infrastructure has been changed so that now it relies on LPG v2.0.17. Reasons behind that decision are that LPG v1.x is stated to be deprecated and also that LPG v1.x run-time has some deficiencies relating performance and memory usage.

297966 QVTo grammar is aligned to LPGv2

300560 Reintroducing official LPGv2 templates

Milestone 6

The milestone was completed on Tuesday, 16 March 2010

Enhancements

302592 New _ (underscore) prefix policies

Now parser supports _'xxx' name escaping policy (along with old _xxx).

Milestone 7

The milestone was completed on Tuesday, 4 May 2010

Enhancements

308049 Accessing Eclipse console from QVTo black-box library

Java black-box implementation now has a mean to access QVTo execution context so transformation configuration properties and standard logging capability are available.


Sample of Java black-box library methods that are declared to have an access to QVTo execution context:

@Operation (kind=Kind.HELPER, withExecutionContext=true)
public void logToConsole(org.eclipse.m2m.qvt.oml.util.IContext context, String param) {
	context.getLog().log(param);
}
 
@Operation (withExecutionContext=true)
public void cancelExecution(org.eclipse.m2m.qvt.oml.util.IContext context) {
	context.getMonitor().cancel();
}
 
@Operation (contextual=true, withExecutionContext=true)
public String getConfigProperty(org.eclipse.m2m.qvt.oml.util.IContext context, String strContext) {
	return context.getConfigProperty(strContext).toString();
}


Sample invocation of the methods above from QVTo script:

import org.bar.Foo;
main() {
	logToConsole('console output from blackbox lib');
 
	log('strTest'.getConfigProperty());
 
	cancelExecution();
}

Back to the top