Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse m2e content assist in POM not working past top level elements

I can't seem to get Eclipse to pick up any content past the top level configuration elements.

For example:

<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <version>1.4.7</version>
            <configuration>
                <container>     <-- Content Assist
                    ...         <-- No Content Assist
                </container>
                <deployables>   <-- Content Assist
                    ...         <-- No Content Assist
                </deployables>

Maybe I'm insane, but I know this has worked in the past.

I have full indexing enabled, and I've rebuilt my repository indexes.

Is this a limitation of the plugin's implementation, or is it environmental?

like image 502
bvulaj Avatar asked Feb 10 '14 19:02

bvulaj


1 Answers

Currently M2Eclipse gets autocompletion hints for a specific Mojo in a plugin from that plugin's embedded plugin.xml descriptor. The descriptor provides the instructions to Maven about how to populate the fields in a Mojo from the XML configuration. The work to do this is performed by internally by reflection so we don't capture anymore detail in the plugin.xml which is why there is no autocomplete information beyond the first level: the first level corresponds to the field level in the Mojo. We don't have any sub-type information currently.

We realize this is a limitation in M2eclipse and Anton Tanasenko (one of the M2Eclipse committers) is working on some editor improvements and we hope to provide an autocomplete mechanism that will be able to inspect the parameter types and provide better information.

We have now added full support for plugin configuration content assist in M2Eclipse with:

https://github.com/eclipse/m2e-core/commit/e84152165805547b1fad2dbc775da711bd169383

Anton finished this work today and we plan to have this out in the next milestone release for people to try.

like image 65
Jason van Zyl Avatar answered Nov 03 '22 04:11

Jason van Zyl