Code Assist Cont...

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

Code Assist Cont...

Seth Berman
Hi everyone,

Code Assist support for Vast is moving forward.  The design document is publicly available at https://inst.fogbugz.com/default.asp?W493.
A new map (VA Code Assist) has been uploaded to VAStGoodies, which is a tweaked version of the latest map that was available in the (now deprecated) StsBrowsersWin w/Code Completion map.
The items in the deprecated map not related to code assist are being worked separately.

The original discussion thread on Code Assist in Vast can still be viewed at http://forums.instantiations.com/viewtopic.php?f=12&t=6223.

Please feel free to provide comments and suggestions.

-- Seth Berman ([hidden email])

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Aw: Code Assist Cont...

Marten Feldtmann-2
Looks promising ...

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/MHVxUmVNM0VlMUVK.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Code Assist Cont...

Seth Berman
A snapshot of the code assist development branch (VA Code Assist V 8.0.3 [162] - DEV 1.0) has been pushed up to VAStGoodies.
It contains a general purpose content assistance framework that, at least as far as I know right now, is cross-platform.
The Sts Code Assist module which is built on top of the framework is in progress, and not yet included in this this map.
However, included is an examples app utilizing the framework, which contains a simple text editor that can "suggest" previously seen words as you type.
I am planning to have a new map which will include code assist in about a week.
Config map notes have been updated with some known issues and how to debug.

Feedback welcome, of course.

-- Seth Berman

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/KgMGBajie8YJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Code Assist Cont...

Seth Berman
Hi everyone,

I have provided another update to the VA Code Assist map in VaSTGoodies that includes some code assist features for the browsers.  Currently, method completions are available for types that can be determined by examining the parse tree.  Please see the examples provided in the design document: https://inst.fogbugz.com/default.asp?W493 under the "Phase 1 Checkpoint" heading if you are interested in this.  Please let me know if you have any additional suggestions or guidance, I would be glad to hear them.  Class, Vars and uninferred type method completions will be available soon...I also will be getting a GUI up in the next couple of weeks.  Stay tuned.

Seth Berman

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/GYYEeEFYjxYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Code Assist Cont...

Seth Berman
Another code assist update available at VaSTGoodies.
This update adds completions for locals, instVars, classVars and classInstVars.
Case-insensitive filtering is also supported so you don't have to match the case of the suggestions in the popup.
This map is VA Code Assist - V 8.0.3 [162] - DEV 1.2

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/jA-lzr3J5Y4J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Code Assist Cont...

Seth Berman
VA Code Assist - V 8.0.3 [162] - DEV 1.6 is now available at VaSTGoodies.
I'm in process on updating the design document (which has a linked that is referenced at the top of this post), it has some more specific information and examples to try.

Changelog since previous post: (DEV 1.2)
  • Pseudo-var completion (self, super, true, false, nil)
  • Scoped-var completion (i.e. CwConstants::<Ctrl-Space>)
  • Auto-Argument injection into completions with same name as current method context.  Useful for super calls or delegation
  • Added Code Assistance to StsDebugger - uses runtime information to resolve receivers of message sends
  • Added Code Assistance to StsWorkspace - uses cached workspace variables (that have been evaluated) to resolve receivers of message sends
What's left (well, that is feasible for this phase)
  • Class/Pool Completion
  • (Unresolved) Method Completion - Method completions to use when the static analysis can not identify the receiver as anything more specific that "Object"
  • Visibility settings (i.e. only show methods in application prereq chain or everything)
  • GUI  (To tweak settings for now - change [StsCodeAssistConfiguration browser], [StsCodeAssistConfiguration debugger] and [StsCodeAssistConfiguration workspace])
  • Must fix CwObjectList popup impl on Linux...the EwTableList enhanced widget seems to be working just fine
What I would like to complete, but may not get to:
  • Light type inference for cascaded messages.  Using the previous cascaded messages, the type can continue to be narrowed
  • Method chain following - It's fairly easy to detect if a method has one statement that returns a bounded variable like a literal or class, not sure how many levels to traverse...maybe an advanced setting
  • In Method completion popup, somehow show the object class that defines a particular method suggestion.
  • Row of buttons on the popup that allow for in-place tweaking of filters and visibility settings.  The list would dynamically refresh as the settings are adjusted

If you find any bugs or have a request...please feel free to respond.  Enjoy

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/kqWtxlXJwQoJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Code Assist Cont...

Seth Berman
VA Code Assist - V 8.0.3 [162] - DEV 2.0 is now available at VaSTGoodies.
I have listed out many of the new features in the config map notes.

If anyone would like to help test, please have at it:)

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/gi2Du4CCL94J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Aw: Re: Aw: Code Assist Cont...

jtuchel
Seth,

I haven't looked at Code Assist for quite a while and I must say I am impressed!
It's come a long way and is very good in suggesting names.

I currently cannot think of any more things to suggest, but I am just using it for a few hours now. Maybe I'll come back with ideas later.

Now that this is on its way, it's probably time for more ideas to improve the code editing experience (before you get bored ;-) ).

There are a few things that could be done for unknown symbols on method save:

I miss the suggestion to add unknown symbols as temporary variables or correct their spelling when a method is saved.
And the same thing may be a good idea for symbols with capital letters:
I may want to add a new class to the system or correct the misspelled class name.
But the missing symbol could also mean I need to add a pool dictionary to the class definition if the symbal can be found in a pool.

Based on this you could do a lot of nice things like adding a Symbol to a pool dictionary and piossibly even extend its definig pragma method (if one exists)...


Just a few thoughts to get you going.
I see the code editing experience improve a lot in upcoming VAST releases - thanks for the good work!

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/H0jDShEs58AJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Re: Aw: Code Assist Cont...

Seth Berman
Hi Joachim,

Thanks for your inputs, glad it's proving to be useful.  I stare at this stuff everyday so all I ever see are it's flaws:)
Yeah, I've really tried to incorporate all the ideas you guys had in the old forum post.  I think what is there now is a good starting point, and as you pointed out, there is lots of room to improve the experience.

I agree with the additional features you were describing above.  Early on, I was trying to keep the door open for this kind of code intelligence.  This is for a future phase, but how do you feel about a "hint" system, very similar to a Netbeans or Eclipse approach, that would provide a hints icon on the side of a given line (presumably where the breakpoint icon shows up).  Pressing the "hint" icon would display a list of one or more actions, for something on that line, to invoke some of these longer running tasks (i.e. Add new temporary, correct spelling, create class, make pool dictionary entry)?

When I update the design doc, I'll add your suggestions to the future phase section.  Thanks again.

Seth

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/Gio1gUZASukJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Aw: Re: Aw: Re: Aw: Code Assist Cont...

jtuchel
Seth,

a hint system for the more advanced stuff like creating a new class and such sounds good. And using the little column to the left (wher breakpoits show up) for other things as well is also a good idea.

But adding temps should be a no brainer for the user: prompt me and do it. The prompt should collect all tempvar candidates and let me choose to add a temp or collect spelling alternatives (the latter may take time...).
Maybe you have an installation of VW around, or Ernest Micklei's goodie that does exactly the add temp var part. It's convenient and fast!

I found an arzable flaw today: say you've typed the word "Objects' and move the cursor back between b and j and type another j, the tool offers correct suggestions. If you accept one, it will simply insert it and not replace the whole word ("ects" in this example). So the result will be "Objectects". I know there are arguments that the tool cannot kbow if I wanted to type more afterwards, so maybe it's not a bug... what do you think?

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/tn_nC_CO75cJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Aw: Re: Aw: Code Assist Cont...

Seth Berman
Joachim,

Good idea about the temps...I will take a look at VW and the goodie you suggested.

I agree about the 'Objects' use case...I tried it a few times and couldn't really think of any reason why I wouldn't want it to replace the part after the cursor.  As you were suggesting, applying method suggestions would be the only thing that would be difficult.  But this is a fairly simple change for the other completion types.  I will look into this.  

Currently, I'm working to slap a GUI on the configuration options.  I don't believe I mentioned this before, but I've shuffled some stuff around and now the configuration object can be retrieved by inspecting 'StsCodeAssist configuration'.

Also, if need be, set StsCodeAssist debug: true if you need to debug anything.  Otherwise, when the debugger is brought up, the text editor loses focus which forces the code assist session to close and that's the end of that:)

Appreciate the feedback.

Seth

On Thu, Jul 28, 2011 at 2:14 PM, [hidden email] <[hidden email]> wrote:
Seth,

a hint system for the more advanced stuff like creating a new class and such sounds good. And using the little column to the left (wher breakpoits show up) for other things as well is also a good idea.

But adding temps should be a no brainer for the user: prompt me and do it. The prompt should collect all tempvar candidates and let me choose to add a temp or collect spelling alternatives (the latter may take time...).
Maybe you have an installation of VW around, or Ernest Micklei's goodie that does exactly the add temp var part. It's convenient and fast!

I found an arzable flaw today: say you've typed the word "Objects' and move the cursor back between b and j and type another j, the tool offers correct suggestions. If you accept one, it will simply insert it and not replace the whole word ("ects" in this example). So the result will be "Objectects". I know there are arguments that the tool cannot kbow if I wanted to type more afterwards, so maybe it's not a bug... what do you think?

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/tn_nC_CO75cJ.

To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.



--
-----------------------------------------------------
Seth Berman
Software Engineer, Instantiations Inc.
[hidden email]



--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Aw: Re: Re: Aw: Re: Aw: Code Assist Cont...

jtuchel
Hi Seth,

I found another bug(?). In case of symbols, I alwaays get the same symbol in the suggestion list twice...

>Currently, I'm working to slap a GUI on the configuration options.

I am surprised: Isn't Instantiations working on a settings framework? Why not be among the first to use it?

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/oP-VDmdp1vkJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Aw: Re: Re: Aw: Re: Aw: Code Assist Cont...

jtuchel
Hi again,

the doubling happens also with method names (implementors), but I cannot tell under which circiumstances. It's not always, just from time to time. I've never seen more than two copies of the same entry, but I've seen double entries when there was only one suggestion, but also when there were multiple hits. As far as I can tell, not all of them were doubled when it happens.

When they were doubled, they always had the same icon (so not a getter and an instvar name or such).

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/0k7aBYPQnxkJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Re: Re: Aw: Re: Aw: Code Assist Cont...

Seth Berman
Hi Joachim,

I'm looking for those cases.  So the symbol suggestions always have double entries?
I see a double entry in the following case:
3 + 2 +<CA>
One '+' is for the inner most receiver '2' and should just have a public method icon
One '+' for the outer receiver expression '3 + 2' and should have a public method icon preceded by a left arrow icon.
The distinction is for inserting parens.

If your seeing the 'implementors' icon with no common superclass on the far right, then these are for receivers who's types are unresolved.
If your seeing the 'implementors' icon with '(Object?)' on the far right, then these are for receivers who are resolved to some set of types, but their common superclass is Object.

So I think your referring to double entries listed for unresolved receivers?  I haven't noticed that in any of the cases I've tried so far, but I will be on the lookout.  Thanks for the find, let me know if you detect a pattern or find an example.

-Seth
 

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/0e10njaqAaQJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Aw: Re: Aw: Re: Re: Aw: Re: Aw: Code Assist Cont...

jtuchel
Hi Seth,

the answer is much more "stupid" ;-)

Most of the time when I see double names, the second one is cut off before the last charecter. So the second one is the setter, but displayed without the colon. The insertion is correct, though.

Also: when I type "IfTrue:", the suggestion list is okay: ifTrue:,  ifFalse: etc.
But if I type  "ifTrue:" there is only one suggestion: "ifTrue:ifFalse" - note the missing colon at the end. When I insert, it inserts correctly.

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/0SRcD-2u9YwJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Re: Aw: Re: Re: Aw: Re: Aw: Code Assist Cont...

Seth Berman
Thanks Joachim,

I was able to reproduce the "suggestion truncation" you pointed out on the Linux side, so I'll take a look and fix that issue.

--Seth

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/HjJaQsu3ftYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Re: Aw: Re: Re: Aw: Re: Aw: Code Assist Cont...

Seth Berman
I have updated the Code Assist Design Document: https://inst.fogbugz.com/default.asp?W493.
Under the section (8/3/2011) Phase 1 Checkpoint, I have provided a complete summary of all the features that can be expected when this goes into the next release.

I have not backported the Configuration GUI and some other tweaks (thanks Joachim) to 8.0.3 yet for VastGoodies, but if I get time I will.
I've readjusted the items in the phases since I completed more than I thought I would.  If you have specific things you would like to see, please let me know.

--Seth

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/r6gJpW25b4oJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Aw: Re: Aw: Re: Aw: Re: Re: Aw: Re: Aw: Code Assist Cont...

jtuchel
Seth,

some tiny problem: pressing Ctrl+S to save a method or Ctrl+R to revert leaves the suggestion list open. A Key press that's not a Character which ends up in the editing pane should close the suggestion list. Again, maybe a question of taste, but I found it to be "surprising behaviour".

I must admit I still don't understand the meaning of most icons (Yellow Arrow to the left and green connected balls that I think mean "implementor of"), but since these are consistent with the icons that are used in the whole environemt, this is more a critique on VAST's icon set rather than Code Assist.

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/l6rxRV0rC-QJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Aw: Re: Aw: Re: Aw: Re: Re: Aw: Re: Aw: Code Assist Cont...

jtuchel
Seth,

since I am sure you are still looking for ideas to improve Code Assist even further... ;-)

What about supporting wildcards? I may remember that the method I want to call is somewhat ending in 'On:', so why not type '*On:' and wait for Code Assist to come up with suggestions? I guess this is not so much a performance problem, because it would not necessarily affect the normal operation. If I enter a wildcard, I agree to wait a bit longer, and if I don't I want you to be fast ;-) This could and maybe should even go so far as to support wildcards in the middle of an expression. Like 'print*On:'.

I don't think there is a need for several wildcards (0 or 1 letters, 1 or more etc.), a simple 0..n wildcard like * would suffice.

I haven't checked with your design document if it's on the list already. If so, I apologize ;-)

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/2N3rUrPobYIJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Re: Aw: Re: Aw: Re: Re: Aw: Re: Aw: Code Assist Cont...

Seth Berman
Hi Joachim,

I think the regex support is a great idea...it brings something unique to the table and I don't think it would be to difficult to implement.  I will add this to the list for Phase 2.
Thank you for pointing out the Ctrl+S, Ctrl+R issue.  Fixing that is not a big deal, I've just been looking for the appropriate place to put that logic.
Given that, in the case of Ctrl+R, the popup may be out of sync with the text, I will probably consider this a bug and fix it for this upcoming release.

--Seth

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/g5ndqeJB7l4J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
12