Posts Tagged ‘pom.xml’

Maven refactorings: Introduce Property

Tuesday, April 20th, 2010

Sometimes while editing pom.xml one needs to define a property and replace the occurrences of some value - artifact version, for example, - with this property. Now you can use the new IDEA  Introduce Property refactoring for these purposes.

To invoke refactoring, select the string that should be replaced and press Ctrl-Alt-V (alternatively, you can use Maven/IntroduceProperty action in the editor context menu). In dialog enter the property name and select the pom to create the property in:

Introduce Property dialog

Introduce Property dialog

Refactoring finds all the occurrences of the selected string in the poms hierarchy and replaces them.

More refactorings will be added soon.

Any comments are appreciated.

Maven pom.xml editor new features

Thursday, March 4th, 2010

Since the latest IntelliJ IDEA  9.0.2 EAP the IDE contains a bit of new Maven-related pom.xml editor features.

1. Easier Navigation

  • You can navigate to “Dependency usages” from “dependencyManagement” of your parent pom.xml:
    and back:
  • You can navigate through projects tree

2. Smarter Paths
‘Path reference’ notion were added to the editor to enhance the code completion, usages search and rename refactoring of project paths.

3. More intelligent plugins configuration
IntelliJ IDEA analyses plugin parameter types and adds smart value editors for plugin configuration tags.

You feedback is as always highly appreciated.

Maven Generate actions for pom.xml editor

Wednesday, March 3rd, 2010

Try the last EAP of IntelliJ IDEA 9.0.2 to test new ‘Generate’ actions for Maven pom.xml editor.  Type “Alt+Insert” to invoke the “Generate…” popup menu and select an action to run.

IntelliJ IDEA actually runs live template inside to complete the code generation

Generate action for pom.xml

Let us know what you think about.