diff options
author | Michael Hutchinson <mhutch@xamarin.com> | 2011-10-07 15:41:53 +0400 |
---|---|---|
committer | Michael Hutchinson <mhutch@xamarin.com> | 2011-10-07 15:59:20 +0400 |
commit | 01c7c1aac947a60c30d08a2169dce08b751cdbac (patch) | |
tree | ca6bfaf59dc0c9625a216c9fb363394b222ea513 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog | |
parent | eb3848c020fbd8ba2dea9d7e93b50b0493a35a5d (diff) |
[Ide] Remove some unnecessary string.Formats
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog/SearchResult.cs | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog/SearchResult.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog/SearchResult.cs index a8a24610e2..a5511bead0 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog/SearchResult.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.NavigateToDialog/SearchResult.cs @@ -103,15 +103,18 @@ namespace MonoDevelop.Ide.NavigateToDialog get { IType type = (IType)member; if (useFullName) - return type.SourceProject != null ? String.Format (GettextCatalog.GetString ("from Project \"{0}\""), type.SourceProject.Name ?? "") : String.Format (GettextCatalog.GetString ("from \"{0}\""), (string)type.CompilationUnit.FileName ?? ""); + return type.SourceProject != null + ? GettextCatalog.GetString ("from Project \"{0}\"", type.SourceProject.Name ?? "") + : GettextCatalog.GetString ("from \"{0}\"", (string)type.CompilationUnit.FileName ?? ""); if (type.SourceProject != null) - return String.Format (GettextCatalog.GetString ("from Project \"{0} in {1}\""), type.SourceProject.Name ?? "", type.Namespace ?? ""); - return String.Format (GettextCatalog.GetString ("from \"{0} in {1}\""), (string)type.CompilationUnit.FileName ?? "", type.Namespace ?? ""); + return GettextCatalog.GetString ("from Project \"{0} in {1}\"", type.SourceProject.Name ?? "", type.Namespace ?? ""); + return GettextCatalog.GetString ("from \"{0} in {1}\"", (string)type.CompilationUnit.FileName ?? "", type.Namespace ?? ""); } } - public TypeSearchResult (string match, string matchedString, int rank, IType type, bool useFullName) : base (match, matchedString, rank, type, useFullName) + public TypeSearchResult (string match, string matchedString, int rank, IType type, bool useFullName) + : base (match, matchedString, rank, type, useFullName) { } } @@ -144,12 +147,15 @@ namespace MonoDevelop.Ide.NavigateToDialog public override string Description { get { if (useFileName) - return file.Project != null ? String.Format (GettextCatalog.GetString ("from \"{0}\" in Project \"{1}\""), GetRelProjectPath (file), file.Project.Name) : String.Format (GettextCatalog.GetString ("from \"{0}\""), GetRelProjectPath (file)); - return file.Project != null ? String.Format (GettextCatalog.GetString ("from Project \"{0}\""), file.Project.Name) : ""; + return file.Project != null + ? GettextCatalog.GetString ("from \"{0}\" in Project \"{1}\"", GetRelProjectPath (file), file.Project.Name) + : GettextCatalog.GetString ("from \"{0}\"", GetRelProjectPath (file)); + return file.Project != null ? GettextCatalog.GetString ("from Project \"{0}\"", file.Project.Name) : ""; } } - public FileSearchResult (string match, string matchedString, int rank, ProjectFile file, bool useFileName) : base (match, matchedString, rank) + public FileSearchResult (string match, string matchedString, int rank, ProjectFile file, bool useFileName) + : base (match, matchedString, rank) { this.file = file; this.useFileName = useFileName; @@ -170,7 +176,8 @@ namespace MonoDevelop.Ide.NavigateToDialog protected virtual OutputFlags Flags { get { - return OutputFlags.IncludeParameters | OutputFlags.IncludeGenerics | (useFullName ? OutputFlags.UseFullName : OutputFlags.None); + return OutputFlags.IncludeParameters | OutputFlags.IncludeGenerics + | (useFullName ? OutputFlags.UseFullName : OutputFlags.None); } } @@ -220,11 +227,12 @@ namespace MonoDevelop.Ide.NavigateToDialog public override string Description { get { - return String.Format (GettextCatalog.GetString ("from Type \"{0}\""), member.DeclaringType.Name); + return GettextCatalog.GetString ("from Type \"{0}\"", member.DeclaringType.Name); } } - public MemberSearchResult (string match, string matchedString, int rank, IMember member, bool useFullName) : base (match, matchedString, rank) + public MemberSearchResult (string match, string matchedString, int rank, IMember member, bool useFullName) + : base (match, matchedString, rank) { this.member = member; this.useFullName = useFullName; |