Archive for the ‘How-To's’ Category

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…)

How to Run a Single Inspection in IDEA X?

Saturday, November 20th, 2010

To run a single inspection in previous versions of IntelliJ IDEA you had to create a dedicated inspection profile for that or use “Run inspection on…” from inspection’s quick fix list. In IntelliJ IDEA X you can find and run inspection by its name on any scope without creating an inspection profile. Use Run Inspection by Name (Ctrl+Alt+Shift+I) action anywhere to choose a desired inspection from hundreds of available,

then select a scope to run inspection on,

and get results.

This action is available since version 98.402 in Main Menu-> Analyze->Run Inspection by Name.

JavaScript Libraries in Intellij IDEA 10

Friday, November 19th, 2010

Meeting the needs of developers working with JavaScript, Intellij IDEA 10 adds a new feature to allow specifying global JavaScript libraries that can be used across multiple projects. For a particular project you can set a scope for each library by defining files and directories the library is applicable to. If you already have JavaScript files in your project and keep your current settings, code completion and navigation would work as before.

(more…)

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…)

Android Library Projects Support

Thursday, September 16th, 2010

An Android library project is a development project that holds shared Android source code and resources. Other Android application projects can reference the library project and, at build time, include its compiled sources in their .apk files. IntelliJ IDEA X supports library projects natively as separate Android library modules.

To create a new library module you need to choose a platform and specify a package:

Application module has to depend on library modules to refer to their resources and source code. Scope of this dependency should be Compile. You can refer to library resources from your application module, as they are located in the same module. Note that you can change a module type (Application or Library) in Android facet settings:

Android unit-testing support

Wednesday, September 15th, 2010

With IntelliJ IDEA X you can write unit tests for your Android application using Android Testing Framework. Android unit tests are located in a separate test module, so first you need to add it (i.e. named tests) to your project, which must already contain an Android module (or module with Android facet) (i.e. named MyAndroidApp). Then, specify this tested module:

IntelliJ IDEA will automatically create a sample test class for your main activity (i.e. MyActivityTest). It’s handy that you can launch tests directly from editor. Note that it is important to choose an item with Android-specific icon for launching tests by Android Tests run configuration rather than using a default JUnit configuration:

Also, after adding a test module to project, IntelliJ IDEA automatically creates run configuration for launching all tests in module:

Note, that scope of a dependency between Test module and Application module should be Provided.

JetBrains TV: Watch with Pleasure!

Thursday, September 2nd, 2010

For some time now, we’ve had requests from the community to have a central point where people could have access to Screencasts and other Video related material that we provide. In response to that, we are happy to announce the availability of JetBrainsTV (Beta!).

The content is organized by Channels, currently one per product, although we will be expanding that to include other topics in the near future. Most of this content, if not all, is tagged with keywords, allowing you to easily locate topics you are interested in. In addition, the cross-cutting nature of the tags allow you to discover new things, for instance functionality that you knew existed in IntelliJ IDEA but weren’t aware that RubyMine also provided.

Content can be voted and commented on, neither of which require you to create an account. Voting is anonymous and comments can be left as a Guest user or using other social media accounts such as Twitter, Disqus or OpenId (obviously based on level of Spam we might have to adjust this in the future).

Contributing content

JetBrains TV is not only a platform to offer centralized screencasts, but also a chance for community members to contribute. By signing in (click on the link in the top right-hand corner), you can upload your own videos, providing you a platform for other community members to see your work. The sign-up process is easy, in fact, you might not even need to create an account. Since it uses the consolidated JetBrains account, if you’ve contributed to the forums or the JetBrains developer community, you’re good to go!

Although it is still in Beta, there’s quite a lot of content on there already and we hope that by opening it up to the community early, we can improve things based on your valuable feedback.

Enjoy!

PS. To support our love for dogfooding we’ve implemented the TV site with PHP and Drupal using PhpStorm IDE. PhpStorm team has received a good bunch of feedback they wanted.

Database Table Editor in IntelliJ IDEA 10

Monday, August 30th, 2010

IntelliJ IDEA X features a simple database table editor and viewer. You can add and remove rows, sort by specific column and choose columns to display just by pressing F4 on a table in the Data Sources view.

If you find the console-like way better than the GUI way, you can still run all those delete from… and insert into… statements in the Database console.

Try this in the latest IntelliJ IDEA 10 EAP and let us know your thoughts on it.

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…)

Hibernate Criteria API Supported in IntelliJ IDEA X

Tuesday, August 17th, 2010

Since IntelliJ IDEA X property names can be completed and navigated. Unrecognized properties are highlighted by the corresponding inspection.

The screenshot says it all in a visual manner.

Download IntelliJ IDEA X EAP build and try this feature.