[jbosstools-issues] [JBoss JIRA] (JBIDE-10210) EL refactoring for @Named beans doesn't work properly
Alexey Kazakov (Issue Comment Edited) (JIRA)
jira-events at lists.jboss.org
Thu Jan 5 14:55:09 EST 2012
[ https://issues.jboss.org/browse/JBIDE-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654151#comment-12654151 ]
Alexey Kazakov edited comment on JBIDE-10210 at 1/5/12 2:53 PM:
----------------------------------------------------------------
Suppose we have two projects:
ProjectA (WAR with WebContent folder) and ProjectB (JAR w/o WebContent).
ProjectB depends on ProjectA.
ProjectA has a @Named bean and a xhtml page which uses this bean.
Try to refactor the name of the bean. You will get the following exception:
{code}
org.eclipse.core.internal.resources.ResourceException: Resource '/ProjectB/WebContent' does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:320)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:194)
at org.eclipse.core.internal.resources.Container.members(Container.java:266)
at org.eclipse.core.internal.resources.Container.members(Container.java:249)
at org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher.scan(RefactorSearcher.java:183)
at org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher.scanProject(RefactorSearcher.java:121)
at org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher.scanProject(RefactorSearcher.java:92)
at org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher.findELReferences(RefactorSearcher.java:145)
at org.jboss.tools.cdi.internal.core.refactoring.RenameNamedBeanProcessor.renameBean(RenameNamedBeanProcessor.java:61)
at org.jboss.tools.cdi.internal.core.refactoring.RenameNamedBeanProcessor.checkFinalConditions(RenameNamedBeanProcessor.java:44)
at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:224)
at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:85)
at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
{code}
was (Author: akazakov):
Suppose we have two projects:
ProjectA (WAR with WebContent folder) and ProjectB (JAR w/o WebContent).
ProjectB depends on ProjectA.
ProjectA has a @Named bean and a xhtml page which uses this bean.
Try to refactor the name of the bean. You will get the following exception:
{code}
org.eclipse.core.internal.resources.ResourceException: Resource '/tck-child/WebContent' does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:320)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:194)
at org.eclipse.core.internal.resources.Container.members(Container.java:266)
at org.eclipse.core.internal.resources.Container.members(Container.java:249)
at org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher.scan(RefactorSearcher.java:183)
at org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher.scanProject(RefactorSearcher.java:121)
at org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher.scanProject(RefactorSearcher.java:92)
at org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher.findELReferences(RefactorSearcher.java:145)
at org.jboss.tools.cdi.internal.core.refactoring.RenameNamedBeanProcessor.renameBean(RenameNamedBeanProcessor.java:61)
at org.jboss.tools.cdi.internal.core.refactoring.RenameNamedBeanProcessor.checkFinalConditions(RenameNamedBeanProcessor.java:44)
at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:224)
at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:85)
at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:121)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
{code}
> EL refactoring for @Named beans doesn't work properly
> -----------------------------------------------------
>
> Key: JBIDE-10210
> URL: https://issues.jboss.org/browse/JBIDE-10210
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: CDI, JSF
> Affects Versions: 3.3.0.M4
> Reporter: Jaroslav Jankovič
> Assignee: Daniel Azarov
> Fix For: 3.3.0.Beta1
>
> Attachments: 01.correctRefactor.png, 02.wrongRefactor.png
>
>
> Sometimes, refactoring @Named annotation doesn't include EL as it should be. Also, another issue, I have found with the steps to reproduce, is disappearing CDI Refactor option in context menu. Workaround exists, it is the same workaround for both issues.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list