[jboss-user] [JBoss Tools] - Re: How to create seam web project programmatically?

Alexey Kazakov do-not-reply at jboss.com
Mon Mar 28 14:42:54 EDT 2011


Alexey Kazakov [http://community.jboss.org/people/akazakov] created the discussion

"Re: How to create seam web project programmatically?"

To view the discussion, visit: http://community.jboss.org/message/596010#596010

--------------------------------------------------------------
Just create a Java project using JDT API and then enable Seam support for the project:

> IProject project = ...;  // Your Java project.
> 
>  org.jboss.tools.common.model.util.EclipseResourceUtil.addNatureToProject(project, org.jboss.tools.seam.core.ISeamProject.NATURE_ID);  // Enables Seam builder and nature.
>                               if(!project.hasNature(org.jboss.tools.jst.web.kb.IKbProject.NATURE_ID)) {
>                                         org.jboss.tools.common.model.util.EclipseResourceUtil.addNatureToProject(project, org.jboss.tools.jst.web.kb.IKbProject.NATURE_ID); // Enables JBoss Tools KnowledgeBase builder/nature required by Seam/JSF code completion/validation/hyperlinks.
>                               }
>                               org.jboss.tools.common.model.util.EclipseResourceUtil.addBuilderToProject(project, org.eclipse.wst.validation.internal.plugin.ValidationPlugin.VALIDATION_BUILDER_ID);  // Enables WST validation which is required by Seam validation.
Or you can create a WTP dynamic web project instead of plain Java project if you want a full JSF support on XHTML/JSPs.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/596010#596010]

Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110328/38db68d9/attachment-0001.html 


More information about the jboss-user mailing list