本文整理汇总了TypeScript中editor.FileEditor.clearEditorHighlights方法的典型用法代码示例。如果您正苦于以下问题:TypeScript FileEditor.clearEditorHighlights方法的具体用法?TypeScript FileEditor.clearEditorHighlights怎么用?TypeScript FileEditor.clearEditorHighlights使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类editor.FileEditor
的用法示例。
在下文中一共展示了FileEditor.clearEditorHighlights方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: highlightProblems
export function highlightProblems(){
var editorState: FileEditorState = FileEditor.currentEditorState();
var editorResource: FilePath = editorState.getResource();
if(editorResource != null) {
var highlightUpdates = [];
//FileEditor.clearEditorHighlights(); this makes breakpoints jitter
for (var problemKey in currentProblems) {
if (currentProblems.hasOwnProperty(problemKey)) {
if(Common.stringStartsWith(problemKey, editorResource.getResourcePath())) {
var problemItem: ProblemItem = currentProblems[problemKey];
if(problemItem != null) {
highlightUpdates.push(problemItem.getLine());
}
}
}
}
FileEditor.clearEditorHighlights();
if(highlightUpdates.length > 0) {
FileEditor.createMultipleEditorHighlights(highlightUpdates, "problemHighlight");
}
}
}
示例2: resumeScript
export function resumeScript() {
var threadScope: ThreadScope = ThreadManager.focusedThread();
if(threadScope != null) {
var message = {
thread: threadScope.getThread(),
type: "RUN"
};
FileEditor.clearEditorHighlights();
EventBus.sendEvent("STEP", message);
}
}