{"action":"created","comment":{"url":"https://api.github.com/repos/bardsoftware/ace/pulls/comments/77643954","id":77643954,"diff_hunk":"@@ -149,12 +160,41 @@ define((require, exports, module) ->\n       else\n         callback(null, @cache)\n \n+  ###\n+  # Show popup if token.type at current pos is one of allowedTypes[i]\n+  # @ (editor) --> editor\n+  # @ (list of strings) -- allowedTypes\n+  ###\n+  showPopupIfTokenIsOneOfTypes = (editor, allowedTypes) ->\n+    if editor.completer?\n+      pos = editor.getCursorPosition()\n+      session = editor.getSession()\n+      token = editor.session.getTokenAt(pos.row, pos.column)\n+\n+      if token?\n+        for type in allowedTypes\n+          if LatexParsingContext.isType(token, type)\n+            editor.completer.showPopup(editor)\n+\n   class TexCompleter\n       constructor: ->\n-        @refGetter = new ReferenceGetter()\n-      @init: (editor) ->  init(editor,  {win: \"enter\", mac: \"enter\"})\n-\n+        @refGetter = new PropertyGetter(processReferenceJson)\n+        @citeGetter = new PropertyGetter(processCitationJson)\n+      @init: (editor) ->\n+        init(editor,  {win: \"enter\", mac: \"enter\"})\n+\n+        # Auto showing popup in ref, cite and other context\n+        editor.commands.on('afterExec', (event) ->","path":"lib/ace/ext/papeeria/tex_completer.coffee","position":73,"original_position":72,"commit_id":"b71eaaa84cae2cc71f3c5c7cfc0f865a8e45d576","original_commit_id":"eb3ef02fe5ea48a3b346e963551cb3cfdd4fc016","user":{"login":"dbarashev","id":2028330,"avatar_url":"https://avatars.githubusercontent.com/u/2028330?v=3","gravatar_id":"","url":"https://api.github.com/users/dbarashev","html_url":"https://github.com/dbarashev","followers_url":"https://api.github.com/users/dbarashev/followers","following_url":"https://api.github.com/users/dbarashev/following{/other_user}","gists_url":"https://api.github.com/users/dbarashev/gists{/gist_id}","starred_url":"https://api.github.com/users/dbarashev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbarashev/subscriptions","organizations_url":"https://api.github.com/users/dbarashev/orgs","repos_url":"https://api.github.com/users/dbarashev/repos","events_url":"https://api.github.com/users/dbarashev/events{/privacy}","received_events_url":"https://api.github.com/users/dbarashev/received_events","type":"User","site_admin":false},"body":"why shall we bother at all? Can't we just live with changeCursor?","created_at":"2016-09-06T14:20:28Z","updated_at":"2016-09-06T14:20:28Z","html_url":"https://github.com/bardsoftware/ace/pull/84#discussion_r77643954","pull_request_url":"https://api.github.com/repos/bardsoftware/ace/pulls/84","_links":{"self":{"href":"https://api.github.com/repos/bardsoftware/ace/pulls/comments/77643954"},"html":{"href":"https://github.com/bardsoftware/ace/pull/84#discussion_r77643954"},"pull_request":{"href":"https://api.github.com/repos/bardsoftware/ace/pulls/84"}}},"pull_request":{"url":"https://api.github.com/repos/bardsoftware/ace/pulls/84","id":84111159,"html_url":"https://github.com/bardsoftware/ace/pull/84","diff_url":"https://github.com/bardsoftware/ace/pull/84.diff","patch_url":"https://github.com/bardsoftware/ace/pull/84.patch","issue_url":"https://api.github.com/repos/bardsoftware/ace/issues/84","number":84,"state":"open","locked":false,"title":"auto ref and citation","user":{"login":"Mikhail-M","id":5405304,"avatar_url":"https://avatars.githubusercontent.com/u/5405304?v=3","gravatar_id":"","url":"https://api.github.com/users/Mikhail-M","html_url":"https://github.com/Mikhail-M","followers_url":"https://api.github.com/users/Mikhail-M/followers","following_url":"https://api.github.com/users/Mikhail-M/following{/other_user}","gists_url":"https://api.github.com/users/Mikhail-M/gists{/gist_id}","starred_url":"https://api.github.com/users/Mikhail-M/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mikhail-M/subscriptions","organizations_url":"https://api.github.com/users/Mikhail-M/orgs","repos_url":"https://api.github.com/users/Mikhail-M/repos","events_url":"https://api.github.com/users/Mikhail-M/events{/privacy}","received_events_url":"https://api.github.com/users/Mikhail-M/received_events","type":"User","site_admin":false},"body":"First version\r\n","created_at":"2016-09-06T12:15:01Z","updated_at":"2016-09-06T14:20:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64dc7a0490c0da193dae4dcc450a234737bb7dd1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bardsoftware/ace/pulls/84/commits","review_comments_url":"https://api.github.com/repos/bardsoftware/ace/pulls/84/comments","review_comment_url":"https://api.github.com/repos/bardsoftware/ace/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bardsoftware/ace/issues/84/comments","statuses_url":"https://api.github.com/repos/bardsoftware/ace/statuses/b71eaaa84cae2cc71f3c5c7cfc0f865a8e45d576","head":{"label":"bardsoftware:tkt_83_auto_reference_and_citation","ref":"tkt_83_auto_reference_and_citation","sha":"b71eaaa84cae2cc71f3c5c7cfc0f865a8e45d576","user":{"login":"bardsoftware","id":2625618,"avatar_url":"https://avatars.githubusercontent.com/u/2625618?v=3","gravatar_id":"","url":"https://api.github.com/users/bardsoftware","html_url":"https://github.com/bardsoftware","followers_url":"https://api.github.com/users/bardsoftware/followers","following_url":"https://api.github.com/users/bardsoftware/following{/other_user}","gists_url":"https://api.github.com/users/bardsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/bardsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bardsoftware/subscriptions","organizations_url":"https://api.github.com/users/bardsoftware/orgs","repos_url":"https://api.github.com/users/bardsoftware/repos","events_url":"https://api.github.com/users/bardsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/bardsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":13590146,"name":"ace","full_name":"bardsoftware/ace","owner":{"login":"bardsoftware","id":2625618,"avatar_url":"https://avatars.githubusercontent.com/u/2625618?v=3","gravatar_id":"","url":"https://api.github.com/users/bardsoftware","html_url":"https://github.com/bardsoftware","followers_url":"https://api.github.com/users/bardsoftware/followers","following_url":"https://api.github.com/users/bardsoftware/following{/other_user}","gists_url":"https://api.github.com/users/bardsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/bardsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bardsoftware/subscriptions","organizations_url":"https://api.github.com/users/bardsoftware/orgs","repos_url":"https://api.github.com/users/bardsoftware/repos","events_url":"https://api.github.com/users/bardsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/bardsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bardsoftware/ace","description":"Ace (Ajax.org Cloud9 Editor)","fork":true,"url":"https://api.github.com/repos/bardsoftware/ace","forks_url":"https://api.github.com/repos/bardsoftware/ace/forks","keys_url":"https://api.github.com/repos/bardsoftware/ace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bardsoftware/ace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bardsoftware/ace/teams","hooks_url":"https://api.github.com/repos/bardsoftware/ace/hooks","issue_events_url":"https://api.github.com/repos/bardsoftware/ace/issues/events{/number}","events_url":"https://api.github.com/repos/bardsoftware/ace/events","assignees_url":"https://api.github.com/repos/bardsoftware/ace/assignees{/user}","branches_url":"https://api.github.com/repos/bardsoftware/ace/branches{/branch}","tags_url":"https://api.github.com/repos/bardsoftware/ace/tags","blobs_url":"https://api.github.com/repos/bardsoftware/ace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bardsoftware/ace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bardsoftware/ace/git/refs{/sha}","trees_url":"https://api.github.com/repos/bardsoftware/ace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bardsoftware/ace/statuses/{sha}","languages_url":"https://api.github.com/repos/bardsoftware/ace/languages","stargazers_url":"https://api.github.com/repos/bardsoftware/ace/stargazers","contributors_url":"https://api.github.com/repos/bardsoftware/ace/contributors","subscribers_url":"https://api.github.com/repos/bardsoftware/ace/subscribers","subscription_url":"https://api.github.com/repos/bardsoftware/ace/subscription","commits_url":"https://api.github.com/repos/bardsoftware/ace/commits{/sha}","git_commits_url":"https://api.github.com/repos/bardsoftware/ace/git/commits{/sha}","comments_url":"https://api.github.com/repos/bardsoftware/ace/comments{/number}","issue_comment_url":"https://api.github.com/repos/bardsoftware/ace/issues/comments{/number}","contents_url":"https://api.github.com/repos/bardsoftware/ace/contents/{+path}","compare_url":"https://api.github.com/repos/bardsoftware/ace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bardsoftware/ace/merges","archive_url":"https://api.github.com/repos/bardsoftware/ace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bardsoftware/ace/downloads","issues_url":"https://api.github.com/repos/bardsoftware/ace/issues{/number}","pulls_url":"https://api.github.com/repos/bardsoftware/ace/pulls{/number}","milestones_url":"https://api.github.com/repos/bardsoftware/ace/milestones{/number}","notifications_url":"https://api.github.com/repos/bardsoftware/ace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bardsoftware/ace/labels{/name}","releases_url":"https://api.github.com/repos/bardsoftware/ace/releases{/id}","deployments_url":"https://api.github.com/repos/bardsoftware/ace/deployments","created_at":"2013-10-15T13:03:16Z","updated_at":"2016-07-04T14:13:07Z","pushed_at":"2016-09-06T13:50:43Z","git_url":"git://github.com/bardsoftware/ace.git","ssh_url":"git@github.com:bardsoftware/ace.git","clone_url":"https://github.com/bardsoftware/ace.git","svn_url":"https://github.com/bardsoftware/ace","homepage":"http://ace.c9.io","size":37549,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":5,"default_branch":"internship-2016"}},"base":{"label":"bardsoftware:internship-2016","ref":"internship-2016","sha":"0ca370e6f1a97fc981fe41a32e74e858838197d3","user":{"login":"bardsoftware","id":2625618,"avatar_url":"https://avatars.githubusercontent.com/u/2625618?v=3","gravatar_id":"","url":"https://api.github.com/users/bardsoftware","html_url":"https://github.com/bardsoftware","followers_url":"https://api.github.com/users/bardsoftware/followers","following_url":"https://api.github.com/users/bardsoftware/following{/other_user}","gists_url":"https://api.github.com/users/bardsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/bardsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bardsoftware/subscriptions","organizations_url":"https://api.github.com/users/bardsoftware/orgs","repos_url":"https://api.github.com/users/bardsoftware/repos","events_url":"https://api.github.com/users/bardsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/bardsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":13590146,"name":"ace","full_name":"bardsoftware/ace","owner":{"login":"bardsoftware","id":2625618,"avatar_url":"https://avatars.githubusercontent.com/u/2625618?v=3","gravatar_id":"","url":"https://api.github.com/users/bardsoftware","html_url":"https://github.com/bardsoftware","followers_url":"https://api.github.com/users/bardsoftware/followers","following_url":"https://api.github.com/users/bardsoftware/following{/other_user}","gists_url":"https://api.github.com/users/bardsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/bardsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bardsoftware/subscriptions","organizations_url":"https://api.github.com/users/bardsoftware/orgs","repos_url":"https://api.github.com/users/bardsoftware/repos","events_url":"https://api.github.com/users/bardsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/bardsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bardsoftware/ace","description":"Ace (Ajax.org Cloud9 Editor)","fork":true,"url":"https://api.github.com/repos/bardsoftware/ace","forks_url":"https://api.github.com/repos/bardsoftware/ace/forks","keys_url":"https://api.github.com/repos/bardsoftware/ace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bardsoftware/ace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bardsoftware/ace/teams","hooks_url":"https://api.github.com/repos/bardsoftware/ace/hooks","issue_events_url":"https://api.github.com/repos/bardsoftware/ace/issues/events{/number}","events_url":"https://api.github.com/repos/bardsoftware/ace/events","assignees_url":"https://api.github.com/repos/bardsoftware/ace/assignees{/user}","branches_url":"https://api.github.com/repos/bardsoftware/ace/branches{/branch}","tags_url":"https://api.github.com/repos/bardsoftware/ace/tags","blobs_url":"https://api.github.com/repos/bardsoftware/ace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bardsoftware/ace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bardsoftware/ace/git/refs{/sha}","trees_url":"https://api.github.com/repos/bardsoftware/ace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bardsoftware/ace/statuses/{sha}","languages_url":"https://api.github.com/repos/bardsoftware/ace/languages","stargazers_url":"https://api.github.com/repos/bardsoftware/ace/stargazers","contributors_url":"https://api.github.com/repos/bardsoftware/ace/contributors","subscribers_url":"https://api.github.com/repos/bardsoftware/ace/subscribers","subscription_url":"https://api.github.com/repos/bardsoftware/ace/subscription","commits_url":"https://api.github.com/repos/bardsoftware/ace/commits{/sha}","git_commits_url":"https://api.github.com/repos/bardsoftware/ace/git/commits{/sha}","comments_url":"https://api.github.com/repos/bardsoftware/ace/comments{/number}","issue_comment_url":"https://api.github.com/repos/bardsoftware/ace/issues/comments{/number}","contents_url":"https://api.github.com/repos/bardsoftware/ace/contents/{+path}","compare_url":"https://api.github.com/repos/bardsoftware/ace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bardsoftware/ace/merges","archive_url":"https://api.github.com/repos/bardsoftware/ace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bardsoftware/ace/downloads","issues_url":"https://api.github.com/repos/bardsoftware/ace/issues{/number}","pulls_url":"https://api.github.com/repos/bardsoftware/ace/pulls{/number}","milestones_url":"https://api.github.com/repos/bardsoftware/ace/milestones{/number}","notifications_url":"https://api.github.com/repos/bardsoftware/ace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bardsoftware/ace/labels{/name}","releases_url":"https://api.github.com/repos/bardsoftware/ace/releases{/id}","deployments_url":"https://api.github.com/repos/bardsoftware/ace/deployments","created_at":"2013-10-15T13:03:16Z","updated_at":"2016-07-04T14:13:07Z","pushed_at":"2016-09-06T13:50:43Z","git_url":"git://github.com/bardsoftware/ace.git","ssh_url":"git@github.com:bardsoftware/ace.git","clone_url":"https://github.com/bardsoftware/ace.git","svn_url":"https://github.com/bardsoftware/ace","homepage":"http://ace.c9.io","size":37549,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":5,"default_branch":"internship-2016"}},"_links":{"self":{"href":"https://api.github.com/repos/bardsoftware/ace/pulls/84"},"html":{"href":"https://github.com/bardsoftware/ace/pull/84"},"issue":{"href":"https://api.github.com/repos/bardsoftware/ace/issues/84"},"comments":{"href":"https://api.github.com/repos/bardsoftware/ace/issues/84/comments"},"review_comments":{"href":"https://api.github.com/repos/bardsoftware/ace/pulls/84/comments"},"review_comment":{"href":"https://api.github.com/repos/bardsoftware/ace/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bardsoftware/ace/pulls/84/commits"},"statuses":{"href":"https://api.github.com/repos/bardsoftware/ace/statuses/b71eaaa84cae2cc71f3c5c7cfc0f865a8e45d576"}}}}
{"actor":{"display_login":"dbarashev"}}