Minor: Rename jetRefactoringUtil.kt -> kotlinRefactoringUtil.kt
(cherry picked from commit a841f87)
This commit is contained in:
+2
-2
@@ -28,7 +28,7 @@ import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.idea.refactoring.JetRefactoringUtilKt;
|
||||
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringUtilKt;
|
||||
import org.jetbrains.kotlin.psi.KtBlockExpression;
|
||||
import org.jetbrains.kotlin.psi.KtFile;
|
||||
import org.jetbrains.kotlin.psi.KtFunctionLiteral;
|
||||
@@ -74,7 +74,7 @@ public abstract class AbstractKotlinUpDownMover extends LineMover {
|
||||
}
|
||||
|
||||
if (comment != null) {
|
||||
int extension = JetRefactoringUtilKt.getLineCount(comment);
|
||||
int extension = KotlinRefactoringUtilKt.getLineCount(comment);
|
||||
if (extendDown) {
|
||||
bottomExtension = extension;
|
||||
}
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ import com.intellij.psi.util.PsiTreeUtil;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.idea.refactoring.JetRefactoringUtilKt;
|
||||
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringUtilKt;
|
||||
import org.jetbrains.kotlin.lexer.KtTokens;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
import org.jetbrains.kotlin.psi.psiUtil.PsiUtilsKt;
|
||||
@@ -445,7 +445,7 @@ public class KotlinExpressionMover extends AbstractKotlinUpDownMover {
|
||||
}
|
||||
|
||||
if (whiteSpaceTestSubject instanceof PsiWhiteSpace) {
|
||||
if (JetRefactoringUtilKt.isMultiLine(whiteSpaceTestSubject)) {
|
||||
if (KotlinRefactoringUtilKt.isMultiLine(whiteSpaceTestSubject)) {
|
||||
int nearLine = down ? sourceRange.endLine : sourceRange.startLine - 1;
|
||||
|
||||
info.toMove = sourceRange;
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.idea.KotlinFileType;
|
||||
import org.jetbrains.kotlin.idea.core.KotlinNameSuggester;
|
||||
import org.jetbrains.kotlin.idea.refactoring.JetRefactoringUtilKt;
|
||||
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringUtilKt;
|
||||
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringBundle;
|
||||
import org.jetbrains.kotlin.idea.refactoring.introduce.extractionEngine.*;
|
||||
import org.jetbrains.kotlin.idea.util.IdeDescriptorRenderers;
|
||||
@@ -220,7 +220,7 @@ public class KotlinExtractFunctionDialog extends DialogWrapper {
|
||||
MultiMap<PsiElement, String> conflicts = ExtractableAnalysisUtilKt.validate(currentDescriptor).getConflicts();
|
||||
conflicts.values().removeAll(originalDescriptor.getConflicts().values());
|
||||
|
||||
JetRefactoringUtilKt.checkConflictsInteractively(
|
||||
KotlinRefactoringUtilKt.checkConflictsInteractively(
|
||||
project,
|
||||
conflicts,
|
||||
new Function0<Unit>() {
|
||||
|
||||
+2
-2
@@ -50,7 +50,7 @@ import org.jetbrains.kotlin.idea.caches.resolve.ResolutionUtils;
|
||||
import org.jetbrains.kotlin.idea.core.CollectingNameValidator;
|
||||
import org.jetbrains.kotlin.idea.core.KotlinNameSuggester;
|
||||
import org.jetbrains.kotlin.idea.core.NewDeclarationNameValidator;
|
||||
import org.jetbrains.kotlin.idea.refactoring.JetRefactoringUtilKt;
|
||||
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringUtilKt;
|
||||
import org.jetbrains.kotlin.idea.refactoring.move.MoveUtilsKt;
|
||||
import org.jetbrains.kotlin.idea.refactoring.move.moveDeclarations.*;
|
||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation;
|
||||
@@ -378,7 +378,7 @@ public class MoveKotlinNestedClassesToUpperLevelDialog extends MoveDialogBase {
|
||||
new Function1<KtFile, KtFile>() {
|
||||
@Override
|
||||
public KtFile invoke(@NotNull KtFile originalFile) {
|
||||
return JetRefactoringUtilKt.createKotlinFile(targetFileName, targetDir, targetPackageFqName.asString());
|
||||
return KotlinRefactoringUtilKt.createKotlinFile(targetFileName, targetDir, targetPackageFqName.asString());
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
+8
-8
@@ -59,7 +59,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.idea.KotlinFileType;
|
||||
import org.jetbrains.kotlin.idea.core.PackageUtilsKt;
|
||||
import org.jetbrains.kotlin.idea.refactoring.JetRefactoringUtilKt;
|
||||
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringUtilKt;
|
||||
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringBundle;
|
||||
import org.jetbrains.kotlin.idea.refactoring.memberInfo.KotlinMemberInfo;
|
||||
import org.jetbrains.kotlin.idea.refactoring.memberInfo.KotlinMemberSelectionPanel;
|
||||
@@ -342,12 +342,12 @@ public class MoveKotlinTopLevelDeclarationsDialog extends RefactoringDialog {
|
||||
KotlinFileChooserDialog dialog = new KotlinFileChooserDialog("Choose Containing File", myProject);
|
||||
|
||||
File targetFile = new File(getTargetFilePath());
|
||||
PsiFile targetPsiFile = JetRefactoringUtilKt.toPsiFile(targetFile, myProject);
|
||||
PsiFile targetPsiFile = KotlinRefactoringUtilKt.toPsiFile(targetFile, myProject);
|
||||
if (targetPsiFile instanceof KtFile) {
|
||||
dialog.select((KtFile) targetPsiFile);
|
||||
}
|
||||
else {
|
||||
PsiDirectory targetDir = JetRefactoringUtilKt.toPsiDirectory(targetFile.getParentFile(), myProject);
|
||||
PsiDirectory targetDir = KotlinRefactoringUtilKt.toPsiDirectory(targetFile.getParentFile(), myProject);
|
||||
if (targetDir == null) {
|
||||
targetDir = sourceDir;
|
||||
}
|
||||
@@ -558,7 +558,7 @@ public class MoveKotlinTopLevelDeclarationsDialog extends RefactoringDialog {
|
||||
new Function1<KtFile, KtFile>() {
|
||||
@Override
|
||||
public KtFile invoke(@NotNull KtFile originalFile) {
|
||||
return JetRefactoringUtilKt.getOrCreateKotlinFile(
|
||||
return KotlinRefactoringUtilKt.getOrCreateKotlinFile(
|
||||
targetFileName != null ? targetFileName : originalFile.getName(),
|
||||
moveDestination.getTargetDirectory(originalFile)
|
||||
);
|
||||
@@ -569,7 +569,7 @@ public class MoveKotlinTopLevelDeclarationsDialog extends RefactoringDialog {
|
||||
|
||||
final File targetFile = new File(getTargetFilePath());
|
||||
if (!checkTargetFileName(targetFile.getName())) return null;
|
||||
KtFile jetFile = (KtFile) JetRefactoringUtilKt.toPsiFile(targetFile, myProject);
|
||||
KtFile jetFile = (KtFile) KotlinRefactoringUtilKt.toPsiFile(targetFile, myProject);
|
||||
if (jetFile != null) {
|
||||
if (sourceFiles.size() == 1 && sourceFiles.contains(jetFile)) {
|
||||
setErrorText("Can't move to the original file");
|
||||
@@ -580,7 +580,7 @@ public class MoveKotlinTopLevelDeclarationsDialog extends RefactoringDialog {
|
||||
}
|
||||
|
||||
File targetDir = targetFile.getParentFile();
|
||||
final PsiDirectory psiDirectory = targetDir != null ? JetRefactoringUtilKt.toPsiDirectory(targetDir, myProject) : null;
|
||||
final PsiDirectory psiDirectory = targetDir != null ? KotlinRefactoringUtilKt.toPsiDirectory(targetDir, myProject) : null;
|
||||
if (psiDirectory == null) {
|
||||
setErrorText("No directory found for file: " + targetFile.getPath());
|
||||
return null;
|
||||
@@ -613,7 +613,7 @@ public class MoveKotlinTopLevelDeclarationsDialog extends RefactoringDialog {
|
||||
new Function1<KtFile, KtFile>() {
|
||||
@Override
|
||||
public KtFile invoke(@NotNull KtFile originalFile) {
|
||||
return JetRefactoringUtilKt.getOrCreateKotlinFile(targetFile.getName(), psiDirectory, finalTargetPackageFqName);
|
||||
return KotlinRefactoringUtilKt.getOrCreateKotlinFile(targetFile.getName(), psiDirectory, finalTargetPackageFqName);
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -630,7 +630,7 @@ public class MoveKotlinTopLevelDeclarationsDialog extends RefactoringDialog {
|
||||
}
|
||||
}
|
||||
else {
|
||||
PsiFile targetFile = JetRefactoringUtilKt.toPsiFile(new File(getTargetFilePath()), myProject);
|
||||
PsiFile targetFile = KotlinRefactoringUtilKt.toPsiFile(new File(getTargetFilePath()), myProject);
|
||||
if (!(targetFile == null || targetFile instanceof KtFile)) {
|
||||
return KotlinRefactoringBundle.message("refactoring.move.non.kotlin.file");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user