Update references when moving Kotlin file
#KT-1696 Fixed
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
<root>
|
||||||
|
<item
|
||||||
|
name='com.intellij.refactoring.move.moveFilesOrDirectories.MoveFileHandler java.util.List<com.intellij.usageView.UsageInfo> findUsages(com.intellij.psi.PsiFile, com.intellij.psi.PsiDirectory, boolean, boolean)'>
|
||||||
|
<annotation name='kotlin.jvm.KotlinSignature'>
|
||||||
|
<val name="value"
|
||||||
|
val=""fun findUsages(psiFile: PsiFile, newParent: PsiDirectory, searchInComments: Boolean, searchInNonJavaFiles: Boolean): List<UsageInfo>?""/>
|
||||||
|
</annotation>
|
||||||
|
</item>
|
||||||
|
<item
|
||||||
|
name='com.intellij.refactoring.move.moveFilesOrDirectories.MoveFileHandler void prepareMovedFile(com.intellij.psi.PsiFile, com.intellij.psi.PsiDirectory, java.util.Map<com.intellij.psi.PsiElement,com.intellij.psi.PsiElement>) 0'>
|
||||||
|
<annotation name='org.jetbrains.annotations.NotNull'/>
|
||||||
|
</item>
|
||||||
|
<item
|
||||||
|
name='com.intellij.refactoring.move.moveFilesOrDirectories.MoveFileHandler void prepareMovedFile(com.intellij.psi.PsiFile, com.intellij.psi.PsiDirectory, java.util.Map<com.intellij.psi.PsiElement,com.intellij.psi.PsiElement>) 1'>
|
||||||
|
<annotation name='org.jetbrains.annotations.NotNull'/>
|
||||||
|
</item>
|
||||||
|
<item
|
||||||
|
name='com.intellij.refactoring.move.moveFilesOrDirectories.MoveFileHandler void prepareMovedFile(com.intellij.psi.PsiFile, com.intellij.psi.PsiDirectory, java.util.Map<com.intellij.psi.PsiElement,com.intellij.psi.PsiElement>) 2'>
|
||||||
|
<annotation name='org.jetbrains.annotations.NotNull'/>
|
||||||
|
</item>
|
||||||
|
<item name='com.intellij.refactoring.move.moveFilesOrDirectories.MoveFileHandler void updateMovedFile(com.intellij.psi.PsiFile) 0'>
|
||||||
|
<annotation name='org.jetbrains.annotations.NotNull'/>
|
||||||
|
</item>
|
||||||
|
</root>
|
||||||
@@ -60,14 +60,17 @@ public class JetPackageDirective extends JetReferenceExpression {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public PsiElement getNameIdentifier() {
|
public JetSimpleNameExpression getLastReferenceExpression() {
|
||||||
JetExpression nameExpression = getPackageNameExpression();
|
JetExpression nameExpression = getPackageNameExpression();
|
||||||
if (nameExpression == null) return null;
|
if (nameExpression == null) return null;
|
||||||
|
|
||||||
JetSimpleNameExpression lastPart = (JetSimpleNameExpression)PsiUtilPackage.getQualifiedElementSelector(nameExpression);
|
return (JetSimpleNameExpression)PsiUtilPackage.getQualifiedElementSelector(nameExpression);
|
||||||
if (lastPart == null) return null;
|
}
|
||||||
|
|
||||||
return lastPart.getIdentifier();
|
@Nullable
|
||||||
|
public PsiElement getNameIdentifier() {
|
||||||
|
JetSimpleNameExpression lastPart = getLastReferenceExpression();
|
||||||
|
return lastPart != null ? lastPart.getIdentifier() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ import com.intellij.psi.PsiPackage
|
|||||||
import com.intellij.psi.PsiClass
|
import com.intellij.psi.PsiClass
|
||||||
import com.intellij.psi.PsiMember
|
import com.intellij.psi.PsiMember
|
||||||
import org.jetbrains.jet.lang.psi.JetNamedDeclaration
|
import org.jetbrains.jet.lang.psi.JetNamedDeclaration
|
||||||
|
import com.intellij.psi.JavaDirectoryService
|
||||||
|
import com.intellij.psi.PsiDirectory
|
||||||
|
|
||||||
public fun PsiElement.getParentByTypesAndPredicate<T: PsiElement>(
|
public fun PsiElement.getParentByTypesAndPredicate<T: PsiElement>(
|
||||||
strict : Boolean = false, vararg parentClasses : Class<T>, predicate: (T) -> Boolean
|
strict : Boolean = false, vararg parentClasses : Class<T>, predicate: (T) -> Boolean
|
||||||
@@ -278,3 +280,5 @@ public fun PsiElement.getFqName(): FqName? {
|
|||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public fun PsiDirectory.getPackage(): PsiPackage? = JavaDirectoryService.getInstance()!!.getPackage(this)
|
||||||
@@ -171,6 +171,7 @@
|
|||||||
<quoteHandler fileType="Kotlin" className="org.jetbrains.jet.plugin.editor.KotlinQuoteHandler"/>
|
<quoteHandler fileType="Kotlin" className="org.jetbrains.jet.plugin.editor.KotlinQuoteHandler"/>
|
||||||
<refactoring.helper implementation="org.jetbrains.jet.plugin.codeInsight.KotlinShortenReferencesRefactoringHelper"/>
|
<refactoring.helper implementation="org.jetbrains.jet.plugin.codeInsight.KotlinShortenReferencesRefactoringHelper"/>
|
||||||
<refactoring.moveHandler implementation="org.jetbrains.jet.plugin.refactoring.move.JetMoveFilesOrDirectoriesHandler"/>
|
<refactoring.moveHandler implementation="org.jetbrains.jet.plugin.refactoring.move.JetMoveFilesOrDirectoriesHandler"/>
|
||||||
|
<moveFileHandler implementation="org.jetbrains.jet.plugin.refactoring.move.MoveKotlinFileHandler" />
|
||||||
<refactoring.copyHandler implementation="org.jetbrains.jet.plugin.refactoring.copy.JetCopyClassHandler"/>
|
<refactoring.copyHandler implementation="org.jetbrains.jet.plugin.refactoring.copy.JetCopyClassHandler"/>
|
||||||
<refactoring.changeSignatureUsageProcessor implementation="org.jetbrains.jet.plugin.refactoring.changeSignature.JetChangeSignatureUsageProcessor"/>
|
<refactoring.changeSignatureUsageProcessor implementation="org.jetbrains.jet.plugin.refactoring.changeSignature.JetChangeSignatureUsageProcessor"/>
|
||||||
<inlineActionHandler implementation="org.jetbrains.jet.plugin.refactoring.inline.KotlinInlineValHandler"/>
|
<inlineActionHandler implementation="org.jetbrains.jet.plugin.refactoring.inline.KotlinInlineValHandler"/>
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ import org.jetbrains.jet.lang.psi.JetPsiFactory
|
|||||||
import org.jetbrains.jet.lang.psi.psiUtil.getQualifiedElement
|
import org.jetbrains.jet.lang.psi.psiUtil.getQualifiedElement
|
||||||
import org.jetbrains.jet.lang.psi.JetUserType
|
import org.jetbrains.jet.lang.psi.JetUserType
|
||||||
import org.jetbrains.jet.lang.resolve.name.isOneSegmentFQN
|
import org.jetbrains.jet.lang.resolve.name.isOneSegmentFQN
|
||||||
|
import com.intellij.psi.PsiElement
|
||||||
|
import com.intellij.openapi.util.Key
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace [[JetSimpleNameExpression]] (and its enclosing qualifier) with qualified element given by FqName
|
* Replace [[JetSimpleNameExpression]] (and its enclosing qualifier) with qualified element given by FqName
|
||||||
@@ -49,3 +51,9 @@ fun JetSimpleNameExpression.changeQualifiedName(fqName: FqName): JetElement {
|
|||||||
else -> elementToReplace.replace(JetPsiFactory.createExpression(project, text))
|
else -> elementToReplace.replace(JetPsiFactory.createExpression(project, text))
|
||||||
} as JetElement
|
} as JetElement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun <T: Any> PsiElement.getAndRemoveCopyableUserData(key: Key<T>): T? {
|
||||||
|
val data = getCopyableUserData(key)
|
||||||
|
putCopyableUserData(key, null)
|
||||||
|
return data
|
||||||
|
}
|
||||||
@@ -0,0 +1,210 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2014 JetBrains s.r.o.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.jet.plugin.refactoring.move
|
||||||
|
|
||||||
|
import com.intellij.refactoring.move.moveFilesOrDirectories.MoveFileHandler
|
||||||
|
import com.intellij.psi.PsiFile
|
||||||
|
import com.intellij.psi.PsiDirectory
|
||||||
|
import com.intellij.psi.PsiElement
|
||||||
|
import com.intellij.usageView.UsageInfo
|
||||||
|
import com.intellij.openapi.roots.JavaProjectRootsUtil
|
||||||
|
import com.intellij.psi.PsiCompiledElement
|
||||||
|
import org.jetbrains.jet.lang.psi.JetFile
|
||||||
|
import java.util.ArrayList
|
||||||
|
import com.intellij.psi.search.GlobalSearchScope
|
||||||
|
import com.intellij.psi.search.searches.ReferencesSearch
|
||||||
|
import com.intellij.refactoring.util.MoveRenameUsageInfo
|
||||||
|
import org.jetbrains.jet.lang.psi.JetClassOrObject
|
||||||
|
import com.intellij.refactoring.util.TextOccurrencesUtil
|
||||||
|
import org.jetbrains.jet.plugin.search.usagesSearch.descriptor
|
||||||
|
import org.jetbrains.jet.lang.resolve.DescriptorUtils
|
||||||
|
import org.jetbrains.jet.lang.psi.JetNamedDeclaration
|
||||||
|
import com.intellij.openapi.util.text.StringUtil
|
||||||
|
import com.intellij.psi.PsiReference
|
||||||
|
import org.jetbrains.jet.lang.resolve.name.FqName
|
||||||
|
import java.util.Collections
|
||||||
|
import org.jetbrains.jet.plugin.references.JetSimpleNameReference
|
||||||
|
import com.intellij.openapi.util.Key
|
||||||
|
import org.jetbrains.jet.plugin.refactoring.getAndRemoveCopyableUserData
|
||||||
|
import org.jetbrains.jet.lang.psi.JetSimpleNameExpression
|
||||||
|
import org.jetbrains.jet.lang.psi.psiUtil.getPackage
|
||||||
|
import org.jetbrains.jet.plugin.codeInsight.JetFileReferencesResolver
|
||||||
|
import org.jetbrains.jet.lang.resolve.BindingContext
|
||||||
|
import org.jetbrains.jet.lang.descriptors.PackageFragmentDescriptor
|
||||||
|
import org.jetbrains.jet.lang.descriptors.ConstructorDescriptor
|
||||||
|
import org.jetbrains.jet.plugin.references.JetReference
|
||||||
|
import org.jetbrains.jet.asJava.toLightElements
|
||||||
|
import org.jetbrains.jet.lang.psi.JetDeclaration
|
||||||
|
import org.jetbrains.jet.lang.psi.JetPsiUtil
|
||||||
|
import com.intellij.openapi.util.TextRange
|
||||||
|
import com.intellij.openapi.diagnostic.Logger
|
||||||
|
|
||||||
|
public class MoveKotlinFileHandler : MoveFileHandler() {
|
||||||
|
class object {
|
||||||
|
private val LOG = Logger.getInstance(javaClass<MoveKotlinFileHandler>())
|
||||||
|
|
||||||
|
class MoveRenameKotlinUsageInfo(
|
||||||
|
reference: JetSimpleNameReference,
|
||||||
|
range: TextRange,
|
||||||
|
referencedElement: JetDeclaration,
|
||||||
|
val newFqName: FqName
|
||||||
|
) : MoveRenameUsageInfo(reference.getElement(), reference, range.getStartOffset(), range.getEndOffset(), referencedElement, false) {
|
||||||
|
val jetReference: JetSimpleNameReference get() = getReference() as JetSimpleNameReference
|
||||||
|
}
|
||||||
|
|
||||||
|
class MoveRenameJavaUsageInfo(
|
||||||
|
reference: PsiReference,
|
||||||
|
range: TextRange,
|
||||||
|
referencedElement: JetDeclaration,
|
||||||
|
val lightElementIndex: Int
|
||||||
|
) : MoveRenameUsageInfo(reference.getElement(), reference, range.getStartOffset(), range.getEndOffset(), referencedElement, false) {
|
||||||
|
val jetDeclaration: JetDeclaration get() = getReferencedElement() as JetDeclaration
|
||||||
|
}
|
||||||
|
|
||||||
|
class PackageNameInfo(val oldPackageName: FqName, val newPackageName: FqName)
|
||||||
|
|
||||||
|
private val PACKAGE_NAME_INFO_KEY =
|
||||||
|
Key.create<PackageNameInfo>("${javaClass<MoveKotlinFileHandler>().getCanonicalName()}.PACKAGE_NAME_INFO_KEY")
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun JetFile.packageMatchesDirectory(): Boolean {
|
||||||
|
return getPackageName() == getParent()?.getPackage()?.getQualifiedName()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun canProcessElement(element: PsiFile?): Boolean {
|
||||||
|
if (element is PsiCompiledElement || element !is JetFile) return false
|
||||||
|
return !JavaProjectRootsUtil.isOutsideJavaSourceRoot(element)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun prepareMovedFile(file: PsiFile, moveDestination: PsiDirectory, oldToNewMap: Map<PsiElement, PsiElement>) {
|
||||||
|
if (file is JetFile && file.packageMatchesDirectory()) {
|
||||||
|
val newPackage = moveDestination.getPackage()
|
||||||
|
if (newPackage != null) {
|
||||||
|
file.putCopyableUserData(
|
||||||
|
PACKAGE_NAME_INFO_KEY,
|
||||||
|
PackageNameInfo(JetPsiUtil.getFQName(file), FqName(newPackage.getQualifiedName()))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun findUsages(
|
||||||
|
psiFile: PsiFile,
|
||||||
|
newParent: PsiDirectory,
|
||||||
|
searchInComments: Boolean,
|
||||||
|
searchInNonJavaFiles: Boolean
|
||||||
|
): List<UsageInfo>? {
|
||||||
|
if (psiFile !is JetFile || !psiFile.packageMatchesDirectory()) return null
|
||||||
|
|
||||||
|
val project = psiFile.getProject()
|
||||||
|
val newPackageName = newParent.getPackage()?.getQualifiedName() ?: ""
|
||||||
|
|
||||||
|
return psiFile.getDeclarations().flatMap { declaration ->
|
||||||
|
val name = (declaration as? JetNamedDeclaration)?.getName()
|
||||||
|
if (name != null) {
|
||||||
|
val newFqName = StringUtil.getQualifiedName(newPackageName, name)!!
|
||||||
|
|
||||||
|
val results = ReferencesSearch.search(declaration, GlobalSearchScope.projectScope(project), false)
|
||||||
|
.toSet()
|
||||||
|
.mapTo(ArrayList<UsageInfo?>()) { ref ->
|
||||||
|
val range = ref.getRangeInElement()!!
|
||||||
|
|
||||||
|
when (ref) {
|
||||||
|
is JetSimpleNameReference ->
|
||||||
|
MoveRenameKotlinUsageInfo(ref, range, declaration, FqName(newFqName))
|
||||||
|
is JetReference ->
|
||||||
|
// Can't rebind other JetReferences
|
||||||
|
null
|
||||||
|
else -> {
|
||||||
|
val lightElementWithIndex =
|
||||||
|
declaration.toLightElements().withIndices().find { p -> ref.isReferenceTo(p.second) }
|
||||||
|
if (lightElementWithIndex != null && lightElementWithIndex.first >= 0) {
|
||||||
|
MoveRenameJavaUsageInfo(ref, range, declaration, lightElementWithIndex.first)
|
||||||
|
}
|
||||||
|
else null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.filterNotNull()
|
||||||
|
if (declaration is JetClassOrObject) {
|
||||||
|
declaration.descriptor?.let { DescriptorUtils.getFqName(it).asString() }?.let { stringToSearch ->
|
||||||
|
TextOccurrencesUtil.findNonCodeUsages(
|
||||||
|
declaration, stringToSearch, searchInComments, searchInNonJavaFiles, newFqName, results
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
results
|
||||||
|
}
|
||||||
|
else Collections.emptyList<UsageInfo>()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun retargetUsages(usageInfos: List<UsageInfo>?, oldToNewMap: Map<PsiElement, PsiElement>?) {
|
||||||
|
usageInfos?.forEach { usage ->
|
||||||
|
when (usage) {
|
||||||
|
is MoveRenameKotlinUsageInfo -> {
|
||||||
|
usage.jetReference.bindToFqName(usage.newFqName, false)
|
||||||
|
}
|
||||||
|
is MoveRenameJavaUsageInfo -> {
|
||||||
|
val lightElements = usage.jetDeclaration.toLightElements()
|
||||||
|
val index = usage.lightElementIndex
|
||||||
|
if (index < lightElements.size) {
|
||||||
|
usage.getReference()!!.bindToElement(lightElements[index])
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LOG.error("Can't find light element with index $index for ${usage.jetDeclaration.getText()} ")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun updateMovedFile(file: PsiFile) {
|
||||||
|
if (file !is JetFile) return
|
||||||
|
|
||||||
|
val packageNameInfo = file.getAndRemoveCopyableUserData(PACKAGE_NAME_INFO_KEY)
|
||||||
|
if (packageNameInfo == null) return
|
||||||
|
|
||||||
|
val referenceToContext = JetFileReferencesResolver.resolve(file = file, visitReceivers = false)
|
||||||
|
|
||||||
|
for ((refExpr, bindingContext) in referenceToContext) {
|
||||||
|
if (refExpr !is JetSimpleNameExpression) continue
|
||||||
|
|
||||||
|
val descriptor = bindingContext[BindingContext.REFERENCE_TARGET, refExpr]?.let { descriptor ->
|
||||||
|
if (descriptor is ConstructorDescriptor) descriptor.getContainingDeclaration() else descriptor
|
||||||
|
}
|
||||||
|
if (descriptor == null) continue
|
||||||
|
|
||||||
|
val packageName = DescriptorUtils.getParentOfType(
|
||||||
|
descriptor, javaClass<PackageFragmentDescriptor>(), false
|
||||||
|
)?.let { DescriptorUtils.getFqName(it).toSafe() }
|
||||||
|
when (packageName) {
|
||||||
|
packageNameInfo.oldPackageName,
|
||||||
|
packageNameInfo.newPackageName -> {
|
||||||
|
val fqName = DescriptorUtils.getFqName(descriptor)
|
||||||
|
if (fqName.isSafe()) {
|
||||||
|
(refExpr.getReference() as? JetSimpleNameReference)?.bindToFqName(fqName.toSafe(), false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val packageRef = file.getPackageDirective()?.getLastReferenceExpression()?.getReference() as? JetSimpleNameReference
|
||||||
|
packageRef?.bindToFqName(packageNameInfo.newPackageName, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -68,15 +68,17 @@ public class JetSimpleNameReference extends JetSimpleReference<JetSimpleNameExpr
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public PsiElement bindToElement(@NotNull PsiElement element, boolean bindImmediately) {
|
public PsiElement bindToElement(@NotNull PsiElement element, boolean bindImmediately) {
|
||||||
Project project = element.getProject();
|
|
||||||
JetSimpleNameExpression currentExpression = getExpression();
|
|
||||||
|
|
||||||
FqName fqName = PsiUtilPackage.getFqName(element);
|
FqName fqName = PsiUtilPackage.getFqName(element);
|
||||||
if (fqName == null) return currentExpression;
|
return fqName != null ? bindToFqName(fqName, bindImmediately) : getExpression();
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public PsiElement bindToFqName(@NotNull FqName fqName, boolean bindImmediately) {
|
||||||
|
JetSimpleNameExpression currentExpression = getExpression();
|
||||||
|
Project project = currentExpression.getProject();
|
||||||
|
|
||||||
ReferenceBindRequest bindRequest = new ReferenceBindRequest(
|
ReferenceBindRequest bindRequest = new ReferenceBindRequest(
|
||||||
SmartPointerManager.getInstance(element.getProject()).createSmartPsiElementPointer(getExpression()),
|
SmartPointerManager.getInstance(project).createSmartPsiElementPointer(getExpression()), fqName
|
||||||
fqName
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (bindImmediately) {
|
if (bindImmediately) {
|
||||||
|
|||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
open class Foo {
|
||||||
|
open class Bar {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var FOO: String = ""
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
import b.Test
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
b.test()
|
||||||
|
println(b.TEST)
|
||||||
|
b.TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
import b.Test as _Test
|
||||||
|
import b.test as _Test
|
||||||
|
import b.TEST as _TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: _Test = _Test()
|
||||||
|
_test()
|
||||||
|
println(_TEST)
|
||||||
|
_TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
import b.Test;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
b.BPackage.test();
|
||||||
|
System.out.println(b.BPackage.getTEST());
|
||||||
|
b.BPackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
import b.Test
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
b.test()
|
||||||
|
println(b.TEST)
|
||||||
|
b.TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
import b.Test;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
b.BPackage.test();
|
||||||
|
System.out.println(b.BPackage.getTEST());
|
||||||
|
b.BPackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
import b.Test as _Test
|
||||||
|
import b.test as _test
|
||||||
|
import b.TEST as _TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: _Test = _Test()
|
||||||
|
_test()
|
||||||
|
println(_TEST)
|
||||||
|
_TEST = ""
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
import b.Test;
|
||||||
|
|
||||||
|
import static b.BPackage.test;
|
||||||
|
import static b.BPackage.getTEST;
|
||||||
|
import static b.BPackage.setTEST;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package b
|
||||||
|
|
||||||
|
open class Foo {
|
||||||
|
open class Bar {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var FOO: String = ""
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package b
|
||||||
|
|
||||||
|
class Test {
|
||||||
|
val aFoo: a.Foo = a.Foo()
|
||||||
|
val bFoo: Foo = Foo()
|
||||||
|
val cFoo: c.Foo = c.Foo()
|
||||||
|
val aBar: a.Foo.Bar = a.Foo.Bar()
|
||||||
|
val bBar: Foo.Bar = Foo.Bar()
|
||||||
|
val cBar: c.Foo.Bar = c.Foo.Bar()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
a.foo()
|
||||||
|
foo()
|
||||||
|
c.foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
var TEST: String
|
||||||
|
get() = a.FOO + FOO + c.FOO
|
||||||
|
set(value: String) {
|
||||||
|
a.FOO = value
|
||||||
|
FOO = value
|
||||||
|
c.FOO = value
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
open class Foo {
|
||||||
|
open class Bar {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var FOO: String = ""
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import b.Test;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
b.BPackage.test();
|
||||||
|
System.out.println(b.BPackage.getTEST());
|
||||||
|
b.BPackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import b.Test
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
b.test()
|
||||||
|
println(b.TEST)
|
||||||
|
b.TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import b.Test;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
b.BPackage.test();
|
||||||
|
System.out.println(b.BPackage.getTEST());
|
||||||
|
b.BPackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import a.*
|
||||||
|
import b.Test
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
b.test()
|
||||||
|
println(b.TEST)
|
||||||
|
b.TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import b.Test;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
b.BPackage.test();
|
||||||
|
System.out.println(b.BPackage.getTEST());
|
||||||
|
b.BPackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import b.Test;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
b.BPackage.test();
|
||||||
|
System.out.println(b.BPackage.getTEST());
|
||||||
|
b.BPackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import b.Test
|
||||||
|
import b.test
|
||||||
|
import b.TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import b.Test as _Test
|
||||||
|
import b.test as _test
|
||||||
|
import b.TEST as _TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: _Test = _Test()
|
||||||
|
_test()
|
||||||
|
println(_TEST)
|
||||||
|
_TEST = ""
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import b.Test;
|
||||||
|
|
||||||
|
import static b.BPackage.test;
|
||||||
|
import static b.BPackage.getTEST;
|
||||||
|
import static b.BPackage.setTEST;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
open class Foo {
|
||||||
|
open class Bar {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var FOO: String = ""
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
import a.Test as _Test
|
||||||
|
import a.test as _Test
|
||||||
|
import a.TEST as _TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: _Test = _Test()
|
||||||
|
_test()
|
||||||
|
println(_TEST)
|
||||||
|
_TEST = ""
|
||||||
|
}
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
class Test {
|
||||||
|
val aFoo: Foo = Foo()
|
||||||
|
val bFoo: b.Foo = b.Foo()
|
||||||
|
val cFoo: c.Foo = c.Foo()
|
||||||
|
val aBar: Foo.Bar = Foo.Bar()
|
||||||
|
val bBar: b.Foo.Bar = b.Foo.Bar()
|
||||||
|
val cBar: c.Foo.Bar = c.Foo.Bar()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
foo()
|
||||||
|
b.foo()
|
||||||
|
c.foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
var TEST: String
|
||||||
|
get() = FOO + b.FOO + c.FOO
|
||||||
|
set(value: String) {
|
||||||
|
FOO = value
|
||||||
|
b.FOO = value
|
||||||
|
c.FOO = value
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
APackage.test();
|
||||||
|
System.out.println(APackage.getTEST());
|
||||||
|
APackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
import static a.APackage.*;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
import a.Test as _Test
|
||||||
|
import a.test as _test
|
||||||
|
import a.TEST as _TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: _Test = _Test()
|
||||||
|
_test()
|
||||||
|
println(_TEST)
|
||||||
|
_TEST = ""
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
import static a.APackage.test;
|
||||||
|
import static a.APackage.getTEST;
|
||||||
|
import static a.APackage.setTEST;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package b
|
||||||
|
|
||||||
|
open class Foo {
|
||||||
|
open class Bar {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var FOO: String = ""
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
open class Foo {
|
||||||
|
open class Bar {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var FOO: String = ""
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
a.Test t = new a.Test();
|
||||||
|
a.APackage.test();
|
||||||
|
System.out.println(a.APackage.getTEST());
|
||||||
|
a.APackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: a.Test = a.Test()
|
||||||
|
a.test()
|
||||||
|
println(a.TEST)
|
||||||
|
a.TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import a.*;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
APackage.test();
|
||||||
|
System.out.println(APackage.getTEST());
|
||||||
|
APackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import a.*
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import static a.APackage.*;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
a.Test t = new a.Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import a.Test;
|
||||||
|
import a.APackage;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
APackage.test();
|
||||||
|
System.out.println(APackage.getTEST());
|
||||||
|
APackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import a.Test
|
||||||
|
import a.test
|
||||||
|
import a.TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import a.Test as _Test
|
||||||
|
import a.test as _test
|
||||||
|
import a.TEST as _TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: _Test = _Test()
|
||||||
|
_test()
|
||||||
|
println(_TEST)
|
||||||
|
_TEST = ""
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import static a.APackage.test;
|
||||||
|
import static a.APackage.getTEST;
|
||||||
|
import static a.APackage.setTEST;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
a.Test t = new a.Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"mainFile": "a/main.kt",
|
||||||
|
"type": "MOVE_FILES",
|
||||||
|
"targetPackage": "b"
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
open class Foo {
|
||||||
|
open class Bar {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var FOO: String = ""
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
import a.Test as _Test
|
||||||
|
import a.test as _Test
|
||||||
|
import a.TEST as _TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: _Test = _Test()
|
||||||
|
_test()
|
||||||
|
println(_TEST)
|
||||||
|
_TEST = ""
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
APackage.test();
|
||||||
|
System.out.println(APackage.getTEST());
|
||||||
|
APackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
import static APackage.*;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
import a.Test as _Test
|
||||||
|
import a.test as _test
|
||||||
|
import a.TEST as _TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: _Test = _Test()
|
||||||
|
_test()
|
||||||
|
println(_TEST)
|
||||||
|
_TEST = ""
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
import static APackage.test;
|
||||||
|
import static APackage.getTEST;
|
||||||
|
import static APackage.setTEST;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package b
|
||||||
|
|
||||||
|
open class Foo {
|
||||||
|
open class Bar {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var FOO: String = ""
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
class Test {
|
||||||
|
val aFoo: Foo = Foo()
|
||||||
|
val bFoo: b.Foo = b.Foo()
|
||||||
|
val cFoo: c.Foo = c.Foo()
|
||||||
|
val aBar: Foo.Bar = Foo.Bar()
|
||||||
|
val bBar: b.Foo.Bar = b.Foo.Bar()
|
||||||
|
val cBar: c.Foo.Bar = c.Foo.Bar()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
foo()
|
||||||
|
b.foo()
|
||||||
|
c.foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
var TEST: String
|
||||||
|
get() = FOO + b.FOO + c.FOO
|
||||||
|
set(value: String) {
|
||||||
|
FOO = value
|
||||||
|
b.FOO = value
|
||||||
|
c.FOO = value
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
open class Foo {
|
||||||
|
open class Bar {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var FOO: String = ""
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
a.Test t = new a.Test();
|
||||||
|
a.APackage.test();
|
||||||
|
System.out.println(a.APackage.getTEST());
|
||||||
|
a.APackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: a.Test = a.Test()
|
||||||
|
a.test()
|
||||||
|
println(a.TEST)
|
||||||
|
a.TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import a.*;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
APackage.test();
|
||||||
|
System.out.println(APackage.getTEST());
|
||||||
|
APackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import a.*
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import static a.APackage.*;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
a.Test t = new a.Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import a.A;
|
||||||
|
import a.APackage;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
APackage.test();
|
||||||
|
System.out.println(APackage.getTEST());
|
||||||
|
APackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import a.Test
|
||||||
|
import a.test
|
||||||
|
import a.TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import a.Test as _Test
|
||||||
|
import a.test as _test
|
||||||
|
import a.TEST as _TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: _Test = _Test()
|
||||||
|
_test()
|
||||||
|
println(_TEST)
|
||||||
|
_TEST = ""
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import static a.APackage.test;
|
||||||
|
import static a.APackage.getTEST;
|
||||||
|
import static a.APackage.setTEST;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
a.Test t = new a.Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
open class Foo {
|
||||||
|
open class Bar {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var FOO: String = ""
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
class Test {
|
||||||
|
val aFoo: Foo = Foo()
|
||||||
|
val bFoo: b.Foo = b.Foo()
|
||||||
|
val cFoo: c.Foo = c.Foo()
|
||||||
|
val aBar: Foo.Bar = Foo.Bar()
|
||||||
|
val bBar: b.Foo.Bar = b.Foo.Bar()
|
||||||
|
val cBar: c.Foo.Bar = c.Foo.Bar()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
foo()
|
||||||
|
b.foo()
|
||||||
|
c.foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
var TEST: String
|
||||||
|
get() = FOO + b.FOO + c.FOO
|
||||||
|
set(value: String) {
|
||||||
|
FOO = value
|
||||||
|
b.FOO = value
|
||||||
|
c.FOO = value
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
import a.Test as _Test
|
||||||
|
import a.test as _Test
|
||||||
|
import a.TEST as _TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: _Test = _Test()
|
||||||
|
_test()
|
||||||
|
println(_TEST)
|
||||||
|
_TEST = ""
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
APackage.test();
|
||||||
|
System.out.println(APackage.getTEST());
|
||||||
|
APackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
import static APackage.*;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package a
|
||||||
|
|
||||||
|
import a.Test as _Test
|
||||||
|
import a.test as _test
|
||||||
|
import a.TEST as _TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: _Test = _Test()
|
||||||
|
_test()
|
||||||
|
println(_TEST)
|
||||||
|
_TEST = ""
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
import static APackage.test;
|
||||||
|
import static APackage.getTEST;
|
||||||
|
import static APackage.setTEST;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package b
|
||||||
|
|
||||||
|
open class Foo {
|
||||||
|
open class Bar {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var FOO: String = ""
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
open class Foo {
|
||||||
|
open class Bar {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var FOO: String = ""
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
a.Test t = new a.Test();
|
||||||
|
a.APackage.test();
|
||||||
|
System.out.println(a.APackage.getTEST());
|
||||||
|
a.APackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: a.Test = a.Test()
|
||||||
|
a.test()
|
||||||
|
println(a.TEST)
|
||||||
|
a.TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import a.*;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
APackage.test();
|
||||||
|
System.out.println(APackage.getTEST());
|
||||||
|
APackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import a.*
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import static a.APackage.*;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
a.Test t = new a.Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import a.A;
|
||||||
|
import a.APackage;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
Test t = new Test();
|
||||||
|
APackage.test();
|
||||||
|
System.out.println(APackage.getTEST());
|
||||||
|
APackage.setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import a.Test
|
||||||
|
import a.test
|
||||||
|
import a.TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: Test = Test()
|
||||||
|
test()
|
||||||
|
println(TEST)
|
||||||
|
TEST = ""
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package c
|
||||||
|
|
||||||
|
import a.Test as _Test
|
||||||
|
import a.test as _test
|
||||||
|
import a.TEST as _TEST
|
||||||
|
|
||||||
|
fun bar() {
|
||||||
|
val t: _Test = _Test()
|
||||||
|
_test()
|
||||||
|
println(_TEST)
|
||||||
|
_TEST = ""
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package c;
|
||||||
|
|
||||||
|
import static a.APackage.test;
|
||||||
|
import static a.APackage.getTEST;
|
||||||
|
import static a.APackage.setTEST;
|
||||||
|
|
||||||
|
class J {
|
||||||
|
void bar() {
|
||||||
|
a.Test t = new a.Test();
|
||||||
|
test();
|
||||||
|
System.out.println(getTEST());
|
||||||
|
setTEST("");
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"mainFile": "_a/main.kt",
|
||||||
|
"type": "MOVE_FILES",
|
||||||
|
"targetPackage": "b"
|
||||||
|
}
|
||||||
@@ -176,6 +176,16 @@ public class JetMoveTestGenerated extends AbstractJetMoveTest {
|
|||||||
doTest("idea/testData/refactoring/move/kotlin/moveFile/moveFileToFile/moveFileToFile.test");
|
doTest("idea/testData/refactoring/move/kotlin/moveFile/moveFileToFile/moveFileToFile.test");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kotlin/moveFile/moveFileWithoutPackageRename/moveFileWithoutPackageRename.test")
|
||||||
|
public void testKotlin_moveFile_moveFileWithoutPackageRename_MoveFileWithoutPackageRename() throws Exception {
|
||||||
|
doTest("idea/testData/refactoring/move/kotlin/moveFile/moveFileWithoutPackageRename/moveFileWithoutPackageRename.test");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kotlin/moveFile/moveFileWithPackageRename/moveFileWithPackageRename.test")
|
||||||
|
public void testKotlin_moveFile_moveFileWithPackageRename_MoveFileWithPackageRename() throws Exception {
|
||||||
|
doTest("idea/testData/refactoring/move/kotlin/moveFile/moveFileWithPackageRename/moveFileWithPackageRename.test");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kotlin/movePackage/movePackage/movePackage.test")
|
@TestMetadata("kotlin/movePackage/movePackage/movePackage.test")
|
||||||
public void testKotlin_movePackage_movePackage_MovePackage() throws Exception {
|
public void testKotlin_movePackage_movePackage_MovePackage() throws Exception {
|
||||||
doTest("idea/testData/refactoring/move/kotlin/movePackage/movePackage/movePackage.test");
|
doTest("idea/testData/refactoring/move/kotlin/movePackage/movePackage/movePackage.test");
|
||||||
|
|||||||
Reference in New Issue
Block a user