Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019-2022 Oak Ridge National Laboratory.
* Copyright (c) 2019-2025 Oak Ridge National Laboratory.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -66,6 +66,7 @@ public FontMapping(final String pattern, final String font_name)
logger.log(Level.WARNING, "Cannot parse font_mappings", ex);
}

edm_paths_config = edm_paths_config.strip();
if (! edm_paths_config.isEmpty())
try
{
Expand All @@ -76,8 +77,8 @@ public FontMapping(final String pattern, final String font_name)
logger.log(Level.WARNING, "Cannot parse paths from " + edm_paths_config, ex);
}

final String dir = prefs.get("auto_converter_dir");
if (dir.isBlank())
final String dir = prefs.get("auto_converter_dir").strip();
if (dir.isEmpty())
auto_converter_dir = null;
else
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019-2022 Oak Ridge National Laboratory.
* Copyright (c) 2019-2025 Oak Ridge National Laboratory.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -10,6 +10,7 @@
import static org.csstudio.display.converter.edm.Converter.logger;

import java.io.File;
import java.nio.file.Files;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Semaphore;
import java.util.logging.Level;
Expand Down Expand Up @@ -142,7 +143,11 @@ private DisplayModel doConvert(final String display_path) throws Exception
// Convert EDM input
logger.log(Level.INFO, "Converting " + input + " into " + output);
locator.setPrefix(new File(display_file).getParent());
new EdmConverter(input, locator).write(output);
final EdmConverter converter = new EdmConverter(input, locator);

// Save EDM file to potentially new folder
Files.createDirectories(output.getParentFile().toPath());
converter.write(output);

// Return DisplayModel of the converted file
return ModelLoader.loadModel(output.getPath());
Expand Down