Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Remove whitespaces from generation
Remove whitespaces from generation [message #76988] Wed, 28 March 2007 15:12 Go to next message
Eclipse UserFriend
Originally posted by: matroska.libero.it

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 #76997 is a reply to message #76988] Wed, 28 March 2007 21:05 Go to previous messageGo to next message
Eclipse UserFriend
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 #77290 is a reply to message #76997] Thu, 29 March 2007 12:31 Go to previous messageGo to next message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
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 #77471 is a reply to message #77290] Thu, 29 March 2007 15:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

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 #77851 is a reply to message #76997] Sat, 31 March 2007 15:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Something else I notice is a blank line appears in generation if you put a
<c:log> </c:log> line in.


"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 #77882 is a reply to message #77471] Mon, 02 April 2007 12:03 Go to previous messageGo to next message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
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 #77898 is a reply to message #77882] Mon, 02 April 2007 12:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

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 #78355 is a reply to message #77898] Wed, 04 April 2007 12:18 Go to previous messageGo to next message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
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 #79526 is a reply to message #78355] Thu, 12 April 2007 04:47 Go to previous messageGo to next message
Eclipse UserFriend
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 #79835 is a reply to message #79526] Fri, 13 April 2007 12:17 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
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
>
Re: Remove whitespaces from generation [message #603923 is a reply to message #76988] Wed, 28 March 2007 21:05 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Remove whitespaces from generation [message #603979 is a reply to message #76997] Thu, 29 March 2007 12:31 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
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 #604024 is a reply to message #77290] Thu, 29 March 2007 15:16 Go to previous message
Stu Plu is currently offline Stu PluFriend
Messages: 44
Registered: July 2009
Member
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 #604156 is a reply to message #76997] Sat, 31 March 2007 15:31 Go to previous message
Stu Plu is currently offline Stu PluFriend
Messages: 44
Registered: July 2009
Member
Something else I notice is a blank line appears in generation if you put a
<c:log> </c:log> line in.


"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 #604170 is a reply to message #77471] Mon, 02 April 2007 12:03 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
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 #604174 is a reply to message #77882] Mon, 02 April 2007 12:21 Go to previous message
Stu Plu is currently offline Stu PluFriend
Messages: 44
Registered: July 2009
Member
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 #604333 is a reply to message #77898] Wed, 04 April 2007 12:18 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
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 #604663 is a reply to message #78355] Thu, 12 April 2007 04:47 Go to previous message
Stu Plu is currently offline Stu PluFriend
Messages: 44
Registered: July 2009
Member
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 #604735 is a reply to message #79526] Fri, 13 April 2007 12:17 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
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
>
Previous Topic:[teneo] xsd that reference another xsd
Next Topic:[Teneo] Blank hibernate.hbm.xml?
Goto Forum:
  


Current Time: Wed Apr 24 19:50:47 GMT 2024

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

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

Back to the top