A couple of weeks ago Jesse Gallagher posted a blog about getting the JSF faces-config visual editor working in Domino Designer. I followed up with how to enable the same functionality in Eclipse by setting up a faceted project. It turned out that had some knock-on implications to the NSF, which you can work around but is not ideal.
Today, Christian Guedemann asked me if I’d isolated the editor it uses. So I went back to Jesse’s post, searched the web and by putting the two together I found a better resolution.
You’ll still need Eclipse Java EE Developer Tools installed into Eclipse, the easiest approach for which is to install the m2e-wtp plugins I mentioned in my first post, which are part of the key for Maven, so useful anyway.
Then you need to modify the Package Explorer or Project Explorer in Eclipse, basically any view that allows you to modify the filters. I preferred to change Project Explorer, so I can always get to the relevant files without cluttering my usual IDE view, the Package Explorer.
Click on the View Menu, you can then choose the option Customize View…, which allows you to modify the filters. You can then take the tick out of “.* resources”, which ensure they are no longer hidden.
Then you need to locate the .project file and in the <natures> XML element and inside it paste:
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
No surprise that that’s what Jesse put in Domino Designer.
The other thing to change is the .settings file. That’s a bit trickier, because we need to copy in some files. The easiest way is to select File > New > Other and choose General > Faceted Project. When you get to the Project Facets dialog screen, as before the Configuration should be JavaServer Faces v2.0 Project. This then gives you the three files you need to copy across:
- org.eclipse.wst.common.component
- org.eclipse.wst.common.project.facet.core.prefs.xml
- org.eclipse.wst.common.project.facet.core.xml
This will give you a shortcut method to enabling the JSF 2.0 faces-config editor without converting the whole ODP to a faceted project and having the knock-on implications (which I never really fully pinned down!)
Enjoy!