<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div><b>From:</b> "Torsten Bergmann" <<a href="mailto:astares@gmx.de">astares@gmx.de</a>><br><b>Date:</b> January 25, 2018 at 11:51:17 PM PST<br><b>To:</b> <a href="mailto:pharo-dev@lists.pharo.org">pharo-dev@lists.pharo.org</a><br><b>Subject:</b> <b>Re: [Pharo-dev] Code Completion</b><br><b>Reply-To:</b> Pharo Development List <<a href="mailto:pharo-dev@lists.pharo.org">pharo-dev@lists.pharo.org</a>><br><br></div><div><span>Hi Myroslava,</span><br><span></span><br><span>some infos:</span><br><span> </span><br><span>Initially for Squeak there was "eCompletion" written by Ruben Bakker. According to the package "eCompletion is code </span><br><span>completion inspired by eclipse", it required MCInstaller, Shout 4 and RoelTyper.</span><br><span><a href="http://uncomplex.net/ecompletion/">http://uncomplex.net/ecompletion/</a></span><br><span></span><br><span>Back in Squeak "Shout" was used to have syntax highlighting as you type.</span><br><span>RoelTyper is a fast type reconstructor for Smalltalk (name comes from its Author Roel Wuyts)</span><br><span><a href="https://roelwuyts.be/roeltyper/index.html">https://roelwuyts.be/roeltyper/index.html</a></span><br><span><a href="https://www.youtube.com/watch?v=CvKTCSv7s8s">https://www.youtube.com/watch?v=CvKTCSv7s8s</a></span><br><span></span><br><span>Later oCompletion followed - "OCompletion builds on ECompletion and improves its accuracy."</span><br><span><a href="http://www.squeaksource.com/OCompletion/">http://www.squeaksource.com/OCompletion/</a></span><br><span><a href="http://www.inf.unisi.ch/phd/robbes/papers/ASE2008-completion.pdf">http://www.inf.unisi.ch/phd/robbes/papers/ASE2008-completion.pdf</a></span><br><span>OCompletion uses (based on recent activity) considerably improves the accuracy of code completion. That is, </span><br><span>the actual selector you want to insert is usually in the top 3 matches OCompletion proposes.</span><br><span><a href="https://news.squeak.org/tag/ocompletion/">https://news.squeak.org/tag/ocompletion/</a></span><br><span></span><br><span>A paper you should read is</span><br><span><a href="https://users.dcc.uchile.cl/~rrobbes/p/JASE-completion.pdf">https://users.dcc.uchile.cl/~rrobbes/p/JASE-completion.pdf</a></span><br><span>OCompletion is a re-working of the venerable eCompletion package, based on research done by Romain Robbes and Michele Lanza.</span><br><span></span><br><span>OCompletion is in Pharo since Pharo 2.0</span><br><span>There already was a discussion about better completion back in 2015</span><br><span><a href="https://www.mail-archive.com/pharo-users@lists.pharo.org/msg14835.html">https://www.mail-archive.com/pharo-users@lists.pharo.org/msg14835.html</a> based on the need for pluggability</span><br><span>(<a href="https://pharo.fogbugz.com/f/cases/13124/NECContext-needs-plugin-design">https://pharo.fogbugz.com/f/cases/13124/NECContext-needs-plugin-design</a>) and basing it on AST instead of Shout</span><br><span><a href="https://pharo.fogbugz.com/f/cases/10219/Completion-enter-on-accept-awkwardness">https://pharo.fogbugz.com/f/cases/10219/Completion-enter-on-accept-awkwardness</a></span><br><span></span><br><span>So NECController is the old code and NOCController (there was a setting to change from one to the other)</span><br><span>ECompletion was just a list of matching classes/selectors. OCompletion added some candy like showing first last typed entries </span><br><span>(with some other heuristic).</span><br><span></span><br><span><a href="http://www.jarober.com/blog/blogView?showComments=true&title=ST+4U+46%3A+Autocomplete+in+Pharo&entry=3474862713">http://www.jarober.com/blog/blogView?showComments=true&title=ST+4U+46%3A+Autocomplete+in+Pharo&entry=3474862713</a></span><br><span></span><br><span></span><br><span>What I always liked in Eclipse compared to Pharo is that you can code complete an expression and</span><br><span>the parameters are visualized with a rectangle and by "tabbing" you can fill each of them:</span><br><span></span><br><span><a href="https://www.youtube.com/watch?v=OMbVQcZ0gV8">https://www.youtube.com/watch?v=OMbVQcZ0gV8</a></span><br><span></span><br><span>Also one can do own code templates who are used in the completion then:</span><br><span><a href="https://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_add_codetemp.htm">https://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_add_codetemp.htm</a></span><br><span></span><br><span></span><br><span>Some other alternatives: CACHECA is a cache language model based code suggestion tool (<a href="https://github.com/christinef/CACHECA">https://github.com/christinef/CACHECA</a>) for Eclipse</span><br><span>which could be seen in <a href="https://www.youtube.com/watch?v=3INk0N3JNtc">https://www.youtube.com/watch?v=3INk0N3JNtc</a></span><br><span></span><br><span>RubyMine code completion for Ruby</span><br><span><a href="https://www.jetbrains.com/help/ruby/auto-completing-code.html">https://www.jetbrains.com/help/ruby/auto-completing-code.html</a></span><br><span></span><br><span></span><br><span>Thanks</span><br><span>T.</span><br><span></span><br><span>Gesendet: Donnerstag, 25. Januar 2018 um 22:52 Uhr</span><br><span>Von: "Myroslava Romaniuk" <<a href="mailto:romaniuk@ucu.edu.ua">romaniuk@ucu.edu.ua</a>></span><br><span>An: "Pharo Development List" <<a href="mailto:pharo-dev@lists.pharo.org">pharo-dev@lists.pharo.org</a>></span><br><span>Betreff: [Pharo-dev] Code Completion</span><br><span></span><br><span>Hi, I'm Myroslava</span><br><span> </span><br><span>Some of you might remember how last year I did GSoC and worked on Renraku / Quality Assistant with Yuriy.</span><br><span> </span><br><span>This year Stephane suggested several projects I could work on, and one of them is improving code completion in Pharo, in particular ecompletion. Could you recommend any resources that would help me better understand how it works? I'd also like to know what's the difference between ecompletion and ocompletion, and what's NOC and NEC completion, as it doesn't seem very clear to me so far?</span><br><span> </span><br><span>If any of you worked on it and can help me get started, I would really appreciate it.</span><br><span> </span><br><span>Thanks</span><br><span></span><br></div></body></html>