enjoliveur's People
enjoliveur's Issues
Better extract method
- better extract method with argument: the best thing would be let the user specify the argument
installStableVersionButton: aList
<menu>
aList
act: [ :presenter | self onInstallFrom: presenter ]
icon: (Smalltalk ui icons iconNamed: #glamorousAccept)
entitled: 'Install stable version'
=> now is just producing
installStableVersionButton: aList
<menu>
aList
act: [ :presenter | self onInstallFrom: presenter ]
icon: self iconNamed
entitled: 'Install stable version'
iconNamed
(Smalltalk ui icons iconNamed: #glamorousAccept)
and we want to have
installStableVersionButton: aList
<menu>
aList
act: [ :presenter | self onInstallFrom: presenter ]
icon: (self iconNamed: #glamorousAccept)
entitled: 'Install stable version'
iconNamed: aSymbol
(Smalltalk ui icons iconNamed: aSymbol)
Consistents extract refactorings
Extract refactorings should be easily accessible with a common shortcut pattern to use them
- Extract Constant, https://www.jetbrains.com/help/idea/extract-constant.html
- Extract Field, https://www.jetbrains.com/help/idea/extract-field.html
- Extract method, https://www.jetbrains.com/help/idea/extract-method.html
- Extract Superclass, https://www.jetbrains.com/help/idea/extract-superclass.html
- Extract Variable, https://www.jetbrains.com/help/idea/extract-variable.html
- Extract parameter, https://www.jetbrains.com/help/idea/javaintroduce.html
- Extract into class refactorings, https://www.jetbrains.com/help/idea/extract-into-class-refactorings.html
We should have a preview dialog allowing to choose what to apply.
We should have tests, including for shortcuts activation
Removing classes should not warn about references in classes to remove
If I want to remove a class A and a class B with B referencing A, currently, Calypso will warn me that A is still referenced before applying the refactoring.
IMO this should not happen because the class referencing A is part of the classes to remove.
missing refactoring: Invert Boolean
Strange logic in RBFactoryChangeManager
Avoid hardcoding class such RBParseTreeRewriter
Undo
In the past refactorings could undone and I do not see how this is possible.
checkMethodName: aName in: aClass should be revisited to use its second argument
Right now checkMethodName: aName in: aClass is defined as
checkMethodName: aString in: aClass
"Return whether the argument aString is can represent a selector"
"You probably look for checkMethodName: since the second argument is ignored"
^ aString isString and: [ RBScanner isSelector: aString ]
and this is a bit suspicious not to use the second argument.
Shortcuts for most used refactorings
We should have consistent shortcuts for most used refactorings:
- all extract refactorings
- in line
- invert condition
- push up / pull down
- rename / move
etc.
We should be able to do an extract method from the code in the debuggeur
RB*Change should work on environment and not Smalltalk globals
and their new environment variable could be initialized to Smalltalk globals for now.
https://github.com/pharo-project/pharo/issues/2137
Hi evelyn can you have a look at this issue?
Having a local rename method would be nice
Sometimes I want to rename a method without renaming all the other implementors and senders
I can do it by editing the method but I have not to forget to remove the previous one.
So this is probably not related to the refactoring but this is a simple operation that we could introduce.
Missing refactoring: Find and replace code duplicates
RBAddParameterTest should not raise a pop up
It looks like the symptoms of a refactoring raising a pop up.
Check status of Refactoring2
Not all the refactorings are available as Refactoring2
We should convert them and avoid to have duplication.
RB*Change should not shortcut the factory
Missing refactoring: Replace Inheritance with Delegation
Add refactoring to remove method and the ones in subclasses
addSearch: is sent but not implemented?
extract method does not check for duplicated instances of the refactored code
RB* should not hardcod everywhere the parse and rewriter
Preview is broken when there is no change.
Strange remove class tells me that there are subclass and open an empty list
Hi
I had
root
subone
subtwo
and I remove subone.
and the systeme told me that there subclasses and opened an empty list :(
Introduce class Parser and class definition so that we can support refactoring from there
We should have shortcuts for the most important refactoring such as
extract method :)
Cannot extract method using Suggestions menu
MethodNameEditor should be redone with Spec
SycMethodNameEditor is already made using spec in https://github.com/CafeKrem/stage
replace one method call by another one
May be we have it.
But how to replace one method call by another one
for example we have two methods
atX: x atY: y
and
atRow: rowNumber atColumn: columnNumber
and we want all methods to use atRow:atColumn:
Add option to rename parameters of extract method refactoring
Check existing conditions
Some conditions have arcane explanations.
We should revisit them.
Add test and comment for RBMethodName
Missing refactoring: InLine
cf https://www.jetbrains.com/help/idea/inline.html
This refactoring already exists (inline method and inline temporary)
Add creation method to RBCondition
checkMethodName: aName in: aClass
^aName isString and: [RBScanner isSelector: aName]
did not use aClass
so introduce
checkMethodName: aName
^aName isString and: [RBScanner isSelector: aName]
NautilusRefactoring should be renamed.
May be into InteractiveRefactoring
Extract method with option to treat a full inheritance hierarchy
I often would like to extract a class reference into a method and then apply this to a complete hierarchy.
Avoid to hardcode RBParser
introduce self parserClass and use it instead.
when there are multiple implementors we are prompted and if we want to only rename one we cannot
I wanted to rename a method and the browser prompted me that I will rename two implementations. I had to cancel. :(
Extract method should check that an existing method has the same body
Imagine that I have a method foo ^ 33
when I extract 33 as foo the system should that the body is the same and it should not tell me that I may change the behavior.
If I have a a method defined in the superclass and a class
I get a warning telling that the code is duplicated but the rules could ask me to remove it.
Also doing a push up ask me if I want to push down the method above in the other subclasses - this makes a lot of sense but when I say no it would be good to push up the method = remove it locally.
Missing refactoring: Abstract instance variables
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.