NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed. (sponsored)
In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.
Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.
Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
Here's a handy feature for those times when you want to clean up your code a little. When you want to condense two or more lines into one, you would normally use Home or End and then Delete or Backspace. But not all Java statements can be so easily combined, and joining lines manually can become a tedious time-waster. Thankfully,
IntelliJ IDEA
adds a little extra intelligence by providing the Smart Line Join editor command.
For example, when a String concatenation expression spans multiple lines, it can be a pain to delete the quotes and plus signs, but Smart Line Join will handle this with just one shortcut.
With the cursor on the first line, press
Ctrl-Shift-J
and the String literals on both lines are joined together, removing the redundant concatenation:
Likewise, when a declaration and initialization of the same variable are split onto two lines, they are quickly joined into one line.
Press
Ctrl-Shift-J
and the initialization is embedded into the declaration:
The Smart Line Join feature is also able to handle other not-so-simple joins, like joining several line-comments (//) joined into a single line-comment, etc.
Hey, even I found an extra hidden feature in it just after I posted this tip: You can also select multiple lines and join them all into one line with this command. A minor addition to the basic functionality, but I can see it being quite useful to quickly clean up several lines at once.
IntelliJ IDEA: Smart Line Join
At 10:20 AM on Mar 2, 2007, Rob Harwood
wrote:
Fresh Jobs for Developers Post a job opportunity
Here's a handy feature for those times when you want to clean up your code a little. When you want to condense two or more lines into one, you would normally use Home or End and then Delete or Backspace. But not all Java statements can be so easily combined, and joining lines manually can become a tedious time-waster. Thankfully, IntelliJ IDEA adds a little extra intelligence by providing the Smart Line Join editor command.
For example, when a String concatenation expression spans multiple lines, it can be a pain to delete the quotes and plus signs, but Smart Line Join will handle this with just one shortcut.
With the cursor on the first line, press Ctrl-Shift-J and the String literals on both lines are joined together, removing the redundant concatenation:
Likewise, when a declaration and initialization of the same variable are split onto two lines, they are quickly joined into one line.
Press Ctrl-Shift-J and the initialization is embedded into the declaration:
The Smart Line Join feature is also able to handle other not-so-simple joins, like joining several line-comments (//) joined into a single line-comment, etc.
5 replies so far (
Post your own)
Re: IntelliJ IDEA: Smart Line Join
Idea is really a great product. I've been using it for years and but was not aware of this stuff!Re: IntelliJ IDEA: Smart Line Join
Hey, even I found an extra hidden feature in it just after I posted this tip: You can also select multiple lines and join them all into one line with this command. A minor addition to the basic functionality, but I can see it being quite useful to quickly clean up several lines at once.Re: IntelliJ IDEA: Smart Line Join
You can also do the opposite with Ctrl-Enter (if I remember correctly) which splits the line in a smart way.Romain Guy's Java Weblog, #ProgX, Jext
Re: IntelliJ IDEA: Smart Line Join
> You can also do the opposite with Ctrl-Enter (if I> remember correctly) which splits the line in a smart
> way.
I think you can do that with just an Enter. IDEA does the right thing the first time, just like iPod.
Is there a similar trick in Eclipse?
Re: IntelliJ IDEA: Smart Line Join
I'm not sure about line join, but smart split of Strings is performed in Eclipse by Enter