Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delay for exec in terminal #592

Merged
merged 58 commits into from
Jan 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ecc1ca9
Fix Microsoft/vscode#37627 (#1368)
octref Nov 3, 2017
7c5778c
Version 0.7.0 of extension (#1381)
DonJayamanne Nov 9, 2017
9d1bf82
Update README.md
DonJayamanne Nov 9, 2017
ffba179
Update README.md
DonJayamanne Nov 9, 2017
905c713
sync fork with upstream
DonJayamanne Nov 10, 2017
acc2109
fix readme
DonJayamanne Nov 10, 2017
d470523
Merge branch 'master' of https://github.com/Microsoft/vscode-python
DonJayamanne Nov 16, 2017
d392e8b
merged upstream
DonJayamanne Nov 16, 2017
92f775f
Merge remote-tracking branch 'upstream/master'
DonJayamanne Nov 20, 2017
32a6e53
Merge remote-tracking branch 'upstream/master'
DonJayamanne Nov 21, 2017
4b30f2c
Merge remote-tracking branch 'upstream/master'
DonJayamanne Nov 22, 2017
e396752
Merge remote-tracking branch 'upstream/master'
DonJayamanne Nov 22, 2017
eff4792
Merge remote-tracking branch 'upstream/master'
DonJayamanne Nov 28, 2017
4553c28
Merge remote-tracking branch 'upstream/master'
DonJayamanne Nov 28, 2017
3c6520a
Merge remote-tracking branch 'upstream/master'
DonJayamanne Nov 28, 2017
966e516
Merge remote-tracking branch 'upstream/master'
DonJayamanne Nov 28, 2017
63d2d65
Merge remote-tracking branch 'upstream/master'
DonJayamanne Nov 28, 2017
f6d469e
Merge remote-tracking branch 'upstream/master'
DonJayamanne Nov 28, 2017
029e055
Merge remote-tracking branch 'upstream/master'
DonJayamanne Nov 30, 2017
e8c71c0
Merge remote-tracking branch 'upstream/master'
DonJayamanne Nov 30, 2017
51cf9d2
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 1, 2017
7aadc43
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 1, 2017
f0f5c59
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 4, 2017
b2b9da9
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 4, 2017
30a4091
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 5, 2017
b16d2f9
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 6, 2017
c8db345
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 7, 2017
0df7f16
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 8, 2017
3ccc881
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 9, 2017
bb0709e
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 11, 2017
2c19004
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 11, 2017
8f224ab
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 11, 2017
41b7080
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 12, 2017
dab38dc
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 12, 2017
ae22dd4
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 12, 2017
d2340d2
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 14, 2017
52bb7ae
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 15, 2017
b6b2531
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 19, 2017
8d8d2fc
Merge remote-tracking branch 'upstream/master'
DonJayamanne Dec 19, 2017
c425a55
Merge remote-tracking branch 'upstream/master'
DonJayamanne Jan 3, 2018
3963217
Merge remote-tracking branch 'upstream/master'
DonJayamanne Jan 3, 2018
a696f2a
Merge remote-tracking branch 'upstream/master'
DonJayamanne Jan 3, 2018
a31e659
Merge remote-tracking branch 'upstream/master'
DonJayamanne Jan 4, 2018
2663cd5
Merge remote-tracking branch 'upstream/master'
DonJayamanne Jan 4, 2018
7c85e0b
Merge remote-tracking branch 'upstream/master'
DonJayamanne Jan 5, 2018
beb82c2
Merge remote-tracking branch 'upstream/master'
DonJayamanne Jan 9, 2018
01e722a
Merge remote-tracking branch 'upstream/master'
DonJayamanne Jan 10, 2018
06cf61c
first set
DonJayamanne Jan 11, 2018
83148c1
tests for terminal services
DonJayamanne Jan 12, 2018
b336bd1
remove unsed var
DonJayamanne Jan 12, 2018
5489575
refactor execution of code in terminals
DonJayamanne Jan 16, 2018
7de62aa
revert change to tests grep
DonJayamanne Jan 16, 2018
36d2aa5
removed duplicate type definition
DonJayamanne Jan 16, 2018
686aca9
ensure title is set
DonJayamanne Jan 16, 2018
ddc46c9
revert retry count
DonJayamanne Jan 16, 2018
4571e48
account for PYTHONPATH in current test environment (existing machine)
DonJayamanne Jan 17, 2018
8783515
Merge branch 'master' into addDelayForExecInTerminal
DonJayamanne Jan 18, 2018
62661ed
Merge branch 'master' into addDelayForExecInTerminal
DonJayamanne Jan 18, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const hygiene = (options) => {
* @param {any[]} failures
*/
function reportLinterFailures(failures) {
failures
return failures
.map(failure => {
const name = failure.name || failure.fileName;
const position = failure.startPosition;
Expand Down Expand Up @@ -235,7 +235,7 @@ const hygiene = (options) => {
const files = options.mode === 'compile' ? tsProject.src() : getFilesToProcess(options);
const dest = options.mode === 'compile' ? './out' : '.';
let result = files
.pipe(filter(f => !f.stat.isDirectory()));
.pipe(filter(f => f && f.stat && !f.stat.isDirectory()));

if (!options.skipIndentationCheck) {
result = result.pipe(filter(indentationFilter))
Expand All @@ -261,7 +261,7 @@ const hygiene = (options) => {
.js.pipe(gulp.dest(dest))
.pipe(es.through(null, function () {
if (errorCount > 0) {
const errorMessage = `Hygiene failed with ${colors.yellow(errorCount)} errors 👎 . Check 'gulpfile.js'.`;
const errorMessage = `Hygiene failed with errors 👎 . Check 'gulpfile.js'.`;
console.error(colors.red(errorMessage));
exitHandler(options);
} else {
Expand Down
75 changes: 75 additions & 0 deletions src/client/common/application/commandManager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// tslint:disable:no-any

import { injectable } from 'inversify';
import { commands, Disposable, TextEditor, TextEditorEdit } from 'vscode';
import { ICommandManager } from './types';

@injectable()
export class CommandManager implements ICommandManager {

/**
* Registers a command that can be invoked via a keyboard shortcut,
* a menu item, an action, or directly.
*
* Registering a command with an existing command identifier twice
* will cause an error.
*
* @param command A unique identifier for the command.
* @param callback A command handler function.
* @param thisArg The `this` context used when invoking the handler function.
* @return Disposable which unregisters this command on disposal.
*/
public registerCommand(command: string, callback: (...args: any[]) => any, thisArg?: any): Disposable {
return commands.registerCommand(command, callback, thisArg);
}

/**
* Registers a text editor command that can be invoked via a keyboard shortcut,
* a menu item, an action, or directly.
*
* Text editor commands are different from ordinary [commands](#commands.registerCommand) as
* they only execute when there is an active editor when the command is called. Also, the
* command handler of an editor command has access to the active editor and to an
* [edit](#TextEditorEdit)-builder.
*
* @param command A unique identifier for the command.
* @param callback A command handler function with access to an [editor](#TextEditor) and an [edit](#TextEditorEdit).
* @param thisArg The `this` context used when invoking the handler function.
* @return Disposable which unregisters this command on disposal.
*/
public registerTextEditorCommand(command: string, callback: (textEditor: TextEditor, edit: TextEditorEdit, ...args: any[]) => void, thisArg?: any): Disposable {
return commands.registerTextEditorCommand(command, callback, thisArg);
}

/**
* Executes the command denoted by the given command identifier.
*
* * *Note 1:* When executing an editor command not all types are allowed to
* be passed as arguments. Allowed are the primitive types `string`, `boolean`,
* `number`, `undefined`, and `null`, as well as [`Position`](#Position), [`Range`](#Range), [`Uri`](#Uri) and [`Location`](#Location).
* * *Note 2:* There are no restrictions when executing commands that have been contributed
* by extensions.
*
* @param command Identifier of the command to execute.
* @param rest Parameters passed to the command function.
* @return A thenable that resolves to the returned value of the given command. `undefined` when
* the command handler function doesn't return anything.
*/
public executeCommand<T>(command: string, ...rest: any[]): Thenable<T | undefined> {
return commands.executeCommand<T>(command, ...rest);
}

/**
* Retrieve the list of all available commands. Commands starting an underscore are
* treated as internal commands.
*
* @param filterInternal Set `true` to not see internal commands (starting with an underscore)
* @return Thenable that resolves to a list of command ids.
*/
public getCommands(filterInternal?: boolean): Thenable<string[]> {
return commands.getCommands(filterInternal);
}
}
39 changes: 39 additions & 0 deletions src/client/common/application/documentManager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// tslint:disable:no-any

import { injectable } from 'inversify';
import { Event, TextDocument, TextDocumentShowOptions, TextEditor, TextEditorOptionsChangeEvent, TextEditorSelectionChangeEvent, TextEditorViewColumnChangeEvent, Uri, ViewColumn, window } from 'vscode';
import { IDocumentManager } from './types';

@injectable()
export class DocumentManager implements IDocumentManager {
public get activeTextEditor(): TextEditor | undefined {
return window.activeTextEditor;
}
public get visibleTextEditors(): TextEditor[] {
return window.visibleTextEditors;
}
public get onDidChangeActiveTextEditor(): Event<TextEditor> {
return window.onDidChangeActiveTextEditor;
}
public get onDidChangeVisibleTextEditors(): Event<TextEditor[]> {
return window.onDidChangeVisibleTextEditors;
}
public get onDidChangeTextEditorSelection(): Event<TextEditorSelectionChangeEvent> {
return window.onDidChangeTextEditorSelection;
}
public get onDidChangeTextEditorOptions(): Event<TextEditorOptionsChangeEvent> {
return window.onDidChangeTextEditorOptions;
}
public get onDidChangeTextEditorViewColumn(): Event<TextEditorViewColumnChangeEvent> {
return window.onDidChangeTextEditorViewColumn;
}
public showTextDocument(document: TextDocument, column?: ViewColumn, preserveFocus?: boolean): Thenable<TextEditor>;
public showTextDocument(document: TextDocument | Uri, options?: TextDocumentShowOptions): Thenable<TextEditor>;
public showTextDocument(uri: any, options?: any, preserveFocus?: any): Thenable<TextEditor> {
return window.showTextDocument(uri, options, preserveFocus);
}

}
16 changes: 16 additions & 0 deletions src/client/common/application/terminalManager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import { injectable } from 'inversify';
import { Event, Terminal, TerminalOptions, window } from 'vscode';
import { ITerminalManager } from './types';

@injectable()
export class TerminalManager implements ITerminalManager {
public get onDidCloseTerminal(): Event<Terminal> {
return window.onDidCloseTerminal;
}
public createTerminal(options: TerminalOptions): Terminal {
return window.createTerminal(options);
}
}
Loading