void loadFile(File file) {
        try {
            if (file.isAbsolute() && file.exists()) {
                BufferedReader in = new BufferedReader(new FileReader(file));
                String str;
                StringBuilder b = new StringBuilder();
                while ((str = in.readLine()) != null) {
                    b.append(str).append('\n');
                }
                in.close();
                lastModified = file.lastModified();
                this.file = file;
                script.setText(b.toString());
                script.setCaretPosition(0);
                enableForGroovy();
            }
        } catch (IOException e) {
            logger.log(Level.SEVERE, "Error", e);
            e.printStackTrace(System.err);
        }
    }