Hi Myroslava,

some infos:
 
Initially for Squeak there was "eCompletion" written by Ruben Bakker. According 
to the package "eCompletion is code 
completion inspired by eclipse", it required MCInstaller, Shout 4 and RoelTyper.
http://uncomplex.net/ecompletion/

Back in Squeak "Shout" was used to have syntax highlighting as you type.
RoelTyper is a fast type reconstructor for Smalltalk (name comes from its 
Author Roel Wuyts)
https://roelwuyts.be/roeltyper/index.html
https://www.youtube.com/watch?v=CvKTCSv7s8s

Later oCompletion followed - "OCompletion builds on ECompletion and improves 
its accuracy."
http://www.squeaksource.com/OCompletion/
http://www.inf.unisi.ch/phd/robbes/papers/ASE2008-completion.pdf
OCompletion uses (based on recent activity) considerably improves the accuracy 
of code completion. That is, 
the actual selector you want to insert is usually in the top 3 matches 
OCompletion proposes.
https://news.squeak.org/tag/ocompletion/

A paper you should read is
https://users.dcc.uchile.cl/~rrobbes/p/JASE-completion.pdf
OCompletion is a re-working of the venerable eCompletion package, based on 
research done by Romain Robbes and Michele Lanza.

OCompletion is in Pharo since Pharo 2.0
There already was a discussion about better completion back in 2015
https://www.mail-archive.com/[email protected]/msg14835.html based on 
the need for pluggability
(https://pharo.fogbugz.com/f/cases/13124/NECContext-needs-plugin-design) and 
basing it on AST instead of Shout
https://pharo.fogbugz.com/f/cases/10219/Completion-enter-on-accept-awkwardness

So NECController is the old code and NOCController (there was a setting to 
change from one to the other)
ECompletion was just a list of matching classes/selectors. OCompletion added 
some candy like showing first last typed entries 
(with some other heuristic).

http://www.jarober.com/blog/blogView?showComments=true&title=ST+4U+46%3A+Autocomplete+in+Pharo&entry=3474862713


What I always liked in Eclipse compared to Pharo is that you can code complete 
an expression and
the parameters are visualized with a rectangle and by "tabbing" you can fill 
each of them:

https://www.youtube.com/watch?v=OMbVQcZ0gV8

Also one can do own code templates who are used in the completion then:
https://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_add_codetemp.htm


Some other alternatives: CACHECA is a cache language model based code 
suggestion tool (https://github.com/christinef/CACHECA) for Eclipse
which could be seen in https://www.youtube.com/watch?v=3INk0N3JNtc

RubyMine code completion for Ruby
https://www.jetbrains.com/help/ruby/auto-completing-code.html


Thanks
T.

Gesendet: Donnerstag, 25. Januar 2018 um 22:52 Uhr
Von: "Myroslava Romaniuk" <[email protected]>
An: "Pharo Development List" <[email protected]>
Betreff: [Pharo-dev] Code Completion

Hi, I'm Myroslava
 
Some of you might remember how last year I did GSoC and worked on Renraku / 
Quality Assistant with Yuriy.
 
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?
 
If any of you worked on it and can help me get started, I would really 
appreciate it.
 
Thanks

Reply via email to