diff --git a/extensions/json/server/src/jsoncontributions/projectJSONContribution.ts b/extensions/json/server/src/jsoncontributions/projectJSONContribution.ts index 7fa207b3627..059c0c06579 100644 --- a/extensions/json/server/src/jsoncontributions/projectJSONContribution.ts +++ b/extensions/json/server/src/jsoncontributions/projectJSONContribution.ts @@ -6,9 +6,8 @@ import { MarkedString, CompletionItemKind, CompletionItem } from 'vscode-languageserver'; import Strings = require('../utils/strings'); -import { XHRResponse, getErrorStatusDescription } from 'request-light'; +import { XHRResponse, getErrorStatusDescription, xhr } from 'request-light'; import { JSONWorkerContribution, JSONPath, CompletionsCollector } from 'vscode-json-languageservice'; -import { xhr } from 'request-light'; import * as nls from 'vscode-nls'; const localize = nls.loadMessageBundle(); diff --git a/extensions/markdown/src/extension.ts b/extensions/markdown/src/extension.ts index 79136041ea1..3b442fa98a3 100644 --- a/extensions/markdown/src/extension.ts +++ b/extensions/markdown/src/extension.ts @@ -7,10 +7,8 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import { ExtensionContext, TextDocumentContentProvider, EventEmitter, Event, Uri, ViewColumn } from 'vscode'; import TelemetryReporter from 'vscode-extension-telemetry'; - interface IPackageInfo { name: string; version: string; @@ -19,7 +17,7 @@ interface IPackageInfo { var telemetryReporter: TelemetryReporter; -export function activate(context: ExtensionContext) { +export function activate(context: vscode.ExtensionContext) { let packageInfo = getPackageInfo(context); telemetryReporter = packageInfo && new TelemetryReporter(packageInfo.name, packageInfo.version, packageInfo.aiKey); @@ -63,21 +61,21 @@ function isMarkdownFile(document: vscode.TextDocument) { && document.uri.scheme !== 'markdown'; // prevent processing of own documents } -function getMarkdownUri(uri: Uri) { +function getMarkdownUri(uri: vscode.Uri) { return uri.with({ scheme: 'markdown', path: uri.path + '.rendered', query: uri.toString() }); } -function showPreview(uri?: Uri, sideBySide: boolean = false) { +function showPreview(uri?: vscode.Uri, sideBySide: boolean = false) { let resource = uri; - if (!(resource instanceof Uri)) { + if (!(resource instanceof vscode.Uri)) { if (vscode.window.activeTextEditor) { // we are relaxed and don't check for markdown files resource = vscode.window.activeTextEditor.document.uri; } } - if (!(resource instanceof Uri)) { + if (!(resource instanceof vscode.Uri)) { if (!vscode.window.activeTextEditor) { // this is most likely toggling the preview return vscode.commands.executeCommand('markdown.showSource'); @@ -93,16 +91,16 @@ function showPreview(uri?: Uri, sideBySide: boolean = false) { telemetryReporter.sendTelemetryEvent('openPreview', { where: sideBySide ? 'sideBySide' : 'inPlace', - how: (uri instanceof Uri) ? 'action' : 'pallete' + how: (uri instanceof vscode.Uri) ? 'action' : 'pallete' }); return thenable; } -function getViewColumn(sideBySide): ViewColumn { +function getViewColumn(sideBySide): vscode.ViewColumn { const active = vscode.window.activeTextEditor; if (!active) { - return ViewColumn.One; + return vscode.ViewColumn.One; } if (!sideBySide) { @@ -110,21 +108,21 @@ function getViewColumn(sideBySide): ViewColumn { } switch (active.viewColumn) { - case ViewColumn.One: - return ViewColumn.Two; - case ViewColumn.Two: - return ViewColumn.Three; + case vscode.ViewColumn.One: + return vscode.ViewColumn.Two; + case vscode.ViewColumn.Two: + return vscode.ViewColumn.Three; } return active.viewColumn; } -function showSource(mdUri: Uri) { +function showSource(mdUri: vscode.Uri) { if (!mdUri) { return vscode.commands.executeCommand('workbench.action.navigateBack'); } - const docUri = Uri.parse(mdUri.query); + const docUri = vscode.Uri.parse(mdUri.query); for (let editor of vscode.window.visibleTextEditors) { if (editor.document.uri.toString() === docUri.toString()) { @@ -137,7 +135,7 @@ function showSource(mdUri: Uri) { }); } -function getPackageInfo(context: ExtensionContext): IPackageInfo { +function getPackageInfo(context: vscode.ExtensionContext): IPackageInfo { let extensionPackage = require(context.asAbsolutePath('./package.json')); if (extensionPackage) { return { @@ -154,13 +152,13 @@ interface IRenderer { render(text: string): string; } -class MDDocumentContentProvider implements TextDocumentContentProvider { - private _context: ExtensionContext; - private _onDidChange = new EventEmitter(); +class MDDocumentContentProvider implements vscode.TextDocumentContentProvider { + private _context: vscode.ExtensionContext; + private _onDidChange = new vscode.EventEmitter(); private _waiting: boolean; private _renderer: IRenderer; - constructor(context: ExtensionContext) { + constructor(context: vscode.ExtensionContext) { this._context = context; this._waiting = false; this._renderer = this.createRenderer(); @@ -191,31 +189,31 @@ class MDDocumentContentProvider implements TextDocumentContentProvider { return path.normalize(p + '/') === path.normalize(path.resolve(p) + '/'); } - private fixHref(resource: Uri, href: string): string { + private fixHref(resource: vscode.Uri, href: string): string { if (href) { // Use href if it is already an URL - if (Uri.parse(href).scheme) { + if (vscode.Uri.parse(href).scheme) { return href; } // Use href as file URI if it is absolute if (this.isAbsolute(href)) { - return Uri.file(href).toString(); + return vscode.Uri.file(href).toString(); } // use a workspace relative path if there is a workspace let rootPath = vscode.workspace.rootPath; if (rootPath) { - return Uri.file(path.join(rootPath, href)).toString(); + return vscode.Uri.file(path.join(rootPath, href)).toString(); } // otherwise look relative to the markdown file - return Uri.file(path.join(path.dirname(resource.fsPath), href)).toString(); + return vscode.Uri.file(path.join(path.dirname(resource.fsPath), href)).toString(); } return href; } - private computeCustomStyleSheetIncludes(uri: Uri): string[] { + private computeCustomStyleSheetIncludes(uri: vscode.Uri): string[] { const styles = vscode.workspace.getConfiguration('markdown')['styles']; if (styles && Array.isArray(styles) && styles.length > 0) { return styles.map((style) => { @@ -225,9 +223,9 @@ class MDDocumentContentProvider implements TextDocumentContentProvider { return []; } - public provideTextDocumentContent(uri: Uri): Thenable { + public provideTextDocumentContent(uri: vscode.Uri): Thenable { - return vscode.workspace.openTextDocument(Uri.parse(uri.query)).then(document => { + return vscode.workspace.openTextDocument(vscode.Uri.parse(uri.query)).then(document => { const head = [].concat( '', '', @@ -252,11 +250,11 @@ class MDDocumentContentProvider implements TextDocumentContentProvider { }); } - get onDidChange(): Event { + get onDidChange(): vscode.Event { return this._onDidChange.event; } - public update(uri: Uri) { + public update(uri: vscode.Uri) { if (!this._waiting) { this._waiting = true; setTimeout(() => { diff --git a/src/vs/base/browser/ui/list/listView.ts b/src/vs/base/browser/ui/list/listView.ts index ca2eb4f58d4..dc2ae29ed42 100644 --- a/src/vs/base/browser/ui/list/listView.ts +++ b/src/vs/base/browser/ui/list/listView.ts @@ -9,8 +9,7 @@ import { Gesture, EventType as TouchEventType, GestureEvent } from 'vs/base/brow import * as DOM from 'vs/base/browser/dom'; import { domEvent } from 'vs/base/browser/event'; import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; -import { ScrollEvent } from 'vs/base/common/scrollable'; -import { ScrollbarVisibility } from 'vs/base/common/scrollable'; +import { ScrollEvent, ScrollbarVisibility } from 'vs/base/common/scrollable'; import { RangeMap, IRange, relativeComplement, each } from './rangeMap'; import { IDelegate, IRenderer } from './list'; import { RowCache, IRow } from './rowCache'; diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 7f0572ad9d3..82f5a627f99 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -19,9 +19,8 @@ import dnd = require('./treeDnd'); import { ArrayIterator, MappedIterator } from 'vs/base/common/iterator'; import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; -import { HeightMap } from 'vs/base/parts/tree/browser/treeViewModel'; +import { HeightMap, IViewItem } from 'vs/base/parts/tree/browser/treeViewModel'; import _ = require('vs/base/parts/tree/browser/tree'); -import { IViewItem } from 'vs/base/parts/tree/browser/treeViewModel'; import { KeyCode } from 'vs/base/common/keyCodes'; export interface IRow { diff --git a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts b/src/vs/editor/browser/standalone/standaloneCodeEditor.ts index 0fadbcf9948..c97af5d72aa 100644 --- a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts +++ b/src/vs/editor/browser/standalone/standaloneCodeEditor.ts @@ -8,10 +8,9 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { ICommandService } from 'vs/platform/commands/common/commands'; +import { ICommandService, ICommandHandler } from 'vs/platform/commands/common/commands'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { ICommandHandler } from 'vs/platform/commands/common/commands'; import { IActionDescriptor, ICodeEditorWidgetCreationOptions, IDiffEditorOptions, IModel, IModelChangedEvent, EventType } from 'vs/editor/common/editorCommon'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; diff --git a/src/vs/editor/browser/standalone/standaloneEditor.ts b/src/vs/editor/browser/standalone/standaloneEditor.ts index 32e25f36ab7..32b24183e46 100644 --- a/src/vs/editor/browser/standalone/standaloneEditor.ts +++ b/src/vs/editor/browser/standalone/standaloneEditor.ts @@ -6,6 +6,9 @@ import 'vs/css!./media/standalone-tokens'; import * as editorCommon from 'vs/editor/common/editorCommon'; +/* tslint:disable:duplicate-imports */ +import { IModel } from 'vs/editor/common/editorCommon'; +/* tslint:disable:duplicate-imports */ import { ContentWidgetPositionPreference, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; import { StandaloneEditor, IStandaloneCodeEditor, StandaloneDiffEditor, IStandaloneDiffEditor, IEditorConstructionOptions, IDiffEditorConstructionOptions } from 'vs/editor/browser/standalone/standaloneCodeEditor'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; @@ -15,7 +18,6 @@ import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { OpenerService } from 'vs/platform/opener/browser/openerService'; import { IOpenerService } from 'vs/platform/opener/common/opener'; -import { IModel } from 'vs/editor/common/editorCommon'; import { Colorizer, IColorizerElementOptions, IColorizerOptions } from 'vs/editor/browser/standalone/colorizer'; import { SimpleEditorService, SimpleEditorModelResolverService } from 'vs/editor/browser/standalone/simpleServices'; import * as modes from 'vs/editor/common/modes'; diff --git a/src/vs/editor/browser/viewParts/selections/selections.ts b/src/vs/editor/browser/viewParts/selections/selections.ts index e32ff141296..957ef0f34d8 100644 --- a/src/vs/editor/browser/viewParts/selections/selections.ts +++ b/src/vs/editor/browser/viewParts/selections/selections.ts @@ -9,8 +9,7 @@ import 'vs/css!./selections'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay'; import { ViewContext } from 'vs/editor/common/view/viewContext'; -import { HorizontalRange, LineVisibleRanges } from 'vs/editor/common/view/renderingContext'; -import { IRenderingContext } from 'vs/editor/common/view/renderingContext'; +import { HorizontalRange, LineVisibleRanges, IRenderingContext } from 'vs/editor/common/view/renderingContext'; import { Range } from 'vs/editor/common/core/range'; const enum CornerStyle { diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index 0aea7fc6b70..701cbc95996 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -8,12 +8,11 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { ReplaceCommand, ReplaceCommandWithoutChangingPosition, ReplaceCommandWithOffsetCursorState } from 'vs/editor/common/commands/replaceCommand'; import { SingleCursorState, EditOperationResult, CursorColumns, CursorConfiguration, ICursorSimpleModel } from 'vs/editor/common/controller/cursorCommon'; import { Range } from 'vs/editor/common/core/range'; -import { CursorChangeReason, ICommand } from 'vs/editor/common/editorCommon'; +import { CursorChangeReason, ICommand, ITokenizedModel } from 'vs/editor/common/editorCommon'; import * as strings from 'vs/base/common/strings'; import { ShiftCommand } from 'vs/editor/common/commands/shiftCommand'; import { Selection } from 'vs/editor/common/core/selection'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; -import { ITokenizedModel } from 'vs/editor/common/editorCommon'; import { IndentAction } from 'vs/editor/common/modes/languageConfiguration'; import { CharCode } from 'vs/base/common/charCode'; import { SurroundSelectionCommand } from 'vs/editor/common/commands/surroundSelectionCommand'; diff --git a/src/vs/editor/common/modes/supports/electricCharacter.ts b/src/vs/editor/common/modes/supports/electricCharacter.ts index 94f242b51d3..f535112a13e 100644 --- a/src/vs/editor/common/modes/supports/electricCharacter.ts +++ b/src/vs/editor/common/modes/supports/electricCharacter.ts @@ -5,8 +5,7 @@ 'use strict'; import { ScopedLineTokens, ignoreBracketsInToken } from 'vs/editor/common/modes/supports'; -import { BracketsUtils } from 'vs/editor/common/modes/supports/richEditBrackets'; -import { RichEditBrackets } from 'vs/editor/common/modes/supports/richEditBrackets'; +import { BracketsUtils, RichEditBrackets } from 'vs/editor/common/modes/supports/richEditBrackets'; import { IAutoClosingPairConditional, IBracketElectricCharacterContribution, StandardAutoClosingPairConditional } from 'vs/editor/common/modes/languageConfiguration'; /** diff --git a/src/vs/editor/common/services/bulkEdit.ts b/src/vs/editor/common/services/bulkEdit.ts index bb19d42bfcd..36045eaacca 100644 --- a/src/vs/editor/common/services/bulkEdit.ts +++ b/src/vs/editor/common/services/bulkEdit.ts @@ -15,8 +15,7 @@ import { EventType as FileEventType, FileChangesEvent, IFileChange } from 'vs/pl import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; -import { IIdentifiedSingleEditOperation, IModel, IRange, ISelection } from 'vs/editor/common/editorCommon'; -import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { IIdentifiedSingleEditOperation, IModel, IRange, ISelection, ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { IProgressRunner } from 'vs/platform/progress/common/progress'; export interface IResourceEdit { diff --git a/src/vs/editor/contrib/goToDeclaration/common/goToDeclaration.ts b/src/vs/editor/contrib/goToDeclaration/common/goToDeclaration.ts index 84a050524b7..c5ff86b4116 100644 --- a/src/vs/editor/contrib/goToDeclaration/common/goToDeclaration.ts +++ b/src/vs/editor/contrib/goToDeclaration/common/goToDeclaration.ts @@ -9,8 +9,7 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { TPromise } from 'vs/base/common/winjs.base'; import { IReadOnlyModel } from 'vs/editor/common/editorCommon'; import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; -import { DefinitionProviderRegistry } from 'vs/editor/common/modes'; -import { Location } from 'vs/editor/common/modes'; +import { DefinitionProviderRegistry, Location } from 'vs/editor/common/modes'; import { asWinJsPromise } from 'vs/base/common/async'; import { Position } from 'vs/editor/common/core/position'; diff --git a/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts b/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts index c79eedf21d8..dce77c73051 100644 --- a/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts +++ b/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts @@ -17,10 +17,9 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import { onUnexpectedError } from 'vs/base/common/errors'; import Event, { Emitter, chain } from 'vs/base/common/event'; import { domEvent, stop } from 'vs/base/browser/event'; -import { ICommonCodeEditor, ICursorSelectionChangedEvent } from 'vs/editor/common/editorCommon'; +import { ICommonCodeEditor, ICursorSelectionChangedEvent, IConfigurationChangedEvent } from 'vs/editor/common/editorCommon'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { Context, provideSignatureHelp } from '../common/parameterHints'; -import { IConfigurationChangedEvent } from 'vs/editor/common/editorCommon'; import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; const $ = dom.$; diff --git a/src/vs/platform/actions/common/actions.ts b/src/vs/platform/actions/common/actions.ts index 3458e1e1ad2..4ae50dd5f3c 100644 --- a/src/vs/platform/actions/common/actions.ts +++ b/src/vs/platform/actions/common/actions.ts @@ -8,12 +8,11 @@ import URI from 'vs/base/common/uri'; import { IAction, Action } from 'vs/base/common/actions'; import { Promise, TPromise } from 'vs/base/common/winjs.base'; import { SyncDescriptor0, createSyncDescriptor, AsyncDescriptor0 } from 'vs/platform/instantiation/common/descriptors'; -import { IConstructorSignature2, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IConstructorSignature2, IInstantiationService, createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IKeybindings } from 'vs/platform/keybinding/common/keybinding'; import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; export interface ICommandAction { diff --git a/src/vs/workbench/api/node/extHost.contribution.ts b/src/vs/workbench/api/node/extHost.contribution.ts index bc1b43beebe..e7bbcdd21fd 100644 --- a/src/vs/workbench/api/node/extHost.contribution.ts +++ b/src/vs/workbench/api/node/extHost.contribution.ts @@ -5,9 +5,8 @@ 'use strict'; -import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; +import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { Registry } from 'vs/platform/platform'; -import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { MainContext, InstanceCollection } from './extHost.protocol'; diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 5e2c54c7a1f..5d09864595c 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -4,8 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { dispose } from 'vs/base/common/lifecycle'; -import { IDisposable } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import * as paths from 'vs/base/common/paths'; import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index 0b0069572f3..44531538545 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -10,7 +10,6 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadServic import { IResourceEdit } from 'vs/editor/common/services/bulkEdit'; import { TPromise } from 'vs/base/common/winjs.base'; import { fromRange } from 'vs/workbench/api/node/extHostTypeConverters'; -import { Uri, CancellationToken } from 'vscode'; import { MainContext, MainThreadWorkspaceShape } from './extHost.protocol'; import * as vscode from 'vscode'; @@ -30,7 +29,7 @@ export class ExtHostWorkspace { return this._workspacePath; } - getRelativePath(pathOrUri: string | Uri): string { + getRelativePath(pathOrUri: string | vscode.Uri): string { let path: string; if (typeof pathOrUri === 'string') { @@ -46,7 +45,7 @@ export class ExtHostWorkspace { return path; } - findFiles(include: string, exclude: string, maxResults?: number, token?: CancellationToken): Thenable { + findFiles(include: string, exclude: string, maxResults?: number, token?: vscode.CancellationToken): Thenable { const requestId = ExtHostWorkspace._requestIdPool++; const result = this._proxy.$startSearch(include, exclude, maxResults, requestId); if (token) { diff --git a/src/vs/workbench/browser/actions/openSettings.ts b/src/vs/workbench/browser/actions/openSettings.ts index 4ee38a7c997..7febcdf7ca4 100644 --- a/src/vs/workbench/browser/actions/openSettings.ts +++ b/src/vs/workbench/browser/actions/openSettings.ts @@ -15,7 +15,7 @@ import * as strings from 'vs/base/common/strings'; import Event, { Emitter } from 'vs/base/common/event'; import { LinkedMap as Map } from 'vs/base/common/map'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; -import { IEditorRegistry, Extensions as EditorExtensions, EditorOptions } from 'vs/workbench/common/editor'; +import { IEditorRegistry, Extensions as EditorExtensions, EditorOptions, EditorInput } from 'vs/workbench/common/editor'; import { EditorDescriptor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { StringEditorInput } from 'vs/workbench/common/editor/stringEditorInput'; import { ICommonCodeEditor, IEditorViewState } from 'vs/editor/common/editorCommon'; @@ -25,7 +25,6 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IWorkspaceConfigurationService, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; import { Position } from 'vs/platform/editor/common/editor'; -import { EditorInput } from 'vs/workbench/common/editor'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IFileService, IFileOperationResult, FileOperationResult } from 'vs/platform/files/common/files'; diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 39f47cce016..5d217587cc0 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -23,7 +23,7 @@ import { BaseEditor, EditorDescriptor } from 'vs/workbench/browser/parts/editor/ import { IEditorRegistry, Extensions as EditorExtensions, EditorInput, EditorOptions, ConfirmResult, IWorkbenchEditorConfiguration, IEditorDescriptor, TextEditorOptions } from 'vs/workbench/common/editor'; import { SideBySideEditorControl, Rochade, ISideBySideEditorControl, ProgressState } from 'vs/workbench/browser/parts/editor/sideBySideEditorControl'; import { WorkbenchProgressService } from 'vs/workbench/services/progress/browser/progressService'; -import { GroupArrangement } from 'vs/workbench/services/group/common/groupService'; +import { IEditorGroupService, GroupOrientation, GroupArrangement } from 'vs/workbench/services/group/common/groupService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IEditorPart } from 'vs/workbench/services/editor/browser/editorService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; @@ -34,7 +34,6 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IMessageService, IMessageWithAction, Severity } from 'vs/platform/message/common/message'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IEditorGroupService, GroupOrientation } from 'vs/workbench/services/group/common/groupService'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor'; import { EditorStacksModel, EditorGroup, EditorIdentifier } from 'vs/workbench/common/editor/editorStacksModel'; diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index 5afe660386d..fcdf703d901 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -24,10 +24,9 @@ import { IDisposable, combinedDisposable, dispose } from 'vs/base/common/lifecyc import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { IEditorAction, ICommonCodeEditor, IModelContentChangedEvent, IModelOptionsChangedEvent, IModelModeChangedEvent, ICursorPositionChangedEvent } from 'vs/editor/common/editorCommon'; +import { IEditorAction, ICommonCodeEditor, IModelContentChangedEvent, IModelOptionsChangedEvent, IModelModeChangedEvent, ICursorPositionChangedEvent, EndOfLineSequence, EditorType, IModel, IDiffEditorModel, IEditor } from 'vs/editor/common/editorCommon'; import { ICodeEditor, IDiffEditor } from 'vs/editor/browser/editorBrowser'; import { TrimTrailingWhitespaceAction } from 'vs/editor/contrib/linesOperations/common/linesOperations'; -import { EndOfLineSequence, EditorType, IModel, IDiffEditorModel, IEditor } from 'vs/editor/common/editorCommon'; import { IndentUsingSpaces, IndentUsingTabs, DetectIndentation, IndentationToSpacesAction, IndentationToTabsAction } from 'vs/editor/contrib/indentation/common/indentation'; import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor'; import { BaseBinaryResourceEditor } from 'vs/workbench/browser/parts/editor/binaryEditor'; diff --git a/src/vs/workbench/browser/parts/editor/sideBySideEditorControl.ts b/src/vs/workbench/browser/parts/editor/sideBySideEditorControl.ts index 3b93b28f195..b24b834e0c9 100644 --- a/src/vs/workbench/browser/parts/editor/sideBySideEditorControl.ts +++ b/src/vs/workbench/browser/parts/editor/sideBySideEditorControl.ts @@ -30,10 +30,9 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { TabsTitleControl } from 'vs/workbench/browser/parts/editor/tabsTitleControl'; -import { TitleControl } from 'vs/workbench/browser/parts/editor/titleControl'; +import { TitleControl, ITitleAreaControl } from 'vs/workbench/browser/parts/editor/titleControl'; import { NoTabsTitleControl } from 'vs/workbench/browser/parts/editor/noTabsTitleControl'; import { IEditorStacksModel, IStacksModelChangeEvent, IWorkbenchEditorConfiguration, IEditorGroup, EditorOptions, TextEditorOptions, IEditorIdentifier } from 'vs/workbench/common/editor'; -import { ITitleAreaControl } from 'vs/workbench/browser/parts/editor/titleControl'; import { extractResources, IDraggedResource } from 'vs/base/browser/dnd'; import { IWindowService } from 'vs/platform/windows/common/windows'; diff --git a/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts b/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts index e3b4dd40087..2eaeb66a893 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts @@ -9,8 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); import { Action } from 'vs/base/common/actions'; import { IQuickOpenService } from 'vs/workbench/services/quickopen/common/quickOpenService'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { IKeybindings } from 'vs/platform/keybinding/common/keybinding'; +import { IKeybindingService, IKeybindings } from 'vs/platform/keybinding/common/keybinding'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 4130c6b7539..d6b7be026f4 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -9,13 +9,12 @@ import Event, { Emitter } from 'vs/base/common/event'; import * as objects from 'vs/base/common/objects'; import types = require('vs/base/common/types'); import URI from 'vs/base/common/uri'; -import { IEditor, ICommonCodeEditor, IEditorViewState, IEditorOptions as ICodeEditorOptions } from 'vs/editor/common/editorCommon'; +import { IEditor, ICommonCodeEditor, IEditorViewState, IEditorOptions as ICodeEditorOptions, IModel } from 'vs/editor/common/editorCommon'; import { IEditorInput, IEditorModel, IEditorOptions, ITextEditorOptions, IResourceInput, Position } from 'vs/platform/editor/common/editor'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { SyncDescriptor, AsyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; -import { IModel } from 'vs/editor/common/editorCommon'; import { telemetryURIDescriptor } from 'vs/platform/telemetry/common/telemetry'; export enum ConfirmResult { diff --git a/src/vs/workbench/electron-browser/integration.ts b/src/vs/workbench/electron-browser/integration.ts index 1f0a393d56e..8010c7ec0ec 100644 --- a/src/vs/workbench/electron-browser/integration.ts +++ b/src/vs/workbench/electron-browser/integration.ts @@ -31,10 +31,9 @@ import { IWorkspaceConfigurationService } from 'vs/workbench/services/configurat import { ElectronWindow } from 'vs/workbench/electron-browser/window'; import * as browser from 'vs/base/browser/browser'; import { DiffEditorInput, toDiffLabel } from 'vs/workbench/common/editor/diffEditorInput'; -import { Position } from 'vs/platform/editor/common/editor'; +import { Position, IResourceInput } from 'vs/platform/editor/common/editor'; import { EditorInput } from 'vs/workbench/common/editor'; import { IPath, IOpenFileRequest, IWindowConfiguration } from 'vs/workbench/electron-browser/common'; -import { IResourceInput } from 'vs/platform/editor/common/editor'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import URI from 'vs/base/common/uri'; diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index 83f33b6a7f9..e1e2ff555dc 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -19,8 +19,7 @@ import uri from 'vs/base/common/uri'; import strings = require('vs/base/common/strings'); import { IResourceInput } from 'vs/platform/editor/common/editor'; import { EventService } from 'vs/platform/event/common/eventService'; -import { WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspace, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configurationService'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { realpath } from 'vs/base/node/pfs'; diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 375b7e693f1..8876278d130 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -43,7 +43,7 @@ import { getServices } from 'vs/platform/instantiation/common/extensions'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { WorkbenchEditorService } from 'vs/workbench/services/editor/browser/editorService'; import { Position, Parts, IPartService, ILayoutOptions } from 'vs/workbench/services/part/common/partService'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { ContextMenuService } from 'vs/workbench/services/contextview/electron-browser/contextmenuService'; import { WorkbenchKeybindingService } from 'vs/workbench/services/keybinding/electron-browser/keybindingService'; @@ -51,7 +51,6 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { IConfigurationEditingService } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ConfigurationEditingService } from 'vs/workbench/services/configuration/node/configurationEditingService'; import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService'; -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ContextKeyExpr, RawContextKey, IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IActivityService } from 'vs/workbench/services/activity/common/activityService'; diff --git a/src/vs/workbench/parts/contentprovider/common/contentprovider.contribution.ts b/src/vs/workbench/parts/contentprovider/common/contentprovider.contribution.ts index 924f3fc6d0c..34bab8f57eb 100644 --- a/src/vs/workbench/parts/contentprovider/common/contentprovider.contribution.ts +++ b/src/vs/workbench/parts/contentprovider/common/contentprovider.contribution.ts @@ -11,8 +11,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IModel } from 'vs/editor/common/editorCommon'; import JSONContributionRegistry = require('vs/platform/jsonschemas/common/jsonContributionRegistry'); import { Registry } from 'vs/platform/platform'; -import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; -import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; +import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { ITextModelResolverService } from 'vs/platform/textmodelResolver/common/resolver'; let schemaRegistry = Registry.as(JSONContributionRegistry.Extensions.JSONContribution); diff --git a/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.ts b/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.ts index 4cbed3955ca..678345f450d 100644 --- a/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.ts +++ b/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.ts @@ -18,8 +18,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { ViewletRegistry, Extensions as ViewletExtensions, ViewletDescriptor } from 'vs/workbench/browser/viewlet'; import { ITreeExplorer } from 'vs/platform/extensionManagement/common/extensionManagement'; import { toCustomExplorerViewletId, toCustomExplorerViewletCSSClass, isValidViewletId } from 'vs/workbench/parts/explorers/common/treeExplorer'; -import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; -import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; +import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; registerSingleton(ICustomTreeExplorerService, CustomTreeExplorerService); diff --git a/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts b/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts index ed3b0c4f688..5024a6f1baa 100644 --- a/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts +++ b/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts @@ -8,13 +8,12 @@ import nls = require('vs/nls'); import { TPromise } from 'vs/base/common/winjs.base'; import * as DOM from 'vs/base/browser/dom'; import { Builder, $ } from 'vs/base/browser/builder'; -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { CollapsibleViewletView } from 'vs/workbench/browser/viewlet'; import { IAction, IActionRunner } from 'vs/base/common/actions'; import { IMessageService } from 'vs/platform/message/common/message'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ICustomTreeExplorerService } from 'vs/workbench/parts/explorers/common/customTreeExplorerService'; import { ITree } from 'vs/base/parts/tree/browser/tree'; diff --git a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts index 3e9fbdf5a4a..8675cae0586 100644 --- a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts +++ b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts @@ -10,10 +10,9 @@ import errors = require('vs/base/common/errors'); import { toErrorMessage } from 'vs/base/common/errorMessage'; import types = require('vs/base/common/types'); import paths = require('vs/base/common/paths'); -import { IEditorViewState } from 'vs/editor/common/editorCommon'; +import { IEditorViewState, IEditorOptions } from 'vs/editor/common/editorCommon'; import { Action } from 'vs/base/common/actions'; import { Scope } from 'vs/workbench/common/memento'; -import { IEditorOptions } from 'vs/editor/common/editorCommon'; import { VIEWLET_ID, TEXT_FILE_EDITOR_ID } from 'vs/workbench/parts/files/common/files'; import { ITextFileEditorModel } from 'vs/workbench/services/textfile/common/textfiles'; import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor'; diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index 303b193d072..addbe45b02b 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -7,13 +7,12 @@ import 'vs/css!./media/explorerviewlet'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { IAction } from 'vs/base/common/actions'; +import { IAction, IActionRunner } from 'vs/base/common/actions'; import { TPromise } from 'vs/base/common/winjs.base'; import { Dimension, Builder } from 'vs/base/browser/builder'; import { Scope } from 'vs/workbench/common/memento'; import { VIEWLET_ID, ExplorerViewletVisible, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; import { IViewletView, Viewlet } from 'vs/workbench/browser/viewlet'; -import { IActionRunner } from 'vs/base/common/actions'; import { SplitView, Orientation } from 'vs/base/browser/ui/splitview/splitview'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ActionRunner, FileViewletState } from 'vs/workbench/parts/files/browser/views/explorerViewer'; diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index a737574c92e..20016bf8994 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -30,13 +30,12 @@ import { CollapseAction, CollapsibleViewletView } from 'vs/workbench/browser/vie import { FileStat } from 'vs/workbench/parts/files/common/explorerViewModel'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, IWorkspace } from 'vs/platform/workspace/common/workspace'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IEventService } from 'vs/platform/event/common/event'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IProgressService } from 'vs/platform/progress/common/progress'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { RawContextKey, IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index 798dee3fb06..6f1bb39273f 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -36,8 +36,7 @@ import { FileStat, NewStatPlaceholder } from 'vs/workbench/parts/files/common/ex import { DragMouseEvent, IMouseEvent } from 'vs/base/browser/mouseEvent'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IContextViewService, IContextMenuService } from 'vs/platform/contextview/browser/contextView'; diff --git a/src/vs/workbench/parts/files/electron-browser/files.electron.contribution.ts b/src/vs/workbench/parts/files/electron-browser/files.electron.contribution.ts index b08311c24cc..260e21c1f8b 100644 --- a/src/vs/workbench/parts/files/electron-browser/files.electron.contribution.ts +++ b/src/vs/workbench/parts/files/electron-browser/files.electron.contribution.ts @@ -17,10 +17,9 @@ import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } fr import { GlobalNewUntitledFileAction, SaveFileAsAction } from 'vs/workbench/parts/files/browser/fileActions'; import { DirtyFilesTracker } from 'vs/workbench/parts/files/electron-browser/dirtyFilesTracker'; import { OpenFolderAction, OpenFileAction, OpenFileFolderAction, ShowOpenedFileInNewWindow, GlobalRevealInOSAction, GlobalCopyPathAction, CopyPathAction, RevealInOSAction } from 'vs/workbench/parts/files/electron-browser/electronFileActions'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; -import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; class FileViewerActionContributor extends ActionBarContributor { diff --git a/src/vs/workbench/parts/git/browser/gitServices.ts b/src/vs/workbench/parts/git/browser/gitServices.ts index af7ebf5ee61..710a4b6bea4 100644 --- a/src/vs/workbench/parts/git/browser/gitServices.ts +++ b/src/vs/workbench/parts/git/browser/gitServices.ts @@ -12,7 +12,7 @@ import { Action } from 'vs/base/common/actions'; import { isPromiseCanceledError, create as createError } from 'vs/base/common/errors'; import * as mime from 'vs/base/common/mime'; import * as paths from 'vs/base/common/paths'; -import { once } from 'vs/base/common/event'; +import Event, { once } from 'vs/base/common/event'; import { EventEmitter } from 'vs/base/common/eventEmitter'; import { EditorInput } from 'vs/workbench/common/editor'; import { @@ -36,7 +36,6 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import URI from 'vs/base/common/uri'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import Event from 'vs/base/common/event'; import { domEvent } from 'vs/base/browser/event'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; diff --git a/src/vs/workbench/parts/markers/browser/markersPanel.ts b/src/vs/workbench/parts/markers/browser/markersPanel.ts index acca67b0c09..26bf4ce5c15 100644 --- a/src/vs/workbench/parts/markers/browser/markersPanel.ts +++ b/src/vs/workbench/parts/markers/browser/markersPanel.ts @@ -13,7 +13,7 @@ import { Delayer } from 'vs/base/common/async'; import dom = require('vs/base/browser/dom'); import lifecycle = require('vs/base/common/lifecycle'); import builder = require('vs/base/browser/builder'); -import { Action } from 'vs/base/common/actions'; +import { IAction, Action } from 'vs/base/common/actions'; import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -21,7 +21,6 @@ import { IEventService } from 'vs/platform/event/common/event'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { asFileEditorInput } from 'vs/workbench/common/editor'; import { Panel } from 'vs/workbench/browser/panel'; -import { IAction } from 'vs/base/common/actions'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import Constants from 'vs/workbench/parts/markers/common/constants'; import { IProblemsConfiguration, MarkersModel, Marker, Resource, FilterOptions } from 'vs/workbench/parts/markers/common/markersModel'; diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 665b2dfda26..390d6e32403 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -32,7 +32,7 @@ import { Viewlet } from 'vs/workbench/browser/viewlet'; import { Match, FileMatch, SearchModel, FileMatchOrMatch, IChangeEvent } from 'vs/workbench/parts/search/common/searchModel'; import { getExcludes, QueryBuilder } from 'vs/workbench/parts/search/common/searchQuery'; import { MessageType, InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; -import { ISearchProgressItem, ISearchComplete, ISearchQuery, IQueryOptions, ISearchConfiguration } from 'vs/platform/search/common/search'; +import { ISearchService, ISearchProgressItem, ISearchComplete, ISearchQuery, IQueryOptions, ISearchConfiguration } from 'vs/platform/search/common/search'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; @@ -40,7 +40,6 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView import { IEventService } from 'vs/platform/event/common/event'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService } from 'vs/platform/message/common/message'; -import { ISearchService } from 'vs/platform/search/common/search'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; diff --git a/src/vs/workbench/parts/search/common/searchModel.ts b/src/vs/workbench/parts/search/common/searchModel.ts index 2a9cc96160a..6417d807813 100644 --- a/src/vs/workbench/parts/search/common/searchModel.ts +++ b/src/vs/workbench/parts/search/common/searchModel.ts @@ -14,15 +14,13 @@ import URI from 'vs/base/common/uri'; import { LinkedMap } from 'vs/base/common/map'; import { ArraySet } from 'vs/base/common/set'; import Event, { Emitter, fromPromise, stopwatch, any } from 'vs/base/common/event'; -import * as Search from 'vs/platform/search/common/search'; -import { ISearchProgressItem, ISearchComplete, ISearchQuery } from 'vs/platform/search/common/search'; +import { ISearchService, ISearchProgressItem, ISearchComplete, ISearchQuery, IPatternInfo, IFileMatch } from 'vs/platform/search/common/search'; import { ReplacePattern } from 'vs/platform/search/common/replace'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { Range } from 'vs/editor/common/core/range'; import { IModel, IModelDeltaDecoration, OverviewRulerLane, TrackedRangeStickiness, IModelDecorationOptions } from 'vs/editor/common/editorCommon'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IModelService } from 'vs/editor/common/services/modelService'; -import { ISearchService } from 'vs/platform/search/common/search'; import { IReplaceService } from 'vs/workbench/parts/search/common/replace'; import { IProgressRunner } from 'vs/platform/progress/common/progress'; import { RangeHighlightDecorations } from 'vs/workbench/common/editor/rangeDecorations'; @@ -115,7 +113,7 @@ export class FileMatch extends Disposable { private _updateScheduler: RunOnceScheduler; private _modelDecorations: string[] = []; - constructor(private _query: Search.IPatternInfo, private _parent: SearchResult, private rawMatch: Search.IFileMatch, + constructor(private _query: IPatternInfo, private _parent: SearchResult, private rawMatch: IFileMatch, @IModelService private modelService: IModelService, @IReplaceService private replaceService: IReplaceService) { super(); this._resource = this.rawMatch.resource; @@ -324,7 +322,7 @@ export class SearchResult extends Disposable { private _fileMatches: LinkedMap; private _unDisposedFileMatches: LinkedMap; - private _query: Search.IPatternInfo = null; + private _query: IPatternInfo = null; private _showHighlights: boolean; private _replacingAll: boolean = false; @@ -338,7 +336,7 @@ export class SearchResult extends Disposable { this._rangeHighlightDecorations = this.instantiationService.createInstance(RangeHighlightDecorations); } - public set query(query: Search.IPatternInfo) { + public set query(query: IPatternInfo) { this._query = query; } @@ -346,7 +344,7 @@ export class SearchResult extends Disposable { return this._searchModel; } - public add(raw: Search.IFileMatch[], silent: boolean = false): void { + public add(raw: IFileMatch[], silent: boolean = false): void { let changed: FileMatch[] = []; raw.forEach((rawFileMatch) => { if (!this._fileMatches.has(rawFileMatch.resource)) { diff --git a/src/vs/workbench/parts/search/test/common/searchModel.test.ts b/src/vs/workbench/parts/search/test/common/searchModel.test.ts index 9b1d0c90c69..7d161fcfc43 100644 --- a/src/vs/workbench/parts/search/test/common/searchModel.test.ts +++ b/src/vs/workbench/parts/search/test/common/searchModel.test.ts @@ -12,9 +12,8 @@ import { PPromise } from 'vs/base/common/winjs.base'; import { nullEvent } from 'vs/base/common/timer'; import { SearchModel } from 'vs/workbench/parts/search/common/searchModel'; import URI from 'vs/base/common/uri'; -import { IFileMatch, ILineMatch } from 'vs/platform/search/common/search'; +import { IFileMatch, ILineMatch, ISearchService, ISearchComplete, ISearchProgressItem, IUncachedSearchStats } from 'vs/platform/search/common/search'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { ISearchService, ISearchComplete, ISearchProgressItem, IUncachedSearchStats } from 'vs/platform/search/common/search'; import { Range } from 'vs/editor/common/core/range'; import { createMockModelService } from 'vs/test/utils/servicesTestUtils'; import { IModelService } from 'vs/editor/common/services/modelService'; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts index bdcfbc343e8..558b19e4eda 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts @@ -3,8 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; -import { IConfiguration } from 'vs/editor/common/config/defaultConfig'; +import { IConfiguration, DefaultConfig } from 'vs/editor/common/config/defaultConfig'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ITerminalConfiguration, ITerminalConfigHelper, ITerminalFont, IShell } from 'vs/workbench/parts/terminal/common/terminal'; import { Platform } from 'vs/base/common/platform'; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index befcd148f66..fc14d30d0f5 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -8,7 +8,7 @@ import nls = require('vs/nls'); import platform = require('vs/base/common/platform'); import { Action, IAction } from 'vs/base/common/actions'; import { Builder, Dimension } from 'vs/base/browser/builder'; -import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; +import { IActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -18,7 +18,6 @@ import { ITerminalService, ITerminalFont, TERMINAL_PANEL_ID } from 'vs/workbench import { IThemeService } from 'vs/workbench/services/themes/common/themeService'; import { KillTerminalAction, CreateNewTerminalAction, SwitchTerminalInstanceAction, SwitchTerminalInstanceActionItem, CopyTerminalSelectionAction, TerminalPasteAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; import { Panel } from 'vs/workbench/browser/panel'; -import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import { TPromise } from 'vs/base/common/winjs.base'; import { getBaseThemeId } from 'vs/platform/theme/common/themes'; diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index fec134a1860..6f786810f5f 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -14,13 +14,12 @@ import pkg from 'vs/platform/package'; import product from 'vs/platform/product'; import URI from 'vs/base/common/uri'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ReleaseNotesInput } from 'vs/workbench/parts/update/electron-browser/releaseNotesInput'; import { IRequestService } from 'vs/platform/request/node/request'; import { asText } from 'vs/base/node/request'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { Keybinding } from 'vs/base/common/keybinding'; -import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; diff --git a/src/vs/workbench/parts/watermark/browser/watermark.ts b/src/vs/workbench/parts/watermark/browser/watermark.ts index 8a33c252f26..1fd0b79ed1c 100644 --- a/src/vs/workbench/parts/watermark/browser/watermark.ts +++ b/src/vs/workbench/parts/watermark/browser/watermark.ts @@ -14,8 +14,7 @@ import { Parts, IPartService } from 'vs/workbench/services/part/common/partServi import { Registry } from 'vs/platform/platform'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; -import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; +import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; interface WatermarkEntry { diff --git a/src/vs/workbench/services/history/browser/history.ts b/src/vs/workbench/services/history/browser/history.ts index e9580766c42..b6b6d3f4abd 100644 --- a/src/vs/workbench/services/history/browser/history.ts +++ b/src/vs/workbench/services/history/browser/history.ts @@ -12,7 +12,7 @@ import nls = require('vs/nls'); import labels = require('vs/base/common/labels'); import URI from 'vs/base/common/uri'; import product from 'vs/platform/product'; -import { IEditor as IBaseEditor } from 'vs/platform/editor/common/editor'; +import { IEditor as IBaseEditor, IEditorInput, ITextEditorOptions, IResourceInput } from 'vs/platform/editor/common/editor'; import { EditorInput, IGroupEvent, IEditorRegistry, Extensions, asFileEditorInput, IEditorGroup } from 'vs/workbench/common/editor'; import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -20,7 +20,6 @@ import { IEventService } from 'vs/platform/event/common/event'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { FileChangesEvent, EventType, FileChangeType } from 'vs/platform/files/common/files'; import { Selection } from 'vs/editor/common/core/selection'; -import { IEditorInput, ITextEditorOptions, IResourceInput } from 'vs/platform/editor/common/editor'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; diff --git a/src/vs/workbench/test/browser/services.test.ts b/src/vs/workbench/test/browser/services.test.ts index 7a03f81c330..f4a2775b857 100644 --- a/src/vs/workbench/test/browser/services.test.ts +++ b/src/vs/workbench/test/browser/services.test.ts @@ -9,7 +9,7 @@ import * as assert from 'assert'; import { IAction, IActionItem } from 'vs/base/common/actions'; import { Promise, TPromise } from 'vs/base/common/winjs.base'; import paths = require('vs/base/common/paths'); -import { IEditorControl } from 'vs/platform/editor/common/editor'; +import { IEditorControl, Position, Direction, IEditor } from 'vs/platform/editor/common/editor'; import URI from 'vs/base/common/uri'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { EditorInput, EditorOptions, TextEditorOptions } from 'vs/workbench/common/editor'; @@ -17,16 +17,14 @@ import { StringEditorInput } from 'vs/workbench/common/editor/stringEditorInput' import { StringEditorModel } from 'vs/workbench/common/editor/stringEditorModel'; import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEditorInput'; import { workbenchInstantiationService } from 'vs/test/utils/servicesTestUtils'; -import { Viewlet } from 'vs/workbench/browser/viewlet'; +import { Viewlet, ViewletDescriptor } from 'vs/workbench/browser/viewlet'; import { IPanel } from 'vs/workbench/common/panel'; import { WorkbenchProgressService, ScopedService } from 'vs/workbench/services/progress/browser/progressService'; import { DelegatingWorkbenchEditorService, WorkbenchEditorService, IEditorPart } from 'vs/workbench/services/editor/browser/editorService'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IViewlet } from 'vs/workbench/common/viewlet'; -import { Position, Direction, IEditor } from 'vs/platform/editor/common/editor'; import { Emitter } from 'vs/base/common/event'; -import { ViewletDescriptor } from 'vs/workbench/browser/viewlet'; let activeViewlet: Viewlet = {}; let activeEditor: BaseEditor = { diff --git a/src/vs/workbench/test/common/editor/untitledEditor.test.ts b/src/vs/workbench/test/common/editor/untitledEditor.test.ts index 79318810459..10cfeb47b08 100644 --- a/src/vs/workbench/test/common/editor/untitledEditor.test.ts +++ b/src/vs/workbench/test/common/editor/untitledEditor.test.ts @@ -8,10 +8,9 @@ import URI from 'vs/base/common/uri'; import * as assert from 'assert'; import { join } from 'vs/base/common/paths'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { workbenchInstantiationService } from 'vs/test/utils/servicesTestUtils'; import { UntitledEditorModel } from 'vs/workbench/common/editor/untitledEditorModel'; -import { UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; class ServiceAccessor { constructor( @IUntitledEditorService public untitledEditorService: UntitledEditorService) { diff --git a/tslint.json b/tslint.json index 97740e17fd1..2df923a4d21 100644 --- a/tslint.json +++ b/tslint.json @@ -53,6 +53,7 @@ "target": "**/{common,browser,workbench}/**", "restrictions": "{**/vs/**,assert}" } - ] + ], + "duplicate-imports": true } }