Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » problem with 0.9.0 I200804162020
problem with 0.9.0 I200804162020 [message #44230] Fri, 18 April 2008 07:22 Go to next message
Edoardo Comar is currently offline Edoardo Comar
Messages: 102
Registered: July 2009
Senior Member
With the latest integration build, my java output is uncompilable.

where I should get

public class Connection extends MyResource implements IConnection {

I get

public class Connection extends
MyReource implements IConnection {


I think this is related to the fix posted for
https://bugs.eclipse.org/bugs/show_bug.cgi?id=206469
as I use <f:replaceAll value="\s+" ...>
which to strip out whitespace


my template is like this

....
public class <c:get select="$resourceDef/javaInfo/class"/> extends
<f:replaceAll value="\s+" replacement="" regex="true">
<c:choose>
<c:when test="$resourceDef/type = 'MyDefinition' ">MyDefinition</c:when>
<c:when test="$resourceDef/type = 'MyManager' ">MyManager</c:when>
<c:otherwise>MyResource</c:otherwise>
</c:choose>
</f:replaceAll> implements <c:get
select="$resourceDef/javaInfo/interface"/> {
....
Re: problem with 0.9.0 I200804162020 [message #44294 is a reply to message #44230] Sat, 19 April 2008 07:19 Go to previous messageGo to next message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Edoardo:

I fixed bug 206469 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=206469).
In tag attributes, JET is supposed to be treating \ as an escape character.
For symetry with the handling of \ in directives, the fix removes the \ and
leaves the following character as a literal even if that character does not
require quoting. I'll take a closer look at how JSP handles this issue and
consider adjusting the behavior.

In the meantime, the easiest work around is to use \\s.

Paul

"Edoardo Comar" <ecomar@uk.ibm.com> wrote in message
news:fua08u$oue$1@build.eclipse.org...
> With the latest integration build, my java output is uncompilable.
>
> where I should get
>
> public class Connection extends MyResource implements IConnection {
>
> I get
>
> public class Connection extends
> MyReource implements IConnection {
>
>
> I think this is related to the fix posted for
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=206469
> as I use <f:replaceAll value="\s+" ...>
> which to strip out whitespace
>
>
> my template is like this
>
> ...
> public class <c:get select="$resourceDef/javaInfo/class"/> extends
> <f:replaceAll value="\s+" replacement="" regex="true">
> <c:choose>
> <c:when test="$resourceDef/type = 'MyDefinition' ">MyDefinition</c:when>
> <c:when test="$resourceDef/type = 'MyManager' ">MyManager</c:when>
> <c:otherwise>MyResource</c:otherwise>
> </c:choose>
> </f:replaceAll> implements <c:get
> select="$resourceDef/javaInfo/interface"/> {
> ...
Re: problem with 0.9.0 I200804162020 [message #44356 is a reply to message #44294] Mon, 21 April 2008 08:59 Go to previous message
Edoardo Comar is currently offline Edoardo Comar
Messages: 102
Registered: July 2009
Senior Member
Paul Elder wrote:
> Edoardo:
>
> I fixed bug 206469 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=206469).
> In tag attributes, JET is supposed to be treating \ as an escape character.
> For symetry with the handling of \ in directives, the fix removes the \ and
> leaves the following character as a literal even if that character does not
> require quoting. I'll take a closer look at how JSP handles this issue and
> consider adjusting the behavior.
>
> In the meantime, the easiest work around is to use \\s.
>
> Paul


Paul, this is what I did, I don't think you need to change anything -
except that the sample in the HTML reference for the tag needs to be
updated :-)
Previous Topic:is it possible to SORT the results of a jet xpath select ?
Next Topic:Is it possible to retrieve attributes and references from JET using XPath?
Goto Forum:
  


Current Time: Thu Apr 24 11:23:48 EDT 2014

Powered by FUDForum. Page generated in 0.01496 seconds