diff --git a/src/vs/workbench/api/common/extHostEditors.ts b/src/vs/workbench/api/common/extHostEditors.ts index 6074730883a..0c68f7b057c 100644 --- a/src/vs/workbench/api/common/extHostEditors.ts +++ b/src/vs/workbench/api/common/extHostEditors.ts @@ -19,7 +19,7 @@ import {IModelService} from 'vs/editor/common/services/modelService'; import {MainThreadEditorsTracker, TextEditorRevealType, MainThreadTextEditor, ITextEditorConfiguration} from 'vs/workbench/api/common/mainThreadEditors'; import * as TypeConverters from './extHostTypeConverters'; import {TextDocument, TextEditorSelectionChangeEvent, TextEditorOptionsChangeEvent, TextEditorOptions, ViewColumn} from 'vscode'; -import {EventType} from 'vs/workbench/browser/events'; +import {EventType} from 'vs/workbench/common/events'; import {IEventService} from 'vs/platform/event/common/event'; import {equals as arrayEquals} from 'vs/base/common/arrays'; diff --git a/src/vs/workbench/browser/events.ts b/src/vs/workbench/browser/events.ts index b6686d9c4d6..73f19ddc71e 100644 --- a/src/vs/workbench/browser/events.ts +++ b/src/vs/workbench/browser/events.ts @@ -5,140 +5,13 @@ 'use strict'; import {Event} from 'vs/base/common/events'; -import URI from 'vs/base/common/uri'; import {IEditorSelection} from 'vs/editor/common/editorCommon'; import CommonEvents = require('vs/workbench/common/events'); import {BaseEditor} from 'vs/workbench/browser/parts/editor/baseEditor'; import {EditorInput, EditorOptions} from 'vs/workbench/common/editor'; import {Position} from 'vs/platform/editor/common/editor'; -/** - * All workbench events are listed here. For DOM events, see Monaco.Base.DomUtils.EventType. - */ -export class EventType { - - /** - * Event type for when an editor is opened. This event is only sent once for a specific editor type until another - * editor type gets opened. For example, when the user opens a file, the editorOpened event will be sent. If another - * file is opened, this event will not be fired again. If the user opens, e.g. the diff editor, editorOpened will be - * fired, since another editor type opened. - */ - static EDITOR_OPENED = 'editorOpened'; - - /** - * Event type for when an editor is closed because another editor type is opened. - */ - static EDITOR_CLOSED = 'editorClosed'; - - /** - * Event to indciate that an editor input is about to open. This event can be prevented to do something else instead. - */ - static EDITOR_INPUT_OPENING = 'editorInputOpening'; - - /** - * Event type for when the editor input is about to change. This event is being sent before (!) the input is being set - * to the active editor. Use EDITOR_INPUT_CHANGED to react after the input has been set and displayed by the editor. - * - * Note: This event will also be emitted when multiple editors are open and the user sets focus from the active editor - * to another one. This allows to detect a focus change of the active editor. - */ - static EDITOR_INPUT_CHANGING = 'editorInputChanging'; - - /** - * Event type to indicate that the editor options of the current active editor are changing. - */ - static EDITOR_OPTIONS_CHANGING = 'editorOptionsChanging'; - - /** - * Event type for when the editor input has been changed in the currently active editor. This event is being sent after - * the input has been set and displayed by the editor. - * - * Note: This event will also be emitted when multiple editors are open and the user sets focus from the active editor - * to another one. This allows to detect a focus change of the active editor. - */ - static EDITOR_INPUT_CHANGED = 'editorInputChanged'; - - /** - * Event type for when the editor input state changed. - */ - static EDITOR_INPUT_STATE_CHANGED = 'editorInputStateChanged'; - - /** - * Event type for when the editor input failed to be set to the editor. - */ - static EDITOR_SET_INPUT_ERROR = 'editorSetInputError'; - - /** - * An event type that fires when a text editor changes its selection. - */ - static TEXT_EDITOR_SELECTION_CHANGED = 'textEditorSelectionChanged'; - - /** - * An event type that fires when a text editor mode changes. - */ - static TEXT_EDITOR_MODE_CHANGED = 'textEditorModeChanged'; - - /** - * An event type that fires when a text editor content changes. - */ - static TEXT_EDITOR_CONTENT_CHANGED = 'textEditorContentChanged'; - - /** - * An event type that fires when a text editor's configuration changes. - */ - static TEXT_EDITOR_CONFIGURATION_CHANGED = 'textEditorOptionsChanged'; - - /** - * Event type for when a viewlet is about to open. - */ - static VIEWLET_OPENING = 'viewletOpening'; - - /** - * Event type for when a viewlet is opened. - */ - static VIEWLET_OPENED = 'viewletOpened'; - - /** - * Event type for when a viewlet is closed. - */ - static VIEWLET_CLOSED = 'viewletClosed'; - - /** - * Event type for when the workbench has been fully created. - */ - static WORKBENCH_CREATED = 'workbenchCreated'; - - /** - * Event type for when the workbench is about to being disposed. - */ - static WORKBENCH_DISPOSING = 'workbenchDisposing'; - - /** - * Event type for when the workbench is fully disposed. - */ - static WORKBENCH_DISPOSED = 'workbenchDisposed'; - - /** - * Event type for when the workbench options change. Listeners should refresh their - * assumption on workbench options after this event is emitted. - */ - static WORKBENCH_OPTIONS_CHANGED = CommonEvents.EventType.WORKBENCH_OPTIONS_CHANGED; - - /** - * Event type for when an untitled file is becoming dirty. - */ - static UNTITLED_FILE_DIRTY = 'untitledFileDirty'; - - /** - * Event type for when an untitled file is deleted. - */ - static UNTITLED_FILE_DELETED = 'untitledFileDeleted'; - - /** - * Event type for when a resources encoding changes. - */ - static RESOURCE_ENCODING_CHANGED = 'resourceEncodingChanged'; -} +export import EventType = CommonEvents.EventType; /** * Editor events are being emitted when the editor input changes, shows, is being saved or when the editor content changes. @@ -195,49 +68,4 @@ export class TextEditorSelectionEvent extends EditorEvent { this.selection = selection; } -} - -/** - * Command events are emitted when an action is being executed through a command handler (Keybinding). - */ -export class CommandEvent extends Event { - public actionId: string; - - constructor(actionId: string, originalEvent?: any) { - super(originalEvent); - - this.actionId = actionId; - } -} - -/** - * Viewlet events are emitted when a viewlet opens or closes in the sidebar. - */ -export class ViewletEvent extends Event { - public viewletId: string; - - constructor(viewletId: string, originalEvent?: any) { - super(originalEvent); - - this.viewletId = viewletId; - } -} - -/** - * Option change events are send when the options in the running instance change. - */ -export import OptionsChangeEvent = CommonEvents.OptionsChangeEvent; - -export class ResourceEvent extends Event { - public resource: URI; - - constructor(resource: URI, originalEvent?: any) { - super(originalEvent); - - this.resource = resource; - } -} - -export class UntitledEditorEvent extends ResourceEvent { - // No new methods } \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index 2d1c2e87da6..25420da86d3 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -15,7 +15,7 @@ import {ActionsOrientation, ActionBar, IActionItem} from 'vs/base/browser/ui/act import {Scope, IActionBarRegistry, Extensions as ActionBarExtensions, prepareActions} from 'vs/workbench/browser/actionBarRegistry'; import {CONTEXT, ToolBar} from 'vs/base/browser/ui/toolbar/toolbar'; import {Registry} from 'vs/platform/platform'; -import {ViewletEvent, EventType} from 'vs/workbench/browser/events'; +import {ViewletEvent, EventType} from 'vs/workbench/common/events'; import {ViewletDescriptor, IViewletRegistry, Extensions as ViewletExtensions} from 'vs/workbench/browser/viewlet'; import {Part} from 'vs/workbench/browser/part'; import {ActivityAction, ActivityActionItem} from 'vs/workbench/browser/parts/activitybar/activityAction'; diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index 4ce35968565..e2ef7f26a50 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -25,7 +25,8 @@ import {IFileEditorInput, EncodingMode, IEncodingSupport, asFileEditorInput, get import {IDisposable, combinedDispose} from 'vs/base/common/lifecycle'; import {ICodeEditor, IDiffEditor} from 'vs/editor/browser/editorBrowser'; import {EndOfLineSequence, ITokenizedModel, EditorType, IEditorSelection, ITextModel, IDiffEditorModel, IEditor} from 'vs/editor/common/editorCommon'; -import {EventType, EditorEvent, TextEditorSelectionEvent, ResourceEvent} from 'vs/workbench/browser/events'; +import {EditorEvent, TextEditorSelectionEvent} from 'vs/workbench/browser/events'; +import {EventType, ResourceEvent} from 'vs/workbench/common/events'; import {BaseTextEditor} from 'vs/workbench/browser/parts/editor/textEditor'; import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService'; import {IQuickOpenService, IPickOpenEntry} from 'vs/workbench/services/quickopen/common/quickOpenService'; diff --git a/src/vs/workbench/browser/parts/editor/stringEditor.ts b/src/vs/workbench/browser/parts/editor/stringEditor.ts index 080ac43c360..c1328f24d4f 100644 --- a/src/vs/workbench/browser/parts/editor/stringEditor.ts +++ b/src/vs/workbench/browser/parts/editor/stringEditor.ts @@ -16,7 +16,7 @@ import {BaseTextEditorModel} from 'vs/workbench/browser/parts/editor/textEditorM import {LogEditorInput} from 'vs/workbench/browser/parts/editor/logEditorInput'; import {UntitledEditorInput} from 'vs/workbench/browser/parts/editor/untitledEditorInput'; import {BaseTextEditor} from 'vs/workbench/browser/parts/editor/textEditor'; -import {UntitledEditorEvent, EventType} from 'vs/workbench/browser/events'; +import {UntitledEditorEvent, EventType} from 'vs/workbench/common/events'; import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry'; import {IWorkspaceContextService} from 'vs/workbench/services/workspace/common/contextService'; import {IStorageService} from 'vs/platform/storage/common/storage'; diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index cac9a8fc880..9cd9d06ba8a 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -13,7 +13,8 @@ import errors = require('vs/base/common/errors'); import {CodeEditorWidget} from 'vs/editor/browser/widget/codeEditorWidget'; import {Preferences} from 'vs/workbench/common/constants'; import {IEditorViewState} from 'vs/editor/common/editorCommon'; -import {EventType as WorkbenchEventType, EditorEvent, TextEditorSelectionEvent, OptionsChangeEvent} from 'vs/workbench/browser/events'; +import {EventType as WorkbenchEventType, EditorEvent, TextEditorSelectionEvent} from 'vs/workbench/browser/events'; +import {OptionsChangeEvent} from 'vs/workbench/common/events'; import {Scope} from 'vs/workbench/common/memento'; import {BaseEditor} from 'vs/workbench/browser/parts/editor/baseEditor'; import {EditorConfiguration} from 'vs/editor/common/config/commonEditorConfig'; diff --git a/src/vs/workbench/browser/parts/editor/untitledEditorModel.ts b/src/vs/workbench/browser/parts/editor/untitledEditorModel.ts index c8d7b9f32c9..21bbbaa0adc 100644 --- a/src/vs/workbench/browser/parts/editor/untitledEditorModel.ts +++ b/src/vs/workbench/browser/parts/editor/untitledEditorModel.ts @@ -9,7 +9,7 @@ import {EditorModel, IEncodingSupport} from 'vs/workbench/common/editor'; import {StringEditorModel} from 'vs/workbench/browser/parts/editor/stringEditorModel'; import URI from 'vs/base/common/uri'; import {IModelContentChangedEvent, EventType, EndOfLinePreference} from 'vs/editor/common/editorCommon'; -import {EventType as WorkbenchEventType, UntitledEditorEvent, ResourceEvent} from 'vs/workbench/browser/events'; +import {EventType as WorkbenchEventType, UntitledEditorEvent, ResourceEvent} from 'vs/workbench/common/events'; import {IFilesConfiguration} from 'vs/platform/files/common/files'; import {IConfigurationService, IConfigurationServiceEvent, ConfigurationServiceEventTypes} from 'vs/platform/configuration/common/configuration'; import {IEventService} from 'vs/platform/event/common/event'; diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index 2c1f964c61b..2ee159e8959 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -23,7 +23,7 @@ import {ProgressBar} from 'vs/base/browser/ui/progressbar/progressbar'; import {Scope, IActionBarRegistry, Extensions, prepareActions} from 'vs/workbench/browser/actionBarRegistry'; import {Action, IAction} from 'vs/base/common/actions'; import {Part} from 'vs/workbench/browser/part'; -import {EventType as WorkbenchEventType, ViewletEvent} from 'vs/workbench/browser/events'; +import {EventType as WorkbenchEventType, ViewletEvent} from 'vs/workbench/common/events'; import {Viewlet, EventType as ViewletEventType, IViewletRegistry, Extensions as ViewletExtensions} from 'vs/workbench/browser/viewlet'; import {IWorkbenchActionRegistry, Extensions as ActionExtensions} from 'vs/workbench/browser/actionRegistry'; import {SyncActionDescriptor} from 'vs/platform/actions/common/actions'; diff --git a/src/vs/workbench/browser/services.ts b/src/vs/workbench/browser/services.ts index bc21b39081e..9bd2b0bdc07 100644 --- a/src/vs/workbench/browser/services.ts +++ b/src/vs/workbench/browser/services.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import {EventType, ViewletEvent, EditorEvent} from 'vs/workbench/browser/events'; +import {EditorEvent} from 'vs/workbench/browser/events'; +import {EventType, ViewletEvent} from 'vs/workbench/common/events'; import {IEventService} from 'vs/platform/event/common/event'; export abstract class ScopedService { diff --git a/src/vs/workbench/browser/viewlet.ts b/src/vs/workbench/browser/viewlet.ts index 51df182e679..027c4daa15e 100644 --- a/src/vs/workbench/browser/viewlet.ts +++ b/src/vs/workbench/browser/viewlet.ts @@ -15,7 +15,7 @@ import {IAction, IActionRunner, Action, ActionRunner} from 'vs/base/common/actio import {IActionItem, ActionsOrientation} from 'vs/base/browser/ui/actionbar/actionbar'; import {ITree, IFocusEvent, ISelectionEvent} from 'vs/base/parts/tree/common/tree'; import {WorkbenchComponent} from 'vs/workbench/browser/component'; -import {ViewletEvent} from 'vs/workbench/browser/events'; +import {ViewletEvent} from 'vs/workbench/common/events'; import {prepareActions} from 'vs/workbench/browser/actionBarRegistry'; import {ToolBar} from 'vs/base/browser/ui/toolbar/toolbar'; import {DelayedDragHandler} from 'vs/base/browser/dnd'; diff --git a/src/vs/workbench/common/events.ts b/src/vs/workbench/common/events.ts index da471b5c2eb..dc08d1ca0fe 100644 --- a/src/vs/workbench/common/events.ts +++ b/src/vs/workbench/common/events.ts @@ -5,12 +5,129 @@ 'use strict'; import {Event} from 'vs/base/common/events'; +import URI from 'vs/base/common/uri'; /** * All workbench events are listed here. For DOM events, see Monaco.Base.DomUtils.EventType. */ export class EventType { + /** + * Event type for when an editor is opened. This event is only sent once for a specific editor type until another + * editor type gets opened. For example, when the user opens a file, the editorOpened event will be sent. If another + * file is opened, this event will not be fired again. If the user opens, e.g. the diff editor, editorOpened will be + * fired, since another editor type opened. + */ + static EDITOR_OPENED = 'editorOpened'; + + /** + * Event type for when an editor is closed because another editor type is opened. + */ + static EDITOR_CLOSED = 'editorClosed'; + + /** + * Event to indciate that an editor input is about to open. This event can be prevented to do something else instead. + */ + static EDITOR_INPUT_OPENING = 'editorInputOpening'; + + /** + * Event type for when the editor input is about to change. This event is being sent before (!) the input is being set + * to the active editor. Use EDITOR_INPUT_CHANGED to react after the input has been set and displayed by the editor. + * + * Note: This event will also be emitted when multiple editors are open and the user sets focus from the active editor + * to another one. This allows to detect a focus change of the active editor. + */ + static EDITOR_INPUT_CHANGING = 'editorInputChanging'; + + /** + * Event type to indicate that the editor options of the current active editor are changing. + */ + static EDITOR_OPTIONS_CHANGING = 'editorOptionsChanging'; + + /** + * Event type for when the editor input has been changed in the currently active editor. This event is being sent after + * the input has been set and displayed by the editor. + * + * Note: This event will also be emitted when multiple editors are open and the user sets focus from the active editor + * to another one. This allows to detect a focus change of the active editor. + */ + static EDITOR_INPUT_CHANGED = 'editorInputChanged'; + + /** + * Event type for when the editor input state changed. + */ + static EDITOR_INPUT_STATE_CHANGED = 'editorInputStateChanged'; + + /** + * Event type for when the editor input failed to be set to the editor. + */ + static EDITOR_SET_INPUT_ERROR = 'editorSetInputError'; + + /** + * An event type that fires when a text editor changes its selection. + */ + static TEXT_EDITOR_SELECTION_CHANGED = 'textEditorSelectionChanged'; + + /** + * An event type that fires when a text editor mode changes. + */ + static TEXT_EDITOR_MODE_CHANGED = 'textEditorModeChanged'; + + /** + * An event type that fires when a text editor content changes. + */ + static TEXT_EDITOR_CONTENT_CHANGED = 'textEditorContentChanged'; + + /** + * An event type that fires when a text editor's configuration changes. + */ + static TEXT_EDITOR_CONFIGURATION_CHANGED = 'textEditorOptionsChanged'; + + /** + * Event type for when a viewlet is about to open. + */ + static VIEWLET_OPENING = 'viewletOpening'; + + /** + * Event type for when a viewlet is opened. + */ + static VIEWLET_OPENED = 'viewletOpened'; + + /** + * Event type for when a viewlet is closed. + */ + static VIEWLET_CLOSED = 'viewletClosed'; + + /** + * Event type for when the workbench has been fully created. + */ + static WORKBENCH_CREATED = 'workbenchCreated'; + + /** + * Event type for when the workbench is about to being disposed. + */ + static WORKBENCH_DISPOSING = 'workbenchDisposing'; + + /** + * Event type for when the workbench is fully disposed. + */ + static WORKBENCH_DISPOSED = 'workbenchDisposed'; + + /** + * Event type for when an untitled file is becoming dirty. + */ + static UNTITLED_FILE_DIRTY = 'untitledFileDirty'; + + /** + * Event type for when an untitled file is deleted. + */ + static UNTITLED_FILE_DELETED = 'untitledFileDeleted'; + + /** + * Event type for when a resources encoding changes. + */ + static RESOURCE_ENCODING_CHANGED = 'resourceEncodingChanged'; + /** * Event type for when the workbench options change. Listeners should refresh their * assumption on workbench options after this event is emitted. @@ -33,4 +150,44 @@ export class OptionsChangeEvent extends Event { this.before = before; this.after = after; } +} + +/** + * Command events are emitted when an action is being executed through a command handler (Keybinding). + */ +export class CommandEvent extends Event { + public actionId: string; + + constructor(actionId: string, originalEvent?: any) { + super(originalEvent); + + this.actionId = actionId; + } +} + +/** + * Viewlet events are emitted when a viewlet opens or closes in the sidebar. + */ +export class ViewletEvent extends Event { + public viewletId: string; + + constructor(viewletId: string, originalEvent?: any) { + super(originalEvent); + + this.viewletId = viewletId; + } +} + +export class ResourceEvent extends Event { + public resource: URI; + + constructor(resource: URI, originalEvent?: any) { + super(originalEvent); + + this.resource = resource; + } +} + +export class UntitledEditorEvent extends ResourceEvent { + // No new methods } \ No newline at end of file diff --git a/src/vs/workbench/parts/files/browser/editors/textFileEditorModel.ts b/src/vs/workbench/parts/files/browser/editors/textFileEditorModel.ts index 76a4647ed45..bd0729bc3f2 100644 --- a/src/vs/workbench/parts/files/browser/editors/textFileEditorModel.ts +++ b/src/vs/workbench/parts/files/browser/editors/textFileEditorModel.ts @@ -13,7 +13,7 @@ import diagnostics = require('vs/base/common/diagnostics'); import types = require('vs/base/common/types'); import {IModelContentChangedEvent, EventType as EditorEventType} from 'vs/editor/common/editorCommon'; import {IMode} from 'vs/editor/common/modes'; -import {EventType as WorkbenchEventType, ResourceEvent} from 'vs/workbench/browser/events'; +import {EventType as WorkbenchEventType, ResourceEvent} from 'vs/workbench/common/events'; import {LocalFileChangeEvent, EventType as FileEventType, TextFileChangeEvent} from 'vs/workbench/parts/files/common/files'; import {EncodingMode, EditorModel, IEncodingSupport} from 'vs/workbench/common/editor'; import {BaseTextEditorModel} from 'vs/workbench/browser/parts/editor/textEditorModel'; diff --git a/src/vs/workbench/parts/files/browser/fileTracker.ts b/src/vs/workbench/parts/files/browser/fileTracker.ts index 0bb0b197c20..c6583648944 100644 --- a/src/vs/workbench/parts/files/browser/fileTracker.ts +++ b/src/vs/workbench/parts/files/browser/fileTracker.ts @@ -20,7 +20,8 @@ import {FileEditorInput} from 'vs/workbench/parts/files/browser/editors/fileEdit import {DerivedFrameEditorInput} from 'vs/workbench/parts/files/browser/editors/derivedFrameEditorInput'; import {State, TextFileEditorModel, CACHE} from 'vs/workbench/parts/files/browser/editors/textFileEditorModel'; import {IFrameEditor} from 'vs/workbench/browser/parts/editor/iframeEditor'; -import {EventType as WorkbenchEventType, EditorInputEvent, UntitledEditorEvent} from 'vs/workbench/browser/events'; +import {EditorInputEvent} from 'vs/workbench/browser/events'; +import {EventType as WorkbenchEventType, UntitledEditorEvent} from 'vs/workbench/common/events'; import {IUntitledEditorService} from 'vs/workbench/services/untitled/common/untitledEditorService'; import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService'; import {IQuickOpenService} from 'vs/workbench/services/quickopen/common/quickOpenService'; diff --git a/src/vs/workbench/parts/files/browser/views/workingFilesView.ts b/src/vs/workbench/parts/files/browser/views/workingFilesView.ts index 589ace40c44..d98519b89e1 100644 --- a/src/vs/workbench/parts/files/browser/views/workingFilesView.ts +++ b/src/vs/workbench/parts/files/browser/views/workingFilesView.ts @@ -16,7 +16,8 @@ import {IWorkingFileEntry, IWorkingFilesModel, IWorkingFileModelChangeEvent, Loc import dom = require('vs/base/browser/dom'); import {IDisposable} from 'vs/base/common/lifecycle'; import errors = require('vs/base/common/errors'); -import {EditorEvent, EventType as WorkbenchEventType, UntitledEditorEvent} from 'vs/workbench/browser/events'; +import {EditorEvent} from 'vs/workbench/browser/events'; +import {EventType as WorkbenchEventType, UntitledEditorEvent} from 'vs/workbench/common/events'; import {AdaptiveCollapsibleViewletView} from 'vs/workbench/browser/viewlet'; import {CloseWorkingFileAction, SaveAllAction} from 'vs/workbench/parts/files/browser/fileActions'; import {WorkingFileEntry} from 'vs/workbench/parts/files/browser/workingFilesModel'; diff --git a/src/vs/workbench/parts/files/browser/workingFilesModel.ts b/src/vs/workbench/parts/files/browser/workingFilesModel.ts index 506625ec593..ebfd8a6544f 100644 --- a/src/vs/workbench/parts/files/browser/workingFilesModel.ts +++ b/src/vs/workbench/parts/files/browser/workingFilesModel.ts @@ -13,7 +13,8 @@ import labels = require('vs/base/common/labels'); import {disposeAll, IDisposable} from 'vs/base/common/lifecycle'; import filesCommon = require('vs/workbench/parts/files/common/files'); import {IFileStat, FileChangeType, FileChangesEvent, EventType as FileEventType} from 'vs/platform/files/common/files'; -import {EditorEvent, UntitledEditorEvent, EventType as WorkbenchEventType} from 'vs/workbench/browser/events'; +import {EditorEvent} from 'vs/workbench/browser/events'; +import {UntitledEditorEvent, EventType as WorkbenchEventType} from 'vs/workbench/common/events'; import {IUntitledEditorService} from 'vs/workbench/services/untitled/common/untitledEditorService'; import {IWorkbenchEditorService} from 'vs/workbench/services/editor/common/editorService'; import {IPartService} from 'vs/workbench/services/part/common/partService'; diff --git a/src/vs/workbench/parts/files/test/browser/events.test.ts b/src/vs/workbench/parts/files/test/browser/events.test.ts index bec4a5ef3fa..3591e8f89f2 100644 --- a/src/vs/workbench/parts/files/test/browser/events.test.ts +++ b/src/vs/workbench/parts/files/test/browser/events.test.ts @@ -8,7 +8,8 @@ import * as assert from 'assert'; import URI from 'vs/base/common/uri'; import {Event, PropertyChangeEvent} from 'vs/base/common/events'; -import {CommandEvent, EditorEvent, ViewletEvent} from 'vs/workbench/browser/events'; +import {EditorEvent} from 'vs/workbench/browser/events'; +import {CommandEvent, ViewletEvent} from 'vs/workbench/common/events'; import {LocalFileChangeEvent} from 'vs/workbench/parts/files/common/files'; import {FileImportedEvent} from 'vs/workbench/parts/files/browser/fileActions'; diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 5cdd1f5f4ef..f1cc2899ded 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -32,7 +32,7 @@ import {ActionsRenderer} from 'vs/base/parts/tree/browser/actionsRenderer'; import {ContributableActionProvider} from 'vs/workbench/browser/actionBarRegistry'; import {Scope} from 'vs/workbench/common/memento'; import {OpenGlobalSettingsAction} from 'vs/workbench/browser/actions/openSettings'; -import {UntitledEditorEvent, EventType as WorkbenchEventType} from 'vs/workbench/browser/events'; +import {UntitledEditorEvent, EventType as WorkbenchEventType} from 'vs/workbench/common/events'; import {ITextFileService} from 'vs/workbench/parts/files/common/files'; import {FileChangeType, FileChangesEvent, EventType as FileEventType} from 'vs/platform/files/common/files'; import {Viewlet} from 'vs/workbench/browser/viewlet'; diff --git a/src/vs/workbench/test/browser/events.test.ts b/src/vs/workbench/test/browser/events.test.ts index 4a114cadf5d..0de109bd36b 100644 --- a/src/vs/workbench/test/browser/events.test.ts +++ b/src/vs/workbench/test/browser/events.test.ts @@ -10,7 +10,8 @@ import URI from 'vs/base/common/uri'; import * as Paths from 'vs/base/common/paths'; import * as Files from 'vs/platform/files/common/files'; import {Event, PropertyChangeEvent} from 'vs/base/common/events'; -import {CommandEvent, EditorEvent, ViewletEvent} from 'vs/workbench/browser/events'; +import {EditorEvent} from 'vs/workbench/browser/events'; +import {CommandEvent, ViewletEvent} from 'vs/workbench/common/events'; let FileChangesEvent = Files.FileChangesEvent;