Fixed: Open FTL File from browser (OFBIZ-12018)

Unable to open file in Windows

Thanks Jacques for reporting.
diff --git a/framework/common/src/main/java/org/apache/ofbiz/common/CommonEvents.java b/framework/common/src/main/java/org/apache/ofbiz/common/CommonEvents.java
index 6313fbf..b8b9a2e 100644
--- a/framework/common/src/main/java/org/apache/ofbiz/common/CommonEvents.java
+++ b/framework/common/src/main/java/org/apache/ofbiz/common/CommonEvents.java
@@ -25,6 +25,7 @@
 import java.awt.geom.AffineTransform;
 import java.awt.image.BufferedImage;
 import java.io.BufferedReader;
+import java.io.File;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.UnsupportedEncodingException;
@@ -459,6 +460,11 @@
                     // find absolute path of file
                     URL sourceFileUrl = FlexibleLocation.resolveLocation(sourceLocation);
                     String location = sourceFileUrl.getFile();
+                    // ensure file separator in location is correct
+                    if (!location.contains(File.separator) && "\\".equals(File.separator)) {
+                        location = location.replaceAll("/", "\\\\");
+                    }
+                    location = "\"" + location + "\"";
                     // prepare content map for string expansion
                     Map<String, Object> sourceMap = new HashMap<>();
                     sourceMap.put("sourceLocation", location);
diff --git a/framework/widget/config/widget.properties b/framework/widget/config/widget.properties
index 8d7a446..dc1be2c 100644
--- a/framework/widget/config/widget.properties
+++ b/framework/widget/config/widget.properties
@@ -33,13 +33,9 @@
 # SOURCE - Show named border with link to open the source code
 widget.dev.namedBorder=NONE
 
-# Command template to open file with editor
-# Linux:
+# Command template to open file with editor. Make sure the program is in PATH.
 # idea ${sourceLocation}
-# eclipse --launcher.openFile ${sourceLocation}
-# Windows:
-# idea.exe ${sourceLocation}
-# eclipse.exe --launcher.openFile ${sourceLocation}
+# eclipse ${sourceLocation}
 widget.dev.cmd.openSourceFile=idea ${sourceLocation}
 
 # Default number of items to be displayed per page in a list form