Merge from vscode 0f73473c08055054f317c1c94502f7f39fdbb164 (#6892)

* Merge from vscode 0f73473c08055054f317c1c94502f7f39fdbb164

* fix tslinting
This commit is contained in:
Anthony Dresser
2019-08-22 22:07:01 -07:00
committed by GitHub
parent 1372cbaee1
commit 658cf51887
91 changed files with 1092 additions and 317 deletions

View File

@@ -20,6 +20,11 @@
color: var(--outline-element-color);
}
.monaco-list .outline-element .deprecated {
text-decoration: line-through;
opacity: 0.66;
}
.monaco-tree .monaco-tree-row.focused .outline-element .outline-element-detail {
visibility: inherit;
}

View File

@@ -12,7 +12,7 @@ import { createMatches, FuzzyScore } from 'vs/base/common/filters';
import 'vs/css!./media/outlineTree';
import 'vs/css!./media/symbol-icons';
import { Range } from 'vs/editor/common/core/range';
import { SymbolKind, symbolKindToCssClass } from 'vs/editor/common/modes';
import { SymbolKind, symbolKindToCssClass, SymbolKindTag } from 'vs/editor/common/modes';
import { OutlineElement, OutlineGroup, OutlineModel } from 'vs/editor/contrib/documentSymbols/outlineModel';
import { localize } from 'vs/nls';
import { IconLabel } from 'vs/base/browser/ui/iconLabel/iconLabel';
@@ -127,6 +127,10 @@ export class OutlineElementRenderer implements ITreeRenderer<OutlineElement, Fuz
// add styles for the icons
options.extraClasses.push(`outline-element-icon ${symbolKindToCssClass(element.symbol.kind, true)}`);
}
if (element.symbol.kindTags.indexOf(SymbolKindTag.Deprecated) >= 0) {
options.extraClasses.push(`deprecated`);
options.matches = [];
}
template.iconLabel.setLabel(element.symbol.name, element.symbol.detail, options);
this._renderMarkerInfo(element, template);
}

View File

@@ -76,6 +76,7 @@ suite('OutlineModel', function () {
name,
detail: 'fake',
kind: SymbolKind.Boolean,
kindTags: [],
selectionRange: range,
range: range
};