[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-5974) Add JSF Capabilities not preserved after restart

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Tue Mar 16 09:29:38 EDT 2010


    [ https://jira.jboss.org/jira/browse/JBIDE-5974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12520136#action_12520136 ] 

Viacheslav Kabanovich commented on JBIDE-5974:
----------------------------------------------

JSF Capability is based on Web Dynamic Project and not any faceted project can be converted to it. For example specific facets of ESB project, JPA project etc. are not compatible with 'jst.web' facet of dynamic web project. I have studied our code and found that it just avoids adding 'jst.web' facet to an existing faceted project because in 99% of cases it is going to fail anyway (with a message like 'Dynamic Web Module 2.5 and JBoss ESB 4.5 cannot both be selected.'). But there exists at least one case when adding 'jst.web' facet is successful, and it is the case of this issue - the faceted project does not declare any facets.

So, this issue may be fixed by simple trying to add 'jst.web' facet if it is missing. Such a fix will not make worse any other case. When it fails, it would mean that the project is not Web Dynamic Project, and at the next start of Eclipse JSF model will not be able to obtain web root from it (after Add JSF Capability wizard it took it from input and tried to save with 'jst.web' facet), so jsfnature will be removed as corrupted. But it is exactly what happens now, only exceptions are different. This simple fix is safe for 3.1.1.

It will be smarter to improve validation in Add JSF Capability wizard, and check if it is safe to try and add missing 'jst.web' facet, and if answer is negative report to wizard error message area of impossibility to add JSF capabilities to the project, and disable finish button. I think it also can be done for 3.1.1. 

> Add JSF Capabilities not preserved after restart
> ------------------------------------------------
>
>                 Key: JBIDE-5974
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-5974
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: JSF
>    Affects Versions: 3.1.0.CR2, 3.1.0.GA
>         Environment: Eclipse 3.5 SR2
> Windows 7
>            Reporter: Cody Lerum
>            Assignee: Viacheslav Kabanovich
>            Priority: Critical
>             Fix For: 3.1.1
>
>         Attachments: .project, .project, .settings.zip
>
>
> This is when working with a seam-gen ear project.
> When using Tools 3.1CR2 the plugin prompts you to add JSF capabilities to ensure code completion (code suggest?) works correctly. 
> When adding to an ear project you have to unselect the target server otherwise it starts publishing your project as a war to the server even though it is an ear. ( see comment here - https://jira.jboss.org/jira/browse/JBIDE-4685?focusedCommentId=12517386#action_12517386)
> It appears that this adds then 5 seconds later I get an error
> WARNING: workspace home changed from  to V:/workspace/myProject/resources/WEB-INF
> Project P/myProject has corrupted nature: org.jboss.tools.jsf.jsfnature
> code complete for EL starts working fine then until eclipse is restarted.
> Then when the project builds the following errors shows up in the Error log
> Project P/myProject has corrupted nature: org.jboss.tools.jsf.jsfnature
> Under the project configure menu the option again shows as "Add JSF Capabiliites" rather than Remove.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list