You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "ARUNAVA SINHA (JIRA)" <ji...@apache.org> on 2018/07/26 05:39:00 UTC

[jira] [Commented] (NETBEANS-691) Cannot undo conversion of constructor to factory when refactoring in calling class.

    [ https://issues.apache.org/jira/browse/NETBEANS-691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16556929#comment-16556929 ] 

ARUNAVA SINHA commented on NETBEANS-691:
----------------------------------------

On undo-->redo-->undo after refactoring with 'Replace Constructor with factory' , second undo call was throwing CannotUndoException.

UndoRedoManager.onSaveTasksEdit 'hasBeenDone' field became false after the redo call in this particular scenario.
So when second time undo is called, it throws CannotUndoException as hasBeenDone field is already false

> Cannot undo conversion of constructor to factory when refactoring in calling class. 
> ------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-691
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-691
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - Refactoring
>    Affects Versions: 9.0
>            Reporter: Manikantan Narender Nath
>            Assignee: ARUNAVA SINHA
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Test Spec: [http://netbeans-vm.apache.org/synergy/client/app/#/specification/351]
> Test Suite: [http://netbeans-vm.apache.org/synergy/client/app/#/suite/2034/v/1]
> Test Case: http://netbeans-vm.apache.org/synergy/client/app/#/case/5158/suite/2034/v/1
> Environment
> *Product Version:* Apache NetBeans IDE Dev (Build incubator-netbeans-linux-408-on-20180417)
> *Java:* 10; Java HotSpot(TM) 64-Bit Server VM 10+46
> *Runtime:* Java(TM) SE Runtime Environment 10+46
> *System:* Mac OS X version 10.12.6 running on x86_64; UTF-8; en_IN (nb)
>  
>  
> Steps to reproduce
>  # OPen Project Java refactoring (attached to test spec)
>  # Open replace_constructor.ClassB
>  # Place caret on constructor call on  line ClassA ca2 = new Clas|sA(10, 5) (| is caret position)
>  # From menu choose Refactor|Replace Constructor With Factory
>  # Provide name for factory
>  # Click Refactor
>  # Click undo-redo-undo
> Expected results
>    Able to run step 7   Undo/Redo button is enabled and clickable
> Actual Result
>    Cannot run Step 7 as  Undo button is disabled.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists