if (env ().isModified ()) { String msg = messageSave ();
if (env ().isModified ()) { String msg = messageSave ();
if (cesEnv().isModified()) {
if (!cesEnv().isModified()) { if (log) { ERR.fine(documentID() + " No save performed because cesEnv().isModified() == false"); // NOI18N
if(!env().isModified()) { return;
if(!env().isModified()) { return;
/** Saves document. Overrides superclass method, adds checking * for read-only property of saving file and warns user in that case. */ public void saveDocument() throws IOException { if(env().isModified() && isEnvReadOnly()) { DialogDisplayer.getDefault().notify( new NotifyDescriptor.Message( NbBundle.getMessage(DataObject.class, "MSG_FileReadOnlySaving", new Object[] {((Env)env).getFileImpl().getNameExt()}), NotifyDescriptor.WARNING_MESSAGE )); return; } super.saveDocument(); }
/** Checks whether is possible to close support components. * Overrides superclass method, adds checking * for read-only property of saving file and warns user in that case. */ protected boolean canClose() { if(env().isModified() && isEnvReadOnly()) { Object result = DialogDisplayer.getDefault().notify( new NotifyDescriptor.Confirmation( NbBundle.getMessage(DataObject.class, "MSG_FileReadOnlyClosing", new Object[] {((Env)env).getFileImpl().getNameExt()}), NotifyDescriptor.OK_CANCEL_OPTION, NotifyDescriptor.WARNING_MESSAGE )); return result == NotifyDescriptor.OK_OPTION; } return super.canClose(); }
/** Test whether the document is modified. * @return <code>true</code> if the document is in memory and is modified; * otherwise <code>false</code> */ public boolean isModified() { CloneableEditorSupport redirect = CloneableEditorSupportRedirector.findRedirect(this); if (redirect != null) { return redirect.isModified(); } return cesEnv().isModified(); }
/** Test whether the document is modified. * @return <code>true</code> if the document is in memory and is modified; * otherwise <code>false</code> */ public boolean isModified () { return env ().isModified (); }
/** Test whether the document is modified. * @return <code>true</code> if the document is in memory and is modified; * otherwise <code>false</code> */ public boolean isModified () { return env ().isModified (); }