Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » *EXPAND* Java-Extension-Problem(Java-Extension does not work (?) in itemis eclipse distro )
icon8.gif  *EXPAND* Java-Extension-Problem [message #508366] Mon, 18 January 2010 10:06 Go to next message
No real name is currently offline No real name
Messages: 7
Registered: January 2010
Junior Member
Hey, I tried 4 hours to use the Java-Extension of Expand,
but it does not work as written in the documentation.
I use the latest Itemis-Distro of eclipse:

I can map a Java Funktion to an Expand-Funktion as long as I do not use any parameters. Then it works... if I use any parameters I cannot match the funktion anymore... I tried everything:

1.)
String createData(Data data): JAVA generator.xml.XmlHelper.createXmlData(Data data);

-->Does not find Data in the Mapping on the right side

2.)
String createData(Data data): JAVA generator.xml.XmlHelper.createXmlData(data);

-->Does not find data in the Mapping on the right side, same effect

3.)
String createXmlData(fullpackage.Data data):
JAVA fullpackage.Data.createXmlData(fullpackage.Data data);

-->I get an error while calling the method in an template File

Is this a bug, or did I something wrong?
Thank you!
Re: *EXPAND* Java-Extension-Problem [message #508406 is a reply to message #508366] Mon, 18 January 2010 06:46 Go to previous messageGo to next message
ekkehard gentz is currently offline ekkehard gentz
Messages: 118
Registered: July 2009
Location: rosenheim, Germany, bavar...
Senior Member

This is a multi-part message in MIME format.
--------------040604030203040800000907
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

something like this should work:

String myJavaExtension(String s):
JAVA org.your.package.getYourExtension(
java.lang.String);

this calls a method using a java.lang.String as Parameter and also a
String as Return value

ekke

Am 18.01.10 16:06, schrieb hyperion@gmx.at:
> Hey, I tried 4 hours to use the Java-Extension of Expand, but it does
> not work as written in the documentation. I use the latest
> Itemis-Distro of eclipse:
>
> I can map a Java Funktion to an Expand-Funktion as long as I do not
> use any parameters. Then it works... if I use any parameters I cannot
> match the funktion anymore... I tried everything:
>
> 1.)
> String createData(Data data): JAVA
> generator.xml.XmlHelper.createXmlData(Data data);
>
> -->Does not find Data in the Mapping on the right side
>
> 2.)
> String createData(Data data): JAVA
> generator.xml.XmlHelper.createXmlData(data);
>
> -->Does not find data in the Mapping on the right side, same effect
>
> 3.)
> String createXmlData(fullpackage.Data data): JAVA
> fullpackage.Data.createXmlData(fullpackage.Data data);
>
> -->I get an error while calling the method in an template File
>
> Is this a bug, or did I something wrong? Thank you!
>


--

ekke (ekkehard gentz)
independent software-architect
senior erp-consultant
eclipse | osgi | equinox | mdsd | oaw | emf | uml
max-josefs-platz 30, D-83022 rosenheim, germany
mailto:ekke@ekkes-corner.org
homepage (de): http://gentz-software.de
blog (en): http://ekkes-corner.org
twitter: @ekkescorner
skype: ekkes-corner
Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490


--------------040604030203040800000907
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
something like this should work:<br>
<br>
String myJavaExtension(String s):<br>
    JAVA org.your.package.getYourExtension(<br>
        java.lang.String);<br>
<br>
this calls a method using a java.lang.String as Parameter and also a
String as Return value<br>
<br>
ekke<br>
<br>
Am 18.01.10 16:06, schrieb <a class="moz-txt-link-abbreviated" href="mailto:hyperion@gmx.at:">hyperion@gmx.at:</a>
<blockquote cite="mid:hj1tdk$q02$1@build.eclipse.org" type="cite">Hey,
I tried 4 hours to use the Java-Extension of Expand, but it does not
work as written in the documentation. I use the latest Itemis-Distro of
eclipse:
<br>
<br>
I can map a Java Funktion to an Expand-Funktion as long as I do not use
any parameters. Then it works... if I use any parameters I cannot match
the funktion anymore... I tried everything:
<br>
<br>
1.)
<br>
String createData(Data data): JAVA
generator.xml.XmlHelper.createXmlData(Data data);
<br>
<br>
--&gt;Does not find Data in the Mapping on the right side
<br>
<br>
2.)
<br>
String createData(Data data): JAVA
generator.xml.XmlHelper.createXmlData(data);
<br>
<br>
--&gt;Does not find data in the Mapping on the right side, same effect
<br>
<br>
3.)
<br>
String createXmlData(fullpackage.Data data): JAVA
fullpackage.Data.createXmlData(fullpackage.Data data);
<br>
<br>
--&gt;I get an error while calling the method in an template File
<br>
<br>
Is this a bug, or did I something wrong? Thank you!
<br>
<br>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<p style="margin-bottom: 0cm;"> <font ,="" color="#808080"
face="Verdana, sans-serif"> <font size="4">ekke (ekkehard gentz)<br>
</font> <font size="3"> independent software-architect<br>
senior erp-consultant<br>
</font> <font size="2">eclipse | osgi | equinox | mdsd | oaw | emf |
uml<br>
max-josefs-platz 30, D-83022 rosenheim, germany<br>
<a class="moz-txt-link-freetext" href="mailto:ekke@ekkes-corner.org">mailto:ekke@ekkes-corner.org</a><br>
homepage (de): <a class="moz-txt-link-freetext" href="http://gentz-software.de">http://gentz-software.de</a><br>
blog (en): <a class="moz-txt-link-freetext" href="http://ekkes-corner.org">http://ekkes-corner.org</a><br>
twitter: @ekkescorner<br>
skype: ekkes-corner<br>
</font> <font size="1"> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID:
DE189929490<br>
</font> </font> </p>
</div>
</body>
</html>

--------------040604030203040800000907--


ekke
independent software architect

blog: http://ekkes-corner.org
twitter: @ekkescorner
icon7.gif  Re: *EXPAND* Java-Extension-Problem [message #508412 is a reply to message #508366] Mon, 18 January 2010 11:58 Go to previous message
No real name is currently offline No real name
Messages: 7
Registered: January 2010
Junior Member
Thank you! It works Smile
Previous Topic:[Acceleo] protected bloc
Next Topic:Transforming models in "GMF editor" into wellformed xml format file
Goto Forum:
  


Current Time: Mon Jul 28 12:26:58 EDT 2014

Powered by FUDForum. Page generated in 0.04010 seconds