pharo
pharo copied to clipboard
Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk.
``` testImportFunctions | pyDoc importer | pyDoc := self sourceBig2. importer := self importer. importer accept: pyDoc. self assert: importer functions size equals: 5 ``` select ``` pyDoc := self...
Often in the refactoring tests, a default model is used such as RBBrowserEnvironment default. This creates a model for the complete system (to be verified) and it is often not...
Move Remove class transformation to Driver. I hate you bot!
Right now some conditions are expressed calling directly the Pharo metamodel sending messages via `self realClass`. `realClass` is a method that given a model class will return the corresponding Pharo...
``` testWhichSelectorsReferToClassVariable | root sub | rbNamespace := RBNamespace onEnvironment: (RBClassEnvironment classes: {MyClassARoot . MySubAccessingSuperclassState }). root := rbNamespace classNamed: #MyClassARoot. sub := rbNamespace classNamed: #MySubAccessingSuperclassState. self assert: (root whichSelectorsReferToClassVariable:...
Right now if you want to replace #old by #new, the method new should be defined in the class of the method containing #old. However the refactoring will happily perform...
``` existingMethodsThatReferToInstanceVariable: ``` returns selectors ``` whichMethodsReferToInstanceVariable: ``` returns selectors So we should introduce `existingSelectorsThatReferToInstanceVariable` and `whichSelectorsReferToInstanceVariable` or a least make sure that existingMethodsThatReferToInstanceVariable and whichMethodsReferToInstanceVariable return methods!
We want to give the user the understanding whether he is using a refactoring or a transformation. So we introduced the method `menuItemString` on `RBAbstractRefactoring` and it display (T) infront...
``` Class >> definesClassVariable: aGlobal "Return whether the receiver has a class variables (shared variables among its class and subclasses) named: aString" ^ self classVariables includes: aGlobal ``` and it...
Right now the only test we have is the following one. ``` testProtectInstanceVariable | refactoring class | refactoring := self createRefactoringWithArguments: {('rewrite' , 'Rule1') . #RBSubclassOfClassToRename}. self executeRefactoring: refactoring. class...