Author Archive

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: Rails i18n support

Wednesday, August 26th, 2009

Hello folks,

Today we are going to tell you about forthcoming Rails i18n support in RubyMine. This functionality is planned for RubyMine 1.5 release in our roadmap, and you will be able to try it in next EAP builds. Feature is under development so comments, suggestions and even feature requests are very welcome :)

At the moment RubyMine supports the following:

  • Resolve and completion for property keys with quick navigation info. Autocompletion for property keys:
  • Go to declaration action:
  • Convenient usages search for property keys
  • Rename property key in locale files with all usages
  • Rails conventions for templates key prefixes
  • Inspection with quickfix for undefined property key. RubyMine offers to apply “Create property” quickfix.

Not all the desired functionality is implemented yet, but we are working hard on it. Just want to mention some of the further feautures:

  • Duplicate property key Inspection
  • Intention to i18nize plain text value
  • Check whether all the keys present in given locale file
  • your suggestions?

Please do not hesistate and let us know your opinion about all this at our forum at: http://www.jetbrains.net/devnet/community/ruby

-JetBrains RubyMine Team

What’s mining: SASS support

Tuesday, August 18th, 2009

Hello everyone,

Our team is glad to announce that development builds of RubyMine already support SASS! The feature will be available in the next public EAP build.

We originally planned SASS support for RubyMine version 2.0, but we received a lot of requests on our forums, mailing lists, in JIRA, and we changed the priorities. (So, if you miss a feature, you can have it)

For now RubyMine’s SASS support includes:

  • Syntax highlighting
  • Smart code folding based on indentation
  • Comment/uncomment actions
  • Dedicated colors page to customize default highlighting attributes
  • Smart color-editor with gutters (see screenshot)

Here you can see SASS editor with smart code folding based on indentation. The syntax highlighting attributes can be configured in File | Settings | Editor | Colors & Fonts | SASS.

SASS editor with code folding

You can see color boxes on the gutters — these are exactly the colors used within your SASS file.
You can modify them either by editing plain SASS code or using RubyMine’s Color Edtor — just click the corresponding gutter!

Smart editor for SASS color attributes

And this is not all, we have a lot of plans for future SASS codeinsight aware support like:

  • Attributes validations
  • Navigation to constant definition, parent attributes
  • and much more

You are welcome to try all these things in coming RubyMine 1.5 EAP build!

Develop with SASS! Develop with pleasure!
- JetBrains RubyMine Team

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

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

Did you know? Searching for help…

Tuesday, June 2nd, 2009

Hello everyone,

If you are a newbie to RubyMine it is quite essential that you can feel a little bit lost in tons of its features. RubyMine ships built-in help to help you. Just go to Help | Help topic

It is the main screen:

Here you can take a short trip in all the features of RubyMine.
One can ask: and what about feature X? Of course it has search capabilities - just select the tab with magnifier on it and here it is.

In the following screenshot I’ve decided to look for Rails console functionality:

Also we provide RubyMine’s help on web, just visit http://www.jetbrains.com/ruby/webhelp

To boost your productivity with RubyMine we recommend you to take a look at Help | Tip of the Day and Help | Productivity Guide sections.

-JetBrains RubyMine team

RubyMine 1.1 is out

Thursday, May 28th, 2009

We are glad to announce that RubyMine 1.1 is out!

Changes since the 1.1 RC build include support for Ruby and HTML highlighting inside HAML files, correct highlighting of server logs shown in debugger tabs, support for belongs_to/references in migration files, several parser fixes and more.

Download RubyMine, get evaluation key, if you do not have one yet, and try it!

Take a look at what’s new, watch our demos to discover all the features and improvements in release.

If you have questions about some features, ask on the forum and we’ll be glad to help.

Stay in touch!

-JetBrains RubyMine Team

What’s mining: HAML support

Friday, May 22nd, 2009

We are glad to announce that RubyMine 1.1 adds HAML syntax highlighting.

As usual you can change color scheme for HAML in Settings | Editor | Colors & Fonts | HAML if you don’t like the defaults.

It is only a first step in HAML/SASS support. So what’s coming next?

  • Ruby code highlighting in HAML/SASS as in Erb.
  • Code folding
  • Code formatting
  • Code inspections
  • and more…

So, stay tuned and Hello HAML!

-JetBrains RubyMine Team