6566676869707172737475
if (MessageDialog.openQuestion( shell, "Save File", "The file contents must be saved before the command can be executed. Do you wish to save now?")) { editorPart.doSave(monitor); } else { throw new InterruptedException(); }
3233343536373839404142
@Override public Object execute(ExecutionEvent event) throws ExecutionException { IEditorPart editor = HandlerUtil.getActiveEditor(event); if (editor != null && editor.getEditorInput() instanceof FileEditorInput) { if (editor.isDirty()) { editor.doSave(null); } IFile editedFile = ((FileEditorInput) editor.getEditorInput()).getFile(); scheduleJob(editedFile, true); } return null;
5960616263646566676869
* @see IEditorPart#doSave(IProgressMonitor) */ public void doSave(IProgressMonitor monitor) { for (int i = 0; i < innerEditors.length; i++) { IEditorPart e = innerEditors[i]; e.doSave(monitor); } } /** * Create the control of the inner editor.
5354555657585960616263
if (file == null) { return null; } if (activeEditor.isDirty()) { activeEditor.doSave(null); } new JSLint().validate(file); return null; }
4950515253545556575859
MessageDialog.openWarning(window.getShell(), "JSTools", "Resource " + editorInput.getName() + " is not part of the workspace!"); } if (activeEditor.isDirty()) { activeEditor.doSave(null); } new JSBeautifier().beautify(file); return null; } }
678679680681682683684685686687688
if (editorRef == null) { return; } IEditorPart editor = (IEditorPart) editorRef.getPart(true); if (editor != null) { editor.doSave(monitor); } } String[] getText() { if (text != null) {
140141142143144145146147148149150
MessageDialog.QUESTION, options, 0); int answer = saveDialog.open(); if (answer == 0) { ed.doSave(null); } //Continue as long as not cancel. ret = (2 != answer); } }
4748495051525354555657
//System.out.println("TRACE-> SecureFTP: Mode[PUT]"); IEditorPart part = Activator.getActivePage().getActiveEditor(); if (part != null) { if (part.isDirty()) { Activator.consolePrintln("Dirty",1); part.doSave(new NullProgressMonitor()); } } super.run(action); } }
//System.out.println("TRACE-> SecureFTP: Mode[PUT]"); IEditorPart part = SftpPlugin.getActivePage().getActiveEditor(); if (part != null) { if (part.isDirty()) { SftpPlugin.consolePrintln("Dirty",1); part.doSave(new NullProgressMonitor()); } } super.run(action); } }