GUI tests:
- refactored to execute GUI code in swing thread
- added failing test the check escape keypress behaviour con save/close modal dialog see #1279
newJMenuItem() should use SHORTCUT_KEY_MASK

newJMenuItem() should use SHORTCUT_KEY_MASK variable defined at the top of this class.
Fix: "Ctrl+," and "Ctrl+/"

Linux and Windows: If you press "Ctrl+," to invoke the preferences dialog,
the file on editor will be marked as "modified". This behavior fixed.

Linux: If you press "Ctrl+/" to comment the line, the line will be replaced
with a single "/" letter. This behavior fixed.
changed test to Character.isISOControl
Fix: Exception if type ESC for close confirmation.

If you type an Escape key if a close econfirmation dialog is prompted
for unsaved file, an exception thrown. This behavior fixed.
formatted
cleaned up imports