提交 a6735b5d 编写于 作者: A André Weinand

make IProcess.sources private

上级 95c53efb
...@@ -140,8 +140,8 @@ export interface IProcess extends ITreeElement { ...@@ -140,8 +140,8 @@ export interface IProcess extends ITreeElement {
getName(includeRoot: boolean): string; getName(includeRoot: boolean): string;
configuration: IConfig; configuration: IConfig;
session: ISession; session: ISession;
sources: Map<string, Source>;
state: ProcessState; state: ProcessState;
getSourceForUri(modelUri: uri): Source;
getThread(threadId: number): IThread; getThread(threadId: number): IThread;
getAllThreads(): IThread[]; getAllThreads(): IThread[];
getSource(raw: DebugProtocol.Source): Source; getSource(raw: DebugProtocol.Source): Source;
......
...@@ -532,8 +532,9 @@ export class Thread implements IThread { ...@@ -532,8 +532,9 @@ export class Thread implements IThread {
export class Process implements IProcess { export class Process implements IProcess {
public sources: Map<string, Source>; private sources: Map<string, Source>;
private threads: Map<number, Thread>; private threads: Map<number, Thread>;
public inactive = true; public inactive = true;
constructor(public configuration: IConfig, private _session: ISession & ITreeElement) { constructor(public configuration: IConfig, private _session: ISession & ITreeElement) {
...@@ -558,6 +559,10 @@ export class Process implements IProcess { ...@@ -558,6 +559,10 @@ export class Process implements IProcess {
return this.configuration.type === 'attach' ? ProcessState.ATTACH : ProcessState.LAUNCH; return this.configuration.type === 'attach' ? ProcessState.ATTACH : ProcessState.LAUNCH;
} }
public getSourceForUri(modelUri: uri): Source {
return this.sources.get(modelUri.toString());
}
public getSource(raw: DebugProtocol.Source): Source { public getSource(raw: DebugProtocol.Source): Source {
let source = new Source(raw, this.getId()); let source = new Source(raw, this.getId());
if (this.sources.has(source.uri.toString())) { if (this.sources.has(source.uri.toString())) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册