jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • IzPack
  • IZPACK-235

CLONE -The current VariableSubstitutor missing recursive substitutes

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Wish Wish
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Translations
  • Labels:
    None

Description

Usually expression contains several nested levels of variables, that needs more then one iterations to get the wanted result .
For instance:

<variable name="Folder.bin" value="@{MyFolder}/bin" condition="OS_IS_UNIX.Condition"/>
<variable name="Folder.Main" value="@{Product.Folder}" condition="OS_IS_WINDOWS.Condition"/>
<variable name="Folder.Main" value="$USER_HOME" condition="OS_IS_UNIX.Condition"/>

Therefor we need set of new methods do it

For example:

public String recursiveSubstitute(String exp)

{ substituteFragmentation(exp, "@"); }

public String substituteFragmentation(String exp, String chr)
{
1. Checks betweens @{<name>}abcd..., so removes the first char @
2. Checks for the same character before and after the name like %<name>% or @<name>@abcd...
3. Checks after single char @<name>abcd...
4. non of them ...
}

vois <some of the above methods>(String name)
{
1. We translate the "name" to new exp'
2. We perform recursive checking on this new exp' with recursiveSubstitute() method
}

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Michael Maimon added a comment - 24/Dec/08 4:26 PM

Sorry for the mistake
This is what I meant

<variable name="Folder.bin" value="@{Folder.Main}/bin" condition="OS_IS_UNIX.Condition"/>
<variable name="Folder.Main" value="@{Product.Folder}" condition="OS_IS_WINDOWS.Condition"/>
<variable name="Folder.Main" value="$USER_HOME" condition="OS_IS_UNIX.Condition"/>

Show
Michael Maimon added a comment - 24/Dec/08 4:26 PM Sorry for the mistake This is what I meant <variable name="Folder.bin" value="@{Folder.Main}/bin" condition="OS_IS_UNIX.Condition"/> <variable name="Folder.Main" value="@{Product.Folder}" condition="OS_IS_WINDOWS.Condition"/> <variable name="Folder.Main" value="$USER_HOME" condition="OS_IS_UNIX.Condition"/>

People

  • Assignee:
    Unassigned
    Reporter:
    Michael Maimon
Vote (1)
Watch (2)

Dates

  • Created:
    24/Dec/08 4:22 PM
    Updated:
    24/Dec/08 4:26 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.