useocl / use

Home of the UML-based Specification Environment (USE)
GNU General Public License v2.0
43 stars 18 forks source link

File explorer should be based on the OS's explorer #61

Open ichxorya opened 1 year ago

ichxorya commented 1 year ago

Is your feature request related to a problem? Please describe. I think it would be better if the file explorer should be based on the OS's explorer. For example, when I need to open a specification file, I need to get to the folder which contains it. The current GUI has nothing better than the basic Windows GUI, so I think we should reimplement it.

Describe the solution you'd like There should be a proper (explorer) GUI for the open/save specification method.

Describe alternatives you've considered In case the developers intended to have a ubiquitous GUI, I hope there would be an option to choose the Windows GUI if the user is using Windows, ect.

Additional context image Example of "Windows' explorer" image Example of "USE explorer"

h-man2 commented 1 year ago

USE is using a Swing JFileChooser for this and this is the default look & feel of it.

To use the file chosse specific to the OS, just a small would be needed (c. f. stackoverflow):

try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { }

Unfortunately, this changes the complete appearance of USE: grafik

On some systems with different screen resolutions I noticed some silly artifacts, e. g., incorrect icons and tree images. So, further testing is required. Maybe in combination with a startparameter to fall back to the "original" appearance.

h-man2 commented 1 year ago

Preview: https://github.com/useocl/use/suites/11113597098/artifacts/566229556