Skip to content
Snippets Groups Projects
Commit f5e74fb7 authored by dgelessus's avatar dgelessus
Browse files

Also recognize special machine names without .mch in error highlighting

parent 78af527d
No related branches found
No related tags found
No related merge requests found
Pipeline #46164 passed
......@@ -627,10 +627,13 @@ public final class ProBKernel extends BaseKernel {
if (filePath.toString().isEmpty()) {
return Optional.ofNullable(contextSourceLines);
} else {
final String fileName = filePath.getFileName().toString();
if (fileName.equals(DEFAULT_MACHINE_NAME + ".mch")) {
String fileName = filePath.getFileName().toString();
if (fileName.endsWith(".mch")) {
fileName = fileName.substring(0, fileName.length() - 4);
}
if (fileName.equals(DEFAULT_MACHINE_NAME)) {
return Optional.of(Arrays.asList(DEFAULT_MACHINE_SOURCE_CODE.split("\n")));
} else if (fileName.equals(LOAD_CELL_MACHINE_NAME + ".mch")) {
} else if (fileName.equals(LOAD_CELL_MACHINE_NAME)) {
if (currentCellSourceCode == null) {
return Optional.empty();
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment