提交 71b5a2b3 编写于 作者: I isidor

debug: import polish

上级 25fa6e09
...@@ -8,7 +8,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; ...@@ -8,7 +8,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
import Event from 'vs/base/common/event'; import Event from 'vs/base/common/event';
import severity from 'vs/base/common/severity'; import severity from 'vs/base/common/severity';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import editor = require('vs/editor/common/editorCommon'); import { IModel as EditorIModel, IEditorContribution } from 'vs/editor/common/editorCommon';
import { Position } from 'vs/editor/common/core/position'; import { Position } from 'vs/editor/common/core/position';
import { ISuggestion } from 'vs/editor/common/modes'; import { ISuggestion } from 'vs/editor/common/modes';
import { Source } from 'vs/workbench/parts/debug/common/debugSource'; import { Source } from 'vs/workbench/parts/debug/common/debugSource';
...@@ -98,9 +98,9 @@ export interface ISession { ...@@ -98,9 +98,9 @@ export interface ISession {
export interface IProcess extends ITreeElement { export interface IProcess extends ITreeElement {
name: string; name: string;
session: ISession;
getThread(threadId: number): IThread; getThread(threadId: number): IThread;
getAllThreads(): IThread[]; getAllThreads(): IThread[];
session: ISession;
} }
export interface IThread extends ITreeElement { export interface IThread extends ITreeElement {
...@@ -346,7 +346,7 @@ export interface IConfigurationManager { ...@@ -346,7 +346,7 @@ export interface IConfigurationManager {
/** /**
* Returns true if breakpoints can be set for a given editor model. Depends on mode. * Returns true if breakpoints can be set for a given editor model. Depends on mode.
*/ */
canSetBreakpointsIn(model: editor.IModel): boolean; canSetBreakpointsIn(model: EditorIModel): boolean;
} }
export const IDebugService = createDecorator<IDebugService>(DEBUG_SERVICE_ID); export const IDebugService = createDecorator<IDebugService>(DEBUG_SERVICE_ID);
...@@ -476,7 +476,7 @@ export interface IDebugService { ...@@ -476,7 +476,7 @@ export interface IDebugService {
} }
// Editor interfaces // Editor interfaces
export interface IDebugEditorContribution extends editor.IEditorContribution { export interface IDebugEditorContribution extends IEditorContribution {
showHover(range: Range, hoveringOver: string, focus: boolean): TPromise<void>; showHover(range: Range, hoveringOver: string, focus: boolean): TPromise<void>;
} }
......
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { TPromise } from 'vs/base/common/winjs.base'; import { TPromise } from 'vs/base/common/winjs.base';
import nls = require('vs/nls'); import * as nls from 'vs/nls';
import lifecycle = require('vs/base/common/lifecycle'); import * as lifecycle from 'vs/base/common/lifecycle';
import Event, { Emitter } from 'vs/base/common/event'; import Event, { Emitter } from 'vs/base/common/event';
import uuid = require('vs/base/common/uuid'); import { generateUuid } from 'vs/base/common/uuid';
import objects = require('vs/base/common/objects'); import { clone } from 'vs/base/common/objects';
import severity from 'vs/base/common/severity'; import severity from 'vs/base/common/severity';
import types = require('vs/base/common/types'); import { isObject, isString } from 'vs/base/common/types';
import arrays = require('vs/base/common/arrays'); import { distinct } from 'vs/base/common/arrays';
import { ISuggestion } from 'vs/editor/common/modes'; import { ISuggestion } from 'vs/editor/common/modes';
import { Position } from 'vs/editor/common/core/position'; import { Position } from 'vs/editor/common/core/position';
import debug = require('vs/workbench/parts/debug/common/debug'); import * as debug from 'vs/workbench/parts/debug/common/debug';
import { Source } from 'vs/workbench/parts/debug/common/debugSource'; import { Source } from 'vs/workbench/parts/debug/common/debugSource';
const MAX_REPL_LENGTH = 10000; const MAX_REPL_LENGTH = 10000;
...@@ -67,9 +67,9 @@ export class KeyValueOutputElement extends OutputElement { ...@@ -67,9 +67,9 @@ export class KeyValueOutputElement extends OutputElement {
this._valueName = 'null'; this._valueName = 'null';
} else if (Array.isArray(this.valueObj)) { } else if (Array.isArray(this.valueObj)) {
this._valueName = `Array[${this.valueObj.length}]`; this._valueName = `Array[${this.valueObj.length}]`;
} else if (types.isObject(this.valueObj)) { } else if (isObject(this.valueObj)) {
this._valueName = 'Object'; this._valueName = 'Object';
} else if (types.isString(this.valueObj)) { } else if (isString(this.valueObj)) {
this._valueName = `"${massageValue(this.valueObj)}"`; this._valueName = `"${massageValue(this.valueObj)}"`;
} else { } else {
this._valueName = String(this.valueObj); this._valueName = String(this.valueObj);
...@@ -87,7 +87,7 @@ export class KeyValueOutputElement extends OutputElement { ...@@ -87,7 +87,7 @@ export class KeyValueOutputElement extends OutputElement {
if (!this.children) { if (!this.children) {
if (Array.isArray(this.valueObj)) { if (Array.isArray(this.valueObj)) {
this.children = (<any[]>this.valueObj).slice(0, KeyValueOutputElement.MAX_CHILDREN).map((v, index) => new KeyValueOutputElement(String(index), v, null)); this.children = (<any[]>this.valueObj).slice(0, KeyValueOutputElement.MAX_CHILDREN).map((v, index) => new KeyValueOutputElement(String(index), v, null));
} else if (types.isObject(this.valueObj)) { } else if (isObject(this.valueObj)) {
this.children = Object.getOwnPropertyNames(this.valueObj).slice(0, KeyValueOutputElement.MAX_CHILDREN).map(key => new KeyValueOutputElement(key, this.valueObj[key], null)); this.children = Object.getOwnPropertyNames(this.valueObj).slice(0, KeyValueOutputElement.MAX_CHILDREN).map(key => new KeyValueOutputElement(key, this.valueObj[key], null));
} else { } else {
this.children = []; this.children = [];
...@@ -179,7 +179,7 @@ export abstract class ExpressionContainer implements debug.IExpressionContainer ...@@ -179,7 +179,7 @@ export abstract class ExpressionContainer implements debug.IExpressionContainer
count, count,
filter filter
}).then(response => { }).then(response => {
return response && response.body && response.body.variables ? arrays.distinct(response.body.variables.filter(v => !!v), v => v.name).map( return response && response.body && response.body.variables ? distinct(response.body.variables.filter(v => !!v), v => v.name).map(
v => new Variable(this.stackFrame, this, v.variablesReference, v.name, v.evaluateName, v.value, v.namedVariables, v.indexedVariables, v.type) v => new Variable(this.stackFrame, this, v.variablesReference, v.name, v.evaluateName, v.value, v.namedVariables, v.indexedVariables, v.type)
) : []; ) : [];
}, (e: Error) => [new Variable(this.stackFrame, this, 0, null, e.message, '', 0, 0, null, false)]); }, (e: Error) => [new Variable(this.stackFrame, this, 0, null, e.message, '', 0, 0, null, false)]);
...@@ -204,7 +204,7 @@ export class Expression extends ExpressionContainer implements debug.IExpression ...@@ -204,7 +204,7 @@ export class Expression extends ExpressionContainer implements debug.IExpression
public available: boolean; public available: boolean;
public type: string; public type: string;
constructor(public name: string, cacheChildren: boolean, id = uuid.generateUuid()) { constructor(public name: string, cacheChildren: boolean, id = generateUuid()) {
super(null, 0, id, cacheChildren, 0, 0); super(null, 0, id, cacheChildren, 0, 0);
this.value = Expression.DEFAULT_VALUE; this.value = Expression.DEFAULT_VALUE;
this.available = false; this.available = false;
...@@ -512,7 +512,7 @@ export class Process implements debug.IProcess { ...@@ -512,7 +512,7 @@ export class Process implements debug.IProcess {
// Only update the details if all the threads are stopped // Only update the details if all the threads are stopped
// because we don't want to overwrite the details of other // because we don't want to overwrite the details of other
// threads that have stopped for a different reason // threads that have stopped for a different reason
this.threads[ref].stoppedDetails = objects.clone(data.stoppedDetails); this.threads[ref].stoppedDetails = clone(data.stoppedDetails);
this.threads[ref].stopped = true; this.threads[ref].stopped = true;
this.threads[ref].clearCallStack(); this.threads[ref].clearCallStack();
}); });
...@@ -584,7 +584,7 @@ export class Breakpoint implements debug.IBreakpoint { ...@@ -584,7 +584,7 @@ export class Breakpoint implements debug.IBreakpoint {
} }
this.lineNumber = this.desiredLineNumber; this.lineNumber = this.desiredLineNumber;
this.verified = false; this.verified = false;
this.id = uuid.generateUuid(); this.id = generateUuid();
} }
public getId(): string { public getId(): string {
...@@ -600,7 +600,7 @@ export class FunctionBreakpoint implements debug.IFunctionBreakpoint { ...@@ -600,7 +600,7 @@ export class FunctionBreakpoint implements debug.IFunctionBreakpoint {
constructor(public name: string, public enabled: boolean, public hitCondition: string) { constructor(public name: string, public enabled: boolean, public hitCondition: string) {
this.verified = false; this.verified = false;
this.id = uuid.generateUuid(); this.id = generateUuid();
} }
public getId(): string { public getId(): string {
...@@ -613,7 +613,7 @@ export class ExceptionBreakpoint implements debug.IExceptionBreakpoint { ...@@ -613,7 +613,7 @@ export class ExceptionBreakpoint implements debug.IExceptionBreakpoint {
private id: string; private id: string;
constructor(public filter: string, public label: string, public enabled: boolean) { constructor(public filter: string, public label: string, public enabled: boolean) {
this.id = uuid.generateUuid(); this.id = generateUuid();
} }
public getId(): string { public getId(): string {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册