/** * Removes an editor. * * @param promptSave true to let the user save the element if necessary, false to close it without * confirmation. * @param editor The editor to remove. */ public void removeEditor(AbstractEditorPanel editor, boolean promptSave) { if (!promptSave || editor.checkCurrentFileSaved()) { editor.close(); remove(editor); repaint(); } }