MenuEditor.st
changeset 3099 7fee6db3c473
parent 3095 f7491ef4bcf0
child 3110 35a4010e8790
equal deleted inserted replaced
3098:f806d15778cd 3099:7fee6db3c473
  2617         ^ self
  2617         ^ self
  2618     ].
  2618     ].
  2619 
  2619 
  2620     browsedClass := cls.
  2620     browsedClass := cls.
  2621     (cls includesSelector:selector) ifFalse:[
  2621     (cls includesSelector:selector) ifFalse:[
       
  2622         | generate |    
  2622         (implClass := cls whichClassImplements:selector) notNil ifTrue:[
  2623         (implClass := cls whichClassImplements:selector) notNil ifTrue:[
  2623             (Dialog 
  2624             generate := (Dialog 
  2624                 confirm:(resources 
  2625                 confirm:(resources 
  2625                             stringWithCRs:'The application does not directly implement %1.\However it inherits this from %2.\\Create a redefinition in %1?'
  2626                             stringWithCRs:'The application does not directly implement %1.\However it inherits this from %2.\\Create a redefinition in %1?'
  2626                             with:cls name
  2627                             with:cls name
  2627                             with:implClass name)
  2628                             with:implClass name)
  2628                 initialAnswer:false)
  2629                 initialAnswer:false)
  2629             ifTrue:[
  2630         ] ifFalse:[ 
  2630                 category := UserPreferences current categoryForMenuActionsMethods.
  2631             generate := true.
  2631 
  2632         ].
  2632                 SmalltalkCodeGeneratorTool
  2633         category := UserPreferences current categoryForMenuActionsMethods.
  2633                     createActionMethodFor:selector in:cls
  2634 
  2634                     category:category
  2635         SmalltalkCodeGeneratorTool
  2635                     redefine:(self redefineAspectMethodsChannel value).
  2636             createActionMethodFor:selector in:cls
  2636             ] ifFalse:[
  2637             category:category
  2637                 browsedClass := implClass
  2638             redefine:(self redefineAspectMethodsChannel value).
  2638             ]
       
  2639         ]
       
  2640     ].
  2639     ].
  2641 
  2640 
  2642     UserPreferences systemBrowserClass openInClass:browsedClass selector:selector
  2641     UserPreferences systemBrowserClass openInClass:browsedClass selector:selector
  2643 
  2642 
  2644     "Created: / 21-10-2010 / 14:07:32 / cg"
  2643     "Created: / 21-10-2010 / 14:07:32 / cg"
  2645     "Modified: / 31-01-2011 / 18:28:59 / cg"
  2644     "Modified: / 31-01-2011 / 18:28:59 / cg"
       
  2645     "Modified: / 17-03-2014 / 12:25:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  2646 !
  2646 !
  2647 
  2647 
  2648 doBrowseChoiceMethod
  2648 doBrowseChoiceMethod
  2649     "open a browser on the choice aspect method (create if not yet existing)"
  2649     "open a browser on the choice aspect method (create if not yet existing)"
  2650 
  2650