Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] Accessing Java class members from transformations
[QVTO] Accessing Java class members from transformations [message #727437] Wed, 21 September 2011 09:57 Go to next message
Jan  is currently offline Jan Friend
Messages: 3
Registered: September 2011
Junior Member
Hi there,

I'm just wondering if it is possible to access attributes or even methods of arbitrary Java classes from within a transformation.

To be specific, I want to read some static String values that are needed for some model class attributes. I intend to avoid holding redundant information in the java and in the qvt world.

Any ideas?
Re: [QVTO] Accessing Java class members from transformations [message #727546 is a reply to message #727437] Wed, 21 September 2011 14:09 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7679
Registered: July 2009
Senior Member
Hi

Provide helper functions to provide access to the 'shared' data.

Regards

Ed Willink

On 21/09/2011 10:57, Jan wrote:
> Hi there,
>
> I'm just wondering if it is possible to access attributes or even
> methods of arbitrary Java classes from within a transformation.
>
> To be specific, I want to read some static String values that are
> needed for some model class attributes. I intend to avoid holding
> redundant information in the java and in the qvt world.
>
> Any ideas?
Re: [QVTO] Accessing Java class members from transformations [message #727561 is a reply to message #727437] Wed, 21 September 2011 14:09 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7679
Registered: July 2009
Senior Member
Hi

Provide helper functions to provide access to the 'shared' data.

Regards

Ed Willink

On 21/09/2011 10:57, Jan wrote:
> Hi there,
>
> I'm just wondering if it is possible to access attributes or even
> methods of arbitrary Java classes from within a transformation.
>
> To be specific, I want to read some static String values that are
> needed for some model class attributes. I intend to avoid holding
> redundant information in the java and in the qvt world.
>
> Any ideas?
Re: [QVTO] Accessing Java class members from transformations [message #727563 is a reply to message #727437] Wed, 21 September 2011 14:09 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7679
Registered: July 2009
Senior Member
Hi

Provide helper functions to provide access to the 'shared' data.

Regards

Ed Willink

On 21/09/2011 10:57, Jan wrote:
> Hi there,
>
> I'm just wondering if it is possible to access attributes or even
> methods of arbitrary Java classes from within a transformation.
>
> To be specific, I want to read some static String values that are
> needed for some model class attributes. I intend to avoid holding
> redundant information in the java and in the qvt world.
>
> Any ideas?
Re: [QVTO] Accessing Java class members from transformations [message #728040 is a reply to message #727546] Thu, 22 September 2011 12:48 Go to previous messageGo to next message
Jan  is currently offline Jan Friend
Messages: 3
Registered: September 2011
Junior Member
I managed to build a seperate plugin with a Java class serving as a kind of library (org.eclipse.m2m.qvt.oml.javaBlackboxUnits extension point). However, when using the import statement in a qvto transformation file I cannot "run" this file (that is the transformation) via a run configuration. When I try to run it, it breaks up immediately without any error, trace file or other output. Running the transformation programmatically via java works just fine. Could this be a bug in the QVTO interpreter?
Re: [QVTO] Accessing Java class members from transformations [message #728153 is a reply to message #728040] Thu, 22 September 2011 16:03 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7679
Registered: July 2009
Senior Member
Hi Jan

Almost certainly a bg.

Have you looked in the Window->Show View->Error Log where many of the
more embarrassing error messages appear.

Regards

Ed Willink

On 22/09/2011 13:48, Jan wrote:
> I managed to build a seperate plugin with a Java class serving as a
> kind of library (org.eclipse.m2m.qvt.oml.javaBlackboxUnits extension
> point). However, when using the import statement in a qvto
> transformation file I cannot "run" this file (that is the
> transformation) via a run configuration. When I try to run it, it
> breaks up immediately without any error, trace file or other output.
> Running the transformation programmatically via java works just fine.
> Could this be a bug in the QVTO interpreter?
Re: [QVTO] Accessing Java class members from transformations [message #728436 is a reply to message #728153] Fri, 23 September 2011 09:33 Go to previous message
Jan  is currently offline Jan Friend
Messages: 3
Registered: September 2011
Junior Member
I did, but there is no error. I also tried the following:

1. Starting my transformation plugin (not the lib) via run->eclipse application
2. Writing a very simple transformation that imports the lib but does not its operations
3. Running the transformation via run->transformation bla (Don't use the plugin at all though)

That worked. Thus, it might be that my development workspace is somehow screwed up but without errors it's hard to tell.

[Updated on: Fri, 23 September 2011 09:34]

Report message to a moderator

Previous Topic:[QVT] result of allSubobjects on sets
Next Topic:[ATL] MWE2 component
Goto Forum:
  


Current Time: Fri Nov 08 23:38:32 GMT 2024

Powered by FUDForum. Page generated in 0.04467 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top