Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (25 sloc) 1.21 KB
* This refactoring redirects calls to the primary constructor to the
* apply method of the companion object.
* The apply method and if necessary the companion object will be generated.
class MoveConstructorToCompanionObjectAction extends RefactoringAction {
def createRefactoring(start: Int, end: Int, file: ScalaSourceFile) = new MoveConstructorToCompanionObjectIdeRefactoring(start, end, file)
class MoveConstructorToCompanionObjectIdeRefactoring(start: Int, end: Int, file: ScalaSourceFile)
extends IndexedIdeRefactoring("Move constructor to companion object", start, end, file) {
val refactoring = withCompiler { compiler =>
new MoveConstructorToCompanionObject with GlobalIndexes with Indexed {
val global = compiler
val refactoringParameters = new refactoring.RefactoringParameters
override def indexHints() = {
val classdef = preparationResult.right.toOption
Something went wrong with that request. Please try again.