This repository has been archived by the owner on Oct 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3e2717
commit 8b99f42
Showing
8 changed files
with
177 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/*--------------------------------------------------------- | ||
* Copyright (C) Microsoft Corporation. All rights reserved. | ||
*--------------------------------------------------------*/ | ||
|
||
import * as DebugProtocol from 'vscode-debugadapter'; | ||
|
||
import {ChromeDebugAdapter} from './chromeDebugAdapter'; | ||
import * as Chrome from './chromeDebugProtocol.d'; | ||
|
||
import * as utils from '../utils'; | ||
|
||
export interface IVariableContainer { | ||
objectId: string; | ||
thisObj?: Chrome.Runtime.RemoteObject; | ||
expand(adapter: ChromeDebugAdapter, filter: string, start: number, count: number): Promise<DebugProtocol.Variable[]>; | ||
setValue(adapter: ChromeDebugAdapter, name: string, value: string): Promise<string>; | ||
} | ||
|
||
export abstract class BaseVariableContainer implements IVariableContainer { | ||
constructor(public objectId: string) { | ||
} | ||
|
||
public abstract expand(adapter: ChromeDebugAdapter, filter: string, start: number, count: number): Promise<DebugProtocol.Variable[]>; | ||
public abstract setValue(adapter: ChromeDebugAdapter, name: string, value: string): Promise<string>; | ||
} | ||
|
||
export class PropertyContainer extends BaseVariableContainer { | ||
public expand(adapter: ChromeDebugAdapter, filter: string, start: number, count: number): Promise<DebugProtocol.Variable[]> { | ||
return utils.errP('Not implemented'); | ||
} | ||
|
||
public setValue(adapter: ChromeDebugAdapter, name: string, value: string): Promise<string> { | ||
return adapter._setPropertyValue(this.objectId, name, value); | ||
} | ||
} | ||
|
||
export class ScopeContainer extends BaseVariableContainer { | ||
public thisObj: Chrome.Runtime.RemoteObject; | ||
|
||
private _frameId: string; | ||
private _scopeIndex: number; | ||
|
||
public constructor(frameId: string, scopeIndex: number, objectId: string, thisObj?: Chrome.Runtime.RemoteObject) { | ||
super(objectId); | ||
this.thisObj = thisObj; | ||
this._frameId = frameId; | ||
this._scopeIndex = scopeIndex; | ||
} | ||
|
||
public expand(adapter: ChromeDebugAdapter, filter: string, start: number, count: number): Promise<DebugProtocol.Variable[]> { | ||
return utils.errP('Not implemented'); | ||
} | ||
|
||
public setValue(adapter: ChromeDebugAdapter, name: string, value: string): Promise<string> { | ||
return adapter._setVariableValue(this._frameId, this._scopeIndex, name, value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
"spaces" | ||
], | ||
"align": [ | ||
true, | ||
false, | ||
"statements" | ||
], | ||
"ban": false, | ||
|