diff --git a/annotations/com/intellij/ide/annotations.xml b/annotations/com/intellij/ide/annotations.xml
new file mode 100644
index 00000000000..e94fa17f59d
--- /dev/null
+++ b/annotations/com/intellij/ide/annotations.xml
@@ -0,0 +1,5 @@
+
+ -
+
+
+
\ No newline at end of file
diff --git a/annotations/com/intellij/testFramework/fixtures/annotations.xml b/annotations/com/intellij/testFramework/fixtures/annotations.xml
index b8f79647ddc..79625be7be6 100644
--- a/annotations/com/intellij/testFramework/fixtures/annotations.xml
+++ b/annotations/com/intellij/testFramework/fixtures/annotations.xml
@@ -1,4 +1,7 @@
+ -
+
+
-
@@ -11,7 +14,13 @@
-
+ -
+
+
-
+ -
+
+
\ No newline at end of file
diff --git a/idea/tests/org/jetbrains/jet/plugin/refactoring/introduce/introduceVariable/AbstractJetExtractionTest.java b/idea/tests/org/jetbrains/jet/plugin/refactoring/introduce/introduceVariable/AbstractJetExtractionTest.java
deleted file mode 100644
index 68be187088d..00000000000
--- a/idea/tests/org/jetbrains/jet/plugin/refactoring/introduce/introduceVariable/AbstractJetExtractionTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2010-2013 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.introduce.introduceVariable;
-
-import com.intellij.ide.DataManager;
-import com.intellij.psi.PsiElement;
-import com.intellij.refactoring.RefactoringActionHandler;
-import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.jet.JetTestCaseBuilder;
-import org.jetbrains.jet.lang.psi.JetFile;
-import org.jetbrains.jet.lexer.JetTokens;
-import org.jetbrains.jet.plugin.refactoring.extractFunction.ExtractKotlinFunctionHandler;
-
-import java.io.File;
-
-public abstract class AbstractJetExtractionTest extends LightCodeInsightFixtureTestCase {
- protected void doIntroduceVariableTest(@NotNull String path) {
- doTest(path, new KotlinIntroduceVariableHandler());
- }
-
- protected void doTest(@NotNull String path, @NotNull RefactoringActionHandler handler) {
- File mainFile = new File(path);
-
- myFixture.setTestDataPath(JetTestCaseBuilder.getHomeDirectory() + "/" + mainFile.getParent());
-
- JetFile file = (JetFile) myFixture.configureByFile(mainFile.getName());
-
- PsiElement lastChild = file.getLastChild();
- assert lastChild != null;
-
- String expectedResultText = null;
- if (lastChild.getNode().getElementType().equals(JetTokens.BLOCK_COMMENT)) {
- String lastChildText = lastChild.getText();
- expectedResultText = lastChildText.substring(2, lastChildText.length() - 2).trim();
- }
- else if (lastChild.getNode().getElementType().equals(JetTokens.EOL_COMMENT)) {
- expectedResultText = lastChild.getText().substring(2).trim();
- }
- assert expectedResultText != null;
-
- handler.invoke(
- getProject(), myFixture.getEditor(), file, DataManager.getInstance().getDataContext(myFixture.getEditor().getComponent())
- );
-
- int endOffset = file.getLastChild().getTextRange().getStartOffset();
- assertEquals(expectedResultText, file.getText().substring(0, endOffset).trim());
- }
-}
diff --git a/idea/tests/org/jetbrains/jet/plugin/refactoring/introduce/introduceVariable/AbstractJetExtractionTest.kt b/idea/tests/org/jetbrains/jet/plugin/refactoring/introduce/introduceVariable/AbstractJetExtractionTest.kt
new file mode 100644
index 00000000000..cc45ce281ee
--- /dev/null
+++ b/idea/tests/org/jetbrains/jet/plugin/refactoring/introduce/introduceVariable/AbstractJetExtractionTest.kt
@@ -0,0 +1,67 @@
+/*
+ * 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.introduce.introduceVariable
+
+import com.intellij.ide.DataManager
+import com.intellij.psi.PsiElement
+import com.intellij.refactoring.RefactoringActionHandler
+import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
+import org.jetbrains.jet.JetTestCaseBuilder
+import org.jetbrains.jet.lang.psi.JetFile
+import org.jetbrains.jet.lexer.JetTokens
+import org.jetbrains.jet.plugin.refactoring.extractFunction.ExtractKotlinFunctionHandler
+import java.io.File
+import junit.framework.TestCase
+import kotlin.test.assertEquals
+
+public abstract class AbstractJetExtractionTest() : LightCodeInsightFixtureTestCase() {
+ protected fun doIntroduceVariableTest(path: String) {
+ doTest(path, KotlinIntroduceVariableHandler())
+ }
+
+ protected fun doTest(path: String, handler: RefactoringActionHandler) {
+ val mainFile = File(path)
+
+ myFixture.setTestDataPath("${JetTestCaseBuilder.getHomeDirectory()}/${mainFile.getParent()}")
+
+ val file = myFixture.configureByFile(mainFile.getName()) as JetFile
+
+ val lastChild = file.getLastChild()
+ assert(lastChild != null)
+
+ val expectedResultText =
+ when (lastChild!!.getNode()!!.getElementType()) {
+ JetTokens.BLOCK_COMMENT -> {
+ val lastChildText = lastChild.getText()
+ lastChildText!!.substring(2, lastChildText.length() - 2).trim()
+ }
+
+ JetTokens.EOL_COMMENT -> {
+ lastChild.getText()!!.substring(2).trim()
+ }
+
+ else -> null
+ }
+ assert(expectedResultText != null)
+
+ handler.invoke(
+ getProject(), myFixture.getEditor(), file, DataManager.getInstance().getDataContext(myFixture.getEditor().getComponent()))
+
+ val endOffset = file.getLastChild()!!.getTextRange()!!.getStartOffset()
+ assertEquals(expectedResultText, file.getText()!!.substring(0, endOffset).trim())
+ }
+}