Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [buckminster-dev] Property Expansion for Environment Variables

On 11/07/2010 12:53 AM, Johannes Utzig wrote:
To wrap it up:

If you think env_vars and custom vars are corner cases and the Eclipse
mechanism should only be consulted during the actual expansion but
ignored in all other methodes

I do, since you have no way of finding all the Eclipse variables. You will find several prefixes similar to workspace_loc where ${workspace_loc:xxx} may resolve to all resources in your workspace depending on the value of xxx. Adding everything to a map would thus make that map very big. I don't think that's feasible.

, then I'd assume my changes should be made
around here in ExpandingProperties#checkedExpand :
Object propVal = (props instanceof ExpandingProperties<?>) ?
((ExpandingProperties<?>) props).getExpandedProperty(propKey,
recursionGuard + 1) : props.get(propKey);


I think that the solution should focus on:

T getExpandedProperty(String key, int recursionGuard) {
   return convertValue(map.get(key), recursionGuard);
}

If map.get(key) returns null then try the eclipse variable.

- thomas


Back to the top