Archive for the ‘Tips & Tricks’ Category
Wednesday, July 8th, 2009
Maia brings a new powerful action Ctrl+Tab that allows you to switch between open files in editor and tool windows. It works similar to Alt+Tab on Windows or ⌘+Tab on Mac.

There are two columns: tool windows and open files (tabs). Navigation is available through the use of navigation keys and Tab (forward) or Shift+Tab (backward) keys.
Is there anything else you think would be handy to have in Switcher Panel?
Tags: maia, tab switcher, tool window, user interface
Posted in FYI, In Development, Tips & Tricks | 30 Comments »
Tuesday, June 9th, 2009
Instead of wasting your time searching the menus and toolbars in an attempt find out that action you need right now, use the Find Action command (Ctrl+Shift+A) to quickly locate what you need. It works just like Go to Class:

Tags: Navigation
Posted in FYI, How-To's, Tips & Tricks | 1 Comment »
Tuesday, June 2nd, 2009
Two-way synchronization between different data models is a common routine task and often developers are stuck with manual copying of data from one model to another for many reasons: model complexity, impossibility to create a simple binding, etc. For example, we have a settings model and an UI to configure it. Traditional approach suggests implementing two methods:
- Initializing UI from settings
- Persisting changes from UI to settings

Next, we need to implement a method (say, saveSettings), similar to initUI where UI changes are persisted to the ProxySetting object — quite boring, isn’t it?
How to do it quicker than just writing from scratch? In Maia we’ll do it twice as easy: copy the body of initUI method to saveSettings, select the just pasted code and press Alt+Enter.
Then, select Flip Setter Call intention action and enjoy.

Tags: Intentions, maia
Posted in In Development, Tips & Tricks | 4 Comments »
Monday, June 1st, 2009
In Maia the Show Parameter Info action (Ctrl+P) is available in SQL function calls and value expressions.

Tags: editor, maia, sql
Posted in FYI, In Development, Tips & Tricks | 1 Comment »
Sunday, May 10th, 2009
One of not so well-known features of IntelliJ IDEA is an ability to differently highlight certain scopes in code editor.
To use it, open the Settings dialog, under IDE Settings expand Editor, then expand Colors & Fonts, and select Scope Based preferences. You will see a list of predefined scopes, and the Edit Scopes button that lets you easily create your own.
Each scope is assigned a distinct color/font scheme — just like different language elements in Java, which makes it easy to distinguish from other code in the editor.
In the following example, it is used to quickly differentiate between real testing code and JUnit Classes (pattern: lib:org.junit..*):

Other use cases include highlighting of, for example, third-party framework code, distinguishing normal code from assertions, etc.
Tags: code style, editor, highlighting, scopes
Posted in FYI, How-To's, Tips & Tricks | 2 Comments »
Monday, April 27th, 2009
The upcoming IntelliJ IDEA 8.1.1 includes a new option to generate separate XML mapping per entity.

Tags: Code Generation, Database, Hibernate, JPA
Posted in FYI, How-To's, Tips & Tricks | 1 Comment »
Sunday, April 19th, 2009
Do you use second smart completion feature? Did you know that it also can help you when you have an array and want an element of it? Just press Ctrl+Shift+Space two times when completing:

Tags: completion, smart completion
Posted in Tips & Tricks | No Comments »
Thursday, April 9th, 2009
Most of IntelliJ IDEA advanced features (rename refactorings, navigation to source, usage search and the others) are available in JBoss Seam pageflow graphical designer.
Just right-click a node (page) or an edge (transition) to bring up a popup menu where you can select an appropriate action.
Moreover, you can double-click a page node to start in-place editing, create new pages using drag’n'drop and link existing pages together by simply drawing a line from one page to another. |
|
 |
Tags: Designer, JBoss Seam, Pageflow
Posted in FYI, Tips & Tricks | 1 Comment »
Wednesday, April 8th, 2009
With IntelliJ IDEA you can easily generate multiple properties in your Spring application contexts. Just invoke Generate action by pressing Alt+Insert inside of a bean tag and select properties you want to generate.

IntelliJ IDEA analyzes property types and invokes an appropriate Live Template for each of the properties you selected.

Tags: Add new tag, Code Generation, Spring
Posted in FYI, How-To's, Tips & Tricks | No Comments »