AlloyTools / org.alloytools.alloy

Alloy is a language for describing structures and a tool for exploring them. It has been used in a wide range of applications from finding holes in security mechanisms to designing telephone switching networks. This repository contains the code for the tool.
Other
712 stars 123 forks source link

make sure every popup has a parent JFrame #113

Closed sadraskol closed 4 years ago

sadraskol commented 4 years ago

this PR solves #111 Popups should have a parent specified to be opened relatively to the parent's frame. As stated in the documentation (https://docs.oracle.com/javase/8/docs/api/javax/swing/JOptionPane.html#createDialog-java.awt.Component-java.lang.String-)

As a result, I had to pass the parent in chains of static calls. That doesn't feel right, but I couldn't find another way to writing it that didn't change the current structure of files.

:chicken: Things to fix still:

pkriens commented 4 years ago

Thanks for the work. I agree that the static nature of Alloy is bad engineering, although I find this all too common in our industry. We are taught that global variables are bad but somehow statics seem to escape scrutiny. And they really suck if you want to reuse code.