From 0333e17cfc0b1563fb93547324c678b9707c3c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20SVENSSON?= Date: Thu, 29 Apr 2021 19:18:25 +0200 Subject: [PATCH] Bug 573254: Add the missing ITool parameter to toManagedCommandLineInfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contributed by STMicroelectronics Change-Id: I4e9351a8af473bf34f2bc8541461f2b82ffd6262 Signed-off-by: Torbjörn Svensson --- .../core/ManagedCommandLineGenerator.java | 12 +++++++++++- .../guide/deprecated_API_removals.html | 17 +++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCommandLineGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCommandLineGenerator.java index 89bdfb7d9be..d49a1da42f4 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCommandLineGenerator.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedCommandLineGenerator.java @@ -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); diff --git a/doc/org.eclipse.cdt.doc.isv/guide/deprecated_API_removals.html b/doc/org.eclipse.cdt.doc.isv/guide/deprecated_API_removals.html index 9f9eddf3944..441549cd6e6 100644 --- a/doc/org.eclipse.cdt.doc.isv/guide/deprecated_API_removals.html +++ b/doc/org.eclipse.cdt.doc.isv/guide/deprecated_API_removals.html @@ -61,6 +61,7 @@

  1. Rework of API to determine GDB command line in org.eclipse.cdt.dsf.gdb
  2. +
  3. Add ITool parameter to ManagedCommandLineGenerator.toManagedCommandLineInfo

@@ -420,6 +421,22 @@

See Bug 572944.

+ +

2. Add ITool parameter to ManagedCommandLineGenerator.toManagedCommandLineInfo

+

+ 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: +

+ +

+ 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. +

+

+ See Bug 573254. +