It's a possibility, but it would require changing/adding a lot to LGM. First off, I'd have to force LGM to do an operating system check (which it currently doesn't have to do). Then, I'd have to add several different entries in the preferences.properties file for each operating system.
I've also noticed that Java has a java.awt.Desktop.edit(File) which can be used to launch the editor associated with the file as per the user's operating system. This may be a solution. Of course, you'd still use the Preferences.properties (or any overriding method) to override the default system editor - especially useful if the system doesn't have a default editor, or if you'd like to use a different editor for GM games than whatever the system default is (e.g. your system editor is something fancy for large-scale graphics, like GIMP, but when working with GM, you'd like to use something more pixel-oriented, like Paint[.net]/Pinta/KolourPaint.
There is a slight issue that this method returns instantly and returns void, making it hard to tell when it's done, etc., but this is not much different from our currently exec() method, which we simply resolve by wrapping it into a file monitor which we've written (listens for changes to the file specified).
Edit: Unfortunately, apparently Linux (or at least Ubuntu) doesn't define any system editors, so Desktop.edit always fails on Ubuntu...
I've also noticed that Java has a java.awt.Desktop.edit(File) which can be used to launch the editor associated with the file as per the user's operating system. This may be a solution. Of course, you'd still use the Preferences.properties (or any overriding method) to override the default system editor - especially useful if the system doesn't have a default editor, or if you'd like to use a different editor for GM games than whatever the system default is (e.g. your system editor is something fancy for large-scale graphics, like GIMP, but when working with GM, you'd like to use something more pixel-oriented, like Paint[.net]/Pinta/KolourPaint.
There is a slight issue that this method returns instantly and returns void, making it hard to tell when it's done, etc., but this is not much different from our currently exec() method, which we simply resolve by wrapping it into a file monitor which we've written (listens for changes to the file specified).
Edit: Unfortunately, apparently Linux (or at least Ubuntu) doesn't define any system editors, so Desktop.edit always fails on Ubuntu...