Skip to content

Commit

Permalink
xml: Remove work-around that formats trace path on Windows
Browse files Browse the repository at this point in the history
This workaround was implemented due to a issue on Windows when using
the XmlConfigurationSource with the Trace Compass trace server and
with theia-trace-extension. Now the Theia platform always provides a
path in the format of the user's platform, the work-around is no longer
needed.

Change-Id: If76c10eb3930f439104997f5be821c5544cbc03e
Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/204909
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
  • Loading branch information
bhufmann committed Oct 13, 2023
1 parent d08f4ec commit f885587
Showing 1 changed file with 0 additions and 11 deletions.
Expand Up @@ -50,7 +50,6 @@ public class XmlConfigurationSource implements ITmfConfigurationSource {
private static final String DESCRIPTION = nullToEmptyString(Messages.XmlConfigurationSource_Description);
private static final String PATH_KEY = "path"; //$NON-NLS-1$
private static final String PATH_DESCRIPTION = nullToEmptyString(Messages.XmlConfigurationSource_PathDescription);
private static final boolean IS_WINDOWS = System.getProperty("os.name").contains("Windows"); //$NON-NLS-1$ //$NON-NLS-2$
private Map<String, ITmfConfiguration> fConfigurations = new ConcurrentHashMap<>();

static {
Expand Down Expand Up @@ -128,16 +127,6 @@ public boolean contains(String id) {

private static @Nullable File getFile(Map<String, Object> parameters) {
String path = (String) parameters.get(PATH_KEY);
if (IS_WINDOWS && path != null && path.startsWith("/")) { //$NON-NLS-1$
/*
* Workaround for path created by the theia-trace-extension, see
* https://github.com/theia-ide/theia-trace-extension/issues/545.
* This is caused by
* https://github.com/eclipse-theia/theia/issues/8098. Once issue
* #8098 is resolved this workaround can be removed.
*/
path = path.substring(1);
}
if (path == null) {
return null;
}
Expand Down

0 comments on commit f885587

Please sign in to comment.