blob: 131e8afe4d3b3b3c5d549423a36b5bf4861b7349 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta name="copyright" content=
"Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" href="../../../book.css" charset="ISO-8859-1" type=
"text/css" />
<title>
String Substitution Preferences
</title>
<script language="JavaScript" src=
"PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript">
</script>
</head>
<body>
<h1>
String Substitution Preferences
</h1>
<p>
The following preferences can be set using the <a class="command-link"
href=
'javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.debug.ui.StringVariablePreferencePage)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt=
"Opens the String Substitution preference page" /> <b>Run/Debug &gt;
String Substitution</b></a> preference page.
</p>
<p>
This preference page is used solely for the purpose of creating string
variables to be reused in other locations that accept string variable
substitution.
</p>
<p>
The platform SDK for Eclipse uses string variables in the launch dialog
for setting program and VM arguments for certain types of launch
configurations, as well as allowing substitutions for Ant targets in the
External Tools launch dialog. Consider the following screen shot which
shows the <strong>String Substitution</strong> preference page with a new
<em>TEST</em> string variable created.
</p>
<p>
<img src=
"../../../reference/preferences/run-debug/images/ref-string_sub.PNG" alt=
"String Substitution Page With Example TEST Variable" />
</p>
<p>
In this case the <em>TEST</em> variable does nothing, but in the 'real'
world it could point to a directory or program that you would like to
reuse the path for in configurations, etc.
</p>
<p>
If we now want to leverage this new variable, we can do so from the
launch dialog on the arguments tab (for those configurations that have a
standard arguments tab), by selecting the <strong>Variables...</strong>
button for either the program or VM arguments text area. Selecting the
Variables button opens a dialog with a listing of all of the string
variables available.
</p>
<p>
In the following screen shot we can see the <em>TEST</em> variable
available in the list.
</p>
<p>
<img src=
"../../../reference/preferences/run-debug/images/ref-string_dialog.PNG"
alt="String Variable Selection Dialog" />
</p>
<p>
We can now select the <em>TEST</em> variable and insert in as an argument
if we wish, as shown in the following screen shot.
</p>
<p>
<img src=
"../../../reference/preferences/run-debug/images/ref-lcd_string_subbed.PNG"
alt="Launch Dialog With Substituted String" />
</p>
<p>
The other mentioned platform use of string substitution in the External
Tools launch dialog, used with Ant configurations, as shown in the
following screen shot.
</p>
<p>
<img src=
"../../../reference/preferences/run-debug/images/ref-ext_string_subbed.PNG"
alt="Ant Configuration Using String Substitution" />
</p>
<h3 class="related">Related concepts</h3>
<a href="../../../concepts/cdebugger.htm">Debugger</a><br />
<a href="../../../concepts/concept-java-perspective.htm">Java
perspectives</a><br />
<a href="../../../concepts/concept-java-views.htm">Java views</a><br />
<a href="../../../concepts/clocdbug.htm">Local debugging</a><br />
<a href="../../../concepts/cremdbug.htm">Remote debugging</a>
<h3 class="related">Related tasks</h3>
<a href="../../../tasks/task-launching_java_program.htm">Launching a Java
program</a><br />
<a href="../../../tasks/task-running_and_debugging.htm">Running and
debugging</a>
<h3 class="related">Related reference</h3>
<a href=
"../../../reference/preferences/run-debug/ref-console.htm">Console
Preferences</a><br />
<a href=
"../../../reference/preferences/java/debug/ref-installed_jres.htm">Installed
JREs Preferences</a><br />
<a href="../../../reference/preferences/java/debug/ref-debug.htm">Java
Debug Preferences</a><br />
<a href=
"../../../reference/preferences/run-debug/ref-launching.htm">Launching
Preferences</a><br />
<a href=
"../../../reference/preferences/run-debug/ref-perspectives.htm">Perspectives
Preferences</a><br />
<a href=
"../../../reference/preferences/run-debug/ref-run_debug.htm">Run/Debug
Preferences</a><br />
<a href=
"../../../reference/preferences/run-debug/ref-view_management.htm">View
Management Preferences</a>
</body>
</html>