Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should make calypso context more polymorphic #17682

Open
Ducasse opened this issue Jan 24, 2025 · 2 comments
Open

should make calypso context more polymorphic #17682

Ducasse opened this issue Jan 24, 2025 · 2 comments

Comments

@Ducasse
Copy link
Member

Ducasse commented Jan 24, 2025

A typical case is #17680

@Ducasse
Copy link
Member Author

Ducasse commented Jan 24, 2025

execute

toolContext class = ClyFullBrowserClassContext 
	ifTrue: [ (ReRenameClassDriver
	rename: targetClass name) 
	model: RBBrowserEnvironment new;
	scopes: toolContext refactoringScopes; runRefactoring ]
	ifFalse: [  
		
		toolContext class = ClyClassDefinitionContext
			ifTrue: [ (ReRenameClassDriver
	rename: toolContext selectedSourceNode value ) 
	model: RBBrowserEnvironment new;
	scopes: toolContext refactoringScopes; runRefactoring ]
			ifFalse: [   
				"we are in selection in a method "
(ReRenameClassDriver
	rename: toolContext selectedSourceNode value name) 
	model: RBBrowserEnvironment new;
	scopes: toolContext refactoringScopes; runRefactoring ] ]

@Ducasse
Copy link
Member Author

Ducasse commented Jan 24, 2025

lastSelectedClass has been defined in MethodContext as

lastSelectedClass

	^ self selectedMethod methodClass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant