This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
http://forums.netbeans.org/viewtopic.php?t=66935 Looking at the source code of the MultiViewCloneableEditor.canCloseElement(), I found a potential bug for which I'd like to get your inputs. Current source code: Savable sav = getLookup().lookup(Savable.class); if (sav != null) { AbstractAction save = new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { try { sup.saveDocument(); } catch (IOException ex) { Exceptions.printStackTrace(ex); } } }; We retrieve the Savable object from the Lookup but we don't use it to perform the save. This looks weird and could lead to some unexpected behaviour. In my application, the Savable object retrieved by the lookup is performing more checks than the saveDocument but it is not triggered when the User close the editor with pending changes. I'd like to submit the following patch but I'd like to be sure I understood correctly. final Savable sav = getLookup().lookup(Savable.class); if (sav != null) { AbstractAction save = new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { try { sav.sav(); } catch (IOException ex) { Exceptions.printStackTrace(ex); } } };