lyt23 / filesync4eclipse

Automatically exported from code.google.com/p/filesync4eclipse
1 stars 0 forks source link

Variable substitution with dollar-expresions used in the variable file #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
FileSync currently supports variable substitution from .propeties files with 
some limitations.
Assume you have the following config.properties, providing the key/value pairs:
# common prefix
base_path=/some/path
# specific variables
my_path=${base_path}/my_stuff
your_path=${base_path}/your_stuff
# variable with $ sign
prize=$100

Using this properties file with FileSync will throw an exception, if any of the 
last three variables are used.
The reason is that $ signs must be quoted in the replacement value passed to 
String.replaceAll().
Furthermore, one would expect a reference to ${my_path} to be replaced by 
"/some/path/my_stuff", so the variables sould be replaced recursively within 
the target file (like Maven resource filtering does).

What is the expected output? What do you see instead?
Refereces to other variables within a variable-value should be resolved.
Dollar-signs within a value (that are not part of a reference) should be quoted.
Currently, an exception is thrown whenever a $-sign appears in the variable 
value.

What version of the product are you using? On what operating system?
Latest stable version, on windows.

Please provide any additional information below.
Patch provided - see my clone here:
http://code.google.com/a/eclipselabs.org/r/floriankirchmeir-1/source/list

Original issue reported on code.google.com by florian....@unycom.com on 5 Jul 2010 at 5:11

GoogleCodeExporter commented 8 years ago
DAmn, notifications were broken so I didn't saw you fixes. I will check it 
soon. Thanks!

Original comment by iloveeclipse on 1 Oct 2010 at 9:08