CustomCodeGeneratorOrRefactoring.st
changeset 798 63fd5f12eb54
parent 789 9349044a65e8
child 803 95cdac772759
equal deleted inserted replaced
797:7a2ee5cc3212 798:63fd5f12eb54
   150 
   150 
   151     perspective isMethodPerspective ifTrue: [
   151     perspective isMethodPerspective ifTrue: [
   152         aCustomContext selectedMethods isEmptyOrNil ifTrue: [ ^ true ].  
   152         aCustomContext selectedMethods isEmptyOrNil ifTrue: [ ^ true ].  
   153 
   153 
   154         ^ aCustomContext selectedMethods anySatisfy: [ :method | 
   154         ^ aCustomContext selectedMethods anySatisfy: [ :method | 
   155             languages includes: method programmingLanguage
   155             method notNil and: [ languages includes: method programmingLanguage ]
   156         ].
   156         ].
   157     ].
   157     ].
   158 
   158 
   159     (perspective isClassPerspective 
   159     (perspective isClassPerspective 
   160         or: [ perspective isInstanceVariablePerspective ] 
   160         or: [ perspective isInstanceVariablePerspective ] 
   161         or: [ perspective isProtocolPerspective ]) ifTrue: [
   161         or: [ perspective isProtocolPerspective ]) ifTrue: [
   162 
   162 
   163         aCustomContext selectedClasses isEmptyOrNil ifTrue: [ ^ true ].
   163         aCustomContext selectedClasses isEmptyOrNil ifTrue: [ ^ true ].
   164 
   164 
   165         ^ aCustomContext selectedClasses anySatisfy: [ :class | 
   165         ^ aCustomContext selectedClasses anySatisfy: [ :class | 
   166             languages includes: class programmingLanguage
   166             class notNil and: [ languages includes: class programmingLanguage ]
   167         ].
   167         ].
   168     ].
   168     ].
   169 
   169 
   170     "For other perspectives (package, class category, namespace) no guess"
   170     "For other perspectives (package, class category, namespace) no guess"
   171     ^ true
   171     ^ true
   172 
   172 
   173     "Created: / 22-12-2014 / 20:34:28 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
   173     "Created: / 22-12-2014 / 20:34:28 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
   174     "Modified: / 25-12-2014 / 09:31:32 / root"
   174     "Modified: / 25-12-2014 / 09:31:32 / root"
   175     "Modified: / 27-12-2014 / 12:12:04 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
   175     "Modified: / 24-01-2015 / 18:24:49 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
   176 !
   176 !
   177 
   177 
   178 availableInContext: aCustomContext
   178 availableInContext: aCustomContext
   179     "Returns true if the generator/refactoring is available in given
   179     "Returns true if the generator/refactoring is available in given
   180      context, false otherwise.
   180      context, false otherwise.