diff --git a/build/monaco/monaco.d.ts.recipe b/build/monaco/monaco.d.ts.recipe index bf43bc715f4..f535b53c444 100644 --- a/build/monaco/monaco.d.ts.recipe +++ b/build/monaco/monaco.d.ts.recipe @@ -57,18 +57,18 @@ declare module monaco { declare module monaco.editor { -#includeAll(vs/editor/browser/standalone/standaloneEditor;modes.=>languages.;editorCommon.=>): +#includeAll(vs/editor/standalone/browser/standaloneEditor;modes.=>languages.;editorCommon.=>): #include(vs/editor/common/services/standaloneThemeService): BuiltinTheme, IStandaloneThemeData, IColors #include(vs/editor/common/modes/supports/tokenization): ITokenThemeRule #include(vs/editor/common/services/webWorker): MonacoWebWorker, IWebWorkerOptions -#include(vs/editor/browser/standalone/standaloneCodeEditor): IEditorConstructionOptions, IDiffEditorConstructionOptions, IStandaloneCodeEditor, IStandaloneDiffEditor +#include(vs/editor/standalone/browser/standaloneCodeEditor): IEditorConstructionOptions, IDiffEditorConstructionOptions, IStandaloneCodeEditor, IStandaloneDiffEditor export interface ICommandHandler { (...args:any[]): void; } #include(vs/platform/contextkey/common/contextkey): IContextKey -#include(vs/editor/browser/standalone/standaloneServices): IEditorOverrideServices +#include(vs/editor/standalone/browser/standaloneServices): IEditorOverrideServices #include(vs/platform/markers/common/markers): IMarkerData -#include(vs/editor/browser/standalone/colorizer): IColorizerOptions, IColorizerElementOptions +#include(vs/editor/standalone/browser/colorizer): IColorizerOptions, IColorizerElementOptions #include(vs/base/common/scrollable): ScrollbarVisibility #include(vs/platform/theme/common/themeService): ThemeColor #includeAll(vs/editor/common/editorCommon;IMode=>languages.IMode;LanguageIdentifier=>languages.LanguageIdentifier;editorOptions.=>): ISelection, IScrollEvent @@ -81,7 +81,7 @@ export interface ICommandHandler { declare module monaco.languages { -#includeAll(vs/editor/browser/standalone/standaloneLanguages;modes.=>;editorCommon.=>editor.;IMarkerData=>editor.IMarkerData): +#includeAll(vs/editor/standalone/browser/standaloneLanguages;modes.=>;editorCommon.=>editor.;IMarkerData=>editor.IMarkerData): #includeAll(vs/editor/common/modes/languageConfiguration): #includeAll(vs/editor/common/modes;editorCommon.IRange=>IRange;editorCommon.IPosition=>IPosition;editorCommon.=>editor.): #include(vs/editor/common/services/modeService): ILanguageExtensionPoint diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index dd68b25c24b..6704c2bf751 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -20,7 +20,6 @@ import { EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { Configuration } from 'vs/editor/browser/config/configuration'; import * as editorBrowser from 'vs/editor/browser/editorBrowser'; -import { Colorizer } from 'vs/editor/browser/standalone/colorizer'; import { View, IOverlayWidgetData, IContentWidgetData } from 'vs/editor/browser/view/viewImpl'; import { Disposable } from 'vs/base/common/lifecycle'; import Event, { Emitter } from 'vs/base/common/event'; @@ -159,18 +158,6 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito super.dispose(); } - public colorizeModelLine(lineNumber: number, model: editorCommon.IModel = this.model): string { - if (!model) { - return ''; - } - let content = model.getLineContent(lineNumber); - model.forceTokenization(lineNumber); - let tokens = model.getLineTokens(lineNumber); - let inflatedTokens = tokens.inflate(); - let tabSize = model.getOptions().tabSize; - return Colorizer.colorizeLine(content, model.mightContainRTL(), inflatedTokens, tabSize); - } - public createOverviewRuler(cssClassName: string, minimumHeight: number, maximumHeight: number): editorBrowser.IOverviewRuler { return this._view.createOverviewRuler(cssClassName, minimumHeight, maximumHeight); } diff --git a/src/vs/editor/editor.main.ts b/src/vs/editor/editor.main.ts index d8770ae5ade..137a3c96db4 100644 --- a/src/vs/editor/editor.main.ts +++ b/src/vs/editor/editor.main.ts @@ -12,8 +12,8 @@ import 'vs/editor/contrib/quickOpen/browser/quickCommand'; import 'vs/editor/contrib/inspectTokens/browser/inspectTokens'; import { createMonacoBaseAPI } from 'vs/editor/common/standalone/standaloneBase'; -import { createMonacoEditorAPI } from 'vs/editor/browser/standalone/standaloneEditor'; -import { createMonacoLanguagesAPI } from 'vs/editor/browser/standalone/standaloneLanguages'; +import { createMonacoEditorAPI } from 'vs/editor/standalone/browser/standaloneEditor'; +import { createMonacoLanguagesAPI } from 'vs/editor/standalone/browser/standaloneLanguages'; import { EDITOR_DEFAULTS, WrappingIndent } from 'vs/editor/common/config/editorOptions'; // Set defaults for standalone editor diff --git a/src/vs/editor/browser/standalone/colorizer.ts b/src/vs/editor/standalone/browser/colorizer.ts similarity index 100% rename from src/vs/editor/browser/standalone/colorizer.ts rename to src/vs/editor/standalone/browser/colorizer.ts diff --git a/src/vs/editor/browser/standalone/media/standalone-tokens.css b/src/vs/editor/standalone/browser/media/standalone-tokens.css similarity index 100% rename from src/vs/editor/browser/standalone/media/standalone-tokens.css rename to src/vs/editor/standalone/browser/media/standalone-tokens.css diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/standalone/browser/simpleServices.ts similarity index 100% rename from src/vs/editor/browser/standalone/simpleServices.ts rename to src/vs/editor/standalone/browser/simpleServices.ts diff --git a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts b/src/vs/editor/standalone/browser/standaloneCodeEditor.ts similarity index 98% rename from src/vs/editor/browser/standalone/standaloneCodeEditor.ts rename to src/vs/editor/standalone/browser/standaloneCodeEditor.ts index 8461009c2a9..da108066c58 100644 --- a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts +++ b/src/vs/editor/standalone/browser/standaloneCodeEditor.ts @@ -15,8 +15,8 @@ import { ContextKeyExpr, IContextKey, IContextKeyService } from 'vs/platform/con import { IActionDescriptor, IModel, IModelChangedEvent } from 'vs/editor/common/editorCommon'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; -import { StandaloneKeybindingService } from 'vs/editor/browser/standalone/simpleServices'; -import { IEditorContextViewService } from 'vs/editor/browser/standalone/standaloneServices'; +import { StandaloneKeybindingService } from 'vs/editor/standalone/browser/simpleServices'; +import { IEditorContextViewService } from 'vs/editor/standalone/browser/standaloneServices'; import { CodeEditor } from 'vs/editor/browser/codeEditor'; import { DiffEditorWidget } from 'vs/editor/browser/widget/diffEditorWidget'; import { ICodeEditor, IDiffEditor } from 'vs/editor/browser/editorBrowser'; diff --git a/src/vs/editor/browser/standalone/standaloneEditor.ts b/src/vs/editor/standalone/browser/standaloneEditor.ts similarity index 98% rename from src/vs/editor/browser/standalone/standaloneEditor.ts rename to src/vs/editor/standalone/browser/standaloneEditor.ts index bf79ba343d4..0bc61d294eb 100644 --- a/src/vs/editor/browser/standalone/standaloneEditor.ts +++ b/src/vs/editor/standalone/browser/standaloneEditor.ts @@ -7,16 +7,16 @@ import 'vs/css!./media/standalone-tokens'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ICodeEditor, ContentWidgetPositionPreference, OverlayWidgetPositionPreference, MouseTargetType } from 'vs/editor/browser/editorBrowser'; -import { StandaloneEditor, IStandaloneCodeEditor, StandaloneDiffEditor, IStandaloneDiffEditor, IEditorConstructionOptions, IDiffEditorConstructionOptions } from 'vs/editor/browser/standalone/standaloneCodeEditor'; +import { StandaloneEditor, IStandaloneCodeEditor, StandaloneDiffEditor, IStandaloneDiffEditor, IEditorConstructionOptions, IDiffEditorConstructionOptions } from 'vs/editor/standalone/browser/standaloneCodeEditor'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; -import { IEditorOverrideServices, DynamicStandaloneServices, StaticServices } from 'vs/editor/browser/standalone/standaloneServices'; +import { IEditorOverrideServices, DynamicStandaloneServices, StaticServices } from 'vs/editor/standalone/browser/standaloneServices'; import { IDisposable } from 'vs/base/common/lifecycle'; 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 { Colorizer, IColorizerElementOptions, IColorizerOptions } from 'vs/editor/browser/standalone/colorizer'; -import { SimpleEditorService, SimpleEditorModelResolverService } from 'vs/editor/browser/standalone/simpleServices'; +import { Colorizer, IColorizerElementOptions, IColorizerOptions } from 'vs/editor/standalone/browser/colorizer'; +import { SimpleEditorService, SimpleEditorModelResolverService } from 'vs/editor/standalone/browser/simpleServices'; import * as modes from 'vs/editor/common/modes'; import { IWebWorkerOptions, MonacoWebWorker, createWebWorker as actualCreateWebWorker } from 'vs/editor/common/services/webWorker'; import { IMarkerData } from 'vs/platform/markers/common/markers'; diff --git a/src/vs/editor/browser/standalone/standaloneLanguages.ts b/src/vs/editor/standalone/browser/standaloneLanguages.ts similarity index 99% rename from src/vs/editor/browser/standalone/standaloneLanguages.ts rename to src/vs/editor/standalone/browser/standaloneLanguages.ts index 08a7d09b838..123ddcd6872 100644 --- a/src/vs/editor/browser/standalone/standaloneLanguages.ts +++ b/src/vs/editor/standalone/browser/standaloneLanguages.ts @@ -10,7 +10,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { ModesRegistry } from 'vs/editor/common/modes/modesRegistry'; import { IMonarchLanguage } from 'vs/editor/common/standalone/monarch/monarchTypes'; import { ILanguageExtensionPoint } from 'vs/editor/common/services/modeService'; -import { StaticServices } from 'vs/editor/browser/standalone/standaloneServices'; +import { StaticServices } from 'vs/editor/standalone/browser/standaloneServices'; import * as modes from 'vs/editor/common/modes'; import { LanguageConfiguration, IndentAction } from 'vs/editor/common/modes/languageConfiguration'; import * as editorCommon from 'vs/editor/common/editorCommon'; diff --git a/src/vs/editor/browser/standalone/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts similarity index 99% rename from src/vs/editor/browser/standalone/standaloneServices.ts rename to src/vs/editor/standalone/browser/standaloneServices.ts index 06e6d59cb16..63f54cace2f 100644 --- a/src/vs/editor/browser/standalone/standaloneServices.ts +++ b/src/vs/editor/standalone/browser/standaloneServices.ts @@ -35,7 +35,7 @@ import { SimpleConfigurationService, SimpleResourceConfigurationService, SimpleMenuService, SimpleMessageService, SimpleProgressService, StandaloneCommandService, StandaloneKeybindingService, StandaloneTelemetryService, SimpleWorkspaceContextService -} from 'vs/editor/browser/standalone/simpleServices'; +} from 'vs/editor/standalone/browser/simpleServices'; import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService'; import { IMenuService } from 'vs/platform/actions/common/actions'; import { IStandaloneThemeService } from 'vs/editor/common/services/standaloneThemeService'; diff --git a/src/vs/editor/test/browser/standalone/simpleServices.test.ts b/src/vs/editor/standalone/test/browser/simpleServices.test.ts similarity index 98% rename from src/vs/editor/test/browser/standalone/simpleServices.test.ts rename to src/vs/editor/standalone/test/browser/simpleServices.test.ts index 14c53c99b5e..12aaaad2825 100644 --- a/src/vs/editor/test/browser/standalone/simpleServices.test.ts +++ b/src/vs/editor/standalone/test/browser/simpleServices.test.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService'; -import { SimpleConfigurationService, SimpleMessageService, StandaloneKeybindingService, StandaloneCommandService } from 'vs/editor/browser/standalone/simpleServices'; +import { SimpleConfigurationService, SimpleMessageService, StandaloneKeybindingService, StandaloneCommandService } from 'vs/editor/standalone/browser/simpleServices'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { KeyCode } from 'vs/base/common/keyCodes'; diff --git a/src/vs/editor/test/browser/standalone/standaloneLanguages.test.ts b/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts similarity index 98% rename from src/vs/editor/test/browser/standalone/standaloneLanguages.test.ts rename to src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts index eed002041d1..1380e9bed5d 100644 --- a/src/vs/editor/test/browser/standalone/standaloneLanguages.test.ts +++ b/src/vs/editor/standalone/test/browser/standaloneLanguages.test.ts @@ -5,7 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { TokenizationSupport2Adapter, TokensProvider, ILineTokens, IToken } from "vs/editor/browser/standalone/standaloneLanguages"; +import { TokenizationSupport2Adapter, TokensProvider, ILineTokens, IToken } from "vs/editor/standalone/browser/standaloneLanguages"; import { IStandaloneThemeService, IStandaloneThemeData, IStandaloneTheme } from "vs/editor/common/services/standaloneThemeService"; import Event from 'vs/base/common/event'; import { ITheme, LIGHT } from "vs/platform/theme/common/themeService"; diff --git a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts index 3a810855bed..cbaf130bec5 100644 --- a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts @@ -26,7 +26,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { TPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; -import { SimpleConfigurationService } from 'vs/editor/browser/standalone/simpleServices'; +import { SimpleConfigurationService } from 'vs/editor/standalone/browser/simpleServices'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; import { IModelService } from 'vs/editor/common/services/modelService'; diff --git a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts index 40c99b3e650..b0ba1a7aaca 100644 --- a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts @@ -25,7 +25,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { TPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; -import { SimpleConfigurationService } from 'vs/editor/browser/standalone/simpleServices'; +import { SimpleConfigurationService } from 'vs/editor/standalone/browser/simpleServices'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; import { IModelService } from 'vs/editor/common/services/modelService'; diff --git a/tslint.json b/tslint.json index 0e8a0939022..7509730a4d4 100644 --- a/tslint.json +++ b/tslint.json @@ -176,6 +176,51 @@ "**/vs/editor/test/{common,browser}/**" ] }, + { + "target": "**/vs/editor/standalone/common/**", + "restrictions": [ + "vs/nls", + "**/vs/base/common/**", + "**/vs/platform/*/common/**", + "**/vs/editor/common/**" + ] + }, + { + "target": "**/vs/editor/standalone/test/common/**", + "restrictions": [ + "assert", + "vs/nls", + "**/vs/base/common/**", + "**/vs/platform/*/common/**", + "**/vs/platform/*/test/common/**", + "**/vs/editor/common/**", + "**/vs/editor/test/common/**" + ] + }, + { + "target": "**/vs/editor/standalone/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser}/**", + "**/vs/platform/*/{common,browser}/**", + "**/vs/editor/{common,browser}/**", + "**/vs/editor/standalone/{common,browser}/**" + ] + }, + { + "target": "**/vs/editor/standalone/test/browser/**", + "restrictions": [ + "assert", + "vs/nls", + "**/vs/base/{common,browser}/**", + "**/vs/platform/*/{common,browser}/**", + "**/vs/platform/*/test/{common,browser}/**", + "**/vs/editor/{common,browser}/**", + "**/vs/editor/standalone/{common,browser}/**", + "**/vs/editor/test/{common,browser}/**" + ] + }, { "target": "**/vs/editor/contrib/*/test/**", "restrictions": [