{"action":"created","comment":{"url":"https://api.github.com/repos/theia-ide/theia/pulls/comments/231395321","pull_request_review_id":172355033,"id":231395321,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTM5NTMyMQ==","diff_hunk":"@@ -86,3 +96,75 @@ export class CommandRegistryImpl implements CommandRegistryExt {\n         }\n     }\n }\n+\n+export class CommandsConverter {\n+\n+    private readonly delegatingCommandId: string;\n+\n+    private cacheId = 0;\n+    private cache = new Map<number, theia.Command>();\n+\n+    constructor(private readonly commands: CommandRegistryImpl) {\n+        this.delegatingCommandId = `_internal_command_delegation_${Date.now()}`;\n+        this.commands.registerHandler(this.delegatingCommandId, this.executeConvertedCommand);\n+    }\n+\n+    toInternal(command: theia.Command | undefined): Command | undefined {\n+        if (!command || !command.label) {\n+            return undefined;\n+        }\n+\n+        const result: Command = {\n+            id: command.id,\n+            title: command.label\n+        };\n+\n+        if (command.id && !this.isFalsyOrEmpty(command.arguments)) {\n+            const id = this.cacheId++;\n+            ObjectIdentifier.mixin(result, id);\n+            this.cache.set(id, command);\n+\n+            result.id = this.delegatingCommandId;\n+            result.arguments = [id];\n+        }\n+\n+        if (command.tooltip) {\n+            result.tooltip = command.tooltip;\n+        }\n+\n+        return result;\n+    }\n+\n+    fromInternal(command: Command | undefined): theia.Command | undefined {\n+        if (!command) {\n+            return undefined;\n+        }\n+\n+        const id = ObjectIdentifier.of(command);\n+        if (typeof id === 'number') {\n+            return this.cache.get(id);\n+\n+        } else {\n+            return {\n+                id: command.id,\n+                label: command.title,\n+                arguments: command.arguments\n+            };\n+        }\n+    }\n+\n+    private executeConvertedCommand(...args: any[]): PromiseLike<any> {\n+        const actualCmd = this.cache.get(args[0]);\n+        if (!actualCmd) {\n+            return Promise.resolve(undefined);","path":"packages/plugin-ext/src/plugin/command-registry.ts","position":91,"original_position":91,"commit_id":"c4a899bb75e45bcda737f331978bfdd87adcbd53","original_commit_id":"c4a899bb75e45bcda737f331978bfdd87adcbd53","user":{"login":"benoitf","id":436777,"node_id":"MDQ6VXNlcjQzNjc3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/436777?v=4","gravatar_id":"","url":"https://api.github.com/users/benoitf","html_url":"https://github.com/benoitf","followers_url":"https://api.github.com/users/benoitf/followers","following_url":"https://api.github.com/users/benoitf/following{/other_user}","gists_url":"https://api.github.com/users/benoitf/gists{/gist_id}","starred_url":"https://api.github.com/users/benoitf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoitf/subscriptions","organizations_url":"https://api.github.com/users/benoitf/orgs","repos_url":"https://api.github.com/users/benoitf/repos","events_url":"https://api.github.com/users/benoitf/events{/privacy}","received_events_url":"https://api.github.com/users/benoitf/received_events","type":"User","site_admin":false},"body":"curious, could not be just `return undefined` ?","created_at":"2018-11-07T06:46:53Z","updated_at":"2018-11-07T06:54:29Z","html_url":"https://github.com/theia-ide/theia/pull/3414#discussion_r231395321","pull_request_url":"https://api.github.com/repos/theia-ide/theia/pulls/3414","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/theia-ide/theia/pulls/comments/231395321"},"html":{"href":"https://github.com/theia-ide/theia/pull/3414#discussion_r231395321"},"pull_request":{"href":"https://api.github.com/repos/theia-ide/theia/pulls/3414"}}},"pull_request":{"url":"https://api.github.com/repos/theia-ide/theia/pulls/3414","id":228795861,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4Nzk1ODYx","html_url":"https://github.com/theia-ide/theia/pull/3414","diff_url":"https://github.com/theia-ide/theia/pull/3414.diff","patch_url":"https://github.com/theia-ide/theia/pull/3414.patch","issue_url":"https://api.github.com/repos/theia-ide/theia/issues/3414","number":3414,"state":"open","locked":false,"title":"[plug-in] languages.registerCodeLensProvider API","user":{"login":"azatsarynnyy","id":1636395,"node_id":"MDQ6VXNlcjE2MzYzOTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1636395?v=4","gravatar_id":"","url":"https://api.github.com/users/azatsarynnyy","html_url":"https://github.com/azatsarynnyy","followers_url":"https://api.github.com/users/azatsarynnyy/followers","following_url":"https://api.github.com/users/azatsarynnyy/following{/other_user}","gists_url":"https://api.github.com/users/azatsarynnyy/gists{/gist_id}","starred_url":"https://api.github.com/users/azatsarynnyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azatsarynnyy/subscriptions","organizations_url":"https://api.github.com/users/azatsarynnyy/orgs","repos_url":"https://api.github.com/users/azatsarynnyy/repos","events_url":"https://api.github.com/users/azatsarynnyy/events{/privacy}","received_events_url":"https://api.github.com/users/azatsarynnyy/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>\r\n\r\nThis PR adds the `languages.registerCodeLensProvider` Plug-in API.\r\nRelated PR with the sample Plug-in https://github.com/eclipse/che-theia-samples/pull/14","created_at":"2018-11-06T18:45:19Z","updated_at":"2018-11-07T06:54:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4d49e4ff86e5abd45490975aa7e7ecb5666473d","assignee":{"login":"azatsarynnyy","id":1636395,"node_id":"MDQ6VXNlcjE2MzYzOTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1636395?v=4","gravatar_id":"","url":"https://api.github.com/users/azatsarynnyy","html_url":"https://github.com/azatsarynnyy","followers_url":"https://api.github.com/users/azatsarynnyy/followers","following_url":"https://api.github.com/users/azatsarynnyy/following{/other_user}","gists_url":"https://api.github.com/users/azatsarynnyy/gists{/gist_id}","starred_url":"https://api.github.com/users/azatsarynnyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azatsarynnyy/subscriptions","organizations_url":"https://api.github.com/users/azatsarynnyy/orgs","repos_url":"https://api.github.com/users/azatsarynnyy/repos","events_url":"https://api.github.com/users/azatsarynnyy/events{/privacy}","received_events_url":"https://api.github.com/users/azatsarynnyy/received_events","type":"User","site_admin":false},"assignees":[{"login":"azatsarynnyy","id":1636395,"node_id":"MDQ6VXNlcjE2MzYzOTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1636395?v=4","gravatar_id":"","url":"https://api.github.com/users/azatsarynnyy","html_url":"https://github.com/azatsarynnyy","followers_url":"https://api.github.com/users/azatsarynnyy/followers","following_url":"https://api.github.com/users/azatsarynnyy/following{/other_user}","gists_url":"https://api.github.com/users/azatsarynnyy/gists{/gist_id}","starred_url":"https://api.github.com/users/azatsarynnyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azatsarynnyy/subscriptions","organizations_url":"https://api.github.com/users/azatsarynnyy/orgs","repos_url":"https://api.github.com/users/azatsarynnyy/repos","events_url":"https://api.github.com/users/azatsarynnyy/events{/privacy}","received_events_url":"https://api.github.com/users/azatsarynnyy/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"evidolob","id":929743,"node_id":"MDQ6VXNlcjkyOTc0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/929743?v=4","gravatar_id":"","url":"https://api.github.com/users/evidolob","html_url":"https://github.com/evidolob","followers_url":"https://api.github.com/users/evidolob/followers","following_url":"https://api.github.com/users/evidolob/following{/other_user}","gists_url":"https://api.github.com/users/evidolob/gists{/gist_id}","starred_url":"https://api.github.com/users/evidolob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evidolob/subscriptions","organizations_url":"https://api.github.com/users/evidolob/orgs","repos_url":"https://api.github.com/users/evidolob/repos","events_url":"https://api.github.com/users/evidolob/events{/privacy}","received_events_url":"https://api.github.com/users/evidolob/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":882621075,"node_id":"MDU6TGFiZWw4ODI2MjEwNzU=","url":"https://api.github.com/repos/theia-ide/theia/labels/plug-in%20system","name":"plug-in system","color":"c2e0c6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/theia-ide/theia/pulls/3414/commits","review_comments_url":"https://api.github.com/repos/theia-ide/theia/pulls/3414/comments","review_comment_url":"https://api.github.com/repos/theia-ide/theia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theia-ide/theia/issues/3414/comments","statuses_url":"https://api.github.com/repos/theia-ide/theia/statuses/c4a899bb75e45bcda737f331978bfdd87adcbd53","head":{"label":"theia-ide:az/lens","ref":"az/lens","sha":"c4a899bb75e45bcda737f331978bfdd87adcbd53","user":{"login":"theia-ide","id":28530323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NTMwMzIz","avatar_url":"https://avatars1.githubusercontent.com/u/28530323?v=4","gravatar_id":"","url":"https://api.github.com/users/theia-ide","html_url":"https://github.com/theia-ide","followers_url":"https://api.github.com/users/theia-ide/followers","following_url":"https://api.github.com/users/theia-ide/following{/other_user}","gists_url":"https://api.github.com/users/theia-ide/gists{/gist_id}","starred_url":"https://api.github.com/users/theia-ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theia-ide/subscriptions","organizations_url":"https://api.github.com/users/theia-ide/orgs","repos_url":"https://api.github.com/users/theia-ide/repos","events_url":"https://api.github.com/users/theia-ide/events{/privacy}","received_events_url":"https://api.github.com/users/theia-ide/received_events","type":"Organization","site_admin":false},"repo":{"id":83050680,"node_id":"MDEwOlJlcG9zaXRvcnk4MzA1MDY4MA==","name":"theia","full_name":"theia-ide/theia","private":false,"owner":{"login":"theia-ide","id":28530323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NTMwMzIz","avatar_url":"https://avatars1.githubusercontent.com/u/28530323?v=4","gravatar_id":"","url":"https://api.github.com/users/theia-ide","html_url":"https://github.com/theia-ide","followers_url":"https://api.github.com/users/theia-ide/followers","following_url":"https://api.github.com/users/theia-ide/following{/other_user}","gists_url":"https://api.github.com/users/theia-ide/gists{/gist_id}","starred_url":"https://api.github.com/users/theia-ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theia-ide/subscriptions","organizations_url":"https://api.github.com/users/theia-ide/orgs","repos_url":"https://api.github.com/users/theia-ide/repos","events_url":"https://api.github.com/users/theia-ide/events{/privacy}","received_events_url":"https://api.github.com/users/theia-ide/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/theia-ide/theia","description":"Theia is a cloud & desktop IDE framework implemented in TypeScript.","fork":false,"url":"https://api.github.com/repos/theia-ide/theia","forks_url":"https://api.github.com/repos/theia-ide/theia/forks","keys_url":"https://api.github.com/repos/theia-ide/theia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theia-ide/theia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theia-ide/theia/teams","hooks_url":"https://api.github.com/repos/theia-ide/theia/hooks","issue_events_url":"https://api.github.com/repos/theia-ide/theia/issues/events{/number}","events_url":"https://api.github.com/repos/theia-ide/theia/events","assignees_url":"https://api.github.com/repos/theia-ide/theia/assignees{/user}","branches_url":"https://api.github.com/repos/theia-ide/theia/branches{/branch}","tags_url":"https://api.github.com/repos/theia-ide/theia/tags","blobs_url":"https://api.github.com/repos/theia-ide/theia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theia-ide/theia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theia-ide/theia/git/refs{/sha}","trees_url":"https://api.github.com/repos/theia-ide/theia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theia-ide/theia/statuses/{sha}","languages_url":"https://api.github.com/repos/theia-ide/theia/languages","stargazers_url":"https://api.github.com/repos/theia-ide/theia/stargazers","contributors_url":"https://api.github.com/repos/theia-ide/theia/contributors","subscribers_url":"https://api.github.com/repos/theia-ide/theia/subscribers","subscription_url":"https://api.github.com/repos/theia-ide/theia/subscription","commits_url":"https://api.github.com/repos/theia-ide/theia/commits{/sha}","git_commits_url":"https://api.github.com/repos/theia-ide/theia/git/commits{/sha}","comments_url":"https://api.github.com/repos/theia-ide/theia/comments{/number}","issue_comment_url":"https://api.github.com/repos/theia-ide/theia/issues/comments{/number}","contents_url":"https://api.github.com/repos/theia-ide/theia/contents/{+path}","compare_url":"https://api.github.com/repos/theia-ide/theia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theia-ide/theia/merges","archive_url":"https://api.github.com/repos/theia-ide/theia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theia-ide/theia/downloads","issues_url":"https://api.github.com/repos/theia-ide/theia/issues{/number}","pulls_url":"https://api.github.com/repos/theia-ide/theia/pulls{/number}","milestones_url":"https://api.github.com/repos/theia-ide/theia/milestones{/number}","notifications_url":"https://api.github.com/repos/theia-ide/theia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theia-ide/theia/labels{/name}","releases_url":"https://api.github.com/repos/theia-ide/theia/releases{/id}","deployments_url":"https://api.github.com/repos/theia-ide/theia/deployments","created_at":"2017-02-24T14:42:05Z","updated_at":"2018-11-07T06:12:39Z","pushed_at":"2018-11-06T18:49:55Z","git_url":"git://github.com/theia-ide/theia.git","ssh_url":"git@github.com:theia-ide/theia.git","clone_url":"https://github.com/theia-ide/theia.git","svn_url":"https://github.com/theia-ide/theia","homepage":"http://theia-ide.org","size":111750,"stargazers_count":1824,"watchers_count":1824,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":264,"mirror_url":null,"archived":false,"open_issues_count":692,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":264,"open_issues":692,"watchers":1824,"default_branch":"master"}},"base":{"label":"theia-ide:master","ref":"master","sha":"1efad7cb520eb760d75e40c24e97e6b6adce4897","user":{"login":"theia-ide","id":28530323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NTMwMzIz","avatar_url":"https://avatars1.githubusercontent.com/u/28530323?v=4","gravatar_id":"","url":"https://api.github.com/users/theia-ide","html_url":"https://github.com/theia-ide","followers_url":"https://api.github.com/users/theia-ide/followers","following_url":"https://api.github.com/users/theia-ide/following{/other_user}","gists_url":"https://api.github.com/users/theia-ide/gists{/gist_id}","starred_url":"https://api.github.com/users/theia-ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theia-ide/subscriptions","organizations_url":"https://api.github.com/users/theia-ide/orgs","repos_url":"https://api.github.com/users/theia-ide/repos","events_url":"https://api.github.com/users/theia-ide/events{/privacy}","received_events_url":"https://api.github.com/users/theia-ide/received_events","type":"Organization","site_admin":false},"repo":{"id":83050680,"node_id":"MDEwOlJlcG9zaXRvcnk4MzA1MDY4MA==","name":"theia","full_name":"theia-ide/theia","private":false,"owner":{"login":"theia-ide","id":28530323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4NTMwMzIz","avatar_url":"https://avatars1.githubusercontent.com/u/28530323?v=4","gravatar_id":"","url":"https://api.github.com/users/theia-ide","html_url":"https://github.com/theia-ide","followers_url":"https://api.github.com/users/theia-ide/followers","following_url":"https://api.github.com/users/theia-ide/following{/other_user}","gists_url":"https://api.github.com/users/theia-ide/gists{/gist_id}","starred_url":"https://api.github.com/users/theia-ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theia-ide/subscriptions","organizations_url":"https://api.github.com/users/theia-ide/orgs","repos_url":"https://api.github.com/users/theia-ide/repos","events_url":"https://api.github.com/users/theia-ide/events{/privacy}","received_events_url":"https://api.github.com/users/theia-ide/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/theia-ide/theia","description":"Theia is a cloud & desktop IDE framework implemented in TypeScript.","fork":false,"url":"https://api.github.com/repos/theia-ide/theia","forks_url":"https://api.github.com/repos/theia-ide/theia/forks","keys_url":"https://api.github.com/repos/theia-ide/theia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theia-ide/theia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theia-ide/theia/teams","hooks_url":"https://api.github.com/repos/theia-ide/theia/hooks","issue_events_url":"https://api.github.com/repos/theia-ide/theia/issues/events{/number}","events_url":"https://api.github.com/repos/theia-ide/theia/events","assignees_url":"https://api.github.com/repos/theia-ide/theia/assignees{/user}","branches_url":"https://api.github.com/repos/theia-ide/theia/branches{/branch}","tags_url":"https://api.github.com/repos/theia-ide/theia/tags","blobs_url":"https://api.github.com/repos/theia-ide/theia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theia-ide/theia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theia-ide/theia/git/refs{/sha}","trees_url":"https://api.github.com/repos/theia-ide/theia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theia-ide/theia/statuses/{sha}","languages_url":"https://api.github.com/repos/theia-ide/theia/languages","stargazers_url":"https://api.github.com/repos/theia-ide/theia/stargazers","contributors_url":"https://api.github.com/repos/theia-ide/theia/contributors","subscribers_url":"https://api.github.com/repos/theia-ide/theia/subscribers","subscription_url":"https://api.github.com/repos/theia-ide/theia/subscription","commits_url":"https://api.github.com/repos/theia-ide/theia/commits{/sha}","git_commits_url":"https://api.github.com/repos/theia-ide/theia/git/commits{/sha}","comments_url":"https://api.github.com/repos/theia-ide/theia/comments{/number}","issue_comment_url":"https://api.github.com/repos/theia-ide/theia/issues/comments{/number}","contents_url":"https://api.github.com/repos/theia-ide/theia/contents/{+path}","compare_url":"https://api.github.com/repos/theia-ide/theia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theia-ide/theia/merges","archive_url":"https://api.github.com/repos/theia-ide/theia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theia-ide/theia/downloads","issues_url":"https://api.github.com/repos/theia-ide/theia/issues{/number}","pulls_url":"https://api.github.com/repos/theia-ide/theia/pulls{/number}","milestones_url":"https://api.github.com/repos/theia-ide/theia/milestones{/number}","notifications_url":"https://api.github.com/repos/theia-ide/theia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theia-ide/theia/labels{/name}","releases_url":"https://api.github.com/repos/theia-ide/theia/releases{/id}","deployments_url":"https://api.github.com/repos/theia-ide/theia/deployments","created_at":"2017-02-24T14:42:05Z","updated_at":"2018-11-07T06:12:39Z","pushed_at":"2018-11-06T18:49:55Z","git_url":"git://github.com/theia-ide/theia.git","ssh_url":"git@github.com:theia-ide/theia.git","clone_url":"https://github.com/theia-ide/theia.git","svn_url":"https://github.com/theia-ide/theia","homepage":"http://theia-ide.org","size":111750,"stargazers_count":1824,"watchers_count":1824,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":264,"mirror_url":null,"archived":false,"open_issues_count":692,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":264,"open_issues":692,"watchers":1824,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/theia-ide/theia/pulls/3414"},"html":{"href":"https://github.com/theia-ide/theia/pull/3414"},"issue":{"href":"https://api.github.com/repos/theia-ide/theia/issues/3414"},"comments":{"href":"https://api.github.com/repos/theia-ide/theia/issues/3414/comments"},"review_comments":{"href":"https://api.github.com/repos/theia-ide/theia/pulls/3414/comments"},"review_comment":{"href":"https://api.github.com/repos/theia-ide/theia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theia-ide/theia/pulls/3414/commits"},"statuses":{"href":"https://api.github.com/repos/theia-ide/theia/statuses/c4a899bb75e45bcda737f331978bfdd87adcbd53"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"benoitf"}}