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.
Code completion is now a must for each and every IDE. But are you using all its power in
IntelliJ IDEA
? Check out the tricks below to get the answer.
Complete variables names
How often do you need to declare something like
ArrayList list
? Using
Ctrl + Space
you can complete the name of the variable. In this example, you will be suggested to choose between
arrayList
and
list
names.
Use “CamelHump”
Probably, you already used “CamelHump” for navigation and search. But it works for code completion too. Everything you typed in the editor will be replaced with the relevant code.
Replace expressions
For example, you have the following expression:
myFrame.setPreferredSize(
new
Dimension(800, 600));
And then you decided that this should be the minimum size. The fastest way to change this code in
IntelliJ IDEA
is to place the caret after the dot, then press
Ctrl + Space.
Find the
setMinimumSize()
method (don’t forget about “CamelHump”!), and press
Tab.
The
setPreferredSize()
method will be replaced with the
setMinimumSize().
Don’t worry about your parameters – they will stay where they are.
There are more tricks in IntelliJ IDEA related to completion. I’m going to write about them in next couple of weeks. But if you don’t want to wait, check out the
Productivity Guide
in IntelliJ IDEA or see description of
java code assistance
features.
Re: IntelliJ IDEA: The real power of code completion
Please also show the Smart Completion (Ctrl+Shift+Space) for variables, method parameters, ... as well as the class-import popup, the new completion of undefined references and other goodies.
Re: IntelliJ IDEA: The real power of code completion
Yes, I'm going to. I wanted to write about all completions, but the list was too long. So I decided to split them into two or three posts. The next will be about Smart Completion (Ctrl+Shift+Space) that you mentioned. And porbably one more post will be about Ctrl + Shift + Enter.
IntelliJ IDEA: The real power of code completion
At 8:34 AM on Apr 4, 2006, Alexandra Rusina wrote:
Fresh Jobs for Developers Post a job opportunity
Complete variables names
How often do you need to declare something like ArrayList list ? Using Ctrl + Space you can complete the name of the variable. In this example, you will be suggested to choose between arrayList and list names.
Use “CamelHump”
Probably, you already used “CamelHump” for navigation and search. But it works for code completion too. Everything you typed in the editor will be replaced with the relevant code.
Replace expressions
For example, you have the following expression:
And then you decided that this should be the minimum size. The fastest way to change this code in IntelliJ IDEA is to place the caret after the dot, then press Ctrl + Space. Find the setMinimumSize() method (don’t forget about “CamelHump”!), and press Tab.
The setPreferredSize() method will be replaced with the setMinimumSize(). Don’t worry about your parameters – they will stay where they are.
There are more tricks in IntelliJ IDEA related to completion. I’m going to write about them in next couple of weeks. But if you don’t want to wait, check out the Productivity Guide in IntelliJ IDEA or see description of java code assistance features.
3 replies so far (
Post your own)
Re: IntelliJ IDEA: The real power of code completion
Please also show the Smart Completion (Ctrl+Shift+Space) for variables, method parameters, ... as well as the class-import popup, the new completion of undefined references and other goodies.Mike
Re: IntelliJ IDEA: The real power of code completion
Yes, I'm going to. I wanted to write about all completions, but the list was too long. So I decided to split them into two or three posts. The next will be about Smart Completion (Ctrl+Shift+Space) that you mentioned. And porbably one more post will be about Ctrl + Shift + Enter.Re: IntelliJ IDEA: The real power of code completion
Knew most of that, except the last one with the TAB key. Very nifty. Thanks ...