nasa / trick

Trick Simulation Environment. Trick provides a common set of simulation capabilities and utilities to build simulations automatically.
Other
32 stars 16 forks source link

Inconsistent Error Message Output in Sim Control Panel #1631

Closed Mrockwell2 closed 7 months ago

Mrockwell2 commented 8 months ago

The approach the Sim Control Panel takes to display error messages is a little scattered. In some places, there is a JOptionPane popup, while, in others, it prints the message directly to the status message pane. Also, with the latter method, there is a possibility that the error will be printed to standard output. I see no reason why there should be two methods, with a possible third, when we can consolidate it into one. I've included examples of both instances below.

https://github.com/nasa/trick/blob/6bbd4ea1dfc5500f6c193e9b4e702728abe7a45a/trick_source/java/src/main/java/trick/simcontrol/SimControlApplication.java#L373-L375

https://github.com/nasa/trick/blob/6bbd4ea1dfc5500f6c193e9b4e702728abe7a45a/trick_source/java/src/main/java/trick/simcontrol/SimControlApplication.java#L621-L623

https://github.com/nasa/trick/blob/6bbd4ea1dfc5500f6c193e9b4e702728abe7a45a/trick_source/java/src/main/java/trick/simcontrol/SimControlApplication.java#L350-L354

https://github.com/nasa/trick/blob/6bbd4ea1dfc5500f6c193e9b4e702728abe7a45a/trick_source/java/src/main/java/trick/simcontrol/SimControlApplication.java#L361-L365