UIPainter.st
changeset 2294 0a4591e6bb20
parent 2293 b8149118f0af
child 2296 365b3a73cd28
equal deleted inserted replaced
2293:b8149118f0af 2294:0a4591e6bb20
   314 #settingsCanvas
   314 #settingsCanvas
   315 'Shows or hides the canvas window.'
   315 'Shows or hides the canvas window.'
   316 
   316 
   317 #settingsGallery
   317 #settingsGallery
   318 'Shows or hides the gallery window.'
   318 'Shows or hides the gallery window.'
       
   319 
       
   320 #settingsGenerateCommentedCode
       
   321 ''
   319 
   322 
   320 #settingsGridManager
   323 #settingsGridManager
   321 'Opens a dialog to toggle grid display or to change the grids spacing.'
   324 'Opens a dialog to toggle grid display or to change the grids spacing.'
   322 
   325 
   323 #settingsRedefineAspectMethods
   326 #settingsRedefineAspectMethods
  1357                (MenuItem
  1360                (MenuItem
  1358                   label: '-'
  1361                   label: '-'
  1359                 )
  1362                 )
  1360                (MenuItem
  1363                (MenuItem
  1361                   activeHelpKey: settingsAspectsAsInstances
  1364                   activeHelpKey: settingsAspectsAsInstances
  1362                   enabled: hasSpecClass
       
  1363                   label: 'Aspects as InstanceVariables'
  1365                   label: 'Aspects as InstanceVariables'
  1364                   translateLabel: true
  1366                   translateLabel: true
  1365                   isVisible: isNotEditingSpecOnly
  1367                   isVisible: isNotEditingSpecOnly
  1366                   indication: generateAspectsAsInstanceVariables:
  1368                   indication: generateAspectsAsInstanceVariables:
  1367                 )
  1369                 )
  1368                (MenuItem
  1370                (MenuItem
  1369                   activeHelpKey: settingsRedefineAspectMethods
  1371                   activeHelpKey: settingsRedefineAspectMethods
  1370                   enabled: hasSpecClass
       
  1371                   label: 'Redefine Aspect Methods'
  1372                   label: 'Redefine Aspect Methods'
  1372                   translateLabel: true
  1373                   translateLabel: true
  1373                   isVisible: isNotEditingSpecOnly
  1374                   isVisible: isNotEditingSpecOnly
  1374                   indication: redefineAspectMethods:
  1375                   indication: redefineAspectMethods:
  1375                 )
  1376                 )
  1376                (MenuItem
  1377                (MenuItem
  1377                   activeHelpKey: settingsGenerateCommentedCode
  1378                   activeHelpKey: settingsGenerateCommentedCode
  1378                   enabled: hasSpecClass
       
  1379                   label: 'Generate Commented Code'
  1379                   label: 'Generate Commented Code'
  1380                   translateLabel: true
  1380                   translateLabel: true
  1381                   isVisible: isNotEditingSpecOnly
  1381                   isVisible: isNotEditingSpecOnly
  1382                   indication: generateCommentedCode:
  1382                   indication: generateCommentedCode:
  1383                 )
  1383                 )
  4465     self painter aspectSelectorsAndTypesDo:
  4465     self painter aspectSelectorsAndTypesDo:
  4466         [:selector :type |
  4466         [:selector :type |
  4467             |newEntry|
  4467             |newEntry|
  4468 
  4468 
  4469             ( #(#modelAspect channelAspect actionSelector valueSelector) includes:type) ifTrue:[
  4469             ( #(#modelAspect channelAspect actionSelector valueSelector) includes:type) ifTrue:[
  4470                 (cls includesSelector:selector) ifFalse:[
  4470                 ((cls canUnderstand:selector) or:[cls class canUnderstand:selector]) ifFalse:[
  4471                     newEntry := Array with:selector with:type.    
  4471                     newEntry := Array with:selector with:type.    
  4472                     (aspectList contains:[:entry | entry = newEntry]) ifFalse:[    
  4472                     (aspectList contains:[:entry | entry = newEntry]) ifFalse:[    
  4473                         aspectList add:newEntry.
  4473                         aspectList add:newEntry.
  4474                     ]
  4474                     ]
  4475                 ]
  4475                 ]