[jbosstools-issues] [JBoss JIRA] (JBIDE-7783) GWT throws exceptions during Java field rename

Victor Rubezhny (JIRA) jira-events at lists.jboss.org
Thu Jun 7 10:28:18 EDT 2012


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

Victor Rubezhny commented on JBIDE-7783:
----------------------------------------

Cannot reproduce this CCE in my environment neither using Google Web Toolkit 2.4.0 SDK Bundle for Eclipse 3.7 (which is provided by Nick's Target Platform for Eclipse 3.7), nor by using the GPE project's plug-in built from a latest source. 

Regarding the source code, the line numbers in the stacktrace provided are not correlate with the source code I have. There are the correct checks/type casts present in the latest source of com.google.gwt.eclipse.core.refactoring.GWTRenameParticipant.initialize() method when calculating a new element. 

Also, I cannot reproduce the issue described in http://code.google.com/p/google-web-toolkit/issues/detail?id=4656&can=1&q=refactor&colspec=ID%20Type%20Status%20Owner%20Milestone%20Summary%20Stars, as well as the fix for the BugZilla issue referenced there (https://bugs.eclipse.org/bugs/show_bug.cgi?format=multiple&id=317264) is released for Eclipse 3.6.1 and 3.7. 

So, I suppose that the issue is out-of-date and fixed at least since Google Web Toolkit 2.4.0 SDK Bundle for Eclipse 3.7.
                
> GWT throws exceptions during Java field rename
> ----------------------------------------------
>
>                 Key: JBIDE-7783
>                 URL: https://issues.jboss.org/browse/JBIDE-7783
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: GWT
>    Affects Versions: 3.2.0.Beta1
>         Environment: JBoss Tools + GWT plugins
>            Reporter: Daniel Azarov
>            Assignee: Victor Rubezhny
>              Labels: googlebug
>             Fix For: 3.3.1
>
>
> Test case:
> 1. Start JBDS
> 2. Create 'test' Java project
> 3. Create 'test' Java package
> 4. Create 'Test' Java class in 'test' package
> 5. Create 'int user' field
> 6. Select field and right-click on it
> 7. Select menu Source->Generate Getters and Setters then press OK button
> 8. Select field and right-click on it
> 9. Select menu Refactor->Rename then type user2 and press Ctrl+Enter
> 10. See Error log
> FAIL:
> java.lang.ClassCastException: org.eclipse.jdt.internal.core.SourceField cannot be cast to org.eclipse.jdt.core.IMethod
> 	at com.google.gwt.eclipse.core.refactoring.GWTRenameParticipant.initialize(GWTRenameParticipant.java:115)
> 	at com.google.gwt.eclipse.core.refactoring.GWTRenameMemberParticipant.initialize(GWTRenameMemberParticipant.java:38)
> 	at com.google.gwt.eclipse.core.refactoring.rpc.PairedMethodRenameParticipant.initialize(PairedMethodRenameParticipant.java:224)
> 	at org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant.initialize(RefactoringParticipant.java:105)
> 	at org.eclipse.ltk.core.refactoring.participants.ParticipantExtensionPoint.getParticipants(ParticipantExtensionPoint.java:100)
> 	at org.eclipse.ltk.core.refactoring.participants.ParticipantManager.loadRenameParticipants(ParticipantManager.java:74)
> 	at org.eclipse.jdt.internal.corext.refactoring.rename.RenameModifications.loadParticipants(RenameModifications.java:190)
> 	at org.eclipse.jdt.internal.corext.refactoring.rename.JavaRenameProcessor.loadParticipants(JavaRenameProcessor.java:40)
> 	at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:233)
> 	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:1975)
> 	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
> 	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
> java.lang.ClassCastException: org.eclipse.jdt.internal.core.SourceField cannot be cast to org.eclipse.jdt.core.IMethod
> 	at com.google.gwt.eclipse.core.refactoring.GWTRenameParticipant.initialize(GWTRenameParticipant.java:115)
> 	at com.google.gwt.eclipse.core.refactoring.GWTRenameMemberParticipant.initialize(GWTRenameMemberParticipant.java:38)
> 	at org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant.initialize(RefactoringParticipant.java:105)
> 	at org.eclipse.ltk.core.refactoring.participants.ParticipantExtensionPoint.getParticipants(ParticipantExtensionPoint.java:100)
> 	at org.eclipse.ltk.core.refactoring.participants.ParticipantManager.loadRenameParticipants(ParticipantManager.java:74)
> 	at org.eclipse.jdt.internal.corext.refactoring.rename.RenameModifications.loadParticipants(RenameModifications.java:190)
> 	at org.eclipse.jdt.internal.corext.refactoring.rename.JavaRenameProcessor.loadParticipants(JavaRenameProcessor.java:40)
> 	at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:233)
> 	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:1975)
> 	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
> 	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

--
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