SapphireSteel Forum
Welcome, Guest. Please login or register.
June 19, 2013, 10:24:07 AM

Login with username, password and session length
Search:     Advanced search
Welcome to the SapphireSteel forum - for discussion of the Sapphire and Amethyst IDEs
3893 Posts in 803 Topics by 672 Members
Latest Member: davib
* Home Help Search Login Register
+  SapphireSteel Forum
|-+  General
| |-+  Sapphire / Ruby In Steel
| | |-+  Intellisense issues
« previous next »
Pages: [1] Print
Author Topic: Intellisense issues  (Read 3267 times)
AlexK
Newbie
*
Posts: 12


« on: February 22, 2007, 02:50:46 PM »

I've been trying out Ruby in Steel using VS2005 SP1, and I found a few oddities.

I tried this simple test script:

Code:
$glob = "glob"

class Test
    def initialize
        @var = 1
        if $global == "glob" then
           
            puts("Bla")
        else
            printf("bla")
        end       
    end   
   
    def do_stuff
        @var = 2
        puts("did stuff")
    end
end

test = Test.new

It seems that Intellisense wasn't doing all it's supposed to do: the completion list didn't show $glob and the class name Test, and there was no parameter tooltip for puts (but the name of the function did appear in the completion list).

Also, I tried to define a bunch of functions outside a class, and they didn't show up in the completion list. However, if I moved the same functions into a class, they did appear. When editing these functions, I didn't get the names of their parameters in the completion list either.

Is there anything wrong with my script, or is it expected behaviour?
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 937



« Reply #1 on: February 22, 2007, 03:35:42 PM »

I take it you are talking about the IntelliSense lists that appear after Ctrl+space rather than after a variable name and a dot.

To display globals, make sure that the appropriate option is enabled: Tools, Options, Text Editor, Ruby, IntelliSense. There are, however, a lot of globals in Ruby so this will generate a long list, which is why it is not enabled by default. We haven't opted to display class names as standard for the simple reason that, once again, this would generate a vast list (all the classes of the Ruby library and any other classes in scope). We could put that in but I wonder whether such a huge completion list would be useful? We're always open to suggestions, so please let us know what you feel about that.

best wishes

Huw

Logged
AlexK
Newbie
*
Posts: 12


« Reply #2 on: February 22, 2007, 05:12:41 PM »

Hi Huw

Thanks for the quick reply.

I guess I would like the completion list to be filtered based on the input. E.g. if I have MyClass1 and MyClass2 in the project, and I type "MyC" and then hit Ctrl+space, the completion list would only display classes starting with MyC (this would include MyClass1 and MyClass2 and any matching Ruby classes). I think there wouldn't be too many classes then, and I could narrow it down further by typing more. Globals could be treated in the same way, I guess.

Also, perhaps I'm spoiled by using the VisualAssist addin for C++, but I find it really convenient not to have to hit Ctrl+space - the completion list appears as soon as there is any match, including language keywords, snippets, classes and variables. In practice it's enough to type in just a few letters to narrow the list down to a small number of entries.
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 937



« Reply #3 on: February 22, 2007, 05:25:04 PM »

Thanks for the feedback. We'll look into this. The major work on IntelliSense to date has been dealing with the really tricky stuff to do with type inference of variables (if only Ruby forced people to gives types to everything like C#, it would have be so much simpler  Grin) plus issues of scoping, mixins and so on. Adding additional features for the sort of code completion you suggest shouldn't be too hard to do. I'll play around with the possibilities and we'll see if we can come up with a few more things for one of the future updates. No promise on a date for this, though, as we are already committed to some pretty big new features in the RoadMap so we'll try and fit in the smaller changes when we have the time (or need a bit of a break from the major additions  Undecided).

best wishes
Huw
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!