提交 ba9c869b 编写于 作者: M Matt Bierner

Organize all imports in ts extension

上级 0986ab36
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import TypeScriptServiceClientHost from './typeScriptServiceClientHost'; import TypeScriptServiceClientHost from './typeScriptServiceClientHost';
import { Command } from './utils/commandManager'; import { Command } from './utils/commandManager';
import { Lazy } from './utils/lazy'; import { Lazy } from './utils/lazy';
import { openOrCreateConfigFile, isImplicitProjectConfigFile } from './utils/tsconfig'; import { isImplicitProjectConfigFile, openOrCreateConfigFile } from './utils/tsconfig';
import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { CodeLensProvider, CodeLens, CancellationToken, TextDocument, Range, Uri, Position, Event, EventEmitter } from 'vscode'; import { CancellationToken, CodeLens, CodeLensProvider, Event, EventEmitter, Position, Range, TextDocument, Uri } from 'vscode';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import * as typeConverters from '../utils/typeConverters';
import { escapeRegExp } from '../utils/regexp'; import { escapeRegExp } from '../utils/regexp';
import * as typeConverters from '../utils/typeConverters';
export class ReferencesCodeLens extends CodeLens { export class ReferencesCodeLens extends CodeLens {
constructor( constructor(
......
...@@ -11,8 +11,8 @@ import API from '../utils/api'; ...@@ -11,8 +11,8 @@ import API from '../utils/api';
import { Delayer } from '../utils/async'; import { Delayer } from '../utils/async';
import { disposeAll } from '../utils/dispose'; import { disposeAll } from '../utils/dispose';
import * as languageModeIds from '../utils/languageModeIds'; import * as languageModeIds from '../utils/languageModeIds';
import * as typeConverters from '../utils/typeConverters';
import { ResourceMap } from '../utils/resourceMap'; import { ResourceMap } from '../utils/resourceMap';
import * as typeConverters from '../utils/typeConverters';
enum BufferKind { enum BufferKind {
TypeScript = 1, TypeScript = 1,
......
...@@ -4,20 +4,20 @@ ...@@ -4,20 +4,20 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import { ITypeScriptServiceClient } from '../typescriptService';
import TypingsStatus from '../utils/typingsStatus';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import * as PConst from '../protocol.const'; import * as PConst from '../protocol.const';
import { ITypeScriptServiceClient } from '../typescriptService';
import API from '../utils/api';
import { applyCodeAction } from '../utils/codeAction';
import { Command, CommandManager } from '../utils/commandManager';
import * as Previewer from '../utils/previewer'; import * as Previewer from '../utils/previewer';
import * as typeConverters from '../utils/typeConverters'; import * as typeConverters from '../utils/typeConverters';
import TypingsStatus from '../utils/typingsStatus';
import * as nls from 'vscode-nls';
import { applyCodeAction } from '../utils/codeAction';
import { CommandManager, Command } from '../utils/commandManager';
import FileConfigurationManager from './fileConfigurationManager'; import FileConfigurationManager from './fileConfigurationManager';
import API from '../utils/api';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { TextDocument, Position, CancellationToken, Location } from 'vscode'; import { CancellationToken, Location, Position, TextDocument } from 'vscode';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import * as typeConverters from '../utils/typeConverters'; import * as typeConverters from '../utils/typeConverters';
export default class TypeScriptDefinitionProviderBase { export default class TypeScriptDefinitionProviderBase {
constructor( constructor(
protected readonly client: ITypeScriptServiceClient protected readonly client: ITypeScriptServiceClient
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { ResourceMap } from '../utils/resourceMap'; import { ResourceMap } from '../utils/resourceMap';
export class DiagnosticSet { export class DiagnosticSet {
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import { VersionDependentRegistration } from '../utils/dependentRegistration';
import API from '../utils/api'; import API from '../utils/api';
import { VersionDependentRegistration } from '../utils/dependentRegistration';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import * as typeConverters from '../utils/typeConverters'; import * as typeConverters from '../utils/typeConverters';
class TypeScriptDocumentHighlightProvider implements vscode.DocumentHighlightProvider { class TypeScriptDocumentHighlightProvider implements vscode.DocumentHighlightProvider {
public constructor( public constructor(
private readonly client: ITypeScriptServiceClient private readonly client: ITypeScriptServiceClient
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import * as PConst from '../protocol.const'; import * as PConst from '../protocol.const';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import * as typeConverters from '../utils/typeConverters';
import API from '../utils/api'; import API from '../utils/api';
import * as typeConverters from '../utils/typeConverters';
const getSymbolKind = (kind: string): vscode.SymbolKind => { const getSymbolKind = (kind: string): vscode.SymbolKind => {
switch (kind) { switch (kind) {
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { workspace as Workspace, FormattingOptions, TextDocument, CancellationToken, window, Disposable, workspace, WorkspaceConfiguration } from 'vscode'; import { CancellationToken, Disposable, FormattingOptions, TextDocument, window, workspace as Workspace, workspace, WorkspaceConfiguration } from 'vscode';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import API from '../utils/api'; import API from '../utils/api';
import { isTypeScriptDocument } from '../utils/languageModeIds'; import { isTypeScriptDocument } from '../utils/languageModeIds';
function objsAreEqual<T>(a: T, b: T): boolean { function objsAreEqual<T>(a: T, b: T): boolean {
let keys = Object.keys(a); let keys = Object.keys(a);
for (let i = 0; i < keys.length; i++) { for (let i = 0; i < keys.length; i++) {
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import * as typeConverters from '../utils/typeConverters';
import { VersionDependentRegistration } from '../utils/dependentRegistration';
import API from '../utils/api'; import API from '../utils/api';
import { VersionDependentRegistration } from '../utils/dependentRegistration';
import * as typeConverters from '../utils/typeConverters';
class TypeScriptFoldingProvider implements vscode.FoldingRangeProvider { class TypeScriptFoldingProvider implements vscode.FoldingRangeProvider {
public constructor( public constructor(
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import { tagsMarkdownPreview } from '../utils/previewer'; import { tagsMarkdownPreview } from '../utils/previewer';
import * as typeConverters from '../utils/typeConverters'; import * as typeConverters from '../utils/typeConverters';
class TypeScriptHoverProvider implements vscode.HoverProvider { class TypeScriptHoverProvider implements vscode.HoverProvider {
public constructor( public constructor(
......
...@@ -7,11 +7,11 @@ import * as vscode from 'vscode'; ...@@ -7,11 +7,11 @@ import * as vscode from 'vscode';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import API from '../utils/api';
import { Command, CommandManager } from '../utils/commandManager'; import { Command, CommandManager } from '../utils/commandManager';
import { VersionDependentRegistration } from '../utils/dependentRegistration';
import * as typeconverts from '../utils/typeConverters'; import * as typeconverts from '../utils/typeConverters';
import FileConfigurationManager from './fileConfigurationManager'; import FileConfigurationManager from './fileConfigurationManager';
import { VersionDependentRegistration } from '../utils/dependentRegistration';
import API from '../utils/api';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
......
...@@ -9,9 +9,9 @@ import { ITypeScriptServiceClient } from '../typescriptService'; ...@@ -9,9 +9,9 @@ import { ITypeScriptServiceClient } from '../typescriptService';
import API from '../utils/api'; import API from '../utils/api';
import { Command, CommandManager } from '../utils/commandManager'; import { Command, CommandManager } from '../utils/commandManager';
import { VersionDependentRegistration } from '../utils/dependentRegistration'; import { VersionDependentRegistration } from '../utils/dependentRegistration';
import TelemetryReporter from '../utils/telemetry';
import * as typeConverters from '../utils/typeConverters'; import * as typeConverters from '../utils/typeConverters';
import FormattingOptionsManager from './fileConfigurationManager'; import FormattingOptionsManager from './fileConfigurationManager';
import TelemetryReporter from '../utils/telemetry';
class ApplyRefactoringCommand implements Command { class ApplyRefactoringCommand implements Command {
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import * as typeConverters from '../utils/typeConverters';
import API from '../utils/api'; import API from '../utils/api';
import * as typeConverters from '../utils/typeConverters';
class TypeScriptReferenceSupport implements vscode.ReferenceProvider { class TypeScriptReferenceSupport implements vscode.ReferenceProvider {
public constructor( public constructor(
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import * as typeConverters from '../utils/typeConverters'; import * as typeConverters from '../utils/typeConverters';
class TypeScriptRenameProvider implements vscode.RenameProvider { class TypeScriptRenameProvider implements vscode.RenameProvider {
public constructor( public constructor(
private readonly client: ITypeScriptServiceClient private readonly client: ITypeScriptServiceClient
......
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
import * as fs from 'fs'; import * as fs from 'fs';
import * as path from 'path'; import * as path from 'path';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import TsConfigProvider, { TSConfig } from '../utils/tsconfigProvider'; import { Lazy } from '../utils/lazy';
import { isImplicitProjectConfigFile } from '../utils/tsconfig'; import { isImplicitProjectConfigFile } from '../utils/tsconfig';
import TsConfigProvider, { TSConfig } from '../utils/tsconfigProvider';
import * as nls from 'vscode-nls';
import { Lazy } from '../utils/lazy';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
type AutoDetect = 'on' | 'off' | 'build' | 'watch'; type AutoDetect = 'on' | 'off' | 'build' | 'watch';
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as jsonc from 'jsonc-parser'; import * as jsonc from 'jsonc-parser';
import { dirname, join } from 'path';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { join, dirname } from 'path';
class TsconfigLinkProvider implements vscode.DocumentLinkProvider { class TsconfigLinkProvider implements vscode.DocumentLinkProvider {
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import API from '../utils/api';
import { VersionDependentRegistration } from '../utils/dependentRegistration'; import { VersionDependentRegistration } from '../utils/dependentRegistration';
import DefinitionProviderBase from './definitionProviderBase'; import DefinitionProviderBase from './definitionProviderBase';
import API from '../utils/api';
export default class TypeScriptTypeDefinitionProvider extends DefinitionProviderBase implements vscode.TypeDefinitionProvider { export default class TypeScriptTypeDefinitionProvider extends DefinitionProviderBase implements vscode.TypeDefinitionProvider {
public provideTypeDefinition(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken | boolean): Promise<vscode.Definition | undefined> { public provideTypeDefinition(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken | boolean): Promise<vscode.Definition | undefined> {
......
...@@ -3,20 +3,20 @@ ...@@ -3,20 +3,20 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import { basename } from 'path'; import { basename } from 'path';
import * as vscode from 'vscode';
import TypeScriptServiceClient from './typescriptServiceClient'; import { CachedNavTreeResponse } from './features/baseCodeLensProvider';
import TypingsStatus from './utils/typingsStatus'; import { DiagnosticKind, DiagnosticsManager } from './features/diagnostics';
import FileConfigurationManager from './features/fileConfigurationManager'; import FileConfigurationManager from './features/fileConfigurationManager';
import TypeScriptServiceClient from './typescriptServiceClient';
import { CommandManager } from './utils/commandManager'; import { CommandManager } from './utils/commandManager';
import { DiagnosticsManager, DiagnosticKind } from './features/diagnostics'; import { disposeAll } from './utils/dispose';
import { LanguageDescription } from './utils/languageDescription';
import * as fileSchemes from './utils/fileSchemes'; import * as fileSchemes from './utils/fileSchemes';
import { CachedNavTreeResponse } from './features/baseCodeLensProvider'; import { LanguageDescription } from './utils/languageDescription';
import { memoize } from './utils/memoize'; import { memoize } from './utils/memoize';
import { disposeAll } from './utils/dispose';
import TelemetryReporter from './utils/telemetry'; import TelemetryReporter from './utils/telemetry';
import TypingsStatus from './utils/typingsStatus';
const validateSetting = 'validate.enable'; const validateSetting = 'validate.enable';
const suggestionSetting = 'suggestionActions.enabled'; const suggestionSetting = 'suggestionActions.enabled';
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
import { Diagnostic, DiagnosticRelatedInformation, DiagnosticSeverity, DiagnosticTag, Disposable, Memento, Range, Uri, workspace } from 'vscode'; import { Diagnostic, DiagnosticRelatedInformation, DiagnosticSeverity, DiagnosticTag, Disposable, Memento, Range, Uri, workspace } from 'vscode';
import { DiagnosticKind } from './features/diagnostics'; import { DiagnosticKind } from './features/diagnostics';
import FileConfigurationManager from './features/fileConfigurationManager'; import FileConfigurationManager from './features/fileConfigurationManager';
import { UpdateImportsOnFileRenameHandler } from './features/updatePathsOnRename';
import LanguageProvider from './languageProvider'; import LanguageProvider from './languageProvider';
import * as Proto from './protocol'; import * as Proto from './protocol';
import * as PConst from './protocol.const'; import * as PConst from './protocol.const';
...@@ -24,7 +25,6 @@ import { TypeScriptServerPlugin } from './utils/plugins'; ...@@ -24,7 +25,6 @@ import { TypeScriptServerPlugin } from './utils/plugins';
import * as typeConverters from './utils/typeConverters'; import * as typeConverters from './utils/typeConverters';
import TypingsStatus, { AtaProgressReporter } from './utils/typingsStatus'; import TypingsStatus, { AtaProgressReporter } from './utils/typingsStatus';
import VersionStatus from './utils/versionStatus'; import VersionStatus from './utils/versionStatus';
import { UpdateImportsOnFileRenameHandler } from './features/updatePathsOnRename';
// Style check diagnostics that can be reported as warnings // Style check diagnostics that can be reported as warnings
const styleCheckDiagnostics = [ const styleCheckDiagnostics = [
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { CancellationToken, Uri, Event } from 'vscode'; import { CancellationToken, Event, Uri } from 'vscode';
import BufferSyncSupport from './features/bufferSyncSupport';
import * as Proto from './protocol'; import * as Proto from './protocol';
import API from './utils/api'; import API from './utils/api';
import { TypeScriptServerPlugin } from './utils/plugins';
import { TypeScriptServiceConfiguration } from './utils/configuration'; import { TypeScriptServiceConfiguration } from './utils/configuration';
import Logger from './utils/logger'; import Logger from './utils/logger';
import BufferSyncSupport from './features/bufferSyncSupport'; import { TypeScriptServerPlugin } from './utils/plugins';
export interface ITypeScriptServiceClient { export interface ITypeScriptServiceClient {
/** /**
......
...@@ -4,34 +4,34 @@ ...@@ -4,34 +4,34 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as cp from 'child_process'; import * as cp from 'child_process';
import * as path from 'path';
import * as fs from 'fs'; import * as fs from 'fs';
import * as path from 'path';
import * as electron from './utils/electron'; import { CancellationToken, commands, Disposable, env, EventEmitter, Memento, MessageItem, Uri, window, workspace } from 'vscode';
import { Reader, ICallback } from './utils/wireProtocol'; import * as nls from 'vscode-nls';
import BufferSyncSupport from './features/bufferSyncSupport';
import { workspace, window, Uri, CancellationToken, Disposable, Memento, MessageItem, EventEmitter, commands, env } from 'vscode'; import { DiagnosticKind } from './features/diagnostics';
import * as Proto from './protocol'; import * as Proto from './protocol';
import { ITypeScriptServiceClient } from './typescriptService'; import { ITypeScriptServiceClient } from './typescriptService';
import { TypeScriptServerPlugin } from './utils/plugins';
import Logger from './utils/logger';
import * as is from './utils/is';
import TelemetryReporter from './utils/telemetry';
import Tracer from './utils/tracer';
import API from './utils/api'; import API from './utils/api';
import { TsServerLogLevel, TypeScriptServiceConfiguration } from './utils/configuration';
import * as nls from 'vscode-nls'; import { disposeAll } from './utils/dispose';
import { TypeScriptServiceConfiguration, TsServerLogLevel } from './utils/configuration'; import * as electron from './utils/electron';
import { TypeScriptVersionProvider, TypeScriptVersion } from './utils/versionProvider';
import { TypeScriptVersionPicker } from './utils/versionPicker';
import * as fileSchemes from './utils/fileSchemes'; import * as fileSchemes from './utils/fileSchemes';
import { inferredProjectConfig } from './utils/tsconfig'; import * as is from './utils/is';
import LogDirectoryProvider from './utils/logDirectoryProvider'; import LogDirectoryProvider from './utils/logDirectoryProvider';
import { disposeAll } from './utils/dispose'; import Logger from './utils/logger';
import { DiagnosticKind } from './features/diagnostics';
import { TypeScriptPluginPathsProvider } from './utils/pluginPathsProvider'; import { TypeScriptPluginPathsProvider } from './utils/pluginPathsProvider';
import BufferSyncSupport from './features/bufferSyncSupport'; import { TypeScriptServerPlugin } from './utils/plugins';
import TelemetryReporter from './utils/telemetry';
import Tracer from './utils/tracer';
import { inferredProjectConfig } from './utils/tsconfig';
import { TypeScriptVersionPicker } from './utils/versionPicker';
import { TypeScriptVersion, TypeScriptVersionProvider } from './utils/versionProvider';
import { ICallback, Reader } from './utils/wireProtocol';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { WorkspaceEdit, workspace } from 'vscode'; import { workspace, WorkspaceEdit } from 'vscode';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import { ITypeScriptServiceClient } from '../typescriptService'; import { ITypeScriptServiceClient } from '../typescriptService';
import * as typeConverters from './typeConverters'; import * as typeConverters from './typeConverters';
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved. * Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { WorkspaceConfiguration, workspace } from 'vscode'; import { workspace, WorkspaceConfiguration } from 'vscode';
import * as arrays from './arrays'; import * as arrays from './arrays';
export enum TsServerLogLevel { export enum TsServerLogLevel {
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { OutputChannel, window } from 'vscode'; import { OutputChannel, window } from 'vscode';
import * as nls from 'vscode-nls';
import * as is from './is'; import * as is from './is';
import { memoize } from './memoize'; import { memoize } from './memoize';
import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
export default class Logger { export default class Logger {
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as path from 'path'; import * as path from 'path';
import { workspace } from 'vscode'; import { workspace } from 'vscode';
import { TypeScriptServiceConfiguration } from './configuration'; import { TypeScriptServiceConfiguration } from './configuration';
import { RelativeWorkspacePathResolver } from './relativePathResolver'; import { RelativeWorkspacePathResolver } from './relativePathResolver';
export class TypeScriptPluginPathsProvider { export class TypeScriptPluginPathsProvider {
public readonly relativePathResolver: RelativeWorkspacePathResolver = new RelativeWorkspacePathResolver(); public readonly relativePathResolver: RelativeWorkspacePathResolver = new RelativeWorkspacePathResolver();
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as Proto from '../protocol';
import { MarkdownString } from 'vscode'; import { MarkdownString } from 'vscode';
import * as Proto from '../protocol';
function getTagBodyText(tag: Proto.JSDocTagInfo): string | undefined { function getTagBodyText(tag: Proto.JSDocTagInfo): string | undefined {
if (!tag.text) { if (!tag.text) {
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { ITypeScriptServiceClient } from '../typescriptService';
import { loadMessageBundle } from 'vscode-nls'; import { loadMessageBundle } from 'vscode-nls';
import { openOrCreateConfigFile, isImplicitProjectConfigFile } from './tsconfig'; import { ITypeScriptServiceClient } from '../typescriptService';
import TelemetryReporter from './telemetry'; import TelemetryReporter from './telemetry';
import { isImplicitProjectConfigFile, openOrCreateConfigFile } from './tsconfig';
const localize = loadMessageBundle(); const localize = loadMessageBundle();
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { workspace } from 'vscode'; import { workspace } from 'vscode';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import Logger from './logger'; import Logger from './logger';
enum Trace { enum Trace {
Off, Off,
Messages, Messages,
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import * as path from 'path'; import * as path from 'path';
import * as vscode from 'vscode';
import * as Proto from '../protocol'; import * as Proto from '../protocol';
import { TypeScriptServiceConfiguration } from './configuration'; import { TypeScriptServiceConfiguration } from './configuration';
export function isImplicitProjectConfigFile(configFileName: string) { export function isImplicitProjectConfigFile(configFileName: string) {
return configFileName.indexOf('/dev/null/') === 0; return configFileName.indexOf('/dev/null/') === 0;
} }
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { MessageItem, workspace, Disposable, ProgressLocation, window } from 'vscode'; import { Disposable, MessageItem, ProgressLocation, window, workspace } from 'vscode';
import { ITypeScriptServiceClient } from '../typescriptService';
import { loadMessageBundle } from 'vscode-nls'; import { loadMessageBundle } from 'vscode-nls';
import { ITypeScriptServiceClient } from '../typescriptService';
const localize = loadMessageBundle(); const localize = loadMessageBundle();
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import { commands, Memento, QuickPickItem, Uri, window, workspace } from 'vscode';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';
import { TypeScriptVersionProvider, TypeScriptVersion } from './versionProvider'; import { TypeScriptVersion, TypeScriptVersionProvider } from './versionProvider';
import { Memento, commands, Uri, window, QuickPickItem, workspace } from 'vscode';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
* Copyright (c) Microsoft Corporation. All rights reserved. * Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information. * Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as fs from 'fs';
import * as path from 'path';
import { window, workspace } from 'vscode';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';
import API from './api';
import { TypeScriptServiceConfiguration } from './configuration';
import { RelativeWorkspacePathResolver } from './relativePathResolver';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
import * as path from 'path';
import * as fs from 'fs';
import { workspace, window } from 'vscode';
import { TypeScriptServiceConfiguration } from './configuration';
import { RelativeWorkspacePathResolver } from './relativePathResolver';
import API from './api';
export class TypeScriptVersion { export class TypeScriptVersion {
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/ *--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { TypeScriptVersion } from './versionProvider';
import * as languageModeIds from './languageModeIds'; import * as languageModeIds from './languageModeIds';
import { TypeScriptVersion } from './versionProvider';
export default class VersionStatus { export default class VersionStatus {
private readonly _onChangeEditorSub: vscode.Disposable; private readonly _onChangeEditorSub: vscode.Disposable;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册