RubyMine extension for Rio can not work!

I have write an extension for Rio,  code as following:

[code]

def register_rio_types()
  describe 'Kernel' do
    set_return_type "rio" => "RIO::Rio"
  end
  describe 'RIO::Rio' do
    set_return_type "files" => "RIO::Rio"
  end
end

register_rio_types

[code]

The code completion can work for rio("oooo").files("pppp").<caret>, please take a look the attachment. I made a mistake?



Attachment(s):
rio.png
8 comments
Comment actions Permalink

Another question is about block variable, and I have following code:

rio('public/statics/images/chiling').each do |f|

   f.<caret>

end

Can I write extensions to make code completion for 'f' variable?  Thanks.

0
Comment actions Permalink

Sorry, I make a mistake, the correct code as following:

describe "RIO::IF::GrandeEntry" do
    set_return_type "files" => "RIO::Rio"
  end

But question is how to implement code completion for block variable.

0
Comment actions Permalink

Hello,

But question is how to implement code completion for block variable.

Should be

.... describe "RIO::IF::Grande" do   set_block_variable_type "each" => "String" end



Thus whole extension is:

require "code_insight/code_insight_helper" describe 'Kernel' do     set_return_type "rio" => "RIO::Rio" end describe "RIO::IF::GrandeEntry" do   set_return_type "files" => "RIO::Rio" end describe "RIO::IF::Grande" do   set_block_variable_type "each" => "String" end



By some reason in this "set_block_variable_type" doesn't work in my RubyMine 2.0 I will investigate it later to day.
0
Comment actions Permalink

Thanks.  I have issued this problem to YouTrack.  http://youtrack.jetbrains.net/issue/RUBY-5570

0
Comment actions Permalink

Fix will be available in 2.0.1 update

0
Comment actions Permalink

It can not work for me with following code in 2.0.1, and can you make it work?  Screenshot will be  great

rio("d:").each do |file|
puts file.<caret>
end

I can not get "filename" in the popup menu.

0
Comment actions Permalink

Screenshot =)
Screen shot 2010-01-19 at 2.29.58 PM.png
But unfortunately you are right I also cannot make it working, although it worked in past. By I a mistake this cucumber test was removed from our build configuration and probably somebody broke my fix. I've reopened the issue.

0
Comment actions Permalink

Screen shot 2010-02-09 at 4.16.31 PM.png
Fix will be available in coming RubyMine 2.0.2 update

0

Please sign in to leave a comment.