This Question is Answered

1 "helpful" answer available (2 pts)
8 Replies Last post: Feb 9, 2010 4:17 PM by Roman.Chernyatchik  
linux_china  Novice 263 posts since
Sep 2, 2002
Currently Being Moderated

Nov 28, 2009 3:04 PM

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?

Attachments:
Roman.Chernyatchik  JetBrains 1,449 posts since
Sep 18, 2007
Currently Being Moderated
Dec 1, 2009 2:46 PM in response to: linux_china
Re: RubyMine extension for Rio can not work!

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.

Roman.Chernyatchik  JetBrains 1,449 posts since
Sep 18, 2007
Currently Being Moderated
Dec 21, 2009 8:32 PM in response to: linux_china
Re: RubyMine extension for Rio can not work!

Fix will be available in 2.0.1 update

Roman.Chernyatchik  JetBrains 1,449 posts since
Sep 18, 2007
Currently Being Moderated
Jan 19, 2010 2:35 PM in response to: linux_china
Re: RubyMine extension for Rio can not work!

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.

Roman.Chernyatchik  JetBrains 1,449 posts since
Sep 18, 2007
Currently Being Moderated
Feb 9, 2010 4:17 PM in response to: linux_china
Re: RubyMine extension for Rio can not work!

Screen shot 2010-02-09 at 4.16.31 PM.png

Fix will be available in coming RubyMine 2.0.2 update

More Like This

  • Retrieving data ...