dolphinsmalltalk / Dolphin

Dolphin Smalltalk Core Image
MIT License
301 stars 58 forks source link

Convert to Sibling Refactoring does not work with namespace qualified class names #1131

Closed blairmcg closed 3 years ago

blairmcg commented 3 years ago

Attempting to perform a Convert to Sibling refactoring has a couple of issues:

  1. The dialog trims off the namespace prefix from the abstract class name it proposes, which would define the class in Smalltalk rather than the original namespace (although this does at least work)
  2. If the namespace prefix is edited back in, when OK is pressed the refactoring fails:
    27/06/2021 17:19:51: 'UndefinedObject does not understand #compile:classified:'
    Core.Object>>doesNotUnderstand:
    ChildrenToSiblingsRefactoring>>pushUp:in:
    [] in ChildrenToSiblingsRefactoring>>pushUpMethodsFrom:
    Set>>do:
    ChildrenToSiblingsRefactoring>>pushUpMethodsFrom:
    ChildrenToSiblingsRefactoring>>pushUpMethods
    ChildrenToSiblingsRefactoring>>transform
    ChildrenToSiblingsRefactoring(Refactoring)>>primitiveExecute
    ChildrenToSiblingsRefactoring(Refactoring)>>execute
    [] in Tools.RefactoringSmalltalkSystem>>convertToSibling:
    ExceptionHandlerSet(ExceptionHandlerAbstract)>>markAndTry
    [] in ExceptionHandlerSet(ExceptionHandlerAbstract)>>try:
    BlockClosure>>ensure:
    ExceptionHandlerSet(ExceptionHandlerAbstract)>>try:
    BlockClosure>>on:do:on:do:
    RefactoringSmalltalkSystem>>handleRefactoringException:
    RefactoringSmalltalkSystem>>convertToSibling:
    ClassHierarchySelector(ClassSelector)>>convertToSibling
    Symbol>>forwardTo:
    CommandDescription>>performAgainst:
    [] in Command>>value
    BlockClosure>>ensure:
    Command>>value
    ShellView>>performCommand:
    ClassBrowserShell(Shell)>>performCommand:
    CommandQuery>>perform
    DelegatingCommandPolicy(CommandPolicy)>>route:
    [] in TreeView(View)>>onCommand:
    BlockClosure>>ensure:
    Cursor>>showWhile:
    TreeView(View)>>onCommand:
    TreeView(View)>>wmCommand:wParam:lParam:
    TreeView(View)>>dispatchMessage:wParam:lParam:
    [] in Kernel.InputState>>wndProc:message:wParam:lParam:cookie:
    BlockClosure>>ifCurtailed:
    GuiInputState(InputState)>>wndProc:message:wParam:lParam:cookie:
    GuiInputState(InputState)>>pumpMessage:
    GuiInputState(InputState)>>loopWhile:
    GuiInputState(InputState)>>mainLoop
    [] in GuiInputState(InputState)>>forkMain
    ExceptionHandler(ExceptionHandlerAbstract)>>markAndTry
    [] in ExceptionHandler(ExceptionHandlerAbstract)>>try:
    BlockClosure>>ensure:
    ExceptionHandler(ExceptionHandlerAbstract)>>try:
    BlockClosure>>on:do:
    [] in BlockClosure>>newProcess:
blairmcg commented 3 years ago

Fixed by ecc4c9ea