Posts Tagged ‘ruby’

Best IDE for Polyglot Programming — IntelliJ IDEA 9

Tuesday, December 8th, 2009

Our neighbour IntelliJ IDEA team is now celebrating the release of IntelliJ IDEA 9, the best environment for polyglot programming and the most intelligent Java IDE, that also includes a free community edition now.

Being build on the same platform, RubyMine shares a lot of functionality with IntelliJ IDEA, and we thank the IntelliJ platform team for all the efforts and congratulate the whole team with this important milestone.

If you are developing with Ruby inside IntelliJ IDEA using the Ruby plugin, the updated plugin is available and is compatible with IntelliJ IDEA 9. You can install it from the IDE UI (IDE Settings | Plugins).

See the impressive list of what’s new in IntelliJ IDEA 9.

RubyMine update is coming soon too. Stay tuned for updates!

Develop with pleasure!
JetBrains Team

What’s mining: search for duplicates in Ruby

Wednesday, September 16th, 2009

Hi all,

It is always a pleasure to tell about new features! This time I’m glad to announce a brand new one that is coming in next RubyMine 1.5 EAP — “Locate duplicates”. It is another useful tool in RubyMine’s code analysis arsenal. Everyone has once faced with copy-paste problem: when you don’t use a refactoring such as extract method/module/variable for some reason but just do copy&paste. Your code begins to “smell”.

Locate duplicates is a helpful feature designed to assist you in writing safe, fast and error-free code.

Use Code | Locate Duplicates menu item to start it. You’ll see the  Code Duplication Analysis Settings dialog where you can tune the intelligibility of the search.

Local variables, Fields, Methods, Literals can be anonymized. Do not show duplicates simpler than and Anonymize uncommon subexpressions simpler than options operate with some heuristic values complexity of found fragments of code. These thresholds are used to cut off obvious duplicates like local variables, field etc. You can change them later, but the defaults should fit pretty good for a start.

Results of this search are shown in a familiar diff view with code fragments to inspect the results.

You are welcome to try this in coming EAP build.

-JetBrains RubyMine Team

What’s mining: inline local refactoring

Tuesday, September 15th, 2009

You’ve probably got used to utilizing the power of RubyMine’s refactorings, have you?

One of the cool refactorings we have in RubyMine is ‘Introduce variable’ that lets you quickly create variable from a statement and replace all similar occurrences in the code.

Right now we are adding the reverse thing: inline local refactoring.

Here is the slide-cast showing it in action.
Step 1: Place caret on a variable you want to inline and select Refactor | Inline… from the main menu or context menu. Or, even better, learn the keyboard shortcut.

Step 2: Confirm your action.

Result: Your code is updated

This new refactoring will be available in the next RubyMine EAP build. You can download the latest build now and try other new refactorings we’ve been adding lately.

BTW, have you pre-ordered the “Refactoring: Ruby Edition” book already? Should be a good one.

Ruby can be refactored!

For the screenshots and my refactoring tests I use excellent ‘Greed’ project created by Jim Weirich and Joe O’Brien for their “Testing, Design, and Refactoring” tutorial during RailsConf 2009. Thanks guys!

Extending RubyMine with Ruby

Friday, August 14th, 2009

As we have already mentioned in RubyMine Roadmap, the forthcoming RubyMine 1.5 will provide Ruby API for extending the IDE in idiomatic Ruby (no Java or XML). For this purpose the latest RubyMine EAP has built-in RubyMine Extensions Manager for your own extension scripts.

Using Extensions Manager you can enable/disable the pre-installed scripts or add your own ones. Use ‘Add’ and ‘Remove’ buttons to manage your own script folders. Newly added scripts under script folders are considered as enabled by default.

API documentation isn’t yet finished, for now please refer to http://www.jetbrains.net/devnet/docs/DOC-1161. But we will surely get it published before RubyMine 1.5 release.

- JetBrains RubyMine Team

Execute selected code in console

Monday, August 10th, 2009

IRB console in RubyMine is a quick way to execute Ruby code.

Here is a quick hint on how you can quickly execute some code from the editor.

  1. Tools | Start the IRB console
  2. Select a code
  3. Tools | Load selected text/file in IRB console (⌥⇧L/Alt+Shift+L)

As you may have guessed from the menu item title, you can execute the whole file, without selecting any code. Try it!

Have you tried RubyMine 1.5 EAP already? Ruby 1.9, improved Cucumber support — already there, with Shoulda and new refactorings coming shortly! Try today!

What’s mining: Ruby support within HAML

Friday, July 3rd, 2009

As you may know RubyMine provides outstanding Ruby code editing support in Erb files (RHTML). So, salute another language with Ruby code support: HAML. Familiar things like on the fly error highlighting, code completion, resolve, code folding, and much more are here to boost your productivity! And of course RubyMine is aware of HAML semantics and ruby blocks are recognized correctly according to indentations.

Here, in support of the words, we have some screenshots:

Ruby code completion:
    Ruby code folding:

This stuff will be available in RubyMine 1.5 EAP coming soon! Stay in touch!

-JetBrains RubyMine Team

What’s mining: unused local variable or parameter inspection

Wednesday, June 24th, 2009

Hello everyone,

RubyMine already has a bunch of inspections that help you on the fly to write correct and clean ruby code. They are Ruby code style, Unreachable code, Unresolved Ruby reference etc. Recently we’ve added one more useful inspection: Unused local variable.

Here is a screenshot:

This inspection will warn you about local variables or parameters which values are not used in the scope. Local variable on lines 2 and 5 are highlighted with warning because values assigned aren’t used anywhere, but local variable on line 7 isn’t because you can see read access to it’s value on line 8.

If you find some errors in its behavior or have suggestions you are welcome to file a bug or post your code on the forum. Thanks for all your reports so far! Your help is invaluable in making RubyMine the smartest Ruby IDE.

Note: You can also disable this inspection from right-click context menu or in File | Settings | Inspections | Ruby.

-JetBrains RubyMine Team

What’s mining: Ruby 1.9 support

Tuesday, June 16th, 2009

Hello folks, we are glad to announce that current development builds of RubyMine 1.5 support Ruby 1.9!

Of course you can use Ruby 1.9 as interpreter in RubyMine 1.1 and earlier versions but now RubyMine offers you brand new quality of understanding Ruby 1.9 code: new convenient lambda syntax, improved local variables semantics, new method parameters declarations and much more.

Here we have some screenshots for you:

  • You can choose Ruby language level for your project

  • RubyMine supports new lambda syntax, local variables semantics and much more.

As we have already mentioned this functionality will be available in RubyMine 1.5 Early Access Preview coming soon.

Stay in touch!

- Jetbrains RubyMine Team

What’s mining: IRB console, IDE Voice control, and more

Wednesday, April 1st, 2009

These are the hot times here in JetBrains office — lots of new stuff appears daily.

Here is some of the most recent stuff:

1. We wrote about the Rails console recently and it is already available in the latest EAP build. With the next build RubyMine will also provide the IRB console.

2. IntelliJ IDEA developers unveiled the revolutionary Voice Control plugin for operating your IDE. We plan to make the plugin bundled with RubyMine as soon as possible.

3. RubyMine Beta is just around the corner. Check for new announcements soon!

-JetBrains RubyMine Team

What’s mining: surround selected text

Wednesday, March 18th, 2009

One small but handy thing that you’ve been asking for is the ability to quickly surround the selected text with quotes, single quotes, parentheses, etc. with a single key.

We just did it for quotes! And will also add parentheses before the next EAP build, later this week. More will come later.

Apart from that it should be mentioned that RubyMine has nice “Surround With” feature that allows surrounding pieces of code with other, more complex constructs. Try it: Ctrl+Alt+T / ⌥⌘T

We are listening carefully. So, if you want something, let us know. Here is how you can do it.