Re: Remove whitespaces from generation [message #8081] |
Wed, 28 March 2007 17:05  |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
John,
Please use the M2T newsgroup for JET2 questions. I've added it to the
"to" list so Paul should see your question. He might need more detail
though. Often the goodness of the answer is proportional to the amount
of information provided in the question...
John Slave wrote:
> Hi,
>
> i am using emft jet generation to create java code however i cannot
> find how to remove whitespaces (these whitespaces are that from used
> tags).
>
> Thanks in advance
> Tobia Loschiavo
|
|
|
|
|
|
|
|
|
|
Re: Remove whitespaces from generation [message #9931 is a reply to message #9859] |
Wed, 04 April 2007 08:18   |
Eclipse User |
|
|
|
Stu:
<c:log>Log here</c:log>
would add a line, while
<c:log>
Log here
</c:log>
will not.
The whitespace/line stripping would have to get smarter about the intent of
individual tags to successfully do the right thing on:
<c:log>Log here</c:log>
and, and the same time:
<f:lc>Lower Case here</f:lc>
I'll give it some thought. Here's a bugzilla to track it...
https://bugs.eclipse.org/bugs/show_bug.cgi?id=180927
Paul
"Stu" <evaandoli@dodo.com.au> wrote in message
news:euqsgl$rhf$1@build.eclipse.org...
>I have all comments on a separate line so it must be something else. I'll
>look more into it and post something with more detail if I can narrow it
>down.
>
> The <c:log>Log here</c:log>
>
> Seems to add a blank line is what I have found so far.
>
> Cheers for all your time.
> Stu
>
> "Paul Elder" <pelder@ca.ibm.com> wrote in message
> news:euqrei$jfl$1@build.eclipse.org...
>> Stu:
>>
>> No, just put them on a separate line.
>>
>> I'll have another look at the new line trimming algorthim to see if I can
>> make it more friendly with respect to comments. No promises for this
>> release, so it still comes down to, put your comments on a separate line.
>>
>> <%-- Good: do something --%>
>> <c:iterate ... >
>>
>> <c:iterate ...> <%-- Bad: will result in a an unexpected new line --%>
>>
>> Paul
>>
>> "Stu" <evaandoli@dodo.com.au> wrote in message
>> news:eugl88$70b$1@build.eclipse.org...
>>>I get the same thing and yes I have comments all over the place trying to
>>>make the text understandable.
>>>
>>> Are you saying to remove these ghost blank lines you have to remove all
>>> comments ? Seems a shame.
>>>
>>>
>>>
>>> "Paul Elder" <pelder@ca.ibm.com> wrote in message
>>> news:eugbj7$qk8$1@build.eclipse.org...
>>>> John:
>>>>
>>>> JET2 removes write space when a tag (or other language element) is
>>>> alone on a line.
>>>>
>>>> Rule of thumb: If you don't want write space associated with a tag, put
>>>> it on its own line.
>>>>
>>>> So:
>>>>
>>>> <c:iterate select... >
>>>> Some code
>>>> </c:iterate>
>>>>
>>>> Should produce
>>>>
>>>> Some code
>>>> Some code
>>>> Some code
>>>> ...
>>>>
>>>> But, if you put a comment on the line
>>>>
>>>> <c:iterate select... > <%-- a comment --%>
>>>> Some code
>>>> </c:iterate>
>>>>
>>>> You'd get:
>>>>
>>>> Some code
>>>>
>>>> Some code
>>>>
>>>> Some code
>>>>
>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>> news:euelal$d3e$1@build.eclipse.org...
>>>>> John,
>>>>>
>>>>> Please use the M2T newsgroup for JET2 questions. I've added it to the
>>>>> "to" list so Paul should see your question. He might need more detail
>>>>> though. Often the goodness of the answer is proportional to the
>>>>> amount of information provided in the question...
>>>>>
>>>>>
>>>>> John Slave wrote:
>>>>>> Hi,
>>>>>>
>>>>>> i am using emft jet generation to create java code however i cannot
>>>>>> find how to remove whitespaces (these whitespaces are that from used
>>>>>> tags).
>>>>>>
>>>>>> Thanks in advance
>>>>>> Tobia Loschiavo
>>>>
>>>>
>>>
>>>
>>
>>
>
>
|
|
|
Re: Remove whitespaces from generation [message #11416 is a reply to message #9931] |
Thu, 12 April 2007 00:47   |
Eclipse User |
|
|
|
Originally posted by: evaandoli.dodo.com.au
Ok I got around to finding my problem with a blank line appearing when I
think it shouldnt.
Here is the line that caused trouble:-
PreText1
<c:addTextElement select="$conductorType/valueHolder" name="notFoundName"
var="notFound">NotFound</c:addTextElement>
PostText1
Output looks like:
PreText1
PostText1
I tried:-
<c:addTextElement select="$conductorType/valueHolder" name="notFoundName"
var="notFound">
NotFound
</c:addTextElement>
but got the same result.
Stuart
"Paul Elder" <pelder@ca.ibm.com> wrote in message
news:ev053l$dvg$1@build.eclipse.org...
> Stu:
>
> <c:log>Log here</c:log>
>
> would add a line, while
>
> <c:log>
> Log here
> </c:log>
>
> will not.
>
> The whitespace/line stripping would have to get smarter about the intent
> of individual tags to successfully do the right thing on:
>
> <c:log>Log here</c:log>
>
> and, and the same time:
>
> <f:lc>Lower Case here</f:lc>
>
> I'll give it some thought. Here's a bugzilla to track it...
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=180927
>
> Paul
>
> "Stu" <evaandoli@dodo.com.au> wrote in message
> news:euqsgl$rhf$1@build.eclipse.org...
>>I have all comments on a separate line so it must be something else. I'll
>>look more into it and post something with more detail if I can narrow it
>>down.
>>
>> The <c:log>Log here</c:log>
>>
>> Seems to add a blank line is what I have found so far.
>>
>> Cheers for all your time.
>> Stu
>>
>> "Paul Elder" <pelder@ca.ibm.com> wrote in message
>> news:euqrei$jfl$1@build.eclipse.org...
>>> Stu:
>>>
>>> No, just put them on a separate line.
>>>
>>> I'll have another look at the new line trimming algorthim to see if I
>>> can make it more friendly with respect to comments. No promises for this
>>> release, so it still comes down to, put your comments on a separate
>>> line.
>>>
>>> <%-- Good: do something --%>
>>> <c:iterate ... >
>>>
>>> <c:iterate ...> <%-- Bad: will result in a an unexpected new line --%>
>>>
>>> Paul
>>>
>>> "Stu" <evaandoli@dodo.com.au> wrote in message
>>> news:eugl88$70b$1@build.eclipse.org...
>>>>I get the same thing and yes I have comments all over the place trying
>>>>to make the text understandable.
>>>>
>>>> Are you saying to remove these ghost blank lines you have to remove all
>>>> comments ? Seems a shame.
>>>>
>>>>
>>>>
>>>> "Paul Elder" <pelder@ca.ibm.com> wrote in message
>>>> news:eugbj7$qk8$1@build.eclipse.org...
>>>>> John:
>>>>>
>>>>> JET2 removes write space when a tag (or other language element) is
>>>>> alone on a line.
>>>>>
>>>>> Rule of thumb: If you don't want write space associated with a tag,
>>>>> put it on its own line.
>>>>>
>>>>> So:
>>>>>
>>>>> <c:iterate select... >
>>>>> Some code
>>>>> </c:iterate>
>>>>>
>>>>> Should produce
>>>>>
>>>>> Some code
>>>>> Some code
>>>>> Some code
>>>>> ...
>>>>>
>>>>> But, if you put a comment on the line
>>>>>
>>>>> <c:iterate select... > <%-- a comment --%>
>>>>> Some code
>>>>> </c:iterate>
>>>>>
>>>>> You'd get:
>>>>>
>>>>> Some code
>>>>>
>>>>> Some code
>>>>>
>>>>> Some code
>>>>>
>>>>> "Ed Merks" <merks@ca.ibm.com> wrote in message
>>>>> news:euelal$d3e$1@build.eclipse.org...
>>>>>> John,
>>>>>>
>>>>>> Please use the M2T newsgroup for JET2 questions. I've added it to
>>>>>> the "to" list so Paul should see your question. He might need more
>>>>>> detail though. Often the goodness of the answer is proportional to
>>>>>> the amount of information provided in the question...
>>>>>>
>>>>>>
>>>>>> John Slave wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> i am using emft jet generation to create java code however i cannot
>>>>>>> find how to remove whitespaces (these whitespaces are that from used
>>>>>>> tags).
>>>>>>>
>>>>>>> Thanks in advance
>>>>>>> Tobia Loschiavo
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
|
|
|
Re: Remove whitespaces from generation [message #11601 is a reply to message #11416] |
Fri, 13 April 2007 08:17  |
Eclipse User |
|
|
|
Stu:
Thanks for you persistence. I have filed bug 182311
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=182311). I'll be fixed
shortly.
Paul
"Stu" <evaandoli@dodo.com.au> wrote in message
news:evkdkp$952$1@build.eclipse.org...
> Ok I got around to finding my problem with a blank line appearing when I
> think it shouldnt.
>
> Here is the line that caused trouble:-
>
> PreText1
> <c:addTextElement select="$conductorType/valueHolder" name="notFoundName"
> var="notFound">NotFound</c:addTextElement>
>
> PostText1
>
> Output looks like:
> PreText1
>
> PostText1
>
> I tried:-
> <c:addTextElement select="$conductorType/valueHolder" name="notFoundName"
> var="notFound">
> NotFound
> </c:addTextElement>
>
> but got the same result.
>
> Stuart
>
|
|
|
Powered by
FUDForum. Page generated in 0.04774 seconds