question: public void saveDomain ( File fileToWrite ) { String curText = editorTab . getText ( ) ; if ( fileToWrite != null ) { try { Files . write ( Paths . get ( fileToWrite . toURI ( ) ) , curText . getBytes ( ) ) ; } catch ( IOException e ) { log . severe ( "Cannot save domain: " + e ) ; e . printStackTrace ( ) ; editorTab . rereadFile ( ) ; } setSavedFlag ( true ) ; refresh ( ) ; } }
target:  Saves the dialogue domain in the editor tab to the file given as argument