Happy !

ThomasHeniart / MagritteTool

Project infos

License MIT
Tags
Creation date 2015-05-12
Website

Monticello registration

About MagritteTool

NautilusRefactoring class>>buildRefactoringShortcutsOn: aBuilder add : self itemForMagritteDescriptionOn: aBuilder.

itemForMagritteDescriptionOn: aBuilder

(aBuilder shortcut: #generateMagritteDescriptions)
    category: #NautilusGlobalShortcuts
    default: $h command , $m command
    do: [ :target | target refactor generateMagritteDescriptions ]
    description: 'Generate the accessors and descriptions for the selected class'

NautilusRefactoring add:

generateMagritteDescriptions

| refactorings |
refactorings := self privateGenerateMagritteDescriptionsFor: self model selectedClass.
refactorings ifNil: [ ^ self ].
refactorings do: [:each | each model environment: self model browsedEnvironment ].
self performRefactorings: refactorings

privateGenerateMagritteDescriptionsFor: class

^ class instVarNames collect: [:aVarName | 
            RBCreateMagritteDescriptionForVariableRefactoring
                model: environment
                variable: aVarName
                class: class
                classVariable: false ]