diff options
author | Michael Keppler | 2019-08-13 18:47:31 +0000 |
---|---|---|
committer | Michael Keppler | 2019-08-15 06:29:32 +0000 |
commit | 8d7219b1abbad2e0c8a510b8bd3e1837040c1c59 (patch) | |
tree | 691fdf5fcbc7b890c50d3d5b4edfb8d623f34875 | |
parent | ce1aa6faf4b4057c5a9f303448c84a3b90d8721f (diff) | |
download | eclipse.platform.text-8d7219b1abbad2e0c8a510b8bd3e1837040c1c59.tar.gz eclipse.platform.text-8d7219b1abbad2e0c8a510b8bd3e1837040c1c59.tar.xz eclipse.platform.text-8d7219b1abbad2e0c8a510b8bd3e1837040c1c59.zip |
Bug 550031 - Remove superfluous slash from quicksearch paths
The results of the quicksearch dialog have a path column. All the paths
displayed there started with a slash, which can be removed, since it
adds no value.
Change-Id: I4d21038e9343c4feff7137a0ba4ab6064a05eedf
Signed-off-by: Michael Keppler <michael.keppler@gmx.de>
-rw-r--r-- | org.eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchDialog.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchDialog.java b/org.eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchDialog.java index bc4c5826956..0b67153775b 100644 --- a/org.eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchDialog.java +++ b/org.eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchDialog.java @@ -259,7 +259,10 @@ public class QuickSearchDialog extends SelectionStatusDialog { IPath path = item.getFile().getFullPath(); String name = path.lastSegment(); String dir = path.removeLastSegments(1).toString(); - cell.setText(name + " - "+dir); + if (dir.startsWith("/")) { + dir = dir.substring(1); + } + cell.setText(name + " - " + dir); StyleRange[] styleRanges = new StyleRange[] { new StyleRange(name.length(), dir.length()+3, GREY, null) }; |