Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 185838 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java (-4 / +4 lines)
Lines 1115-1124 Link Here
1115
		IStatus status= info.fTextFileBuffer.getStatus();
1115
		IStatus status= info.fTextFileBuffer.getStatus();
1116
1116
1117
		// Ensure that we don't open an empty document for an non-existent IFile
1117
		// Ensure that we don't open an empty document for an non-existent IFile
1118
		if (status.getSeverity() != IStatus.ERROR && element instanceof IFileEditorInput) {
1118
		if (element instanceof IFileEditorInput || element instanceof IURIEditorInput) {
1119
			IFile file= FileBuffers.getWorkspaceFileAtLocation(info.fTextFileBuffer.getLocation());
1119
			IFileStore fileStore= info.fTextFileBuffer.getFileStore();
1120
			if (file == null || !file.exists()) {
1120
			if (fileStore != null && !fileStore.fetchInfo().exists()) {
1121
				String message= NLSUtility.format(TextEditorMessages.TextFileDocumentProvider_error_doesNotExist, ((IFileEditorInput)element).getFile().getFullPath());
1121
				String message= NLSUtility.format(TextEditorMessages.TextFileDocumentProvider_error_doesNotExist, fileStore.toString());
1122
				return new Status(IStatus.ERROR, EditorsUI.PLUGIN_ID, IResourceStatus.RESOURCE_NOT_FOUND, message, null);
1122
				return new Status(IStatus.ERROR, EditorsUI.PLUGIN_ID, IResourceStatus.RESOURCE_NOT_FOUND, message, null);
1123
			}
1123
			}
1124
		}
1124
		}

Return to bug 185838