public boolean isDeleted(Object element) { return fParentProvider.isDeleted(element); }
@Override public boolean isDeleted(Object element) { return fParentProvider.isDeleted(element); }
@Override public boolean isDeleted(Object element) { FileInfo info= fFileInfoMap.get(element); if (info != null) { IFileStore fileStore= getFileStore(info); return fileStore == null ? true : !fileStore.fetchInfo().exists(); } return getParentProvider().isDeleted(element); }
public boolean isDeleted(Object element) { FileInfo info= (FileInfo) fFileInfoMap.get(element); if (info != null) { IFileStore fileStore= getFileStore(info); return fileStore == null ? true : !fileStore.fetchInfo().exists(); } return getParentProvider().isDeleted(element); }
if (provider.isDeleted(input)) {
public void doSaveAs(IProgressMonitor monitor) throws Exception { // Get the editor shell Shell shell = getEditor().getSite().getShell(); // Create the save as dialog SaveAsDialog dialog = new SaveAsDialog(shell); // Set the initial file name to the original file name IFile file = null; if (fEditorInput instanceof IFileEditorInput) { file = ((IFileEditorInput) fEditorInput).getFile(); dialog.setOriginalFile(file); } // Create the dialog dialog.create(); // Warn the user if the underlying file does not exist if (fDocumentProvider.isDeleted(fEditorInput) && (file != null)) { String message = NLS.bind(PDEUIMessages.InputContext_errorMessageFileDoesNotExist, file.getName()); dialog.setErrorMessage(null); dialog.setMessage(message, IMessageProvider.WARNING); } // Open the dialog if (dialog.open() == Window.OK) { // Get the path to where the new file will be stored IPath path = dialog.getResult(); handleSaveAs(monitor, path); } }
final String inputName= input.getToolTipText(); if (provider.isDeleted(input)) {
final String inputName= input.getToolTipText(); if (provider.isDeleted(input)) {
/** * The <code>AbstractTextEditor</code> implementation of this * <code>IEditorPart</code> method may be extended by subclasses. * * @param progressMonitor the progress monitor for communicating result state or <code>null</code> */ public void doSave(IProgressMonitor progressMonitor) { IDocumentProvider p= getDocumentProvider(); if (p == null) return; if (p.isDeleted(getEditorInput())) { if (isSaveAsAllowed()) { /* * 1GEUSSR: ITPUI:ALL - User should never loose changes made in the editors. * Changed Behavior to make sure that if called inside a regular save (because * of deletion of input element) there is a way to report back to the caller. */ performSaveAs(progressMonitor); } else { Shell shell= getSite().getShell(); String title= EditorMessages.Editor_error_save_deleted_title; String msg= EditorMessages.Editor_error_save_deleted_message; MessageDialog.openError(shell, title, msg); } } else { updateState(getEditorInput()); validateState(getEditorInput()); performSave(false, progressMonitor); } }
return; if (p.isDeleted(getEditorInput())) {
private void hack_AbstractTextEditor_doSave(IProgressMonitor progressMonitor) { IDocumentProvider p = getDocumentProvider(); if (p == null) return; if (p.isDeleted(getEditorInput())) { if (isSaveAsAllowed()) { /* * 1GEUSSR: ITPUI:ALL - User should never loose changes made in the editors. Changed Behavior to make * sure that if called inside a regular save (because of deletion of input element) there is a way to * report back to the caller. */ performSaveAs(progressMonitor); } else { Shell shell = getSite().getShell(); String title = "Cannot Save"; String msg = "The file has been deleted or is not accessible."; MessageDialog.openError(shell, title, msg); } } else { updateState(getEditorInput()); validateState(getEditorInput()); performSave(false, progressMonitor); } }
return; if (p.isDeleted(getEditorInput())) {
return; if (p.isDeleted(getEditorInput())) {
if (provider.isDeleted(input) && original != null)
if (provider.isDeleted(input) && original != null) { String message = "The original file, '" + original.getName() + "' has been deleted"; dialog.setErrorMessage(null);
if (provider.isDeleted(input) && original != null) { String message= NLSUtility.format(TextEditorMessages.AbstractDecoratedTextEditor_warning_saveAs_deleted, original.getName()); dialog.setErrorMessage(null);
if (provider.isDeleted(input) && original != null) { String message= NLSUtility.format(TextEditorMessages.AbstractDecoratedTextEditor_warning_saveAs_deleted, original.getName()); dialog.setErrorMessage(null);
if (p.isDeleted(getEditorInput())) {
if (p.isDeleted(getEditorInput())) {
if (p.isDeleted(getEditorInput())) {