Giter Club home page Giter Club logo

enjoliveur's People

Contributors

juliendelplanque avatar lin777 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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

We should have a preview dialog allowing to choose what to apply.
We should have tests, including for shortcuts activation

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.

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.

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 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]

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.