{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/1608","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/1608/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/1608/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/1608/events","html_url":"https://github.com/Microsoft/vscode/issues/1608","id":123628396,"number":1608,"title":"Jungle of editor abstractions and services","user":{"login":"jrieken","id":1794099,"avatar_url":"https://avatars.githubusercontent.com/u/1794099?v=3","gravatar_id":"","url":"https://api.github.com/users/jrieken","html_url":"https://github.com/jrieken","followers_url":"https://api.github.com/users/jrieken/followers","following_url":"https://api.github.com/users/jrieken/following{/other_user}","gists_url":"https://api.github.com/users/jrieken/gists{/gist_id}","starred_url":"https://api.github.com/users/jrieken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrieken/subscriptions","organizations_url":"https://api.github.com/users/jrieken/orgs","repos_url":"https://api.github.com/users/jrieken/repos","events_url":"https://api.github.com/users/jrieken/events{/privacy}","received_events_url":"https://api.github.com/users/jrieken/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/vscode/labels/debt","name":"debt","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-23T09:36:21Z","updated_at":"2015-12-23T09:36:21Z","closed_at":null,"body":"We have many ways to talk about models and editors and while it might have made sense back then we should consider to consolidate them. Let's start by taking inventory:\r\n\r\nOn the service side we have:\r\n\r\n1. IEditorService (in platform/editor/common)\r\n2. IWorkbenchEditorService (in workbench/services/editor)\r\n3. ICodeEditorService (in editor/common/services)\r\n4. IModelService (in editor/common/services)\r\n\r\nThe latter two use editor types like `IModel`, `ICodeEditor` etc while the former two abstract them away, like `IEditor` and `ITextEditorModel`.  Tho, those abstractions are very weak and often you encounter code like this: `let editor = this.editorService.getActiveEditor(); this.lastKnownEditorViewState = (<IEditor>editor.getControl()).saveViewState();`\r\n\r\nI think this needs simplification in the face of the challenge of building a simple API that hides all of this. Also, there are semantic differences, like `IWorkbenchEditorService` not knowing anything about inline-editors and `ICodeEditorService` not knowing anything about the _active_ editor etc. \r\n\r\nLet's collection more issues and let's discuss @alexandrudima @bpasero \r\n\r\n\r\n"}}