Posts Tagged ‘completion’

Spring 3.1 c-namespace in IntelliJ IDEA 10.5 EAP build 106.561

Friday, April 22nd, 2011

Spring 3.1 “c-namespace” facility is now supported in IntelliJ IDEA 10.5 with code completion, error highlighting, quick fixes and code generation.

Grab the fresh IntelliJ IDEA 10.5 EAP build 106.561, check the release notes and send us your feedback.

Happy Easter Holidays!

Shiftless code completion and navigation in IntelliJ IDEA 10.5

Friday, April 15th, 2011

With IntelliJ IDEA 10.5, you may press up to twice as less keys every day as you do now. Seriously! Here’s how.

The reason IDEs exist in the first place is that they make your life easier. In particular, they are able to generate code for you. An ideal IDE would do all the boring typing by itself, leaving you more time for thinking about the great software engineering problems you face. Unfortunately, such an ideal is not there yet. Currently, if you want an IDE to help you, you first have to help it help you. Usually this means giving it some cues on a word you have in mind, and it then tries to guess the whole word. So you can just type  NPE and smart IntelliJ IDEA will suggest that you must have meant NullPointerException. Or StBui for StringBuilder. I’m sure you get the idea. This handy “camel case” matching feature saves quite a lot of typing.

Here it gets complicated. In the first place, you had to so something (coding) and the IDE was there to help you. Now you have to do something easier, namely giving the cues to the IDE. But since this requires some action from you, why couldn’t IDE help you with this as well? This means helping you help the IDE help you :). But how can such a simple task as giving the cues be made even simpler?

As it’s easy to see from the examples, the “camel case” matching requires you to enter LOTS of capital letters. And this means pressing Shift quite often. Very often. In fact, almost always. But is this really needed? Following our colleagues from ReSharper team, we asked ourselves this question and, like they, have found no adequate reason. After that we just removed this requirement to press Shift in IntelliJ IDEA. Well, you can still do it, and the capital letters will match “camel hump” starts as they did before. But why bother if you can get the same result without Shift? OK, chances are that you’ll see a bit more variants in this case, but this still pays off in the productivity.

Shiftless matching is now everywhere in IntelliJ IDEA.

When searching for a class (Ctrl+N / Cmd+N):

When typing in the editor with the autopopup enabled:

In the File Structure popup (Ctrl+F12 / Cmd+F12):

So, grab an IntelliJ IDEA 10.5 EAP build, rest to your little fingers and enjoy!

Faster XML coding with new completion features

Wednesday, October 27th, 2010

How often do you write XML configurations like that above? How many keystrokes does it take?

This one is written in just moments, with the help of the new completion features coming in IntelliJ IDEA 10. First of all, the IDE completes all required subtags for you, even nested ones. Second, you can use smart completion feature to ensure that the tags you write are in order described in your XML schema.

If you do not know where your new tag should be inserted, invoke the Generate / XML Tag action from context menu, choose the tag you want, and IntelliJ IDEA will generate a completely valid XML structure and insert it in the right place of the document.

Download the latest IntelliJ IDEA EAP build and try this in the next XML file you open.

Custom file types in IntelliJ IDEA

Tuesday, September 14th, 2010

IntelliJ IDEA is a great IDE for Java, Groovy, Flex, Python, Ruby and many other languages. The text editor with camel-hump completion, and version control support are so great that it may be hard to switch to another editor which may lack some useful features. So, when a need arises for me to code in a language that’s not listed on the features page, I just teach IDEA some basics about that language, and feel much more comfortable than I would if I was editing a plain text. Luckily, you don’t have to write a plugin for that, it is possible via the GUI.

Assume you want to edit Haskell code in IDEA. You go to IDE Settings | File Types and press the ‘Add‘ button next to the file types list:

This brings a dialog where you can provide some knowledge about Haskell: case sensitivity, brace matching settings, ways of defining comments and keywords. You can have up to four lists of keywords, which will be colored differently in the editor. And, of course, all of them will be auto-completed.

After you are done with this dialog, all that remains is to assign the *.hs extension to the newly created file type:

And enjoy hacking:

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.

Completing non-imported GWT components in ui.xml

Friday, August 6th, 2010

IntelliJ IDEA 9 allows you to complete tags for components with namespaces imported in the current GWT ui.xml file.

In IntelliJ IDEA 10 you can complete component even if it is not imported yet. Just press Ctrl+Space twice and IntelliJ IDEA will search for components across the whole project and libraries:

After pressing Enter the IDE will complete the selected component and insert the appropriate namespace declaration for it:

Try IntelliJ IDEA EAP and code faster!

Spring testing support in IntelliJ IDEA 10

Wednesday, August 4th, 2010

Please try IntelliJ IDEA X (EAP) with new Spring testing related support. There is a number of things to note:

1. @ContextConfiguration support with completion, navigation, usages search and error highlighting

2. @TransactionConfiguration

3. All Spring related inspections, quick fixes and annotators are supported for corresponding TestContext Framework configurations.

Tried IntelliJ IDEA 10 EAP already? Let us know what you think!

Develop with pleasure!
The JetBrains Team

Support for CSS in GWT ui.xml files

Tuesday, August 3rd, 2010

If you use GWT you may be interested to know that the first IntelliJ IDEA X EAP build fully understands CSS code inside <ui:style> tags of ui.xml:
CSS inside <ui:style>

The editor also provides coding assistance when you’re using CSS classes declared in these tags:
GWT CSS class completion

Try IntelliJ IDEA 10 EAP and let us know what you think!

Develop with pleasure!
The JetBrains Team

More intelligence for web.xml editor

Wednesday, March 3rd, 2010

With IntelliJ IDEA 9.0.2 you can enjoy editing web.xml with the new initial parameters support. IntelliJ IDEA now collects parameter names and is also aware of parameter values types. This allows the IDE to generate (with Alt-Insert), complete, highlight and validate them appropriately.

web.xml context-param completion

Grab the latest EAP of IntelliJ IDEA 9.0.2 to try it today.

If you are a plugin writer, you can provide your specific context parameters through the special com.intellij.javaee.model.xml.converters.ContextParamsProvider extention point.

Super Completion

Tuesday, September 15th, 2009

Do you often find yourself calling a super method with a large number of parameters? Typing all those arguments one by one is soooooo boring, isn’t it?! Don’t be upset anymore — latest Maia EAP can rescue you. Just use Smart Completion (Ctrl+Shift+Space):