1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 00:45:28 +02:00

Bug 573254: Add the missing ITool parameter to toManagedCommandLineInfo

Contributed by STMicroelectronics

Change-Id: I4e9351a8af473bf34f2bc8541461f2b82ffd6262
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
This commit is contained in:
Torbjörn SVENSSON 2021-04-29 19:18:25 +02:00 committed by Torbjörn Svensson
parent e2c0b9973f
commit 0333e17cfc
2 changed files with 28 additions and 1 deletions

View file

@ -79,13 +79,23 @@ public class ManagedCommandLineGenerator implements IManagedCommandLineGenerator
command = command.replace(makeVariable(OUTPUT_PRM_NAME.toLowerCase()), outputName);
command = command.replace(makeVariable(INPUTS_PRM_NAME.toLowerCase()), inputsStr);
return toManagedCommandLineInfo(command.trim(), commandLinePattern, commandName, flags, outputFlag,
return toManagedCommandLineInfo(tool, command.trim(), commandLinePattern, commandName, flags, outputFlag,
outputPrefix, outputName, inputResources);
}
@Deprecated(since = "9.2", forRemoval = true)
protected IManagedCommandLineInfo toManagedCommandLineInfo(String commandLine, String commandLinePattern,
String commandName, String[] flags, String outputFlag, String outputPrefix, String outputName,
String[] inputResources) {
throw new UnsupportedOperationException();
}
/**
* @since 9.3
*/
protected IManagedCommandLineInfo toManagedCommandLineInfo(ITool tool, String commandLine,
String commandLinePattern, String commandName, String[] flags, String outputFlag, String outputPrefix,
String outputName, String[] inputResources) {
String flagsStr = stringArrayToString(flags);
String inputResourcesStr = stringArrayToString(inputResources);

View file

@ -61,6 +61,7 @@
</p>
<ol>
<li><a href="#gdbBackendDebuggerCommandLine">Rework of API to determine GDB command line in org.eclipse.cdt.dsf.gdb</a></li>
<li><a name="ManagedCommandLineGenerator.toManagedCommandLineInfo">Add ITool parameter to ManagedCommandLineGenerator.toManagedCommandLineInfo</a></li>
</ol>
<hr>
@ -420,6 +421,22 @@
<p>
See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=572944" target="_blank">Bug 572944</a>.
</p>
<h3>2. <a name="ManagedCommandLineGenerator.toManagedCommandLineInfo">Add ITool parameter to ManagedCommandLineGenerator.toManagedCommandLineInfo</a></h3>
<p>
To allow extenders to know the context of a generated command line, the ITool instance was added to ManagedCommandLineGenerator.toManagedCommandLineInfo
method and the method without the ITool parameter will be removed:
</p>
<ul>
<li>org.eclipse.cdt.managedbuilder.core.ManagedCommandLineGenerator.toManagedCommandLineInfo(String, String, String, String[], String, String, String, String[])</li>
</ul>
<p>
Extenders that override the above protected method should override
org.eclipse.cdt.managedbuilder.core.ManagedCommandLineGenerator.toManagedCommandLineInfo(ITool, String, String, String, String[], String, String, String, String[]) instead.
</p>
<p>
See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=573254" target="_blank">Bug 573254</a>.
</p>
</body>
</html>