Move standalone editor specific code to vs/editor/standalone

This commit is contained in:
Alex Dima 2017-06-19 16:44:25 +02:00
parent c4aabc566f
commit 1171b53005
15 changed files with 64 additions and 32 deletions

View file

@ -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

View file

@ -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);
}

View file

@ -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

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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";

View file

@ -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';

View file

@ -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';

View file

@ -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": [