RefactorInsight-master/kotlin-impl/src/main/java/org/jetbrains/research/refactorinsight/kotlin/impl/data/packages/RenamePackageKotlinHandler.java
package org.jetbrains.research.refactorinsight.kotlin.impl.data.packages;

import org.jetbrains.research.kotlinrminer.ide.Refactoring;
import org.jetbrains.research.kotlinrminer.ide.diff.refactoring.RenamePackageRefactoring;
import org.jetbrains.research.refactorinsight.data.Group;
import org.jetbrains.research.refactorinsight.data.RefactoringInfo;
import org.jetbrains.research.refactorinsight.kotlin.impl.data.KotlinRefactoringHandler;

public class RenamePackageKotlinHandler extends KotlinRefactoringHandler {

    @Override
    public RefactoringInfo specify(Refactoring refactoring,
                                   RefactoringInfo info) {
        RenamePackageRefactoring ref =
                (RenamePackageRefactoring) refactoring;
        return info.setGroup(Group.PACKAGE)
                .setNameBefore(ref.getPattern().getBefore())
                .setNameAfter(ref.getPattern().getAfter());
    }

}
