Closed GoogleCodeExporter closed 9 years ago
There is already a possibility to specify a path variable defined in Eclipse
for
each client, see "Window ->Preferences ->General ->Workspace->Linked
resources->
Defined path variables"
and
http://andrei.gmxhome.de/filesync/usage.html
Hovewer, you will need to enforce all your developers to add this variable
manually
in each workspace they use/create, which is not very friendly...
So I've added some experimental code in SVN for the path resolving/unresolving.
It will resolve //server/share/${env_var\:CLIENT}/data to
//server/share/andrei/
data
or
c:/${env_var\:CLIENT}/data/${env_var\:TODAY} to c:/andrei/data/20090131
or
${env_var\:TEMP}/blabla/${env_var\:USERNAME} to c:\temp\blabla\andrei
Basically everything "hardcoded" between the first and the last variable will
be
kept, the rest can be changed.
Please notice, that even if Eclipse uses ${name:value} format, because of
encoding
into/from properties file it should be written as ${name\:value}.
All kinds of variables supported by Eclipse variables extension point can be
used.
Some reference info:
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/
reference/api/org/eclipse/core/variables/package-summary.html
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/
reference/extension-points/org_eclipse_core_variables_dynamicVariables.html
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/
reference/extension-points/org_eclipse_core_variables_valueVariables.html
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.user/
concepts/concepts-exttools.htm
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.jdt.doc.user/referen
ce/
preferences/run-debug/ref-string_substitution.htm
Original comment by iloveeclipse
on 7 Feb 2009 at 11:19
Some new issues reported by Bob Swift:
1) UI config: If I specify
//server/root/p4clients/X${env_var\:P4TOOLCLIENT}/
test and save, next time I look at the configuration it is turned into
server/root/
p4clients/x${env_var/:\P4TOOLCLIENT}\test which does not work
2) File config: If I specify
//server/root/p4clients/X${env_var\:P4TOOLCLIENT}/
test in the configuration file and start eclipse, then if I look in the UI I
see
that the configuration has been expanded to
\\server\root\p4clients\xswiftb1\test
<file:///\\server\root\p4clients\xswiftb1\test> and this is correct and it
works
3) If I try to update the server to say newserver, typing is VERY slow, but
eventually it works. Checking the config file, it still includes the ${env_var
\:P4TOOLCLIENT}/ value.
Original comment by iloveeclipse
on 7 Feb 2009 at 11:22
Closing because it works now.
Original comment by iloveeclipse
on 3 Apr 2009 at 9:27
Original issue reported on code.google.com by
iloveeclipse
on 7 Feb 2009 at 11:17