Code completion differences at browser and workspace

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

Code completion differences at browser and workspace

laura
Hi all,

I've noticed that the code completition tool shows a different list if brought up at a workspace or at a system browser. Particulary workspace's completition list is broader than browser's one. 

For instance if while writting a method i have already accepted other method names but haven't yet defined them in any class, these selectors are shown in worskpace's completition but don't in browser's. So while at the system browser i have to waste keystrokes bringing up the manually the other completition tool and search in that list the selector i want.

So, question : how do i make the completition tool show at system browser the same list that it would show at a workspace?

Best,
Laura
Reply | Threaded
Open this post in threaded view
|

Re: Code completion differences at browser and workspace

Nicolai Hess
2015-01-29 22:06 GMT+01:00 Laura Risani <[hidden email]>:
Hi all,

I've noticed that the code completition tool shows a different list if brought up at a workspace or at a system browser. Particulary workspace's completition list is broader than browser's one. 

For instance if while writting a method i have already accepted other method names but haven't yet defined them in any class, these selectors are shown in worskpace's completition but don't in browser's. So while at the system browser i have to waste keystrokes bringing up the manually the other completition tool and search in that list the selector i want.

So, question : how do i make the completition tool show at system browser the same list that it would show at a workspace?

Best,
Laura


There is one difference between the Workspace and the SystemBrowser.
In the SystemBrowers, the one method that you are editing belongs to one (known) class and if you
start typing
"self"
the code completion can guess which methods of that class (or superclasses) can be called.
In the Workspace you don't have this (class-) context.

But the code completion is smart enough to guess the actual type in some situations, for example
in a Workspace:

|m|
m:= new Morph.
m handleKey

at this point, the code completion context knows, that "m" is a Morph and therefore only shows the methods
from the class Morph, starting with "handleKey".
This completion menu should be the same, as if  you start with
self handleKey
in the SystemBrowser, while editing a method of the class Morph.

nicolai


Reply | Threaded
Open this post in threaded view
|

Re: Code completion differences at browser and workspace

laura
Hi Nicolai ,

I have noticed what you say, because there is a label in code completion with the class name . Yet what i haven't explicitly considered before, and your comment made me notice, is that in order to code copmletition to function properly, all the previous text should be a valid expression.

Thank you for the teaching!
Best,
Laura

On Thu, Jan 29, 2015 at 9:02 PM, Nicolai Hess <[hidden email]> wrote:
2015-01-29 22:06 GMT+01:00 Laura Risani <[hidden email]>:
Hi all,

I've noticed that the code completition tool shows a different list if brought up at a workspace or at a system browser. Particulary workspace's completition list is broader than browser's one. 

For instance if while writting a method i have already accepted other method names but haven't yet defined them in any class, these selectors are shown in worskpace's completition but don't in browser's. So while at the system browser i have to waste keystrokes bringing up the manually the other completition tool and search in that list the selector i want.

So, question : how do i make the completition tool show at system browser the same list that it would show at a workspace?

Best,
Laura


There is one difference between the Workspace and the SystemBrowser.
In the SystemBrowers, the one method that you are editing belongs to one (known) class and if you
start typing
"self"
the code completion can guess which methods of that class (or superclasses) can be called.
In the Workspace you don't have this (class-) context.

But the code completion is smart enough to guess the actual type in some situations, for example
in a Workspace:

|m|
m:= new Morph.
m handleKey

at this point, the code completion context knows, that "m" is a Morph and therefore only shows the methods
from the class Morph, starting with "handleKey".
This completion menu should be the same, as if  you start with
self handleKey
in the SystemBrowser, while editing a method of the class Morph.

nicolai