{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4416","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4416/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4416/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4416/events","html_url":"https://github.com/Microsoft/TypeScript/issues/4416","id":102567720,"number":4416,"title":"Hooking up getDocCommentTemplateAtPosition() in Eclipse","user":{"login":"derekcicerone","id":1081904,"avatar_url":"https://avatars.githubusercontent.com/u/1081904?v=3","gravatar_id":"","url":"https://api.github.com/users/derekcicerone","html_url":"https://github.com/derekcicerone","followers_url":"https://api.github.com/users/derekcicerone/followers","following_url":"https://api.github.com/users/derekcicerone/following{/other_user}","gists_url":"https://api.github.com/users/derekcicerone/gists{/gist_id}","starred_url":"https://api.github.com/users/derekcicerone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekcicerone/subscriptions","organizations_url":"https://api.github.com/users/derekcicerone/orgs","repos_url":"https://api.github.com/users/derekcicerone/repos","events_url":"https://api.github.com/users/derekcicerone/events{/privacy}","received_events_url":"https://api.github.com/users/derekcicerone/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/API","name":"API","color":"bfe5bf"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Question","name":"Question","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-08-22T21:15:45Z","updated_at":"2015-08-26T20:45:14Z","closed_at":null,"body":"I'm really excited by the new getDocCommentTemplateAtPosition() functionality and I'm trying to hook it up for Eclipse (for https://github.com/palantir/eclipse-typescript).\r\n\r\nIn Eclipse, the typical way of starting a documentation comment is by typing \"/**\" and then hitting \\<enter>. It looks like the current getDocCommentTemplateAtPosition() may not support this method of autocompleting a doc comment though (but perhaps I'm misunderstanding how to call it)."},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/135165675","html_url":"https://github.com/Microsoft/TypeScript/issues/4416#issuecomment-135165675","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4416","id":135165675,"user":{"login":"CyrusNajmabadi","id":4564579,"avatar_url":"https://avatars.githubusercontent.com/u/4564579?v=3","gravatar_id":"","url":"https://api.github.com/users/CyrusNajmabadi","html_url":"https://github.com/CyrusNajmabadi","followers_url":"https://api.github.com/users/CyrusNajmabadi/followers","following_url":"https://api.github.com/users/CyrusNajmabadi/following{/other_user}","gists_url":"https://api.github.com/users/CyrusNajmabadi/gists{/gist_id}","starred_url":"https://api.github.com/users/CyrusNajmabadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyrusNajmabadi/subscriptions","organizations_url":"https://api.github.com/users/CyrusNajmabadi/orgs","repos_url":"https://api.github.com/users/CyrusNajmabadi/repos","events_url":"https://api.github.com/users/CyrusNajmabadi/events{/privacy}","received_events_url":"https://api.github.com/users/CyrusNajmabadi/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T20:45:14Z","updated_at":"2015-08-26T20:45:14Z","body":"> I thought we were trying to move to the syntactic classifier,\r\n\r\nEven with the syntactic classifier, the lexical classifier is still necessary.  \r\n\r\n1. It's what is used when a file is open and we don't even have a tree.  If we need ot wait for a tree, you could have black text for several seconds.  (This is easy for you to try out by just disabling the lexical classifier and trying to open a compiler file).\r\n\r\n2. Even if we have trees, syntactic classification can be noticeably slow.  This is because perception time for classification is on the order of milliseconds.  Syntactically classifying still involves us having to marshal to another thread, wait for an existing task to finish, marshall over to the script side, have the script side incrementally parse, marshall over the results, and then then have the async tagger display things.  The async tagger itself adds overhead as well as it batches and throttles.  So syntactic classification in the absence of lexical can be very noticeable. \r\n\r\nThe benefit of Syntactic classification is *correctness*.  The benefit of Lexical is *perf*.  You want both, and so we need to keep both.  \r\n\r\nNote: thanks to @JsonFreeman's great idea about ClassificationTag ordering, we don't need to coordinate the two classifiers.  They can both produce results on their own schedule, and the Syntactic classification tags will naturally override the lexical one.\r\n\r\nThat way things look really fast (because of the lexical classifier doing things quickly), but they'll always appear accurate almost immediately.  In the 99% case where you're not tying anything lexically odd, you won't even notice because no visible change will happen."}}