提交 f5e9cb6d 编写于 作者: I isidor

debug: polish constructor formating

上级 9c118b9e
......@@ -159,7 +159,12 @@ export class OutputElement implements debug.ITreeElement {
export class ValueOutputElement extends OutputElement {
constructor(public value: string, public severity: severity, public category?: string, public counter:number = 1) {
constructor(
public value: string,
public severity: severity,
public category?: string,
public counter: number = 1
) {
super();
}
}
......@@ -224,7 +229,13 @@ export abstract class ExpressionContainer implements debug.IExpressionContainer
private children: TPromise<debug.IExpression[]>;
private _value: string;
constructor(public reference: number, private id: string, private cacheChildren: boolean, public childrenCount: number, private chunkIndex = 0) {
constructor(
public reference: number,
private id: string,
private cacheChildren: boolean,
public childrenCount: number,
private chunkIndex = 0
) {
// noop
}
......@@ -294,7 +305,16 @@ export class Variable extends ExpressionContainer implements debug.IExpression {
// Used to show the error message coming from the adapter when setting the value #7807
public errorMessage: string;
constructor(public parent: debug.IExpressionContainer, reference: number, public name: string, value: string, childrenCount: number, public type: string = null, public available = true, chunkIndex = 0) {
constructor(
public parent: debug.IExpressionContainer,
reference: number,
public name: string,
value: string,
childrenCount: number,
public type: string = null,
public available = true,
chunkIndex = 0
) {
super(reference, `variable:${ parent.getId() }:${ name }`, true, childrenCount, chunkIndex);
this.value = massageValue(value);
}
......@@ -302,7 +322,13 @@ export class Variable extends ExpressionContainer implements debug.IExpression {
export class Scope extends ExpressionContainer implements debug.IScope {
constructor(private threadId: number, public name: string, reference: number, public expensive: boolean, childrenCount: number) {
constructor(
private threadId: number,
public name: string,
reference: number,
public expensive: boolean,
childrenCount: number
) {
super(reference, `scope:${threadId}:${name}:${reference}`, true, childrenCount);
}
}
......@@ -311,7 +337,14 @@ export class StackFrame implements debug.IStackFrame {
private scopes: TPromise<Scope[]>;
constructor(public threadId: number, public frameId: number, public source: Source, public name: string, public lineNumber: number, public column: number) {
constructor(
public threadId: number,
public frameId: number,
public source: Source,
public name: string,
public lineNumber: number,
public column: number
) {
this.scopes = null;
}
......@@ -338,7 +371,12 @@ export class Breakpoint implements debug.IBreakpoint {
public message: string;
private id: string;
constructor(public source: Source, public desiredLineNumber: number, public enabled: boolean, public condition: string) {
constructor(
public source: Source,
public desiredLineNumber: number,
public enabled: boolean,
public condition: string
) {
if (enabled === undefined) {
this.enabled = true;
}
......@@ -391,9 +429,13 @@ export class Model implements debug.IModel {
private _onDidChangeWatchExpressions: Emitter<debug.IExpression>;
private _onDidChangeREPLElements: Emitter<void>;
constructor(private breakpoints: debug.IBreakpoint[], private breakpointsActivated: boolean, private functionBreakpoints: debug.IFunctionBreakpoint[],
private exceptionBreakpoints: debug.IExceptionBreakpoint[], private watchExpressions: Expression[]) {
constructor(
private breakpoints: debug.IBreakpoint[],
private breakpointsActivated: boolean,
private functionBreakpoints: debug.IFunctionBreakpoint[],
private exceptionBreakpoints: debug.IExceptionBreakpoint[],
private watchExpressions: Expression[]
) {
this.threads = {};
this.replElements = [];
this.toDispose = [];
......
......@@ -157,7 +157,12 @@ function getSourceName(source: Source, contextService: IWorkspaceContextService)
export class BaseDebugController extends treedefaults.DefaultController {
constructor(protected debugService: debug.IDebugService, private contextMenuService: IContextMenuService, private actionProvider: renderer.IActionProvider, private focusOnContextMenu = true) {
constructor(
protected debugService: debug.IDebugService,
private contextMenuService: IContextMenuService,
private actionProvider: renderer.IActionProvider,
private focusOnContextMenu = true
) {
super();
if (isMacintosh) {
......@@ -281,7 +286,7 @@ export class CallStackController extends BaseDebugController {
export class CallStackActionProvider implements renderer.IActionProvider {
constructor( @IInstantiationService private instantiationService: IInstantiationService, @debug.IDebugService private debugService: debug.IDebugService) {
constructor(@IInstantiationService private instantiationService: IInstantiationService, @debug.IDebugService private debugService: debug.IDebugService) {
// noop
}
......@@ -326,7 +331,7 @@ export class CallStackActionProvider implements renderer.IActionProvider {
export class CallStackDataSource implements tree.IDataSource {
constructor( @debug.IDebugService private debugService: debug.IDebugService) {
constructor(@debug.IDebugService private debugService: debug.IDebugService) {
// noop
}
......@@ -402,7 +407,7 @@ export class CallStackRenderer implements tree.IRenderer {
private static ERROR_TEMPLATE_ID = 'error';
private static LOAD_MORE_TEMPLATE_ID = 'loadMore';
constructor( @IWorkspaceContextService private contextService: IWorkspaceContextService) {
constructor(@IWorkspaceContextService private contextService: IWorkspaceContextService) {
// noop
}
......@@ -506,7 +511,7 @@ export class CallStackRenderer implements tree.IRenderer {
export class CallstackAccessibilityProvider implements tree.IAccessibilityProvider {
constructor( @IWorkspaceContextService private contextService: IWorkspaceContextService) {
constructor(@IWorkspaceContextService private contextService: IWorkspaceContextService) {
// noop
}
......@@ -823,7 +828,9 @@ export class WatchExpressionsRenderer implements tree.IRenderer {
private toDispose: lifecycle.IDisposable[];
private actionProvider: WatchExpressionsActionProvider;
constructor(actionProvider: renderer.IActionProvider, private actionRunner: actions.IActionRunner,
constructor(
actionProvider: renderer.IActionProvider,
private actionRunner: actions.IActionRunner,
@IMessageService private messageService: IMessageService,
@debug.IDebugService private debugService: debug.IDebugService,
@IContextViewService private contextViewService: IContextViewService
......@@ -1185,7 +1192,7 @@ export class BreakpointsRenderer implements tree.IRenderer {
export class BreakpointsAccessibilityProvider implements tree.IAccessibilityProvider {
constructor( @IWorkspaceContextService private contextService: IWorkspaceContextService) {
constructor(@IWorkspaceContextService private contextService: IWorkspaceContextService) {
// noop
}
......
......@@ -49,7 +49,9 @@ export class VariablesView extends viewlet.CollapsibleViewletView {
private static MEMENTO = 'variablesview.memento';
constructor(actionRunner: actions.IActionRunner, private settings: any,
constructor(
actionRunner: actions.IActionRunner,
private settings: any,
@IMessageService messageService: IMessageService,
@IContextMenuService contextMenuService: IContextMenuService,
@ITelemetryService private telemetryService: ITelemetryService,
......@@ -137,7 +139,9 @@ export class WatchExpressionsView extends viewlet.CollapsibleViewletView {
private static MEMENTO = 'watchexpressionsview.memento';
constructor(actionRunner: actions.IActionRunner, private settings: any,
constructor(
actionRunner: actions.IActionRunner,
private settings: any,
@IMessageService messageService: IMessageService,
@IContextMenuService contextMenuService: IContextMenuService,
@IDebugService private debugService: IDebugService,
......@@ -214,7 +218,9 @@ export class CallStackView extends viewlet.CollapsibleViewletView {
private pauseMessage: builder.Builder;
private pauseMessageLabel: builder.Builder;
constructor(actionRunner: actions.IActionRunner, private settings: any,
constructor(
actionRunner: actions.IActionRunner,
private settings: any,
@IMessageService messageService: IMessageService,
@IContextMenuService contextMenuService: IContextMenuService,
@ITelemetryService private telemetryService: ITelemetryService,
......@@ -307,7 +313,9 @@ export class BreakpointsView extends viewlet.AdaptiveCollapsibleViewletView {
private static MAX_VISIBLE_FILES = 9;
private static MEMENTO = 'breakopintsview.memento';
constructor(actionRunner: actions.IActionRunner, private settings: any,
constructor(
actionRunner: actions.IActionRunner,
private settings: any,
@IMessageService messageService: IMessageService,
@IContextMenuService contextMenuService: IContextMenuService,
@IDebugService private debugService: IDebugService,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册