Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-7783

GWT throws exceptions during Java field rename

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.CR1
    • 3.2.0.Beta1
    • gwt
    • JBoss Tools + GWT plugins

      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)

              vrubezhny Victor Rubezhny (Inactive)
              dazarov_jira Daniel Azarov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: