Rename jet to kotlin in android-idea-plugin
This commit is contained in:
+6
-12
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2015 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.
|
||||
@@ -14,21 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.android
|
||||
package org.jetbrains.kotlin.android
|
||||
|
||||
import com.intellij.openapi.application.PathManager
|
||||
import com.intellij.codeInsight.CodeInsightSettings
|
||||
import com.intellij.codeInsight.completion.CompletionType
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import java.io.File
|
||||
import com.intellij.ide.startup.impl.StartupManagerImpl
|
||||
import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess
|
||||
import com.intellij.openapi.startup.StartupManager
|
||||
import com.intellij.psi.impl.PsiManagerEx
|
||||
import com.intellij.psi.PsiManager
|
||||
import com.android.SdkConstants
|
||||
import com.intellij.codeInsight.CodeInsightSettings
|
||||
import org.jetbrains.kotlin.completion.util.testCompletion
|
||||
import org.jetbrains.kotlin.idea.project.TargetPlatform
|
||||
import org.jetbrains.kotlin.completion
|
||||
import org.jetbrains.kotlin.completion.util.testCompletion
|
||||
import java.io.File
|
||||
|
||||
public abstract class AbstractAndroidCompletionTest : KotlinAndroidTestCase() {
|
||||
private var kotlinInternalModeOriginalValue: Boolean = false
|
||||
+5
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2015 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.
|
||||
@@ -14,12 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.android
|
||||
package org.jetbrains.kotlin.android
|
||||
|
||||
import kotlin.test.assertTrue
|
||||
import com.intellij.codeInsight.TargetElementUtilBase
|
||||
import com.intellij.codeInsight.navigation.actions.GotoDeclarationAction
|
||||
import kotlin.test.assertNotNull
|
||||
|
||||
public abstract class AbstractAndroidFindUsagesTest : KotlinAndroidTestCase() {
|
||||
|
||||
@@ -33,10 +30,10 @@ public abstract class AbstractAndroidFindUsagesTest : KotlinAndroidTestCase() {
|
||||
|
||||
val targetElement = TargetElementUtilBase.findTargetElement(f.getEditor(), TargetElementUtilBase.ELEMENT_NAME_ACCEPTED or TargetElementUtilBase.REFERENCED_ELEMENT_ACCEPTED)
|
||||
|
||||
assertNotNull(targetElement)
|
||||
kotlin.test.assertNotNull(targetElement)
|
||||
|
||||
val propUsages = f.findUsages(targetElement)
|
||||
|
||||
assertTrue(propUsages.notEmpty)
|
||||
kotlin.test.assertTrue(propUsages.notEmpty)
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-10
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2015 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.
|
||||
@@ -14,14 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.android
|
||||
package org.jetbrains.kotlin.android
|
||||
|
||||
import com.intellij.openapi.application.PathManager
|
||||
import com.android.SdkConstants
|
||||
import com.intellij.codeInsight.navigation.actions.GotoDeclarationAction
|
||||
import kotlin.test.fail
|
||||
import kotlin.test.assertEquals
|
||||
import org.jetbrains.kotlin.psi.JetProperty
|
||||
import com.intellij.codeInsight.navigation.actions.GotoDeclarationAction
|
||||
|
||||
public abstract class AbstractAndroidGotoTest : KotlinAndroidTestCase() {
|
||||
|
||||
@@ -36,8 +32,8 @@ public abstract class AbstractAndroidGotoTest : KotlinAndroidTestCase() {
|
||||
f.configureFromExistingVirtualFile(virtualFile)
|
||||
|
||||
val resolved = GotoDeclarationAction.findTargetElement(f.getProject(), f.getEditor(), f.getCaretOffset())
|
||||
if (f.getElementAtCaret() !is JetProperty) fail("element at caret must be a property, not a ${f.getElementAtCaret().javaClass}")
|
||||
assertEquals("\"@+id/${(f.getElementAtCaret() as JetProperty).getName()}\"", resolved?.getText())
|
||||
if (f.getElementAtCaret() !is JetProperty) kotlin.test.fail("element at caret must be a property, not a ${f.getElementAtCaret().javaClass}")
|
||||
kotlin.test.assertEquals("\"@+id/${(f.getElementAtCaret() as JetProperty).getName()}\"", resolved?.getText())
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
-9
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2015 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.
|
||||
@@ -14,18 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.android
|
||||
package org.jetbrains.kotlin.android
|
||||
|
||||
import com.intellij.openapi.command.WriteCommandAction
|
||||
import org.jetbrains.kotlin.psi.JetProperty
|
||||
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil
|
||||
import com.intellij.codeInsight.TargetElementUtilBase
|
||||
import com.intellij.refactoring.rename.RenamePsiElementProcessor
|
||||
import com.intellij.refactoring.rename.RenameProcessor
|
||||
import com.intellij.codeInsight.navigation.actions.GotoDeclarationAction
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertTrue
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.psi.JetProperty
|
||||
import kotlin.test.*
|
||||
|
||||
public abstract class AbstractAndroidRenameTest : KotlinAndroidTestCase() {
|
||||
|
||||
@@ -61,4 +57,4 @@ public abstract class AbstractAndroidRenameTest : KotlinAndroidTestCase() {
|
||||
}
|
||||
|
||||
override fun getTestDataPath() = KotlinAndroidTestCaseBase.getPluginTestDataPathBase() + "/rename/" + getTestName(true) + "/"
|
||||
}
|
||||
}
|
||||
+8
-9
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2015 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.
|
||||
@@ -14,19 +14,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.android
|
||||
package org.jetbrains.kotlin.android
|
||||
|
||||
import org.jetbrains.jet.lang.resolve.android.CliAndroidUIXmlProcessor
|
||||
import org.jetbrains.jet.plugin.android.IDEAndroidUIXmlProcessor
|
||||
import kotlin.test.assertEquals
|
||||
import org.jetbrains.jet.plugin.android.TestConst
|
||||
import org.jetbrains.kotlin.android.AndroidConfigurationKeys
|
||||
import com.intellij.openapi.module.ModuleManager
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.JetCoreEnvironment
|
||||
import org.jetbrains.kotlin.test.JetTestUtils
|
||||
import org.jetbrains.kotlin.plugin.android.TestConst
|
||||
import org.jetbrains.kotlin.lang.resolve.android.CliAndroidUIXmlProcessor
|
||||
import com.intellij.openapi.module.ModuleManager
|
||||
import org.jetbrains.kotlin.plugin.android.IDEAndroidUIXmlProcessor
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind
|
||||
import org.jetbrains.kotlin.test.TestJdkKind
|
||||
import org.jetbrains.kotlin.test.JetTestUtils
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
public abstract class AbstractParserResultEqualityTest : KotlinAndroidTestCase() {
|
||||
public fun doTest(path: String) {
|
||||
+4
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2015 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.
|
||||
@@ -14,9 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.android;
|
||||
package org.jetbrains.kotlin.android;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.InnerTestClasses;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
@@ -25,7 +26,7 @@ import org.junit.runner.RunWith;
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/android-idea-plugin/testData/android/completion")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
+4
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2015 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.
|
||||
@@ -14,9 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.android;
|
||||
package org.jetbrains.kotlin.android;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.InnerTestClasses;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
@@ -25,7 +26,7 @@ import org.junit.runner.RunWith;
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/android-idea-plugin/testData/android/findUsages")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
+4
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2015 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.
|
||||
@@ -14,9 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.android;
|
||||
package org.jetbrains.kotlin.android;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.InnerTestClasses;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
@@ -25,7 +26,7 @@ import org.junit.runner.RunWith;
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/android-idea-plugin/testData/android/goto")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
+4
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2015 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.
|
||||
@@ -14,9 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.android;
|
||||
package org.jetbrains.kotlin.android;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.InnerTestClasses;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
@@ -25,7 +26,7 @@ import org.junit.runner.RunWith;
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/android-idea-plugin/testData/android/rename")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
+2
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.android;
|
||||
package org.jetbrains.kotlin.android;
|
||||
|
||||
import com.android.SdkConstants;
|
||||
import com.android.ide.common.rendering.RenderSecurityManager;
|
||||
@@ -46,6 +46,7 @@ import com.intellij.testFramework.fixtures.impl.GlobalInspectionContextForTests;
|
||||
import org.jetbrains.android.facet.AndroidFacet;
|
||||
import org.jetbrains.android.facet.AndroidRootUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.android.KotlinAndroidTestCaseBase;
|
||||
import org.jetbrains.kotlin.idea.actions.internal.KotlinInternalMode;
|
||||
import org.jetbrains.kotlin.idea.references.BuiltInsReferenceResolver;
|
||||
import org.jetbrains.kotlin.psi.JetFile;
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jetbrains.jet.android;
|
||||
package org.jetbrains.kotlin.android;
|
||||
|
||||
import com.android.sdklib.IAndroidTarget;
|
||||
import com.android.tools.idea.rendering.ResourceHelper;
|
||||
+4
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
* Copyright 2010-2015 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.
|
||||
@@ -14,9 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.android;
|
||||
package org.jetbrains.kotlin.android;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.InnerTestClasses;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
@@ -25,7 +26,7 @@ import org.junit.runner.RunWith;
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("plugins/android-idea-plugin/testData/android/parserResultEquality")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
Reference in New Issue
Block a user