MenuEditor.st
changeset 3028 272d45da727d
parent 3026 0bf0d52eb92e
child 3029 58cc0b402815
equal deleted inserted replaced
3027:50657c666fdc 3028:272d45da727d
  2592 
  2592 
  2593     "Modified: / 21-10-2010 / 14:09:33 / cg"
  2593     "Modified: / 21-10-2010 / 14:09:33 / cg"
  2594 !
  2594 !
  2595 
  2595 
  2596 doBrowseApplicationMethodFor:aspect
  2596 doBrowseApplicationMethodFor:aspect
  2597     |selector cls category|
  2597     |selector cls implClass browsedClass category|
  2598 
  2598 
  2599     specClass isNil ifTrue:[
  2599     specClass isNil ifTrue:[
  2600         self warn:(resources string:'Please define the application class first.').
  2600         self warn:(resources string:'Please define the application class first.').
  2601         ^ self
  2601         ^ self
  2602     ].
  2602     ].
  2615     cls isNil ifTrue:[
  2615     cls isNil ifTrue:[
  2616         self warn:(resources string:'Class %1 does not exist!!' with:specClass asString).
  2616         self warn:(resources string:'Class %1 does not exist!!' with:specClass asString).
  2617         ^ self
  2617         ^ self
  2618     ].
  2618     ].
  2619 
  2619 
       
  2620     browsedClass := cls.
  2620     (cls includesSelector:selector) ifFalse:[
  2621     (cls includesSelector:selector) ifFalse:[
  2621         category := UserPreferences current categoryForMenuActionsMethods.
  2622         (implClass := cls whichClassImplements:selector) notNil ifTrue:[
  2622 
  2623             (Dialog confirm:(resources 
  2623         SmalltalkCodeGeneratorTool
  2624                         stringWithCRs:'The application does not directly implement %1.\However it inherits this from %2.\\Create a redefinition in %1?'
  2624             createActionMethodFor:selector in:cls
  2625                         with:cls name
  2625             category:category
  2626                         with:implClass name))
  2626             redefine:(self redefineAspectMethodsChannel value).
  2627             ifTrue:[
  2627     ].
  2628                 category := UserPreferences current categoryForMenuActionsMethods.
  2628 
  2629 
  2629     UserPreferences systemBrowserClass openInClass:cls selector:selector
  2630                 SmalltalkCodeGeneratorTool
       
  2631                     createActionMethodFor:selector in:cls
       
  2632                     category:category
       
  2633                     redefine:(self redefineAspectMethodsChannel value).
       
  2634             ] ifFalse:[
       
  2635                 browsedClass := implClass
       
  2636             ]
       
  2637         ]
       
  2638     ].
       
  2639 
       
  2640     UserPreferences systemBrowserClass openInClass:browsedClass selector:selector
  2630 
  2641 
  2631     "Created: / 21-10-2010 / 14:07:32 / cg"
  2642     "Created: / 21-10-2010 / 14:07:32 / cg"
  2632     "Modified: / 31-01-2011 / 18:28:59 / cg"
  2643     "Modified: / 31-01-2011 / 18:28:59 / cg"
  2633 !
  2644 !
  2634 
  2645