5

How can I get auto completion for managed beans in Eclipse Indigo when the Managed Beans are declared via Annotations rather than with a faces-config.xml?

If this function is missing the whole point of xml-less declaration is gone (for me). :(

Thanks in advance!

hugri
  • 1,416
  • 3
  • 18
  • 32

3 Answers3

3

This isn't supported by Eclipse out the box. You'd need to grab a plugin for this. As far there's only the JBoss Tools plugin wherein this feature is implemented since milestone version M3 (currently still in beta/development stage).

enter image description here

You can get it from the Eclipse update site at http://download.jboss.org/jbosstools/updates/development/indigo/.

This has currently only one minor bug: @ManagedBean beans without a name are not picked up, only those with name are picked up.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • Thanks! Do you know which exact package(s) I have to install for getting the functionality? Is it the Richfaces editor? – hugri Oct 28 '11 at 13:26
  • "Web And Java EE Development". See also http://stackoverflow.com/questions/4057328/how-do-i-install-jboss-6-in-eclipse-helios-jee/4057346#4057346 (note: you need a different URL!) – BalusC Oct 28 '11 at 13:47
  • 1
    It worked with the version from there: http://download.jboss.org/jbosstools/updates/development/indigo/, but only after enabling CDI support in the project settings – hugri Nov 28 '11 at 15:31
1

Window->Preferences->Java->Editor->Content Assist->Favorites allows you to 'define a list of static members or types with static members. Content assist will propose those static members even if the import is missing'. So just add the static imports for annotations here.

Paul Croarkin
  • 14,496
  • 14
  • 79
  • 118
0

In Eclipse 4.2 Juno, we have auto-complete for both, annotation and faces-config mbeans.

korro
  • 499
  • 9
  • 17