Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2264

Issue in undo/redo when method is pulled up

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 11.0
    • None
    • java - Refactoring
    • None

    Description

      Test case:

      https://netbeans-vm.apache.org/synergy/client/app/#/case/5135/suite/2506/edit

       

      Steps to reproduce:

      1. Open push_pull.ClassB.java class
      2. Put caret into public int fa|ct(int i){...}
      3. From main menu select Refactor > Pull Up...
      4. In Pull Up dialog select ClassA as Destiantion Supertype and leave checkbox fact(int i) checked then press Preview
      5. Inspect changes and press Do Refactoring

      The refactoring works correctly.
      The file ClassB.java is opened in the editor and its tab is selected

      1. Click on Undo in the toolbar
      2. When the "confirm undo" dialog appears select "yes"
      3. Click on Redo in the toolbar
      4. When the "confirm redo" dialog appears select "yes"
      5. Open the file ClassA.java
      6. Click on Undo in the toolbar
      7. When the "confirm undo" dialog appears select "yes"

      Expected result

      • The Undo is correctly performed in both the files ClassA.java and ClassB.java and the project is compilable

      Actual result

      • The Undo is correctly performed in the file ClassA.java but not in ClassB.java, the method  public int fact(int i) that was pulled up is lost in both files, the project is not compilable

      Attachments

        Activity

          People

            Unassigned Unassigned
            gtino <DELETED>
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: