Unable to alter the outline of usercode region markings

Posts   
 
    
arjanv
User
Posts: 512
Joined: 15-Nov-2006
# Posted on: 05-Dec-2006 11:38:33   

Hi,

I'm unable to alter the outline of the usercode region markings. I initially created a template with a usercode region outline short 1 tab. I altered the template and inserted one tab before the usercode region markings, but without any effect. When I alter it manually in the generated code, the outline stays correct after generating, but all other files remain one tab short.

I'm using LLBLGen 2.0 23rd October build.

Template code:

<[ UserCodeRegion "ValidationEntityCode" ]>
        // __LLBLGENPRO_USER_CODE_REGION_START ValidationEntityCode
        // __LLBLGENPRO_USER_CODE_REGION_END
<[ EndUserCodeRegion ]>

Result:

    // __LLBLGENPRO_USER_CODE_REGION_START ValidationEntityCode
    // __LLBLGENPRO_USER_CODE_REGION_END

Any suggestions?

Thanks, Arjan Vermunt

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 05-Dec-2006 18:42:06   

Will look into it. Sounds strange as the code generator copies everything between the two markers directly into the output.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 06-Dec-2006 10:11:27   

I can't reproduce it:


<[ UserCodeRegion "Test1" ]>
    // __LLBLGENPRO_USER_CODE_REGION_START Test1
    // __LLBLGENPRO_USER_CODE_REGION_END
<[ EndUserCodeRegion ]>

    <[ UserCodeRegion "Test2" ]>
        // __LLBLGENPRO_USER_CODE_REGION_START Test2
        // __LLBLGENPRO_USER_CODE_REGION_END
    <[ EndUserCodeRegion ]>
    
        <[ UserCodeRegion "Test3" ]>
            // __LLBLGENPRO_USER_CODE_REGION_START Test3
            // __LLBLGENPRO_USER_CODE_REGION_END
        <[ EndUserCodeRegion ]>

leads to:


    // __LLBLGENPRO_USER_CODE_REGION_START Test1
    // __LLBLGENPRO_USER_CODE_REGION_END


    
        // __LLBLGENPRO_USER_CODE_REGION_START Test2
        // __LLBLGENPRO_USER_CODE_REGION_END
    
    
        
            // __LLBLGENPRO_USER_CODE_REGION_START Test3
            // __LLBLGENPRO_USER_CODE_REGION_END

Frans Bouma | Lead developer LLBLGen Pro
arjanv
User
Posts: 512
Joined: 15-Nov-2006
# Posted on: 06-Dec-2006 10:14:11   

Now alter the outline in the generated code. Remove a tab from each usercode region marker and then generate. The outline isn't restored to the original layout.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 06-Dec-2006 11:32:19   

arjanv wrote:

Now alter the outline in the generated code. Remove a tab from each usercode region marker and then generate. The outline isn't restored to the original layout.

I don't follow what you mean. My regions have 0, 1 and 2 tabs in front of the marker, so I have tested with 0 tabs in front of the marker...

Please specify the exact what the steps are to reproduce this, as I have currently no clue what to do to repro this.

Edit: Why would I alter the generated code and remove a tab in front of the marker? Could you explain why you want to do that?

Frans Bouma | Lead developer LLBLGen Pro
arjanv
User
Posts: 512
Joined: 15-Nov-2006
# Posted on: 06-Dec-2006 11:38:34   
  1. generate the code
  2. alter the indent of a user code region in the generated code (add or remove a tab, or several blank spaces)
  3. regenerate the code
  4. now the outline is not the same as the first generated code. The manually added tabs or spaces still remain.

or

  1. generate the code
  2. alter the indent of the user code region markers in the template.
  3. generate the code
  4. the code has the same layout as the first time without the adjustments in the template
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 06-Dec-2006 12:26:47   

Ok, this is because the complete line with the marker is seen as the start of the region. I.e: the # of tabs or spaces in front of the comment isn't important: the complete line is used and is also placed as such in the output. So the TDL interpreter doesn't strip off the marker in the original text and therefore doesn't replace it with the marker as stated in the template.

One of the reasons is that the marker in the template (the comment between the usercoderegion statements can contain initial text, e.g. a comment with a hint or remark.

Frans Bouma | Lead developer LLBLGen Pro
arjanv
User
Posts: 512
Joined: 15-Nov-2006
# Posted on: 06-Dec-2006 13:12:05   

So walk through every file and alter the outling. cry

Thanks for the support.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 06-Dec-2006 13:18:33   

arjanv wrote:

So walk through every file and alter the outling. cry

Thanks for the support.

You could use VS.NET's search/replace in files: replace <tab>+marker with <tab><tab>+marker

Frans Bouma | Lead developer LLBLGen Pro