Added ResourceSetReference as a level of abstraction between manifest resource names (or other resource set names) and actual resource files.
The resolvers now return a ResourceSetReference with the resolved resource set name even if the resource file is missing. This may be used in the future to detect missing resource files and to write unit tests for the resolvers without having to create resource files on disk.
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2127 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
(!this.isLocalVariable||this.resourceManagerMember.Region.IsInside(this.CurrentNodeStartLocation.Y,this.CurrentNodeStartLocation.X))// skip if local variable is out of scope
(!this.isLocalVariable||this.resourceManagerMember.Region.IsInside(this.CurrentNodeStartLocation.Y,this.CurrentNodeStartLocation.X))// skip if local variable is out of scope
LoggingService.Info("ResourceToolkit: ICSharpCodeCoreResourceResolver: Could not find the ICSharpCode.Core resource file name for the source file '"+fileName+"', key '"+(key==null?"<null>":key.ToString())+"'.");
LoggingService.Info("ResourceToolkit: ICSharpCodeCoreResourceResolver: Could not find the ICSharpCode.Core resource file name for the source file '"+fileName+"', key '"+(key==null?"<null>":key.ToString())+"'.");
}
}
#endif
returnnull;
// TODO: Add information about callingClass, callingMember, returnType
/// <returns>A <see cref="ResourceSetReference"/> that describes the referenced resource set. The contained file name may be <c>null</c> if the file cannot be determined.</returns>
/// <returns>A <see cref="ResourceSetReference"/> that describes the referenced resource set. The contained file name may be <c>null</c> if the file cannot be determined.</returns>
/// <param name="sourceFileName">The name of the source code file which the reference occurs in.</param>
/// <param name="sourceFileName">The name of the source code file which the reference occurs in.</param>
/// <param name="resourceName">The manifest resource name to find the resource file for.</param>
/// <param name="resourceName">The manifest resource name to find the resource file for.</param>
/// <returns>The name of the file that contains the resources with the specified manifest resource name, or <c>null</c> if the file name cannot be determined.</returns>
/// <returns>A <see cref="ResourceSetReference"/> with the specified resource set name and the name of the file that contains the resources with the specified manifest resource name, or <c>null</c> if the file name cannot be determined.</returns>
/// <exception cref="ArgumentNullException">The <paramref name="resourceName"/> parameter is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException">The <paramref name="resourceName"/> parameter is <c>null</c>.</exception>
LoggingService.Info("ResourceToolkit: NRefactoryResourceResolver.GetResourceFileNameByResourceName could not determine the project for the source file '"+(sourceFileName??"<null>")+"'.");
#if DEBUG
LoggingService.Info("ResourceToolkit: NRefactoryResourceResolver.GetResourceSetReference could not determine the project for the source file '"+(sourceFileName??"<null>")+"'.");
LoggingService.Debug("ResourceToolkit: NRefactoryResourceResolver.GetResourceFileNameByResourceName: looking for a resource file like '"+Path.Combine(directory,resourcePart)+"'");
LoggingService.Debug("ResourceToolkit: NRefactoryResourceResolver.GetResourceSetReference: looking for a resource file like '"+Path.Combine(directory,resourcePart)+"'");
LoggingService.Info("ResourceToolkit: NRefactoryResourceResolver.GetResourceFileNameByResourceName is unable to find a suitable resource file for '"+resourceName+"'");
#if DEBUG
LoggingService.Info("ResourceToolkit: NRefactoryResourceResolver.GetResourceSetReference is unable to find a suitable resource file for '"+resourceName+"'");