blob: c6fc74e08f8b3fc4291b0779dbb5dc63a84004ae [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. 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=ISO-8859-1">
<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"> </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.png" 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 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>
<p><img src="../../../images/ngrelc.png" alt="Related concepts" border="0"></p>
<p> <a href="../../../concepts/cdebugger.htm">Debugger</a><br>
<a href="../../../concepts/concepts-5.htm">Java perspectives</a><br>
<a href="../../../concepts/cjavaviews.htm">Java views</a><br>
<a href="../../../concepts/clocdbug.htm">Local debugging</a><br>
<a href="../../../concepts/cremdbug.htm">Remote debugging</a> </p>
<p> <img border="0" src="../../../images/ngrelt.png" alt="Related tasks" > </p>
<p> <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> </p>
<p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
<p> <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> </p>
</body>
</html>