mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-13 15:35:20 +01:00
tslint
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
'use strict';
|
||||
|
||||
import nls = require('./utils/nls');
|
||||
import {IJSONSchema} from './json-toolbox/jsonSchema';
|
||||
|
||||
import {ISchemaContributions} from './jsonSchemaService';
|
||||
|
||||
|
||||
@@ -5,14 +5,13 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
import URI from './utils/uri';
|
||||
import Parser = require('./jsonParser');
|
||||
import SchemaService = require('./jsonSchemaService');
|
||||
import JsonSchema = require('./json-toolbox/jsonSchema');
|
||||
import nls = require('./utils/nls');
|
||||
import {IJSONWorkerContribution} from './jsonContributions';
|
||||
|
||||
import {CompletionItem, CompletionItemKind, CompletionList, CompletionOptions, ITextDocument, TextDocumentIdentifier, TextDocumentPosition, Range, TextEdit} from 'vscode-languageserver';
|
||||
import {CompletionItem, CompletionItemKind, CompletionList, ITextDocument, TextDocumentPosition, Range, TextEdit} from 'vscode-languageserver';
|
||||
|
||||
export interface ISuggestionsCollector {
|
||||
add(suggestion: CompletionItem): void;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
'use strict';
|
||||
|
||||
import Parser = require('./jsonParser');
|
||||
import SchemaService = require('./jsonSchemaService');
|
||||
import Strings = require('./utils/strings');
|
||||
|
||||
import {SymbolInformation, SymbolKind, ITextDocument, Range, Location} from 'vscode-languageserver';
|
||||
|
||||
@@ -9,7 +9,7 @@ import Parser = require('./jsonParser');
|
||||
import SchemaService = require('./jsonSchemaService');
|
||||
import {IJSONWorkerContribution} from './jsonContributions';
|
||||
|
||||
import {Hover, ITextDocument, TextDocumentPosition, Range, MarkedString, RemoteConsole} from 'vscode-languageserver';
|
||||
import {Hover, ITextDocument, TextDocumentPosition, Range, MarkedString} from 'vscode-languageserver';
|
||||
|
||||
export class JSONHover {
|
||||
|
||||
@@ -25,7 +25,6 @@ export class JSONHover {
|
||||
|
||||
let offset = document.offsetAt(textDocumentPosition.position);
|
||||
let node = doc.getNodeFromOffset(offset);
|
||||
let originalNode = node;
|
||||
|
||||
// use the property description when hovering over an object key
|
||||
if (node && node.type === 'string') {
|
||||
@@ -55,7 +54,7 @@ export class JSONHover {
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
var createHover = (contents: MarkedString[]) => {
|
||||
let range = Range.create(document.positionAt(node.start), document.positionAt(node.end));
|
||||
let result: Hover = {
|
||||
@@ -64,7 +63,7 @@ export class JSONHover {
|
||||
};
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
let location = node.getNodeLocation();
|
||||
for (let i = this.contributions.length - 1; i >= 0; i--) {
|
||||
let contribution = this.contributions[i];
|
||||
|
||||
@@ -8,7 +8,6 @@ import nls = require('./utils/nls');
|
||||
import Json = require('./json-toolbox/json');
|
||||
import JsonSchema = require('./json-toolbox/jsonSchema');
|
||||
import {JSONLocation} from './jsonLocation';
|
||||
import SchemaService = require('./jsonSchemaService');
|
||||
|
||||
export interface IRange {
|
||||
start: number;
|
||||
|
||||
@@ -10,8 +10,6 @@ import {IJSONSchema} from './json-toolbox/jsonSchema';
|
||||
import {IXHROptions, IXHRResponse, getErrorStatusDescription} from './utils/httpRequest';
|
||||
import URI from './utils/uri';
|
||||
import Strings = require('./utils/strings');
|
||||
import {parse as parseURL} from 'url';
|
||||
import path = require('path');
|
||||
import Parser = require('./jsonParser');
|
||||
|
||||
export interface IJSONSchemaService {
|
||||
|
||||
@@ -8,7 +8,6 @@ import {MarkedString, CompletionItemKind, CompletionItem} from 'vscode-languages
|
||||
import Strings = require('../utils/strings');
|
||||
import nls = require('../utils/nls');
|
||||
import {IJSONWorkerContribution, ISuggestionsCollector} from '../jsonContributions';
|
||||
import {IRequestService} from '../jsonSchemaService';
|
||||
import {JSONLocation} from '../jsonLocation';
|
||||
|
||||
let globProperties:CompletionItem[] = [
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import {MarkedString, CompletionItemKind, CompletionItem} from 'vscode-languageserver';
|
||||
import {MarkedString, CompletionItemKind} from 'vscode-languageserver';
|
||||
import Strings = require('../utils/strings');
|
||||
import nls = require('../utils/nls');
|
||||
import {IJSONWorkerContribution, ISuggestionsCollector} from '../jsonContributions';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import {MarkedString, CompletionItemKind, CompletionItem} from 'vscode-languageserver';
|
||||
import {MarkedString, CompletionItemKind} from 'vscode-languageserver';
|
||||
import Strings = require('../utils/strings');
|
||||
import nls = require('../utils/nls');
|
||||
import {IJSONWorkerContribution, ISuggestionsCollector} from '../jsonContributions';
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
|
||||
import {
|
||||
IPCMessageReader, IPCMessageWriter,
|
||||
createConnection, IConnection, TextDocumentSyncKind,
|
||||
createConnection, IConnection,
|
||||
TextDocuments, ITextDocument, Diagnostic, DiagnosticSeverity,
|
||||
InitializeParams, InitializeResult, TextDocumentIdentifier, TextDocumentPosition, CompletionList,
|
||||
CompletionItem, CompletionItemKind, Files, Hover, SymbolInformation, TextEdit, DocumentFormattingParams,
|
||||
Hover, SymbolInformation, DocumentFormattingParams,
|
||||
DocumentRangeFormattingParams, NotificationType, RequestType
|
||||
} from 'vscode-languageserver';
|
||||
|
||||
@@ -18,7 +18,7 @@ import path = require('path');
|
||||
import fs = require('fs');
|
||||
import URI from './utils/uri';
|
||||
import Strings = require('./utils/strings');
|
||||
import {IWorkspaceContextService, ITelemetryService, JSONSchemaService, ISchemaContributions, ISchemaAssociations} from './jsonSchemaService';
|
||||
import {JSONSchemaService, ISchemaAssociations} from './jsonSchemaService';
|
||||
import {parse as parseJSON, ObjectASTNode, JSONDocument} from './jsonParser';
|
||||
import {JSONCompletion} from './jsonCompletion';
|
||||
import {JSONHover} from './jsonHover';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import {ITextDocument, DocumentFormattingParams, Range, Position, FormattingOptions, TextEdit} from 'vscode-languageserver';
|
||||
import {ITextDocument, TextEdit} from 'vscode-languageserver';
|
||||
import assert = require('assert');
|
||||
|
||||
export function applyEdits(document: ITextDocument, edits: TextEdit[]) : string {
|
||||
@@ -19,5 +19,5 @@ export function applyEdits(document: ITextDocument, edits: TextEdit[]) : string
|
||||
formatted = formatted.substring(0, startOffset) + e.newText + formatted.substring(endOffset, formatted.length);
|
||||
lastOffset = startOffset;
|
||||
});
|
||||
return formatted;
|
||||
return formatted;
|
||||
}
|
||||
@@ -190,7 +190,7 @@ export default class URI {
|
||||
ret._path = match[5] || ret._path;
|
||||
ret._query = match[7] || ret._query;
|
||||
ret._fragment = match[9] || ret._fragment;
|
||||
};
|
||||
}
|
||||
URI._validate(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
import * as path from 'path';
|
||||
|
||||
import {workspace, languages, Disposable, ExtensionContext, extensions, Uri} from 'vscode';
|
||||
import {LanguageClient, LanguageClientOptions, RequestType, SettingMonitor, ServerOptions, TransportKind, NotificationType} from 'vscode-languageclient';
|
||||
import {workspace, languages, ExtensionContext, extensions, Uri} from 'vscode';
|
||||
import {LanguageClient, LanguageClientOptions, RequestType, ServerOptions, TransportKind, NotificationType} from 'vscode-languageclient';
|
||||
|
||||
namespace TelemetryNotification {
|
||||
export const type: NotificationType<{ key: string, data: any }> = { get method() { return 'telemetry'; } };
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import {CompletionItemProvider, CompletionItem, CompletionItemKind, CancellationToken, TextDocument, Range, Position} from 'vscode';
|
||||
import {CompletionItemProvider, CompletionItem, CompletionItemKind, CancellationToken, TextDocument, Position} from 'vscode';
|
||||
import phpGlobals = require('./phpGlobals');
|
||||
|
||||
export default class PHPCompletionItemProvider implements CompletionItemProvider {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import {HoverProvider, Hover, MarkedString, TextDocument, CancellationToken, Range, Position} from 'vscode';
|
||||
import {HoverProvider, Hover, MarkedString, TextDocument, CancellationToken, Position} from 'vscode';
|
||||
import phpGlobals = require('./phpGlobals');
|
||||
|
||||
export default class PHPHoverProvider implements HoverProvider {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import {SignatureHelpProvider, SignatureHelp, SignatureInformation, ParameterInformation, Uri, CancellationToken, TextLine, TextDocument, Position} from 'vscode';
|
||||
import {SignatureHelpProvider, SignatureHelp, SignatureInformation, CancellationToken, TextDocument, Position} from 'vscode';
|
||||
import phpGlobals = require('./phpGlobals');
|
||||
|
||||
var _NL = '\n'.charCodeAt(0);
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import * as path from 'path';
|
||||
import * as cp from 'child_process';
|
||||
import ChildProcess = cp.ChildProcess;
|
||||
import { NodeStringDecoder, StringDecoder } from 'string_decoder';
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
@@ -163,14 +161,12 @@ export default class PHPValidationProvider {
|
||||
private doValidate(textDocument: vscode.TextDocument): Promise<void> {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
let executable = this.executable || 'php';
|
||||
let filePath = textDocument.fileName;
|
||||
let decoder = new LineDecoder();
|
||||
let diagnostics: vscode.Diagnostic[] = [];
|
||||
let processLine = (line: string) => {
|
||||
let matches = line.match(PHPValidationProvider.MatchExpression);
|
||||
if (matches) {
|
||||
let message = matches[1];
|
||||
let file = matches[2];
|
||||
let line = parseInt(matches[3]) - 1;
|
||||
let diagnostic: vscode.Diagnostic = new vscode.Diagnostic(
|
||||
new vscode.Range(line, 0, line, Number.MAX_VALUE),
|
||||
|
||||
@@ -9,7 +9,7 @@ import PHPCompletionItemProvider from './features/completionItemProvider';
|
||||
import PHPHoverProvider from './features/hoverProvider';
|
||||
import PHPSignatureHelpProvider from './features/signatureHelpProvider';
|
||||
import PHPValidationProvider from './features/validationProvider';
|
||||
import {ExtensionContext, languages, extensions} from 'vscode';
|
||||
import {ExtensionContext, languages} from 'vscode';
|
||||
|
||||
export function activate(context: ExtensionContext): any {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { workspace, DefinitionProvider, TextDocument, Position, Range, CancellationToken, Location } from 'vscode';
|
||||
import { DefinitionProvider, TextDocument, Position, Range, CancellationToken, Location } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { workspace, DocumentHighlightProvider, DocumentHighlight, DocumentHighlightKind, TextDocument, Position, Range, CancellationToken } from 'vscode';
|
||||
import { DocumentHighlightProvider, DocumentHighlight, DocumentHighlightKind, TextDocument, Position, Range, CancellationToken } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { workspace, DocumentSymbolProvider, SymbolInformation, SymbolKind, TextDocument, Position, Range, CancellationToken } from 'vscode';
|
||||
import { DocumentSymbolProvider, SymbolInformation, SymbolKind, TextDocument, Range, CancellationToken } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import * as PConst from '../protocol.const';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { workspace, DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, FormattingOptions, TextDocument, Position, Range, CancellationToken, TextEdit } from 'vscode';
|
||||
import { DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, FormattingOptions, TextDocument, Position, Range, CancellationToken, TextEdit } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { workspace, HoverProvider, Hover, TextDocument, Position, Range, CancellationToken } from 'vscode';
|
||||
import { HoverProvider, Hover, TextDocument, Position, Range, CancellationToken } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { workspace, ReferenceProvider, Location, TextDocument, Position, Range, CancellationToken } from 'vscode';
|
||||
import { ReferenceProvider, Location, TextDocument, Position, Range, CancellationToken } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { workspace, RenameProvider, WorkspaceEdit, TextDocument, Position, Range, CancellationToken } from 'vscode';
|
||||
import { RenameProvider, WorkspaceEdit, TextDocument, Position, Range, CancellationToken } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { workspace, SignatureHelpProvider, SignatureHelp, SignatureInformation, ParameterInformation, TextDocument, Position, CancellationToken } from 'vscode';
|
||||
import { SignatureHelpProvider, SignatureHelp, SignatureInformation, ParameterInformation, TextDocument, Position, CancellationToken } from 'vscode';
|
||||
|
||||
import * as Previewer from './previewer';
|
||||
import * as Proto from '../protocol';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { workspace, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, TextDocument, Position, Range, CancellationToken } from 'vscode';
|
||||
import { workspace, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Range, CancellationToken } from 'vscode';
|
||||
|
||||
import * as Proto from '../protocol';
|
||||
import { ITypescriptServiceClient } from '../typescriptService';
|
||||
|
||||
@@ -18,11 +18,6 @@ import { ITypescriptServiceClient, ITypescriptServiceClientHost } from './types
|
||||
|
||||
import * as SalsaStatus from './utils/salsaStatus';
|
||||
|
||||
let isWin = /^win/.test(process.platform);
|
||||
let isDarwin = /^darwin/.test(process.platform);
|
||||
let isLinux = /^linux/.test(process.platform);
|
||||
let arch = process.arch;
|
||||
|
||||
interface CallbackItem {
|
||||
c: (value: any) => void;
|
||||
e: (err: any) => void;
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var net = require('net'),
|
||||
fs = require('fs'),
|
||||
stream = require('stream'),
|
||||
util = require('util');
|
||||
fs = require('fs');
|
||||
|
||||
var ENABLE_LOGGING = false;
|
||||
|
||||
|
||||
@@ -223,7 +223,9 @@ export class List<T> implements IDisposable {
|
||||
if (this.length === 0) { return; }
|
||||
const selection = this.selection.get();
|
||||
let index = selection.length > 0 ? selection[0] - n : 0;
|
||||
if (loop && index < 0) index = this.length + (index % this.length);
|
||||
if (loop && index < 0) {
|
||||
index = this.length + (index % this.length);
|
||||
}
|
||||
this.setSelection(Math.max(index, 0));
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
import {WorkerServer} from 'vs/base/common/worker/workerServer';
|
||||
import {marked, MarkedOptions} from 'vs/base/common/marked/marked';
|
||||
import {marked} from 'vs/base/common/marked/marked';
|
||||
|
||||
|
||||
function link(href, title, text): string {
|
||||
@@ -18,9 +18,9 @@ export const value = {
|
||||
|
||||
markdownToHtml(main: WorkerServer, resolve: Function, reject: Function, progress: Function, data: { source: string; highlight: boolean; }): void {
|
||||
|
||||
function highlight(code: string, lang: string, callback?: (error: Error, result: string) => void) {
|
||||
main.request('highlight', { code, lang }).then(value => callback(void 0, value), err => callback(err, void 0));
|
||||
};
|
||||
// function highlight(code: string, lang: string, callback?: (error: Error, result: string) => void) {
|
||||
// main.request('highlight', { code, lang }).then(value => callback(void 0, value), err => callback(err, void 0));
|
||||
// }
|
||||
|
||||
const renderer = new marked.Renderer();
|
||||
renderer.link = link;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import * as Objects from 'vs/base/common/objects';
|
||||
import * as Types from 'vs/base/common/types';
|
||||
import { IStringDictionary } from 'vs/base/common/collections';
|
||||
|
||||
@@ -70,13 +69,21 @@ export abstract class Parser {
|
||||
|
||||
protected is(value: any, func: (value:any) => boolean, wrongTypeState?: ValidationState, wrongTypeMessage?: string, undefinedState?: ValidationState, undefinedMessage?: string): boolean {
|
||||
if (Types.isUndefined(value)) {
|
||||
if (undefinedState) this.validationStatus.state = undefinedState;
|
||||
if (undefinedMessage) this.log(undefinedMessage);
|
||||
if (undefinedState) {
|
||||
this.validationStatus.state = undefinedState;
|
||||
}
|
||||
if (undefinedMessage) {
|
||||
this.log(undefinedMessage);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!func(value)) {
|
||||
if (wrongTypeState) this.validationStatus.state = wrongTypeState;
|
||||
if (wrongTypeMessage) this.log(wrongTypeMessage);
|
||||
if (wrongTypeState) {
|
||||
this.validationStatus.state = wrongTypeState;
|
||||
}
|
||||
if (wrongTypeMessage) {
|
||||
this.log(wrongTypeMessage);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -7,19 +7,17 @@
|
||||
'use strict';
|
||||
|
||||
import {RunOnceScheduler} from 'vs/base/common/async';
|
||||
import {Range} from 'vs/editor/common/core/range';
|
||||
import EditorCommon = require('vs/editor/common/editorCommon');
|
||||
import {IMouseEvent, ICodeEditor} from 'vs/editor/browser/editorBrowser';
|
||||
import {INullService} from 'vs/platform/instantiation/common/instantiation';
|
||||
import {IDisposable, disposeAll} from 'vs/base/common/lifecycle';
|
||||
import Modes = require('vs/editor/common/modes');
|
||||
import {EditorBrowserRegistry} from 'vs/editor/browser/editorBrowserExtensions';
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import foldStrategy = require('vs/editor/contrib/folding/common/indentFoldStrategy');
|
||||
import {IFoldingRange, toString as rangeToString} from 'vs/editor/contrib/folding/common/foldingRange';
|
||||
import {CommonEditorRegistry, ContextKey, EditorActionDescriptor} from 'vs/editor/common/editorCommonExtensions';
|
||||
import {KeyMod, KeyCode} from 'vs/base/common/keyCodes';
|
||||
import {EditorAction, Behaviour} from 'vs/editor/common/editorAction';
|
||||
import {EditorAction} from 'vs/editor/common/editorAction';
|
||||
import nls = require('vs/nls');
|
||||
|
||||
let log = function(msg: string) {
|
||||
@@ -74,7 +72,7 @@ class CollapsibleRegion {
|
||||
private getRangeDecorationOptions(): EditorCommon.IModelDecorationOptions {
|
||||
return {
|
||||
stickiness: EditorCommon.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public update(newRange:IFoldingRange, model:EditorCommon.IModel, changeAccessor:EditorCommon.IModelDecorationsChangeAccessor): void {
|
||||
@@ -181,7 +179,7 @@ export class FoldingController implements EditorCommon.IEditorContribution {
|
||||
if (range) {
|
||||
collapsedRegions.push({ startLineNumber: range.startLineNumber, endLineNumber: range.endLineNumber, isCollapsed: true});
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
return collapsedRegions;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import EditorCommon = require('vs/editor/common/editorCommon');
|
||||
import {IFoldingRange} from 'vs/editor/contrib/folding/common/foldingRange';
|
||||
|
||||
|
||||
@@ -272,7 +272,6 @@ export class Parser {
|
||||
case nodes.NodeType.MSViewPort:
|
||||
case nodes.NodeType.Media:
|
||||
case nodes.NodeType.Ruleset:
|
||||
case nodes.NodeType.Media:
|
||||
case nodes.NodeType.Namespace:
|
||||
case nodes.NodeType.If:
|
||||
case nodes.NodeType.For:
|
||||
@@ -326,7 +325,7 @@ export class Parser {
|
||||
public _parseBody<T extends nodes.BodyDeclaration>(node: T, parseDeclaration: () => nodes.Node): T {
|
||||
if (!node.setDeclarations(this._parseDeclarations(parseDeclaration))) {
|
||||
return this.finish(node, errors.ParseError.LeftCurlyExpected, [scanner.TokenType.CurlyR, scanner.TokenType.SemiColon ]);
|
||||
};
|
||||
}
|
||||
return this.finish(node);
|
||||
}
|
||||
|
||||
|
||||
@@ -138,16 +138,12 @@ export class MultiLineStream {
|
||||
}
|
||||
|
||||
var _a = 'a'.charCodeAt(0);
|
||||
var _c = 'c'.charCodeAt(0);
|
||||
var _e = 'e'.charCodeAt(0);
|
||||
var _f = 'f'.charCodeAt(0);
|
||||
var _h = 'h'.charCodeAt(0);
|
||||
var _i = 'i'.charCodeAt(0);
|
||||
var _l = 'l'.charCodeAt(0);
|
||||
var _p = 'p'.charCodeAt(0);
|
||||
var _r = 'r'.charCodeAt(0);
|
||||
var _s = 's'.charCodeAt(0);
|
||||
var _t = 't'.charCodeAt(0);
|
||||
var _u = 'u'.charCodeAt(0);
|
||||
var _x = 'x'.charCodeAt(0);
|
||||
var _z = 'z'.charCodeAt(0);
|
||||
@@ -514,7 +510,7 @@ export class Scanner {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (ch !== _CAR && ch !== _LFD && ch != _NWL) {
|
||||
if (ch !== _CAR && ch !== _LFD && ch !== _NWL) {
|
||||
this.stream.advance(1);
|
||||
result.push(String.fromCharCode(ch));
|
||||
return true;
|
||||
|
||||
@@ -122,7 +122,7 @@ export class CSSLanguageService implements ILanguageService {
|
||||
|
||||
private updateResources():void {
|
||||
|
||||
var t1 = new Date().getTime(), n = 0;
|
||||
var n = 0;
|
||||
|
||||
this.resourceService.all().filter((element) => this._isMyMirrorModel(element)).forEach((model:EditorCommon.IMirrorModel) => {
|
||||
// Reparse changes or new models
|
||||
|
||||
@@ -12,7 +12,6 @@ import URI from 'vs/base/common/uri';
|
||||
import EditorCommon = require('vs/editor/common/editorCommon');
|
||||
import Modes = require('vs/editor/common/modes');
|
||||
import nls = require('vs/nls');
|
||||
import scanner = require('vs/languages/css/common/parser/cssScanner');
|
||||
|
||||
export class CSSIntellisense {
|
||||
|
||||
@@ -267,7 +266,7 @@ export class CSSIntellisense {
|
||||
type: 'function'
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -281,7 +280,7 @@ export class CSSIntellisense {
|
||||
type: 'value'
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -295,7 +294,7 @@ export class CSSIntellisense {
|
||||
type: 'value'
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -309,7 +308,7 @@ export class CSSIntellisense {
|
||||
type: 'value'
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
if (entry.restrictions.indexOf('line-width') !== -1) {
|
||||
languageFacts.lineWidthKeywords.forEach((lineWidth) => {
|
||||
result.push({
|
||||
@@ -318,7 +317,7 @@ export class CSSIntellisense {
|
||||
type: 'value'
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -333,7 +332,7 @@ export class CSSIntellisense {
|
||||
type: 'value'
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
if (entry.restrictions.indexOf('box') !== -1 || geometryBox !== -1) {
|
||||
for (var box in languageFacts.boxKeywords) {
|
||||
result.push({
|
||||
@@ -343,7 +342,7 @@ export class CSSIntellisense {
|
||||
type: 'value'
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -357,7 +356,7 @@ export class CSSIntellisense {
|
||||
type: 'function'
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -371,7 +370,7 @@ export class CSSIntellisense {
|
||||
type: 'function'
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -385,7 +384,7 @@ export class CSSIntellisense {
|
||||
type: 'function'
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ export class LintVisitor implements nodes.IVisitor {
|
||||
if (missingVendorSpecific || needsStandard) {
|
||||
keyframes.data[name].nodes.forEach(addVendorSpecificWarnings);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ export function typeFromNode(node:nodes.Node):IType {
|
||||
case nodes.NodeType.NumericValue: return typeFromNumeric(<nodes.NumericValue> node);
|
||||
case nodes.NodeType.HexColorValue: return SimpleType.Color;
|
||||
case nodes.NodeType.Identifier: return typeFromLiteral(node);
|
||||
case nodes.NodeType.Function: return typeFromFunction(<nodes.Function> node);
|
||||
case nodes.NodeType.FunctionArgument: return typeFromFunctionArgument(<nodes.FunctionArgument> node);
|
||||
}
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ export class HTMLMode<W extends htmlWorker.HTMLWorker> extends AbstractMode<W> i
|
||||
open: key,
|
||||
close: map[key]
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import platform = require('vs/platform/platform');
|
||||
import ConfigurationRegistry = require('vs/platform/configuration/common/configurationRegistry');
|
||||
import {LanguageExtensions} from 'vs/editor/common/modes/languageExtensionPoint';
|
||||
import Options = require('vs/languages/typescript/common/options');
|
||||
import defaults = Options.javaScriptOptions;
|
||||
let defaults = Options.javaScriptOptions;
|
||||
|
||||
if (!env.enableTypeScriptServiceModeForJS) {
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ export class JavaScriptWorker extends typeScriptWorker.TypeScriptWorker2 {
|
||||
|
||||
// perform the semantic checks on the rewritten project and
|
||||
// filter/translate the error markers
|
||||
var missing: URI[] = [];
|
||||
var project = this._projectService.getProject(resource, this._fancyRewriters);
|
||||
var result = diagnostics.getSemanticDiagnostics(project.languageService, resource, this._options);
|
||||
if (result) {
|
||||
|
||||
@@ -173,8 +173,6 @@ export class JSONIntellisense {
|
||||
var matchingSchemas: Parser.IApplicableSchema[] = [];
|
||||
doc.validate(schema.schema, matchingSchemas, node.start);
|
||||
|
||||
var collectPromises: WinJS.TPromise<Modes.ISuggestion[]>[] = [];
|
||||
|
||||
matchingSchemas.forEach((s) => {
|
||||
if (s.node === node && !s.inverted) {
|
||||
var schemaProperties = s.schema.properties;
|
||||
@@ -266,7 +264,6 @@ export class JSONIntellisense {
|
||||
|
||||
public getValueSuggestions(resource: URI, schema: SchemaService.ResolvedSchema, doc: Parser.JSONDocument, node: Parser.ASTNode, offset: number, collector: JsonWorker.ISuggestionsCollector) : void {
|
||||
|
||||
var collectPromises: WinJS.TPromise<Modes.ISuggestion[]>[] = [];
|
||||
if (!node) {
|
||||
this.addDefaultSuggestion(schema.schema, collector);
|
||||
} else {
|
||||
|
||||
@@ -264,7 +264,7 @@ export class LessParser extends cssParser.Parser {
|
||||
}
|
||||
if (!node.setSelector(this._parseSimpleSelector())) {
|
||||
return this.finish(node, errors.ParseError.SelectorExpected);
|
||||
};
|
||||
}
|
||||
if (!this.accept(scanner.TokenType.ParenthesisR)) {
|
||||
return this.finish(node, errors.ParseError.RightParenthesisExpected);
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
import scanner = require('vs/languages/css/common/parser/cssScanner');
|
||||
|
||||
var _PRC = '%'.charCodeAt(0);
|
||||
var _LPA = '('.charCodeAt(0);
|
||||
var _FSL = '/'.charCodeAt(0);
|
||||
var _NWL = '\n'.charCodeAt(0);
|
||||
var _CAR = '\r'.charCodeAt(0);
|
||||
|
||||
@@ -217,7 +217,7 @@ export class SassParser extends cssParser.Parser {
|
||||
if (this.accept(scanner.TokenType.AtKeyword, '@extend')) {
|
||||
if (!node.setSelector(this._parseSimpleSelector())) {
|
||||
return this.finish(node, errors.ParseError.SelectorExpected);
|
||||
};
|
||||
}
|
||||
if (this.accept(scanner.TokenType.Exclamation)) {
|
||||
if (!this.accept(scanner.TokenType.Ident, 'optional', true)) {
|
||||
return this.finish(node, errors.ParseError.UnknownKeyword);
|
||||
@@ -282,7 +282,7 @@ export class SassParser extends cssParser.Parser {
|
||||
this.consumeToken(); // @if or if
|
||||
if (!node.setExpression(this._parseBinaryExpr())) {
|
||||
return this.finish(node, errors.ParseError.ExpressionExpected);
|
||||
};
|
||||
}
|
||||
this._parseBody(node, parseStatement);
|
||||
if (this.accept(scanner.TokenType.AtKeyword, '@else')) {
|
||||
if (this.peek(scanner.TokenType.Ident, 'if')) {
|
||||
@@ -311,13 +311,13 @@ export class SassParser extends cssParser.Parser {
|
||||
}
|
||||
if (!node.addChild(this._parseBinaryExpr())) {
|
||||
return this.finish(node, errors.ParseError.ExpressionExpected, [ scanner.TokenType.CurlyR ]);
|
||||
};
|
||||
}
|
||||
if (!this.accept(scanner.TokenType.Ident, 'to') && !this.accept(scanner.TokenType.Ident, 'through')) {
|
||||
return this.finish(node, sassErrors.ParseError.ThroughOrToExpected, [ scanner.TokenType.CurlyR ]);
|
||||
}
|
||||
if (!node.addChild(this._parseBinaryExpr())) {
|
||||
return this.finish(node, errors.ParseError.ExpressionExpected, [ scanner.TokenType.CurlyR ]);
|
||||
};
|
||||
}
|
||||
|
||||
return this._parseBody(node, parseStatement);
|
||||
}
|
||||
@@ -337,7 +337,7 @@ export class SassParser extends cssParser.Parser {
|
||||
}
|
||||
if (!node.addChild(this._parseExpr())) {
|
||||
return this.finish(node, errors.ParseError.ExpressionExpected, [ scanner.TokenType.CurlyR ]);
|
||||
};
|
||||
}
|
||||
|
||||
return this._parseBody(node, parseStatement);
|
||||
}
|
||||
@@ -351,7 +351,7 @@ export class SassParser extends cssParser.Parser {
|
||||
this.consumeToken(); // @while
|
||||
if (!node.addChild(this._parseBinaryExpr())) {
|
||||
return this.finish(node, errors.ParseError.ExpressionExpected, [ scanner.TokenType.CurlyR ]);
|
||||
};
|
||||
}
|
||||
|
||||
return this._parseBody(node, parseStatement);
|
||||
}
|
||||
|
||||
@@ -540,25 +540,6 @@ class ProjectResolver implements typescript.IProjectResolver2 {
|
||||
}
|
||||
}
|
||||
|
||||
private static _lookUpProjects(resource: URI, index: { [dirname: string]: URI }): URI[] {
|
||||
|
||||
var dirnames = paths.dirnames(resource.fsPath),
|
||||
element = dirnames.next(),
|
||||
result: URI[];
|
||||
|
||||
while (!element.done) {
|
||||
var project = index[element.value];
|
||||
if (project) {
|
||||
if (!result) {
|
||||
result = [];
|
||||
}
|
||||
result.push(project);
|
||||
}
|
||||
element = dirnames.next();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static _asChangeKind(fileChangeType: Files.FileChangeType): typescript.ChangeKind {
|
||||
switch (fileChangeType) {
|
||||
case Files.FileChangeType.UPDATED: return typescript.ChangeKind.Changed;
|
||||
|
||||
@@ -44,7 +44,6 @@ export function getSemanticDiagnostics(languageService: ts.LanguageService, reso
|
||||
if (options.validate.enable && options.validate.semanticValidation) {
|
||||
|
||||
var diagnostics = languageService.getSemanticDiagnostics(resource.toString()),
|
||||
unresolved: string[] = [],
|
||||
classifier = createDiagnosticClassifier(options);
|
||||
|
||||
for (var i = 0; i < diagnostics.length; i++) {
|
||||
@@ -205,7 +204,6 @@ function _getJavaScriptSemanticDiagnostics(sourceFile: ts.SourceFile, options: t
|
||||
case ts.SyntaxKind.GetAccessor:
|
||||
case ts.SyntaxKind.SetAccessor:
|
||||
case ts.SyntaxKind.FunctionExpression:
|
||||
case ts.SyntaxKind.FunctionDeclaration:
|
||||
case ts.SyntaxKind.FunctionDeclaration:
|
||||
var functionDeclaration = <ts.FunctionLikeDeclaration>node;
|
||||
if (checkModifiers(functionDeclaration.modifiers) ||
|
||||
|
||||
@@ -55,13 +55,6 @@ export class QuickFixMainActions {
|
||||
resourcePath = resource.fsPath;
|
||||
}
|
||||
|
||||
var currentFolderPath = strings.rtrim(paths.dirname(resourcePath), '/');
|
||||
var relativeDtsPath = paths.relative(currentFolderPath, dtsFile);
|
||||
|
||||
var action = {
|
||||
edits: []
|
||||
};
|
||||
|
||||
return this._fileService.resolveFile(dtsFileResource).then(file => {
|
||||
// file exists already
|
||||
return {
|
||||
|
||||
@@ -15,8 +15,7 @@ class ES6PropertyDeclarator implements rewriter.ISyntaxRewriter {
|
||||
|
||||
public computeEdits(context: rewriter.AnalyzerContext): void {
|
||||
|
||||
var offset = 0,
|
||||
sourceText = context.sourceFile.getFullText(),
|
||||
var sourceText = context.sourceFile.getFullText(),
|
||||
pattern = /\bclass\b/g;
|
||||
|
||||
while (pattern.test(sourceText)) {
|
||||
|
||||
@@ -373,9 +373,9 @@ export class ImportsAndExportsCollector implements rewriter.ISyntaxRewriter {
|
||||
// // this._context.newReplace(node.offset, node.length - node.name.length, 'export var ');
|
||||
// }
|
||||
|
||||
private _translateNamedExportExpresson(node:NamedExportExpresson):void {
|
||||
this._context.newAppend(`export var ${node.name}:any;\n`);
|
||||
}
|
||||
// private _translateNamedExportExpresson(node:NamedExportExpresson):void {
|
||||
// this._context.newAppend(`export var ${node.name}:any;\n`);
|
||||
// }
|
||||
|
||||
private _translateDefineNode(node:DefineNode):void {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import platform = require('vs/platform/platform');
|
||||
import modesExtensions = require('vs/editor/common/modes/modesRegistry');
|
||||
import ConfigurationRegistry = require('vs/platform/configuration/common/configurationRegistry');
|
||||
import options = require('vs/languages/typescript/common/options');
|
||||
import defaults = options.typeScriptOptions;
|
||||
let defaults = options.typeScriptOptions;
|
||||
|
||||
// ----- Registration and Configuration --------------------------------------------------------
|
||||
|
||||
|
||||
@@ -9,11 +9,10 @@ import 'vs/css!./media/activityBarPart';
|
||||
import nls = require('vs/nls');
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import {Builder, $} from 'vs/base/browser/builder';
|
||||
import {Action, IAction} from 'vs/base/common/actions';
|
||||
import {Action} from 'vs/base/common/actions';
|
||||
import errors = require('vs/base/common/errors');
|
||||
import {ActionsOrientation, ActionBar, IActionItem} from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import {Scope, IActionBarRegistry, Extensions as ActionBarExtensions} from 'vs/workbench/browser/actionBarRegistry';
|
||||
import {CONTEXT, ToolBar} from 'vs/base/browser/ui/toolbar/toolbar';
|
||||
import {ToolBar} from 'vs/base/browser/ui/toolbar/toolbar';
|
||||
import {Registry} from 'vs/platform/platform';
|
||||
import {CompositeEvent, EventType} from 'vs/workbench/common/events';
|
||||
import {ViewletDescriptor, ViewletRegistry, Extensions as ViewletExtensions} from 'vs/workbench/browser/viewlet';
|
||||
@@ -187,41 +186,41 @@ export class ActivitybarPart extends Part implements IActivityService {
|
||||
// this.globalToolBar.setActions(prepareActions(primaryActions), prepareActions(secondaryActions))();
|
||||
// }
|
||||
|
||||
private getGlobalActions(primary: boolean): IAction[] {
|
||||
let actionBarRegistry = <IActionBarRegistry>Registry.as(ActionBarExtensions.Actionbar);
|
||||
// private getGlobalActions(primary: boolean): IAction[] {
|
||||
// let actionBarRegistry = <IActionBarRegistry>Registry.as(ActionBarExtensions.Actionbar);
|
||||
|
||||
// Collect actions from actionbar contributor
|
||||
let actions: IAction[];
|
||||
if (primary) {
|
||||
actions = actionBarRegistry.getActionBarActionsForContext(Scope.GLOBAL, CONTEXT);
|
||||
} else {
|
||||
actions = actionBarRegistry.getSecondaryActionBarActionsForContext(Scope.GLOBAL, CONTEXT);
|
||||
}
|
||||
// // Collect actions from actionbar contributor
|
||||
// let actions: IAction[];
|
||||
// if (primary) {
|
||||
// actions = actionBarRegistry.getActionBarActionsForContext(Scope.GLOBAL, CONTEXT);
|
||||
// } else {
|
||||
// actions = actionBarRegistry.getSecondaryActionBarActionsForContext(Scope.GLOBAL, CONTEXT);
|
||||
// }
|
||||
|
||||
return actions.map((action: Action) => {
|
||||
if (primary) {
|
||||
let keybinding: string = null;
|
||||
let keys = this.keybindingService.lookupKeybindings(action.id).map(k => this.keybindingService.getLabelFor(k));
|
||||
if (keys && keys.length) {
|
||||
keybinding = keys[0];
|
||||
}
|
||||
// return actions.map((action: Action) => {
|
||||
// if (primary) {
|
||||
// let keybinding: string = null;
|
||||
// let keys = this.keybindingService.lookupKeybindings(action.id).map(k => this.keybindingService.getLabelFor(k));
|
||||
// if (keys && keys.length) {
|
||||
// keybinding = keys[0];
|
||||
// }
|
||||
|
||||
let actionItem = actionBarRegistry.getActionItemForContext(Scope.GLOBAL, CONTEXT, action);
|
||||
// let actionItem = actionBarRegistry.getActionItemForContext(Scope.GLOBAL, CONTEXT, action);
|
||||
|
||||
if (!actionItem) {
|
||||
actionItem = new ActivityActionItem(action, action.label, keybinding);
|
||||
}
|
||||
// if (!actionItem) {
|
||||
// actionItem = new ActivityActionItem(action, action.label, keybinding);
|
||||
// }
|
||||
|
||||
if (actionItem instanceof ActivityActionItem) {
|
||||
(<ActivityActionItem> actionItem).keybinding = keybinding;
|
||||
}
|
||||
// if (actionItem instanceof ActivityActionItem) {
|
||||
// (<ActivityActionItem> actionItem).keybinding = keybinding;
|
||||
// }
|
||||
|
||||
this.activityActionItems[action.id] = actionItem;
|
||||
}
|
||||
// this.activityActionItems[action.id] = actionItem;
|
||||
// }
|
||||
|
||||
return action;
|
||||
});
|
||||
}
|
||||
// return action;
|
||||
// });
|
||||
// }
|
||||
|
||||
public dispose(): void {
|
||||
if (this.viewletSwitcherBar) {
|
||||
|
||||
@@ -33,9 +33,6 @@ function getEnvironment(): IEnvironment {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
// The amd loader has the global scope assigned to this.
|
||||
const globalRequire = this.require;
|
||||
|
||||
function _spawnSharedProcess(): cp.ChildProcess {
|
||||
// Make sure the nls configuration travels to the plugin host.
|
||||
const opts = {
|
||||
|
||||
@@ -15,16 +15,8 @@ import { Executable, ExecutableParser, Config as ProcessConfig} from 'vs/base/c
|
||||
|
||||
import { ProblemMatcher, Config as ProblemMatcherConfig, ProblemMatcherParser, registry as ProblemMatcherRegistry } from 'vs/platform/markers/common/problemMatcher';
|
||||
|
||||
import { IPluginDescription } from 'vs/platform/plugins/common/plugins';
|
||||
|
||||
export namespace Config {
|
||||
|
||||
export namespace ShowOutput {
|
||||
let always: string = 'always';
|
||||
let silent: string = 'silent';
|
||||
let never: string = 'never';
|
||||
}
|
||||
|
||||
/**
|
||||
* The description of a task.
|
||||
*/
|
||||
@@ -256,7 +248,7 @@ export class TaskParser extends Parser {
|
||||
// TODO@Dirk: provide JSON schema here
|
||||
// });
|
||||
|
||||
const extensionPoint: string = 'tasks';
|
||||
// const extensionPoint: string = 'tasks';
|
||||
|
||||
export class TaskRegistry {
|
||||
private tasks: IStringDictionary<Task>;
|
||||
@@ -278,25 +270,25 @@ export class TaskRegistry {
|
||||
*/
|
||||
}
|
||||
|
||||
private onDescriptions(descriptions: IPluginDescription[]) {
|
||||
descriptions.forEach(description => {
|
||||
let extensions = description.contributes[extensionPoint];
|
||||
if (Types.isArray(extensions)) {
|
||||
(<Config.Task[]>extensions).forEach(this.onTask, this);
|
||||
} else {
|
||||
this.onTask(extensions);
|
||||
}
|
||||
});
|
||||
}
|
||||
// private onDescriptions(descriptions: IPluginDescription[]) {
|
||||
// descriptions.forEach(description => {
|
||||
// let extensions = description.contributes[extensionPoint];
|
||||
// if (Types.isArray(extensions)) {
|
||||
// (<Config.Task[]>extensions).forEach(this.onTask, this);
|
||||
// } else {
|
||||
// this.onTask(extensions);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
private onTask(json: Config.Task): void {
|
||||
let logger: ILogger = {
|
||||
log: (message) => { console.warn(message); }
|
||||
};
|
||||
let parser = new TaskParser(ProblemMatcherRegistry, logger);
|
||||
let result = parser.parse(json, { emptyExecutable: true, emptyCommand: true });
|
||||
this.add(result);
|
||||
}
|
||||
// private onTask(json: Config.Task): void {
|
||||
// let logger: ILogger = {
|
||||
// log: (message) => { console.warn(message); }
|
||||
// };
|
||||
// let parser = new TaskParser(ProblemMatcherRegistry, logger);
|
||||
// let result = parser.parse(json, { emptyExecutable: true, emptyCommand: true });
|
||||
// this.add(result);
|
||||
// }
|
||||
|
||||
public add(task: Task): void {
|
||||
this.tasks[task.id] = task;
|
||||
|
||||
@@ -70,7 +70,7 @@ export class ProcessRunnerSystem extends EventEmitter implements ITaskSystem {
|
||||
}
|
||||
this.errorsShown = false;
|
||||
let parseResult = FileConfig.parse(fileConfig, this);
|
||||
this.validationStatus = parseResult.validationStatus;;
|
||||
this.validationStatus = parseResult.validationStatus;
|
||||
this.configuration = parseResult.configuration;
|
||||
this.defaultBuildTaskIdentifier = parseResult.defaultBuildTaskIdentifier;
|
||||
this.defaultTestTaskIdentifier = parseResult.defaultTestTaskIdentifier;
|
||||
|
||||
Reference in New Issue
Block a user