Code Completion in Pharo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Code Completion in Pharo

komarlu2
Hello to all,

I am a student at the Faculty of Information Technology of the Czech Technical University in Prague and I decided to make Code Completion in Pharo the topic of my Bachelor's degree and try to improve it.

If you have suggestions on what should change / how to change it so you would be satisfied with it, I will appreciate any input on this topic. It would mean a lot to me if you could find two minutes and take this survey (there are only like 7 questions, so it won't take longer than those 2 minutes):

https://docs.google.com/forms/d/e/1FAIpQLSd7lx6gIN079-vMvMwRsnA_AX_e_7sZEz2XJQ4059nk_-LV6w/viewform

Regards


Lukas
Reply | Threaded
Open this post in threaded view
|

Re: Code Completion in Pharo

Guillermo Polito
Hi Lukas,

This is cool and an interesting topic. Something that I would like is to see wether we can merge the auto-completion with the AST-based suggestion mechanism (right click on a piece of code -> suggestions), that provides suggestions for refactorings and code browsing. I mean, you can see auto-completion as a particular suggestion to add a word where the current cursor is placed.

A somehow related question is to apply type inference mechanisms to enhance the suggested completions. You can check the work done lately on type inferencers for Pharo in here:


Guille


On Tue, Feb 14, 2017 at 6:57 PM, <[hidden email]> wrote:
Hello to all,

I am a student at the Faculty of Information Technology of the Czech Technical University in Prague and I decided to make Code Completion in Pharo the topic of my Bachelor's degree and try to improve it.

If you have suggestions on what should change / how to change it so you would be satisfied with it, I will appreciate any input on this topic. It would mean a lot to me if you could find two minutes and take this survey (there are only like 7 questions, so it won't take longer than those 2 minutes):


Regards


Lukas

Reply | Threaded
Open this post in threaded view
|

Re: Code Completion in Pharo

stepharong
In reply to this post by komarlu2
Hi lukas

Nice to see you here.
I would start to look at the code and clean what is strange.

- Did you test the difference between the two algorithms?

- Did you play with NECPreferences?

- I would like to see what is the difference between the NOC class and the NECclass

- I would like to remove the link with Smalltalk tools

- I would be nice to improve the class comments. 

- there are some tests for NEC but
-- are there any good? Did you read them?
- there are no tests for NOC
-- it would be nice to add tests.

Looking at the code

quickFillWithCategoriesMatching: pattern
     (Smalltalk organization categoriesMatching: pattern) do: [:category | (Smalltalk organization classesInCategory: category) do: [:e | self quickFillWithClass: e]]

>> 
Smalltalk globals organization 


no senders? Remove?
Class categories are an obsolete concepts so we should clean this. 


NOCompletionTable comment
I keep track of symbols to be retrieved in ocompletion algorithm. Unlike ecompletion, I learn something and try to retrieve users last occurences of typing sequences first, then the system symbols which match.
TODO remove stupid symbols (like packages and method extensions and timestamp)




Hello to all,

I am a student at the Faculty of Information Technology of the Czech Technical University in Prague and I decided to make Code Completion in Pharo the topic of my Bachelor's degree and try to improve it.

If you have suggestions on what should change / how to change it so you would be satisfied with it, I will appreciate any input on this topic. It would mean a lot to me if you could find two minutes and take this survey (there are only like 7 questions, so it won't take longer than those 2 minutes):

https://docs.google.com/forms/d/e/1FAIpQLSd7lx6gIN079-vMvMwRsnA_AX_e_7sZEz2XJQ4059nk_-LV6w/viewform

Regards


Lukas



--
Using Opera's mail client: http://www.opera.com/mail/
Reply | Threaded
Open this post in threaded view
|

Re: Code Completion in Pharo

Torsten Bergmann
Beside regular Smalltalk completion I personally would like to see also support for custom
templates in the code completion (similar to what Eclipse provides, see https://www.youtube.com/watch?v=zqm4CB1BX6Y).

Reply | Threaded
Open this post in threaded view
|

Re: Code Completion in Pharo

Ben Coman
In reply to this post by komarlu2
How would people feel about... 
when an item is selected from the code completion popup (e.g. with <Enter>) that the arguments get expanded as well.  These might show up red initially if there is no matching variable and easily show what needs to be edited.

cheers -ben

On Wed, Feb 15, 2017 at 1:57 AM, <[hidden email]> wrote:
Hello to all,

I am a student at the Faculty of Information Technology of the Czech Technical University in Prague and I decided to make Code Completion in Pharo the topic of my Bachelor's degree and try to improve it.

If you have suggestions on what should change / how to change it so you would be satisfied with it, I will appreciate any input on this topic. It would mean a lot to me if you could find two minutes and take this survey (there are only like 7 questions, so it won't take longer than those 2 minutes):


Regards


Lukas

Reply | Threaded
Open this post in threaded view
|

Re: Code Completion in Pharo

Ben Coman
Another random idea, that you can use something similar to Finder>Examples from within the debugger.  That is, a shortcut brings up a small popup dialog kind-of inline with the cursor where you can feed live variables into the pattern matching.  

cheers -ben   

On Sat, Feb 25, 2017 at 7:09 AM, Ben Coman <[hidden email]> wrote:
How would people feel about... 
when an item is selected from the code completion popup (e.g. with <Enter>) that the arguments get expanded as well.  These might show up red initially if there is no matching variable and easily show what needs to be edited.

cheers -ben

On Wed, Feb 15, 2017 at 1:57 AM, <[hidden email]> wrote:
Hello to all,

I am a student at the Faculty of Information Technology of the Czech Technical University in Prague and I decided to make Code Completion in Pharo the topic of my Bachelor's degree and try to improve it.

If you have suggestions on what should change / how to change it so you would be satisfied with it, I will appreciate any input on this topic. It would mean a lot to me if you could find two minutes and take this survey (there are only like 7 questions, so it won't take longer than those 2 minutes):


Regards


Lukas


Reply | Threaded
Open this post in threaded view
|

Re: Code Completion in Pharo

webwarrior
In reply to this post by komarlu2
One thing that is broken in current code completion and needs to be addressed is when you try to edit keyword messages.

For example you have:

dict at: #foo

and you want to add ifAbsent: part.

Current implementation won't help you, because it works out of context and doesn't recognize the whole selector. Same when you want to edit any part of keyword message.

I'd like to see code completion operating on message send level, not on word (token?) level.

Is it clear what I'm trying to say?
Reply | Threaded
Open this post in threaded view
|

Re: Code Completion in Pharo

stepharong
On Sat, 04 Mar 2017 20:07:00 +0100, webwarrior <[hidden email]> wrote:

> One thing that is broken in current code completion and needs to be  
> addressed
> is when you try to edit keyword messages.
>
> For example you have:
>
> dict at: #foo
>
> and you want to add ifAbsent: part.
>
> Current implementation won't help you, because it works out of context  
> and
> doesn't recognize the whole selector. Same when you want to edit any  
> part of
> keyword message.
>
> I'd like to see code completion operating on message send level, not on  
> word
> (token?) level.

+ 1
I would love also to have

        it -> ifTrue: [ | cursor here ]

and also even if this is not strictly about completion
selector: navigation

        | self at: key ifAbsent:
        then
        self |at: key ifAbsent:
        then
        self at:| key ifAbsent:
        then
        self at: key |ifAbsent:


> Is it clear what I'm trying to say?
>
>
>
> --
> View this message in context:  
> http://forum.world.st/Code-Completion-in-Pharo-tp4934313p4937296.html
> Sent from the Pharo Smalltalk Developers mailing list archive at  
> Nabble.com.
>


--
Using Opera's mail client: http://www.opera.com/mail/