diff options
author | Dani Megert | 2014-01-27 15:16:59 +0000 |
---|---|---|
committer | Dani Megert | 2014-01-27 15:16:59 +0000 |
commit | 4ef89d4b16a3562d88191be48b872d3eabf0da9e (patch) | |
tree | 8b036b51391a5bd7a31de2296e0734089721b1a6 /org.eclipse.core.filebuffers | |
parent | ea77850dd7025feeeab44d6c19de3317f1b121d6 (diff) | |
download | eclipse.platform.text-4ef89d4b16a3562d88191be48b872d3eabf0da9e.tar.gz eclipse.platform.text-4ef89d4b16a3562d88191be48b872d3eabf0da9e.tar.xz eclipse.platform.text-4ef89d4b16a3562d88191be48b872d3eabf0da9e.zip |
Fixed bug 426387: [implementation] Exception message in org.eclipse.core.internal.filebuffers.ResourceFileBuffer.create() does not contain actual file nameI20140128-0800
Diffstat (limited to 'org.eclipse.core.filebuffers')
3 files changed, 9 insertions, 9 deletions
diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.java index 591e1b86a4e..a589ef45529 100644 --- a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.java +++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -27,7 +27,7 @@ final class FileBuffersMessages extends NLS { public static String ExtensionsRegistry_error_extensionPointNotFound; public static String ExtensionsRegistry_error_contentTypeDoesNotExist; - public static String ResourceFileBuffer_error_fileDoesNotExist; + public static String ResourceFileBuffer_error_cannot_determine_URI; public static String ResourceFileBuffer_warning_fileIsDerived; public static String ResourceFileBuffer_stateValidationFailed; public static String FileBuffer_error_outOfSync; diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.properties b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.properties index cf4d7132428..817d8c2362a 100644 --- a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.properties +++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000, 2010 IBM Corporation and others. +# Copyright (c) 2000, 2014 IBM Corporation and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at @@ -12,7 +12,7 @@ ExtensionsRegistry_error_extensionPointNotFound= Extension point "{0}" not found. ExtensionsRegistry_error_contentTypeDoesNotExist= The content type with id "{0}" specified in the extension point does not exist. -ResourceFileBuffer_error_fileDoesNotExist= The file does not exist. +ResourceFileBuffer_error_cannot_determine_URI= Cannot determine URI for ''{0}''. ResourceFileBuffer_warning_fileIsDerived= This file is derived and does not allow to be modified. ResourceFileBuffer_stateValidationFailed= State validation failed. diff --git a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceFileBuffer.java b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceFileBuffer.java index 68b0e5a79d5..2e409480905 100644 --- a/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceFileBuffer.java +++ b/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceFileBuffer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -232,11 +232,11 @@ public abstract class ResourceFileBuffer extends AbstractFileBuffer { try { IWorkspaceRoot workspaceRoot= ResourcesPlugin.getWorkspace().getRoot(); IFile file= workspaceRoot.getFile(location); - if (file == null) - throw new CoreException(new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, FileBuffersMessages.ResourceFileBuffer_error_fileDoesNotExist, null)); URI uri= file.getLocationURI(); - if (uri == null) - throw new CoreException(new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, FileBuffersMessages.ResourceFileBuffer_error_fileDoesNotExist, null)); + if (uri == null) { + String message= NLSUtility.format(FileBuffersMessages.ResourceFileBuffer_error_cannot_determine_URI, location); + throw new CoreException(new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, message, null)); + } fLocation= location; fFile= file; |