Posts Tagged ‘refactoring’

IntelliJ IDEA’s Move Refactoring for ActionScript/Flex gets Smarter

Monday, January 16th, 2012

At JetBrains we not only bring you new powerful features that make your life better, but also take care to polish the good old stuff to perfection. Let’s take a look at the Move refactoring for ActionScript classes, Flex components and all other types of top-level declarations (namespaces, functions, variables and constants), that has just got a little smarter. By the way, this refactoring also works for inner declarations (also known as helpers or file-local declarations), defined in ActionScript file out of the package statement.

(more…)

Refactoring in IntelliJ IDEA, Live by Robert C. Martin (Uncle Bob)

Monday, September 12th, 2011

It’s still over 3 months before the holiday season, but we just got a great present from our long time friend Robert C. Martin (Uncle Bob) — a live refactoring demo performed by the legendary software expert himself. He’s, of course, using IntelliJ IDEA!

Check out this video where Uncle Bob shows some refactoring techniques transforming a “large and ugly” function into a clean and readable piece of Java code, using such refactorings as Rename, Extract Method, Inline Variable, and others. We learn something new every time we watch experts like Uncle Bob.


You can also watch this video on JetBrains TV.

The video is part of the highly recommended “Clean Code” series of educational “code-casts.” More Clean Code videos are available at cleancoders.com.
Robert C. Martin (Uncle Bob) is the Master Craftsman at 8th Light Inc., 8thlight.com.

As a separate note, Robert C. Martin has recently released a new book “The Clean Coder: A Code of Conduct for Professional Programmers” which we think is a must read for every professional software developer.

Enjoy the demo and develop with pleasure!
-The JetBrains Team

ActionScript refactoring improvements in IntelliJ IDEA 10.5

Tuesday, May 10th, 2011

We’re working day and night to bring you more goodies in IntelliJ IDEA 10.5. Here are just a few more of them.

Introduce Variable (Field, Constant) refactoring now has a type chooser and makes it easier to work with untyped array elements (among other things):

(more…)

New in 10.5: Introduce Refactorings for Groovy

Wednesday, April 13th, 2011

In the upcoming IntelliJ IDEA 10.5 some new Groovy refactorings will appear.

The first of them is Introduce Parameter. It allows you to select any expression inside a method and make from it a new method parameter. All the usages of the method in both Groovy and Java will be auto-updated.
Introduce parameter dialog

The second one is Introduce Field which provides you with an ability to quickly create a new field from any expression inside a class.

No doubt these 2 introduce refactorings will be a good addition to the existing Introduce Constant and Introduce Variable. You are using them, right?

Download the latest EAP build of IntelliJ IDEA 10.5 to try these and other new features and to let us know what you think.

Smarter and Faster Introduce Parameter in Java

Thursday, March 24th, 2011

As a logical next step after inplace introduce variable refactoring we did in IntelliJ IDEA 10, version 10.5 will offer inplace introduce parameter.

Here is a brief overview of what we’re working on.

Once called, it will gently ask you to choose a method you want to add parameter to

Note, that you can introduce parameter in hierarchy by selecting the “Use super method of” option.

Then you’ll get a familiar template-like editor with a possibility to change parameter type and name. The refactoring settings you’ve got used to have in the dialog, are now available during template editing. You can make the parameter final, and generate method delegate, to remove unused parameters and replace field usages with getters. When multiple occurrences found you will be able to replace all of them or decide to replace only one right in place. No need to rerun the refactoring to see the results — they are already in the editor.

All method usages are already processed once you finish typing.

Just make sure you have inplace refactoring enabled in ‘IDE Settings | Editor | Enable in place refactorings‘.

The feature will be available in IntelliJ IDEA 10.5 EAP.

Watch our progress on inplace refactorings and let us know what you think!

Change Method Signature Refactoring for ActionScript and Flex

Thursday, December 9th, 2010

Hi all ActionScript/Flex devs! I hope you enjoy using IntelliJ IDEA and I’m sure you’ll like it even more after you try Change Method Signature refactoring! It’s amazing how it allows you to quickly restyle your methods not only by renaming them, but also by adding, reordering, renaming, and deleting parameters, changing their types and default values.

All usages and overriding method declarations will be updated automagically, so your application compiles and works the same way as before with no extra care from your side!

Let me show you how it all works.

(more…)

Smarter and Faster Introduce Variable in Java

Thursday, November 11th, 2010

Introduce variable is one of those refactorings used many times a day. So, how can we make it work faster?
Get rid of modal dialogs!

So, in order to introduce a variable from an expression press Ctrl+Alt+V.

Remember modal dialog? No more of it! Now you can edit your code right in the editor:

Oh, you prefer List as variable type? No problem, press Shift+Tab, choose List from drop down and IntelliJ IDEA will remember your choice for future.

You already pressed Ctrl+Alt+V but then realized that such variable already exists? Not a problem! Now it is possible to reassign a variable right from introduce template. Press Ctrl+Alt+V one more time and IntelliJ IDEA will collect all available variables of appropriate types and will suggest you to choose one:

You can try it yourself using a latest IntelliJ IDEA X EAP.

And let us know what you think!

Extract Interface and Extract Superclass refactorings for ActionScript/Flex

Saturday, September 18th, 2010

ActionScript/Flex development support in IntelliJ IDEA eventually gets closer to the unbeaten level of its Java assistance. Today it’s time to Extract Interface and Superclass.

Let’s illustrate this feature on a simple example…

(more…)

WSDL improvements in IDEA X

Wednesday, September 15th, 2010

If you work a lot with WSDL, you will find new IntelliJ IDEA X refactorings, code completions and validations very handy. Be it schema or WSDL, import inside a WSDL document is not a problem anymore.

Also, we are looking forward to your feedback regarding WSDL.

Smarter Introduce Variable in JavaScript

Wednesday, August 18th, 2010

Introduce variable is a very useful refactoring and is probably used quite often and for many languages IntelliJ IDEA supports. JavaScript is one of them (along with ActionScript).

IntelliJ IDEA 10 makes this refactoring even easier and more pleasant to use. Below is a simple example with highlights for the enhancements. (more…)