This repository has been archived by the owner on Oct 16, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow grouping search results by file.
- Loading branch information
Showing
6 changed files
with
137 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/AddIns/Misc/SearchAndReplace/Project/Gui/SearchFileNode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) | ||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) | ||
|
||
using System; | ||
using System.IO; | ||
using System.Windows.Controls; | ||
using System.Windows.Documents; | ||
|
||
using ICSharpCode.Core; | ||
using ICSharpCode.SharpDevelop.Editor.Search; | ||
|
||
namespace SearchAndReplace | ||
{ | ||
class SearchFileNode : SearchNode | ||
{ | ||
FileName fileName; | ||
|
||
public SearchFileNode(FileName fileName, SearchResultNode[] resultNodes) | ||
{ | ||
this.fileName = fileName; | ||
this.Children = resultNodes; | ||
this.IsExpanded = true; | ||
} | ||
|
||
protected override object CreateText() | ||
{ | ||
return new TextBlock { | ||
Inlines = { | ||
new Bold(new Run(Path.GetFileName(fileName))), | ||
new Run(StringParser.Parse(" (${res:MainWindow.Windows.SearchResultPanel.In} ") + Path.GetDirectoryName(fileName) + ")") | ||
} | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters